[Libguestfs] Attempts to install a Windows driver from WinPE

Matthew Booth mbooth at redhat.com
Fri Dec 4 17:12:03 UTC 2009


On 04/12/09 13:38, Matthew Booth wrote:
> An update on this as promised: I have now made it work with Windows 2008
> R2! The short version:
>
> 1. Create a Windows PE image containing VirtIO drivers
>
> * Install WAIK for Windows 7 on your build system
> * Create a stock amd64 Windows PE image
> * Use DISM to mount the image
> * Use DISM to install the amd64 viostor driver for Win2008 in the image
> * Use DISM to unmount the image
> * Copy the image to sources\boot.wim in the ISO tree
> * Copy the complete contents of the virtio driver floppy into ISO tree
> * Create a bootable ISO image from the ISO tree
>
> 2. Use Windows PE image to install driver in guest
>
> * Ensure guest is configured to use VirtIO for storage
> * Add Windows PE image as boot image for guest
> * Boot guest with Windows PE image
> Guest system drive is D:
> Mounted ISO image is E:
> * Run: dism /image:d:\ /add-driver
> /driver:e:\virtio\amd64\win2008\viostor.inf
> * exit
> * Configure guest to boot from HD
>
> The guest will now boot normally using VirtIO.
>
> The biggest gotcha in the above is that if you google 'WAIK' it will
> send you to a download page for Windows Automated Installation Kit.
> Unless you're extremely eagle-eyed (I wasn't) you won't notice that this
> was released in 2007, and it doesn't support Windows 2008 R2. However,
> if you search for WAIK in the search box (not the Bing one, the useful
> one below that), you'll find it.
>
> DISM is new in the latest WAIK. Compared to pkgmgr it's a doddle to
> install a driver as you don't need an obtuse unattend.xml.
>
> I'm about to test the same image against 32bit Windows 2003. I'll report
> back on how that goes.

It looks like DISM only works on Vista and Windows Server 2008+. 
Unfortunately it doesn't work on Windows 2003.

However, just on the way out the door I've come across the 
[SysprepMassStorage] configuration directive in Sysprep.inf, which looks 
interesting. That's one for Monday morning.

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490




More information about the Libguestfs mailing list