Partager via


Vista Beta 2 and Sysprep: Hey, what the heck happened to the VM Additions?

If anyone has tried syspreping Windows Vista Beta 2 inside a VM, you may have noticed that the VM Additions are still installed but not functional afterwards (this only happens if you use the /generalize switch).  This is because of the way that the new Sysprep Generalization phase works.  The idea here is that the system starts with a totally clean slate, and PnP detects the "best" driver for the hardware all over again. 

For some reason, the drivers included with the Additions are not detected as the "best" fit.  I'm not on the setup team, so I'm not sure why, but that's what seems to be happening. 

There are a few ways to work around this.  The first, and most obvious way, is not to use the /generalize switch on Sysprep.  While this has the pro of not breaking our Additions, there are a lot of cons involved with doing this.  The big one is that the unique information about the system's identity (the system's SID, for example) aren't reset if you don't generalize, which causes a boatload of problems if you want to deploy the VM to multiple people/places. 

The other - and preferred - way to do this is to provide an answer file to Sysprep when you run it.  You'll need to set the PersistAllDeviceInstalls flag to "true" in the "generalize" pass.  Here's a sample unattend file which contains that information:

<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State">
<settings pass="generalize">
<component name="Microsoft-Windows-PnpSysprep" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
</component>
</settings>
</unattend>

Assuming you've named this file sysprep.xml, you'd tell Sysprep to use this as an answer file with the following command:

sysprep /generalize /unattend:sysprep.xml

(of course, you can throw in any other switches that you need, too.)

Comments

  • Anonymous
    June 30, 2006
    The comment has been removed

  • Anonymous
    July 05, 2006
    The comment has been removed

  • Anonymous
    August 02, 2006
    Can you please post a full copy of you Unattend.xml? I am trying to sysprep build 5472 with an unattend.xml file but the Windows system imager manager does not work with this build thus I cannot create an unattend.xml file.   [Actually, the XML in the post should be a complete and valid sysprep.xml example.  The other parts are left out, obviously, because all the example is intended to show is how to tell Sysprep to leave the Additions alone.  There are a lot of other possible settings that could show up in a sysprep.xml file, so I really can't post a comprehensive example here.  - mikekol]

  • Anonymous
    August 18, 2006
    Mikekol, sorry to use this section to ask you what follows.

    As Cokazn, I am looking for a complete sysprep.xml. I understand you can't post it because it is not the subject of this section but can you send me a complete sample to my mailbox or tell me how to create one?

    My email is fabienl@avanade.com

    Thanks
    Fabien [Your best bet is probably to check out the Vista website for deployment information.  http://www.microsoft.com/technet/windowsvista/library/88f80cb7-d44f-47f7-a10d-e23dd53bc3fa.mspx - mikekol]