As my project is working towards building new environments using virtual servers on Hyper-V, I've been working with the Microsoft Deployment Toolkit (MDT) to create standardized server deploy images. MDT provides a wonderful mechanism to provide a repeatable build process. In addition to the obvious advantage of speed and saving the mental health of the poor installer who has to build 100+ servers manually, it creates a nice standardized build environment where you know where you stand in terms of how servers were configured, what service packs were applied, etc.
However I ran into a fun snag with installing Windows Server 2003 x64 using MDT on Hyper-V. So MDT creates an ISO boot image which you can point your guest VM's virtual DVD drive at to boot the OS. The basic OS goes on okay, but then the install fails. The root of the problem is that after the OS has been installed, the installer tries to connect to the MDT deployment share to continue the installation tasks specified in the task sequence. However, Windows 2003 will not recognize the Hyper-V virtual NIC until Windows 2003 SP2 has been installed AND the Hyper-V guest components are installed. Hyper-V provides a work-around for this in that I could use the Legacy Network Adapter until the OS is configured then do a swap of NICs later. However, the Hyper-V Legacy Network Adapter is incompatible with 64-bit operating systems. In my opinion it's also a bit of a kludge as my goal is to have a completely configured OS stood up with minimum user intervention after the fact.
The first problem is relatively easy to solve by slipstreaming SP2 into the base OS installation media. But how do I install the Hyper-V guest components to get the network adapter working without a network adapter to connect to the MDT deployment share? Luckily for us, the folks who designed MDT were thinking ahead and gave us an option to consolidate all of our installs into a stand-alone ISO using the MDT Deployment Media option. Like the MDT deployment share it creates a bootable ISO, but the difference here is that all of the applications, drivers, etc. that you want to install are included in the bootable ISO. This option is found under "Advanced Configuration" in the MDT Deployment Share of Deployment Workbench.
So I added the Hyper-V guest components (found under c:\windows\vmguest of your host OS) as an application unto itself. The final piece of the puzzle then was organizing the task sequence so that I did all of my network settings work AFTER I installed the Hyper-V guest components. By default, MDT will create a Task Sequence which configures networking and tries to join the domain under the "State Restore" task group. Instead I added a group after the State Restore called "Install Hyper-V Components" which installs the Hyper-V guest components and restarts the computer, then added a group after that to apply the network settings and join to the domain. One note: When specifying the Hyper-V command line installation parameters, make sure and use the /norestart switch, otherwise the guest components will hang with some errors requiring manual intervention. It doesn't really affect the installation of the guest components, but having to have a user click "OK" on some error dialogs defeats the purpose of a scripted install.
So to sum up, the steps are:
Slipstream Windows Service Pack 2 into the Windows 2003 x64 installation media
Add the Hyper-V Guest components as an application to your MDT deployment share
Organize the task sequence to have the Hyper-V guest components application install after the State Restore task group
Move the network settings (and all other application installs) after the Hyper-V guest components installation in the task sequence
Create Deployment Media which does not require connectivity to the MDT deployment share