Unattended Windows 2008 R2 installation on qemu-kvm using virtio

UPDATE: Fedora now provide signed drivers here: (windows doesn’t like using unsigned drivers that are critical to the boot process, like disk controllers)

I used this method in addition to the one in to use virtio (viostor+netkvm) using PXE installation, and then to have the drivers (including balloon) inserted into the installation itself.

You’ll need the Red Hat (RHEV) ISO that contains the drivers (in cat/inf/sys format, not the msi format) since they need to be signed to be used properly. I mounted this ISO on G:

Start the Deployment Tools Command Prompt and mount the PXE WIM:

C:datawinpe_amd64>dism /mount-wim /wimfile:winpe.wim /mountdir:mount /index:1

Insert the viostor and netkvm drivers:

C:datawinpe_amd64>dism /image:mount /add-driver /driver:g:netkvm2k8amd64netkvm.inf
C:datawinpe_amd64>dism /image:mount /add-driver /driver:g:viostor2k8amd64viostor.inf

Unmount the WIM:

C:datawinpe_amd64>dism /unmount-wim /mountdir:mount /commit

Copy the netkvm driver files ( netkvm.inf netkvm.sys) and all the balloon files to bootsrv.example.comdatawindowsdrivers There appears to be a problem when the kernel tries to load viostor twice. Possibly the driver is supposed to prevent that action itself, but it doesn’t. In any case the installation crashes out at the point it imports viostor.inf from the 3rd party driver location. The viostor driver is automatically copied from the PXE image, so it’s not required in the 3rd party location.

C:datawinpe_amd64>mkdir bootsrv.example.comdatawindowsdrivers
C:datawinpe_amd64>copy g:balloon2k8amd64*.* bootsrv.example.comdatawindowsdrivers
C:datawinpe_amd64>copy g:netkvm2k8amd64*.* bootsrv.example.comdatawindowsdrivers

Append this to the end of the autounattend.xml file to include the 3rd party driver location: (without this step, the installation will copy the disk driver but not the network driver)

<settings pass="offlineServicing">
<component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="" xmlns:xsi="">
<PathAndCredentials wcm:action="add" wcm:keyValue="1">

The PXE image will now be able to use the virtio network and disk devices, and the machine should boot up after install.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment replies are not available offline