Injecting VirtIO drivers into Windows 2012 R2 (wim and ISO)

June 2nd, 2014


Recently I have begun toying around with Openstack and as soon as I got everything working the first thing I wanted to do was create a VM with Windows 2012 R2 on it, just to see if I could get it working.

I quickly realized that Microsoft had opted not to include the VirtIO drivers required for KVM into the Windows 2012 R2 install media.

After searching around and finding several different approaches to resolving this problem (most of which required me to purchase an ISO editor for Windows for some reason) I came up with my own solution that costs nothing and I am happy to share it with you.


  • Install the Microsoft ADK from here:
  • Download the latest VirtIO drivers from here:
  • Extract the VirtIO drivers to a temp folder (all commands will assume c:\tmp\virtio)
  • Extract Windows 2012 R2 ISO to c:\tmp\dist (we will assume that your ISO includes standardcore, datacentercore, standard, and datacenter editions)
  • Open the ‘Deployment and Imaging Tools environment’ as Administrator (this is very important).

#make some temporary folders to hold stuff

mkdir c:\tmp\iso
mkdir c:\tmp\mount

#update the boot images

imagex /mountrw c:\tmp\dist\sources\boot.wim 1 c:\tmp\mount
dism /image:c:\tmp\mount /add-driver /driver:c:\tmp\virtio\WIN8 /Recurse /ForceUnsigned
imagex /unmount /commit c:\tmp\mount

imagex /mountrw c:\tmp\dist\sources\boot.wim 2 c:\tmp\mount
dism /image:c:\tmp\mount /add-driver /driver:c:\tmp\virtio\WIN8 /Recurse /ForceUnsigned
imagex /unmount /commit c:\tmp\mount

#update the install images

imagex /mountrw c:\tmp\dist\sources\install.wim 1 c:\tmp\mount
dism /image:c:\tmp\mount /add-driver /driver:c:\tmp\virtio\WIN8 /Recurse /ForceUnsigned
imagex /unmount /commit c:\tmp\mount

imagex /mountrw c:\tmp\dist\sources\install.wim 2 c:\tmp\mount
dism /image:c:\tmp\mount /add-driver /driver:c:\tmp\virtio\WIN8 /Recurse /ForceUnsigned
imagex /unmount /commit c:\tmp\mount

imagex /mountrw c:\tmp\dist\sources\install.wim 3 c:\tmp\mount
dism /image:c:\tmp\mount /add-driver /driver:c:\tmp\virtio\WIN8 /Recurse /ForceUnsigned
imagex /unmount /commit c:\tmp\mount

imagex /mountrw c:\tmp\dist\sources\install.wim 4 c:\tmp\mount
dism /image:c:\tmp\mount /add-driver /driver:c:\tmp\virtio\WIN8 /Recurse /ForceUnsigned
imagex /unmount /commit c:\tmp\mount

#create the new ISO using Microsoft’s own tool which they likely use to master their own ISOs…

oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,b”c:\tmp\dist\boot\”#pEF,e,b”c:\tmp\dist\efi\microsoft\boot\efisys.bin” C:\tmp\dist C:\tmp\iso\windows2012r2virtio.iso

XenServer 6.1 PXE install hangs at xen.gz …

March 6th, 2013

This happens because the mboot.c32 file located in boot/pxelinux on the XenServer 6.1 install media is bad.

If You copy mboot.c32 from another XenServer version it will work flawlessly.

Hope this helps someone!




SuperMicro X9SCL/X9SCM hard disk update image

May 15th, 2012

With Intel’s release of the Xeon E3 1200v2 CPUs yesterday I have had to come up with a creative solution to update the BIOS on hundreds of SuperMicro X9SCL/X9SCM motherboards to support the new CPUs.

I feel that laziness is a virtue in System Administration so I created a image file that can PXE boot into DOS and handles the update automatically.

The file is here:

X9SCL BIOS Updater

I’ll assume that you already have a Linux based PXE setup; this is the command I use to call it with pxelinux:

label X9SCL
KERNEL other/memdisk
APPEND initrd=tools/c.img harddisk



The best WordPress performance tip, ever.

June 12th, 2011

If you’ve ever used WordPress to host a blog than you know that it is a very powerful platform. With a lot of power comes a lot of complexity. This complexity combined with the mandate that WordPress be easy to use/install/run combines to make for some interesting choices as it pertains to performance.

Recently I was tasked with building a high performance WordPress system for a user. I won’t bore you with all of the details but I will give you 1 tip that saved the day for me.

Read the rest of this entry »

Vista Anti-Virus 2011– Seriously, Microsoft?

March 21st, 2011

Last night I was doing some Google queries to research a technical issue I was having with GlusterFS. I clicked on a link Google had suggested for me and suddenly the performance of my system had slowed to a crawl. I assumed that the site had JavaScript, or some other poorly implemented client-side code on it but it was really much worse.

I had been hit by malware…

Read the rest of this entry »

If you get less spam today, thank Microsoft

March 18th, 2011

Microsoft is usually the punch line of jokes related to the security of their software but apparently they take spam, botnets, and malicious code creators very, very seriously.

In an apparent raid coordinated between Microsoft and federal authorities yesterday (as the wall street journal first reported) one of the largest botnets in the world (known as “Rustock”) was shutdown. “Rustock” was believed to be in control of over one million infected PCs worldwide and responsible for more than a billion spam messages a day.

So if you notice that the spam in your inbox is a little lighter today than it was yesterday, You might just have Microsoft to thank.

Technorati Tags: ,,,


Massive earthquake in Japan leaves only the Internet as a communication method

March 11th, 2011

Cellular phone networks and land lines were disrupted as a result of the devastating earthquake in Japan leaving the Internet as the only  means of communication for most residents. This event – as well as all of the recent turmoil in Africa and the middle east just gives more power to the idea that the Internet has become much more than a medium for entertainment and time wasting.

The Internet is oxygen for people going through crisis.


How to: Install APF (advanced policy firewall) for Linux

March 9th, 2011


This article explains how to quickly install and configure APF (Advanced Policy Firewall) for Linux.

Read the rest of this entry »

Intel DH55TC – Linux/Virtualization tests

January 14th, 2010

I recently had the chance to test out the brand spanking new Intel DH55TC motherboard with various Linux (and virtualization) operating systems for the purposes of network installation and compatibility actually surprised me.

Read the rest of this entry »

Plesk – SSL: Private key does not match the certificate public key

January 14th, 2010

After enabling SSO, Plesk will not start with the error:

(network.c.377) SSL: Private key does not match the certificate public key, reason: error:0906D06C:PEM routines:PEM_read_bio:no start line /etc/sso/sso.pem

Read the rest of this entry »