Jump to content

Autounattend on Virtual Box


Recommended Posts

Hi All,

Not used the WSIM before and have been following some videos on how to create a unattended Windows 7 install from a website http://www.professormesser.com/

The chap on this website seems to be able to use the WSIM to create a autounattend.xml file and then install it on the VM machine using Oracle Vritualbox (I want to install the Windows activation key at a later date)

I can't get this to work on the VM, I tested it on a actual laptop and the install started, but using the VM machine I get the following error message:

"Windows cannot locate the disk and partition specified in the unattend answer file's <ImageInstall>setting. Make sure the setting references a valid partition and restart the application"

So obviously the way the autounattend is setup missing something in terms of the disk partition but I'm not sure what? The laptop I started the install on successfully has just the C drive partition so I'm a bit confused.

Here is the contents of my autounattend file that this site claims contains the minimum about of info need to create a Windows install:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<UILanguage>en-US</UILanguage>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<ProductKey>
<Key></Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>
<ImageInstall>
<OSImage>
<InstallToAvailablePartition>true</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
</component>
</settings>
<cpi:offlineImage cpi:source="catalog://edward/cusers/edward mallett/wims/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

If anyone has any ideas as to why this isn't working I would be very grateful.

Many thanks.

Link to comment
Share on other sites


I was wondering about that. I use that object but never by itself like that. I looked in others example XMLs they've posted and its been by itself, so I presume that it should work that way. I always accompany it with the create the partitions for the System Reserved and OS volume.

Link to comment
Share on other sites

  • 2 months later...

same video, same virtual box, same os, same problem, i may have to agree with tripredacus after maintenancing my answer file a few times and getting an xml message in the wsim stating ( the catalog file associated with the windows image windows 7 enterprise (catalog) is out of date ). the funny thing is that the answer file and disk work out fine on vmware at school. or may be that message could just mean that everybody in the school has wore out the disk. any comments???

**update** - secondly, virtual box has recently recieved many various updated versions, drivers, service packs, patches, etc. due to this fact, i strongly believe that all the recent revisions to virtual box is causing certain wim files to become outdated. just think about it, the same simple answer file works fine in vm ware.

Edited by willharr
Link to comment
Share on other sites

same video, same virtual box, same os, same problem, i may have to agree with tripredacus after maintenancing my answer file a few times and getting an xml message in the wsim stating ( the catalog file associated with the windows image windows 7 enterprise (catalog) is out of date ). the funny thing is that the answer file and disk work out fine on vmware at school. or may be that message could just mean that everybody in the school has wore out the disk. any comments???

**update** - secondly, virtual box has recently recieved many various updated versions, drivers, service packs, patches, etc. due to this fact, i strongly believe that all the recent revisions to virtual box is causing certain wim files to become outdated. just think about it, the same simple answer file works fine in vm ware.

The catalogue file that WSIM verifies when you use Waik is not necessary to be updated nor changed for windows to install successfully! Sure it may need updating or error using WSIM but won't affect an install on a Virtual machine.

Link to comment
Share on other sites

"Windows cannot locate the disk and partition specified in the unattend answer file's <ImageInstall>setting. Make sure the setting references a valid partition and restart the application"

<ImageInstall>

<OSImage>

<InstallToAvailablePartition>true</InstallToAvailablePartition>

It's not an error with the VM Oracle but the file isn't correct!

Use intead:

<InstallToAvailablePartition>false</InstallToAvailablePartition>

However if you want an fully unattended file, you must add more values, like (example for 64 bits OS):


<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="[url="http://schemas.microsoft.com/WMIConfig/2002/State"]http://schemas.microsoft.com/WMIConfig/2002/State[/url]" xmlns:xsi="[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]">
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>100</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>System</Label>
<Format>NTFS</Format>
<Active>true</Active>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Letter>C</Letter>
<Label>Win7</Label>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
</OSImage>
</ImageInstall>
<UserData>
<AcceptEula>true</AcceptEula>
<ProductKey>
<!-- Default key is needed for silent install (or a valid key) -->
<!-- Example using Default key for Windows 7 HOMEPREMIUM -->
<Key>RHPQ2-RMFJH-74XYM-BH4JX-XM76F</Key>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
</UserData>
</component>

You can find help here:

http://www.msfn.org/board/topic/139572-ask-your-seven-xml-here/

Cheers

Edited by myselfidem
Link to comment
Share on other sites

same video, same virtual box, same os, same problem, i may have to agree with tripredacus after maintenancing my answer file a few times and getting an xml message in the wsim stating ( the catalog file associated with the windows image windows 7 enterprise (catalog) is out of date ). the funny thing is that the answer file and disk work out fine on vmware at school. or may be that message could just mean that everybody in the school has wore out the disk. any comments???

**update** - secondly, virtual box has recently recieved many various updated versions, drivers, service packs, patches, etc. due to this fact, i strongly believe that all the recent revisions to virtual box is causing certain wim files to become outdated. just think about it, the same simple answer file works fine in vm ware.

fellas, fellas, fellas, take your answer file and juice it up anyway that you like. it will not work properly in virtual box. i will assure you. the reason for this i'm not quite sure. however i've had much success in vmware with just a basic configuration answer file.

Edited by willharr
Link to comment
Share on other sites

fellas, fellas, fellas, take your answer file and juice it up anyway that you like. it will not work properly in virtual box. i will assure you. the reason for this i'm not quite sure. however i've had much success in vmware with just a basic configuration answer file.

Try your Autounattend.xml file on your Computer, and not on a WM, and let us know the result!

Cheers

Link to comment
Share on other sites

I've not used this, but maybe <InstallToAvailablePartition>true expects a partition rather than a blank disk?

along these lines:

did you format the VHD first? We have only had issues when it is a "bare metal" disk (as is the behavior of a newly snapped in .vhd), adding a simple format command (or diskpart directives) to startnet.cmd remedied virtual disk issues for us.

Link to comment
Share on other sites

  • 3 months later...

I install Windows from the Dell KACE K2000 appliance, which relies on an answer file to perform an unattended installation. I got the same error message you did, but found a workaround. The solution for me was to go into the Virtual Machine Settings -> Storage, remove the SATA virtual disk, and add an IDE virtual disk. Works flawlessly after that. Good luck.

(I know this topic is old, but figured someone might benefit from my response)

Edited by Sw0rdfish
Link to comment
Share on other sites

  • 3 months later...

Here It Is Y'all, It's On And Popping Out Da Virtual Box Fresh For The New Year 2013.

First Make Sure That Your Flash Drive Is Bootable By:

[*]Opening CMD as Admin

[*]Running Diskpart

[*]List Disk

[*]Select Flash Drive Letter

[*]Clean

[*]Create Partition Primary

[*]Select Partition 1

[*]Active

[*]Format fs=NTFS

[*]Assign

[*]Exit Diskpart But Keep CMD Open

[*]Insert Your Windows 7 DVD Into The Optical Drive

[*]Type ----> D: CD Boot and Press Enter (Type D Or Whatever Letter Your Optical Drive Is)

[*]Type ----------> CD Boot -------> Example - D:\>CD Boot

[*]Then Type The Command bootsect /nt60 (Flash Drive Letter)E: ----------------> Example - D:\Boot>BOOTSECT /NT60 E:

Now The Flash Drive Is Bootable "I Thought I Heard The Funny Looking Guy Say That". Make Sure That You Have Installed All Of The Drivers And Patche's N Thang's For Virtual Box "They Really Come In Handy". Make Sure That You Configure The Proper USB Settings For Virtual Box. Also Make Sure That Virtual Box Is Set To Detect The USB Flash Drive As Soon As The Guest Starts Up. Also, Make Sure That Your Answer File Is Configured For The Correct Bios Settings ----->Check This Out -------------------------------> http://technet.microsoft.com/en-us/library/dd744509(v=ws.10).aspx

Now, Let's Get Started With This Answer File Business. First We Want To Make Sure That We've Got A Nice Clean Install.wim. The Next Part Is The Tricky Part. People Always Say That The Basic Configuration Answer File Will Do The Trick, Well That's Not The Case In The Mysterious Virtual Box Scenario. Windows Itself Acts Funny Sometimes And Won't Let You Install The OS On An Unpartitioned Drive, So, I Had A Funny Feeling That Maybe Virtual Box Was Shedding Light On The Darker Side Of Windows, And Then, Configured My Answer File To Partition The Virtual Box Drive For The Installation. Under Image Install/OS Install I Configured Install To Disk ID [0], Partition ID [1], And Install To Available Partition [False] (Most Of The Time Setting This Configuration To [True] Is Perfect But Not Tonight). "Tricky Part" Then I Configured Disk Configuration/Disk WCM:Action=[Modify] (The Reason Why I Say This Part Is Tricky Is Because Sometimes Windows Itself Has Mood Swings And Wont Let You Install The OS On An Unpartitioned Disk And It Could Be True That Virtual Box Exposes This Side Of Windows Since I've Configured The Disk Configuration/Disk WCM:Action Pass To [Modify] And Found Complete Closure To This Particular Issue. During The Previous Months I Had Found Myself Setting This Pass To [add]. The Trick Is You May Never Find Out Whats Going On If You Dont Understand Whats Going On). Next I Configured Create Partition WCM:Action=[Add], Type=Primary, Order=1, And Disk ID=0. Now The Answer File Is Configured To Modify The Drive By Applying A Partition To Install The OS On.

Works Like A Charm, Time To Go To Sleep. Take A Look At My Answer File For Specific Details.

<?xml version="1.0" encoding="UTF-8"?>

-<unattend xmlns="urn:schemas-microsoft-com:unattend">

-<settings pass="windowsPE">

-<component language="neutral" xmlns:xsi="http://www.w3.org/2001/XMLSchema-

instance" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"

versionScope="nonSxS" publicKeyToken="31bf3856ad364e35" processorArchitecture="x86"

name="Microsoft-Windows-International-Core-WinPE">

-<SetupUILanguage>

<UILanguage>en-us</UILanguage>

</SetupUILanguage>

<UserLocale>en-us</UserLocale>

<UILanguage>en-us</UILanguage>

<SystemLocale>en-us</SystemLocale>

<InputLocale>en-us</InputLocale>

</component>

-<component language="neutral" xmlns:xsi="http://www.w3.org/2001/XMLSchema-

instance" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"

versionScope="nonSxS" publicKeyToken="31bf3856ad364e35" processorArchitecture="x86"

name="Microsoft-Windows-Setup">

-<UserData>

<AcceptEula>true</AcceptEula>

<FullName>will</FullName>

</UserData>

-<ImageInstall>

-<OSImage>

-<InstallTo>

<DiskID>0</DiskID>

<PartitionID>1</PartitionID>

</InstallTo>

<InstallToAvailablePartition>false</InstallToAvailablePartition>

<WillShowUI>OnError</WillShowUI>

</OSImage>

</ImageInstall>

-<DiskConfiguration>

-<Disk wcm:action="modify">

-<CreatePartitions>

-<CreatePartition wcm:action="add">

<Type>Primary</Type>

<Size>7000</Size>

<Order>1</Order>

</CreatePartition>

</CreatePartitions>

<DiskID>0</DiskID>

<WillWipeDisk>true</WillWipeDisk>

</Disk>

<WillShowUI>OnError</WillShowUI>

</DiskConfiguration>

<Restart>Restart</Restart>

<EnableNetwork>true</EnableNetwork> <EnableFirewall>true</EnableFirewall>

</component>

</settings>

-<settings pass="oobeSystem">

-<component language="neutral" xmlns:xsi="http://www.w3.org/2001/XMLSchema-

instance" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"

versionScope="nonSxS" publicKeyToken="31bf3856ad364e35" processorArchitecture="x86"

name="Microsoft-Windows-Shell-Setup">

-<UserAccounts>

-<LocalAccounts>

-<LocalAccount wcm:action="add">

<Name>will</Name>

<DisplayName>will</DisplayName>

</LocalAccount>

</LocalAccounts>

</UserAccounts>

<BluetoothTaskbarIconEnabled>true</BluetoothTaskbarIconEnabled>

<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>

<DoNotCleanTaskBar>true</DoNotCleanTaskBar>

<TimeZone>central</TimeZone>

</component>

</settings>

<cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi"

cpi:source="wim:c:/flashfiles/sources/install.wim#Windows 7 ENTERPRISE"/>

</unattend>

It's Been Great; Now Give Me My 5 Thousand Dollars!! Thank You,

WillHarr

MCTS Configuring Windows Server 2008 Active Directory

Edited by willharr
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...