Step-by-Step: Adding Hyper-V Integration Components to Windows PE using WAIK 2.0 Tools

For those that have been using Windows Automated Installation Kit (WAIK) 2.0 released recently (download link here) or using Microsoft Deployment Toolkit 2010 Beta 1, that works only with WAIK 2.0 (check these articles of mine about MDT 2010: Post I, Post II and Post III); maybe you’ve noticed that the management tools that were included with WAIK 1.1 (and 1.0) disappeared in this new version.

These tools were consolidated by one command-line: DISM.exe (more info on Post I about MDT 2010). Meaning that the Windows PE management (like customizing, adding drivers or inserting Hyper-V integration components to those images) that you executed on previous versions of WAIK, has significant changes.

On this post we’ll be reviewing how to add the Hyper-V Integration Components to a Windows Preinstallation Environment (Windows PE) image, including the new Windows PE 3.0.

Why should I need to add the Hyper-V Integration Components to Windows PE?

The Integration Components of Hyper-V are a set of drivers that are a significant performance change that you can apply to virtual machines for them to be able to install synthetic devices instead of emulated devices.

Some of the drivers that are installed using the Integration Components are: Video driver, network driver (with this you avoid using Hyper-V’s Legacy Network adapter), storage driver, VMBUS (transport for synthetic devices), time sync (time synchronization with the host), etc.

Adding Hyper-V Integration Components 

As I mentioned before, I prepared a set of MDT 2010 posts about LTI deployments with Windows 7, so I’m going to take the LiteTouch PE image created on that deployment instead of a common Windows PE image (boot.wim). But again, this process will work the same as using a Windows PE raw image.

Since I have already a LiteTouch image added to my Windows Deployment Services (WDS) as a boot image, I’m going to export it, mount the image to be able to apply all changes there, and then import it again to WDS.

1. Mounting Boot Image

1.1. Open the Windows Deployment Services Console and Export the image.

1.2. I’m going to place it on C:\Temp.

1.3. Create the folder where you are going to mount it. In my case C:\Temp\mount.

1.4. Run “cmd” as Administrator, place it in “cd C:\Program Files\Windows AIK\Tools\Servicing”.

1.5. Mount the image using this command line:
Dism.exe /mount-wim /wimfile:”C:\Temp\Lite Touch Windows PE.WIM” /index:1 /mountdir:”C:\Temp\mount

/index:1 states that you want to use the first image inside the WIM file. A WIM file for operating systems, like Windows 7 for example, contain several images: Ultimate, Enterprise, Starter, etc.

2. Uncompressing Drivers from Integration Components

Now that the image is mounted and ready to be modified, we are going to uncompress the files we need from the Hyper-V Integration Components.

2.1. Since I’m using a virtual machine, I’m going to attach the Integration Components media and extract the files from there.

2.2. From the media of the IC, copy this two files to a local folder:

D:\support\amd64\Windows6.0-KB951634-x64.msu
D:\support\x86\Windows6.0-KB951634-x86.msu

We are going to use the Expand command line to extract the drivers within those updates. Place the cmd window in C:\Windows\System32\ and create a folder to store this temporary files. C:\Temp\source

2.3. Insert:
expand.exe –F:* “C:\Temp\Windows6.0-KB951634-x64.msu” “C:\Temp\source”.

Repeat the step for the x86 update.

Now we are going to also extract the drivers included in the .CAB files that we took from the MSU file.

2.4 Create another temporary folder for these drivers. C:\Temp\source\drivers.

2.5. Insert:
expand.exe -F:* "C:\Temp\source\Windows6.0-KB951634-x64.cab" "C:\Temp\source\drivers"
.

Inside C:\Temp\source\drivers are all the files we need to insert x64 environments. You can repeat the step 2.5 using the x86 update.

3. Injecting the drivers

You will notice that hundreds of files have been uncompressed, but we are not going to add them all, we are just going to inject the ones that we need.

Here are all the necessary drivers and the command lines to execute:

dism /image:"C:\Temp\mount" /add-driver  /driver:"C:\Temp\source\drivers\amd64_wnetvsc.inf_31bf3856ad364e35_6.0.6001.18016_none_b337f91d87dbf1d0\wnetvsc.inf"

dism /image:"C:\Temp\mount" /add-driver /driver:"C:\Temp\source\drivers\amd64_ws3cap.inf_31bf3856ad364e35_6.0.6001.18016_none_f2e1ba67fcb48f61\ws3cap.inf" /forceunsigned

dism /image:"C:\Temp\mount" /add-driver /driver:"C:\Temp\source\drivers\amd64_wstorflt.inf_31bf3856ad364e35_6.0.6001.18016_none_1cadbbeed0ad55a3\wstorflt.inf" /forceunsigned

dism /image:"C:\Temp\mount" /add-driver /driver:"C:\Temp\source\drivers\amd64_wstorvsc.inf_31bf3856ad364e35_6.0.6001.18016_none_836399a4204c4863\wstorvsc.inf" /forceunsigned

dism /image:"C:\Temp\mount" /add-driver /driver:"C:\Temp\source\drivers\amd64_wvmbus.inf_31bf3856ad364e35_6.0.6001.18016_none_959a72f36267838a
\wvmbus.inf" /forceunsigned

dism /image:"C:\Temp\mount" /add-driver /driver:"C:\Temp\source\drivers\amd64_wvmbushid.inf_31bf3856ad364e35_6.0.6001.18016_none_4ccff81064c7c78f
\wvmbushid.inf" /forceunsigned

dism /image:"C:\Temp\mount" /add-driver /driver:"C:\Temp\source\drivers\amd64_wvmic.inf_31bf3856ad364e35_6.0.6001.18016_none_5dfb8c2804cc9e9a
\wvmic.inf" /forceunsigned

 

Injecting drivers

Note that on most of them, the /forceunsigned parameter was necessary. If you don’t use it, this error will appear: “Error 50 The request is not supported

4. Committing and Unmounting the Boot Image

Now we have are image ready to use it, so we are going to commit the changes and unmount it.

4.1. From cmd:
Dism /unmount-wim /Mountdir:"C:\Temp\mount" /commit

5. Deploying the Image

On C:\Temp you’ll find the WIM file modified and ready to be added to WDS.

5.1. Open the WDS Console, select “Add Boot Image” and complete the wizard.

On the new boot image, I’m adding the Integration Components description

5.2. Boot the new virtual machine from the network and select the image you just added.

And the new virtual machine should be fully functional with the Hyper-V Integration Components included.

How you can you test it? In my case, I’m connecting with RDP to the Hyper-V host and the mouse from inside the virtual machine is working perfectly; if the IC components are not present a message will appear saying that the “Mouse session could not be captured”.

Adding Drivers Using WAIK 1.1 Tools

If you were wondering how to execute the procedure using the WAIK 1.0 or 1.1 tools, here it is:

1. Mount the WIM file using imagex tool:
imagex /mountrw “C:\Temp\Lite Touch Windows PE.WIM” 2 “C:\Temp\mount”

2. Inject drivers using peimg tool:
peimg /inf=C:\Temp\source\drivers\*.inf /image=”C:\Temp\mount”

*.inf is representing all the previous drivers that we added above. Repeat the command line for each file.

3. Commit changes:
imagex /unmount /commit C:\Temp\mount

4. Add the new “Lite Touch Windows PE.WIM” on WDS as a “Boot Image

Enjoy!

Cheers!

10 Comments »

  1. I am using w2008 R2 and am not seeing the Windows6.0-KB951634-x64.msu file in the vmguest.iso. They appear to be updated with Kb9432295-x64-enu.exe. Any updates on this article would be much appreciated. I am going to expand the exe and see what I can get figured out.

  2. Hello James,
    I haven’t tested this procedure using Windows Server 2008 R2, but I’m certain that you are correct on that one.
    Execute the same steps replacing the .msu and tell us how was it :)
    Cheers
    Augusto

  3. @James,

    There’s no need to do this anymore with R2 / Windows 7. Replace the boot image on your WDS server and you’re good to go, the integration components are included in the standard PE.

    Cheers!

    Jeroen.

  4. I tried this and this works fine for any Winpe or WDS Boot.wim image. But I tried to add the Integrations Service Drivers to a boot.wim image of an Vista-Installation DVD, but the drivers are not loaded by installing an vista-vm on Hyper-V. Do you guess why?

    Christoph

  5. Augusto- Is the DISM tool fully backward compatible? Do you recommend also having copies of the older tools in your WinPE toolkit? /Cheers, MCSE

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s