Ben Armstrong has been working on a completely automated virtual machine build process that does not use templates (but build everything from scratch). One of the key tools that I have been using for this process is WIM2VHD.
WIM2VHD allows me to generate new VHD files directly from Windows installation media. However – I wanted to go a step further and have the virtual machines generated using this process boot in a completely unattended fashion. My ultimate goal here was to go from nothing to having a virtual machine logged into the desktop with no external interaction. Luckily, WIM2VHD allows you to specify a unattended installation file to be injected into the virtual hard disk. I installed the Windows Automated Installation Kit for Windows 7 and then used the Windows System Image Manager to create some unattended installation files. One of the interesting problems though is that not all sections of the unattended file are referenced when used with WIM2VHD. In fact, only the specialize and oobeSystem sections are used. So I had to figure out how to do everything I wanted in these two sections.