Unattended install of Microsoft Hyper-V Server 2012

Microsoft Hyper-V Server 2012 is a free version of Windows Server 2012 that only supports the Hyper-V role. You can use this to install on bare metal to give you a hyper visor that can support virtualisation. In this article I will be looking at how you prepare an image and configuration file (autounattend.xml) to target a server for a hands off installation.

Resources you will need

Download the ISO, install the DVD tool but when you come to install the ADK only install the Deployment Tools:

adk1

You will need to run the Windows System Image Manager:

wsim1

First mount the ISO on a local drive or open it in another program to extract the install.wim file from the sources folder.  Save this file to your local hard disk.  From the File Menu select New Answer File… then choose Yes to Open a new Windows Image:

wsim2

Select the Windows install.wim Image that you copied from the Sources folder earlier:

wsim3

Then select yes to create the catalogue file.  This will take a few minutes.  At this point you could use the USB/DVD download tool to create your bootable USB drive. A 2GB USB Drive will do fine for this.

When the creation of the catalogue file has completed you will need to add a number of configuration options from the Windows Image section in the bottom left of the Windows System Image Manager window to the Answer File.  You do this by opening the Components Tree and right-clicking on a Component with the mouse and selecting the appropriate phase to add it to.  You will then see the Answer File populate with the Configuration Option that you can edit later.  I will details the Configuration Options you need to add to your answer file to enable an unattended install of Windows Hyper-V Server 2012.

Add the following to 1 windowsPE:

  • amd64_Microsoft-Windows-International-Core-WinPE
  • amd64_Microsoft-Windows-Setup

Add the following to 4 specialize:

  • amd64_Microsoft-Windows-Shell-Setup
  • amd64_Microsoft-Windows-TerminalServices-LocalSessionManager
  • amd64_Microsoft-Windows-TerminalServices-RDP-WinStationExtensions
  • amd64_Microsoft-Windows-UnattendedJoin

Add the following to 7 oobe System:

  • amd64_Microsoft-Windows-Shell-Setup

wsim4

Remove any items from the tree that you may have that are not shown above.  They will not be needed.

Go back to the top of the Tree and Select amd64_Microsoft-Windows-International-Core-WinPE.  For Input Local, SystemLocale, UILanguage, UILanguageFallback and UserLocale enter en-US

wsim5

Select SetupUILanguage and set UI Language to en-US and WillShowUI to OnError

wsim10

Select amd64_Microsoft-Windows-Setup, set EnableFirewall to False and EnableNetwork to True

wsim6

Then select DiskConfiguration right click and select Insert New Disk. Set the DiskID to 0 and set WillWipeDisk to True

wsim11

Right click on CreatePartitions and select Insert New CreatePartition on this set Order to 1, Size to 100 and Type to Primary

wsim12

Do the same again but set the Extend to true, Order to 2 and Type to Primary

wsim13

Move down to ModifyPartitions right click and select Insert New ModifyPartition, set Active to True, Format to NTFS, Label to Boot, Order to 1 and PartitionID to 1

wsim14

Do the same again but don’t set Active,set Label to System, Order to 2 and PartitionID to 2

wsim15

Select Image install right click and select Insert New OSImage. Set InstallToAvailablePartition to False and WillShowUI to OnError.  Select InstallFrom, right click and select Insert New MetaData.  Set the Key to /IMAGE/NAME and set Value to Hyper-V Server 2012 SERVERHYPERCORE. Remove Credentials

wsim16

Select InstallTo and set DiskID to 0 and PartitionID to 2

wsim17

Select UserData and set AcceptEula to True, FullName to User and Organization to Company

wsim18

Select amd64_Microsoft-Windows-Shell-Setup, set ComputerName to HYPER-V-01, set RegisteredOwner to User and set TimeZone to UTC

wsim7

Select amd64_Microsoft-Windows-TerminalServices-LocalSessionManager and set fDenyTSConnections to False

wsim8

Select amd64_Microsoft-Windows-TerminalServices-RDP-WinStationExtensions, set SecurityLayer to 1 and UserAuthentication to 0

wsim9

Select amd64_Microsoft-Windows-UnattendedJoin and then Identification, in this case we are setting to join a Workgroup so set JoinWorkgroup to WORKGROUP

wsim19

Navigate to amd64_Microsoft-Windows-Shell-Setup and set RegisteredOrganization to Company, RegisteredOwner to User and TimeZone to UTC

wsim20

Select AdministratorPassword and for Value type in the password you want to use, in clear text. Later WSIM will encrypt the password.  Don’t forget it.

wsim21

From the Tools menu select Validate Answer File and in the message windows verify that No warnings or errors are shown.  From the File menu select Save As… and use the filename autounattend.xml to save the file to your local disk.  If you are going to boot the system from USB and you are confident that it will work then you can copy the XML file to your USB stick once you have prepared the USB stick using the Microsoft USB/DVD Download tool.

In my next article I will show you how to verify your unattended install in Hyper-V.  This is very useful for proving your answer file where it will be used on a headless system.

Advertisements

One thought on “Unattended install of Microsoft Hyper-V Server 2012

  1. peter says:

    I have done all this (thank you) for R2 and put the file AutoUnattend.xml in the root of the USB (with the install media). but it is not running unattended. It starts windows setup as normal as if AutoUnattend.xml does not exist. I also made sure the image was updated to reflect R2. any ideas? thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: