Your best source of information and news about Vista hardware, secrets and Vista hardware on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

Hyper-V How To

You are currently browsing the articles from MS Windows Vista Compatible Software matching the category Hyper-V How To.

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 -->
    <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>

  • 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.

Written by mikekol on March 26th, 2008 with no comments.
Read more articles on Hyper-V RC0 and Hyper-V How To and otherSoftware and Microsoft Hyper-V.

Hyper-V Installation Tricks - Part 1: Sysprep and Hyper-V

Before we jump right into this, I thought it would be best if we got a few things straight.  For the remainder of this post, everytime I say "sysprep," I'm referring to running Sysprep with the /generalize switch.  This is the best way to make sure that the Windows installation image that you capture and apply to other systems actually works when you put it on those other systems.

For more details on what Sysprep with and without the /generalize switch does, I encourage you to read the documentation, which I have conveniently provided a hyperlink to.

So, you're planning to sysprep a Windows Server 2008 box with Hyper-V installed?  Good choice.  I'm sure you'll be happy with the result, but there are few things that you'll have to do to make sure Hyper-V functions properly after you apply the image to a different computer.  A KB article that describes all of these things is in the works, but I thought I'd get this out in the open as soon as possible.  Once the KB is available, I'll provide a link to it here.

The purpose of sysprep is to make the system as generic as possible so that any image taken of a sysprep'd system can then be applied to different hardware.  Syspreping the system will destroy any super-specific information - like hardware IDs.  The next time that Windows installation boots up, all of the information is regenerated.

With Hyper-V, however, you'll need to do a little bit of work after the system boots back up for the first time.

First, the hypervisor will not be running, since the BCD (Boot Configuration Data) store has been generalized.  You'll need to run the following command to put the hypervisor launch directive back in the BCD store:

bcdedit /set hypervisorlaunchtype auto

Secondly, any virtual network switch that was set for external connectivity will revert to an internal-only switch.  This is because the physical NIC that the external switch was bound to doesn't technically exist after a sysprep.  You'll need to rebind the switch to a physical NIC if you want external connectivity again.

Thirdly, any disks that you have set to pass-thru (whether hard disks or CD/DVD ROM drives) will need to be set up again (this is also because of the hardware IDs).

If you have to do this on a lot of systems, I recommend that you take a look at our WMI API documentation and figure out how to do this programmatically, and then add commands to your unattend.xml file that run those scripts after the first boot on the new hardware.

I'll talk more about this in a future post.

Written by mikekol on March 26th, 2008 with 1 comment.
Read more articles on Hyper-V RC0 and Hyper-V How To and otherSoftware and Microsoft Hyper-V.

Hyper-V Installation Tricks - Prologue

As you may have heard, we've shipped Hyper-V RC0.  Sorry for the lack of posts - it seems like I'm always on vacation when we ship a major release like this, so my posts lag a few days behind.

Installing Hyper-V isn't exactly a difficult task, but if you have to do it on multiple machines, installing Windows, installing Hyper-V and then applying the RC0 patch can be a bit time consuming.   The purpose of this series of posts is to offer a few different ways to help you speed up your Hyper-V deployments.

Here are the major topics I'm planning to post about:

If you've got any other suggestions for topics, please let me know.

Written by mikekol on March 26th, 2008 with no comments.
Read more articles on Hyper-V RC0 and Hyper-V How To and otherSoftware and Microsoft Hyper-V.

No older articles

Newer articles »