Hyper-V Generation 2 Virtual Machines - Part 4
Hyper-V Generation 2 Virtual Machines - Part 4
Hyper-V Generation 2 Virtual Machines - Part 4
20
Once installed, start an elevated Deployment and Imaging Tools Environment command prompt.
While its installing, grab an ISO of Windows 8 or Windows Server 2012 and copy it locally to the machine where the ADK is
installed. For this walkthrough, Im using an en_us Windows 8 RTM ISO although the language should be irrelevant. Thinking
about it, I should have grabbed the en_gb ISO as I still get frustrated continually seeing Favourites misspelt!
The next think you need is the CAB file which contains the Integration Service .CAB file for Windows 8.1. It is important to use the
.CAB file from the final RTM build of Windows 8.1, not the version from Windows 8.1 preview to avoid driver signing issues and a
conflict with the Secure Boot feature of generation 2 virtual machines. The CAB file can be found under
\Windows\vmguest\support\amd64, named Windows6.2HyperVIntegrationServicesx64.cab. Copy it to a working directory
where the .ISO being modified is located.
Now you need to mount the .ISO as a local drive letter to extract the contents which you are soon going to be modifying. You can
mount it by simply typing the name of the .ISO file at the command prompt, or using Windows File Explorer. Simply copy the
contents, including subdirectories to a temporary directory. In my case, Im using c:\working\extract. After copying, you can
unmount the ISO from explorer by right clicking on the drive and selecting Eject.
Next job is to examine the Windows PE boot WIM image which will be in the sources subdirectory where you just extracted the
.ISO contents. Use dism /getimageinfo to do this. There is a little gotcha here, you need to use DISM from the ADK, not the one
built into Windows to avoid Error: 87 as shown below.
The output shows there are two images in the WIM file, both of which we are going to update. Using another temporary empty
directory, in my case, c:\mount, mount one of the images in the above WIM. Again, using dism, we are going to use the /mount
image parameter. Note the use of the /index: parameter too to match each of the images in the WIM per the above screenshot.
Next we need to add the softwarebased keyboard driver from the CAB file we copied earlier. As the HyperV Integration Services
are catalog signed, it is necessary to apply the complete package of the integration services rather than the single keyboard
driver. This is done using the /addpackage parameter to dism.
And finally, for this image, unmount it, remembering to commit the changes. This is done using dism with the /unmountimage
and /commit parameters.
Mounting the first and only image in WinRE.wim to a second mount temporary directory c:\mount2
And now unmounting the Windows 8 image itself from c:\mount committing the contents.
u2
udfver102
bootdata:2
#p0,e,b<Path>\etfsboot.com
#pEF,e,b<Path>efisys.bin
<Source Directory>
<Target>
Note that using just etfsboot.com is not sufficient as this only puts a boot loader suitable for BIOS/PCAT based machines onto the
ISO. More information can be found at http://support.microsoft.com/kb/947024. This KB applies for Windows Server 2008, but
can be used for Windows Server 2012/Windows 8 as well.
Using our previous working directories, heres an example.
Phew! Lets try it out in a new generation 2 virtual machine attaching and installing from the patched ISO.
Of course, you can also use the patched boot.wim file for use on a WDS server. However, I would recommend instead you put the
Windows 8.1 PE and boot.wim on the WDS server instead as these contain the software keyboard driver already.
In the next part, Ill talk about debugging as it relates to generation 2 virtual machines.
Cheers,
John.
Comments
affordable web designers 5 Nov 2013 5:53 AM