Hyper-V Installation Tricks - Part 2: Unattended Installation of Windows and Hyper-V RC0
Picture it: Sicily, 1914. You've got a bunch of Servers that you need to install and configure Windows Server 2008 and Hyper-V RC0 on. You don't feel like messing around with Sysprep. What do you do?
Well, since none of these things existed in 1914, you're probably pretty safe, but that doesn't really help anyone right now, does it?
What you need, is a way to do an unattended installation of Windows and Hyper-V so you don't have to sit there the whole time and type commands when the system is ready for you. Lucky for you, we've already thought of that.
Before you begin, I strongly recommend that you download the Windows AIK for Windows Server 2008 and Windows Vista SP1. The AIK contains tools and documentation specifically for helping administrators just like you to roll-out Windows on a large scale. With the AIK, you'll get a nifty little tool that will help you build unattended installation files (formerly called sysprep.inf, now called unattend.xml). You can download it here.
Assumptions
- For the purposes of this post, I'm going to assume that you already have an unattend.xml file you plan on using to answer questions at install-time. In the body of this post, I'll only be providing XML fragments for you to drop into your answer file as necessary. But, just to make sure that everyone gets the information they way, I'll attach a complete and working answer file (except for the product key, of course), which you can find at the bottom of this post.
- You're dealing with enabling the Hyper-V role on x64 servers, and you want to apply the RC0 patch.
- You're going to be using a USB key with your Windows installation media to do the unattended installation. You could just as easily create a custom install DVD with the unattend file and the RC0 QFE on it. It's up to you, but I'm just going to stick with the steps for a USB key.
The Steps
- Download the Hyper-V RC0 patch. (We're assuming you're doing this on the server, so we're working with x64 packages only.) It's over on the Microsoft Download Center, which is right over here. Download the MSU, and save it to your local machine.
- Create a working directory on your local machine. I prefer to call mine C:\extract.
- From an elevated command prompt, run the following command:
expand -F:* <MSU file that you just downloaded> C:\extract - If you look in C:\extract, you should see two CAB files. Ignore the one named WSUSSCAN.CAB - it's the other one that you're interested in. Copy it to the root of your USB key.
- Open up your unattend.xml file and add one of the following fragments right after the <unattend /> element, but before any of the <settings /> elements
<!-- fragment for Server Full -->
<servicing>
<package
action="configure">
<assemblyIdentity
name="Microsoft-Windows-Foundation-Package"
version="6.0.6001.18000"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="" />
<selection
name="Microsoft-Hyper-V"
state="true" />
<selection
name="Microsoft-Hyper-V-Management-Clients"
state="true" />
</package>
<package
action="install">
<assemblyIdentity
name="Package_for_KB949219"
version="6.0.1.2"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral" />
<source
location="E:\Windows6.0-KB949219-x64.cab" />
</package>
</servicing>
-or- <!-- fragment for Server Core --> - Make sure you change the location of the CAB file to point to your USB Key drive (this takes some doing, depending on your hard drive configuration).
- Save the unattend.xml file to your USB key as "autounattend.xml".
- Go test it out. Pop a Windows installation DVD into one of your servers and plug in the USB Key that you copied all of your unattend files to. If you had the unattend file answer all of the questions during setup, the installation should just start without you having to do anything.
- Once you're at the desktop of your new Windows installation, go check in the Programs applet in the Control Panel. If you look at installed updates, you should see KB949219 - the Hyper-V RC0 QFE.
<servicing>
<package
action="configure">
<assemblyIdentity
name="Microsoft-Windows-ServerCore-Package"
version="6.0.6001.18000"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="" />
<selection
name="Microsoft-Hyper-V"
state="true" />
</package>
<package
action="install">
<assemblyIdentity
name="Package_for_KB949219"
version="6.0.1.2"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
language="neutral" />
<source
location="E:\Windows6.0-KB949219-x64.cab" />
</package>
</servicing>
Written by mikekol. Read more great feeds at is source WEBSITE
no comments.
Read more articles on Hyper-V RC0 and Hyper-V How To and otherSoftware and Microsoft Hyper-V.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article

