Installing, configuring and managing Hyper-V Server “8” Beta

 

With the release of Windows 8 Consumer Preview and Windows Server “8” Beta, we have also released Hyper-V Server “8”. I have always been a huge promoter of Hyper-V Server and have always recommended to deploy Hyper-V Server in any scenario.

Hyper-V Server 2008 R2 was based on the Windows Server 2008 R2 Core of the Enterprise Edition. The difference between the Enterprise and Datacenter edition is the supported number of CPU sockets which is limited to 8 in Enterprise and 64 with Datacenter. Notice that I specifically talk about sockets, not cores. Both editions support up to 64 cores.

So there was a scenario where Hyper-V Server would not fit; when you needed support for more than 8 sockets. But that was the only technical difference. So with Hyper-V Server you got the same Virtual Machine migration, support for workgroups and domains, support for 384 running virtual machines, clustering, etc.

The table below shows the differences from Hyper-V Server 2008 and compares Hyper-V Server 2008 R2 with the Windows Hyper-V editions.

 

Capabilities

Microsoft Hyper-V Server 2008

Microsoft Hyper-V Server 2008 R2

Windows Server 2008 R2 (EE, DC)

Processor Architecture - 64 bit

Yes

Yes

Yes

Hypervisor-based

Yes

Yes

Yes

Product Type

Standalone product

Standalone product

Operating System

Number of Sockets

Up to 4

Up to 8

Up to 8 = EE | Up to 64 = DC

Number of cores

24 (with QFE)

64

64

Memory

Up to 32 GB

Up to 1 TB

Up to 1TB

VM Migration

None

Quick and Live

Quick and Live

Administrative UI

Command line, text based configuration utility and remote GUI management

Command line, text based configuration utility and remote GUI management

Command line, remote management, and local GUI (Hyper-V Manager MMC)

Management

Existing management tools

Manageable by SC Virtual Machine Manager

Yes (SCVMM 2008)

Yes (SCVMM 2008 R2)

Yes (SCVMM 2008 R2)

Virtualization Rights for Windows Server 2008 guests

0

0

EE = 4 VM DC Edition = unl. VM per proc

Number of running VM Guests

Up to 192, or as many as physical resources allow

Up to 384, or as many as physical resources allow

Up to 384, or as many as physical resources allow

Storage

Direct Attach Storage (DAS): SATA, eSATA, PATA, SAS, SCSI, USB, Firewire Storage Area Networks (SANs): iSCSI, Fiber Channel, SAS Network Attached Storage (NAS)

Guest OS support

Windows Server 2008, Windows Server 2003 SP2, Windows 2000 Server, Novell SUSE Linux Enterprise Server 10, Windows Vista SP1 & Windows XP SP3/SP2

From a licensing perspective, Hyper-V Server is different. There are no virtualization rights with Hyper-V Server. This made it especially interesting for organizations that wanted to start with virtualization and were using Windows Server 2003. But organizations properly licensed for Windows Server 2008 R2 could still use Hyper-V Server too. When you have the license for each host, you can still install Hyper-V Server on it.

A virtualization host should be a single-purpose or single-role server. And that is exactly what Hyper-V Server is; based on a Core version of Windows but with one role installed. A Hyper-V Server has a command prompt for management offering only the configuration basics like host name, domain, ip address, remote management. Once the basics are configured, you log off and never log back in again; all virtualization management is done remotely.

Although most admins recognized the advantages of Hyper-V Server, some still preferred the Windows release of Hyper-V with the GUI installed. In most cases this was because of lack of proper support from third-party vendors for command line management. This was often the case with NIC teaming or LBFO software.

Hyper-V Server “8” still has the same characteristics as Hyper-V Server 2008 R2. But it has inherited all improvements of Windows Server “8”. The following table summarizes the differences going from Windows Server 2008 R2, Windows Server 2008 R2 SP1 and Hyper-V Server “8”.

 

 

MS Hyper-V Server 2008 R2

MS Hyper-V Server 2008 R2 SP1

Microsoft Hyper-V Server “8”

Release Date:

July 2009

August 2011

2012

Cost:

Free Download from: www.microsoft.com/hvs

Free Download from: www.microsoft.com/hvs

Free Download from: www.microsoft.com/hvs

Physical Processor Support:

Up to 8 processors

(no core limitations)

Up to 8 processors

(no core limitations)

No processor or core limits

Logical processor support

 64

 64

160

Physical Memory Support:

Up to 1 TB per server

Up to 1 TB per server

Up to 2 TB per server

Virtual Machine Memory Support:

64 GB of memory per VM

(no memory tax)

64 GB of memory per VM

(no memory tax)

1 TB of memory per VM

(no memory tax)

Number of running Virtual Machines

384 

384 

1024

Number of virtual processors

4

4

32

Live Migration:

Yes

Yes

Yes

High Availability:

Yes

Yes

Yes

Live Storage Migration:

No

No

Yes

Shared Nothing Live Migration:

No

No

Yes

RemoteFX:

No

Yes

More monitors, more resolutions

Storage Spaces:

No

No

Yes

VMs on File Based Storage

No

No

Yes

What you can see from the table is that there is no difference anymore with the Windows Hyper-V release. Hyper-V Server “8” supports the same amount of CPU sockets. And it does support all other great enhancements like NIC teaming.

Nothing is final yet until the Windows Server “8” and Hyper-V Server “8” products have been released. But given the current release of Beta products, I see no reason not to use Hyper-V Server “8” in any scenario. There is no limitation compared to the Windows release, NIC teaming is in-box and actually better and more advanced than what you get from a vendor (because NIC teaming is vendor / hardware agnostic) and you can fully manage Hyper-V Server from remote management tools, PowerShell and PowerShell remoting.

In the remainder of this article, I will go into the installation and management options of Hyper-V Server “8”.

Hyper-V Server “8” can be downloaded from the Hyper-V Server page here or from the TechNet or MSDN subscriptions download page. The ISO is approximately 1,5 GB in size. Most likely you are going to install it from a UFD (USB Flash Device). If that is the case, we offer a great tool to put the ISO on the UFD. It is called the “Windows 7 USB/DVD Download Tool” and it is available here from the Microsoft Store. Although the name implies it is for Windows 7 only, you can simply use it to put the Hyper-V Server ISO on the flash device. It will extract the contents and make the UFD bootable. It is really super simple.

1. Open the Hyper-V Server ISO file.

clip_image001

2. Select the media device you want to use.

clip_image002

3. Insert the flash device.

clip_image003

4. Click Begin copying.

clip_image004

In case your device is not empty, you get the below additional dialogs first.

clip_image005

clip_image006

This is all you need to do, just sit back and wait.

clip_image007

When it is finished, you get this.

clip_image008

The flash device contents look like this.

clip_image010

Form here it is evenly simple. Insert the flash device in a USB port and boot from it. When booted you will see the installation screen below.

clip_image011

I have omitted the other screens. But from here you click Next, Install Now, agree to the license terms and select the custom install.
On my laptop, the file installation was done in two minutes. The complete installation from start to Sign In was done in less than five minutes. Imagine how quick this will be on real server hardware!

Once setup is finished and you have set the administrator password and signed in, you see the familiar Hyper-V Server “Server Configuration” screen.

clip_image012

Configure the IP address settings (8). Then enable Remote Desktop (7). Then configure the computer name (2) or join the host to a domain (1) and configure the computer name there. Once you have done these (in this particular order), you can reboot the host and you are done with the local console. From here on forwards, you can configure and manage the host remotely.

To manage the host, you can use Hyper-V Manager on any Windows Server “8” Beta host or use the Remote Server Administration Tools (RSAT) on a client. I always recommend managing infrastructure and applications (services) from one or more management servers. I always advise against using workstations for this type of management.
Management from Hyper-V Manager works the same way as it does with Windows Server 2008 R2. I won’t go into using it here as everyone is familiar with it. You can of course manage it from System Center Virtual Machine Manager but not with the currently available release. You must wait for an updated release of System center Virtual machine Manager 2012 which will support Windows Server “8” and Hyper-V Server “8”.

You can manage Hyper-V Server when it is joined to a domain or member of a workgroup, even when your management server is in a different forest or workgroup. This is different from the previous release where you hit all sorts of authentication and authorization issues and must go through a lengthy script of modifications before you can properly manage the host. Here is what you must configure on the Hyper-V Server host.

For the remainder of this article, I go into the configuration of the Hyper-V Server host using PowerShell. If you are unfamiliar with PowerShell, I suggest you read this post before continuing.

I am using PowerShell from my management server. Both management server and the Hyper-V Server host are in the same domain.

Get the Hyper-V Settings of the host by using Get-VMHost.

Get-VMHost –ComputerName vmhost1

clip_image014

You could also have type Get-VMHost vmhost1. ComputerName is the requested parameter so it understands you want the settings from host vmhost1.

You probably will always configure the VirtualMachinePath and VirtualHardDiskPath. From the previous blog post, here are the cmdlets to use.

Set-VMHost –ComputerName vmhost1 -VirtualHardDiskPath c:\vm –VirtualMachinePath c:\vm

Enable Virtual Machine Migration.

Enable-VMMigration –ComputerName vmhost1

Configure Virtual Machine Replication.

Set-VMReplicationServer –ComputerName vmhost1 -ReplicationEnabled 1 -AllowedAuthenticationType Integrated -ReplicationAllowedFromAnyServer 1 -DefaultStorageLocation c:\vm –Force

Just a sidestep here. If you don’t want to type the complete sentences you have two options:

· Type the switch name or constant partially and complete by pressing the Tab key

· Use abbreviations because PowerShell will understand what you mean

To illustrate the second bullet, the command above could be entered shorter by abbreviating both switches and values like this:

Set-VMReplicationServer -com vmhost1 -replicationen 1 -allowed Int -replicationa 1 -def c:\vm –f

The only thing that matters is that PowerShell is able to interpret it correctly. You must not have ambiguous values.

See below for the syntax for the Set-ReplicationServer cmdlet.

clip_image016

You can abbreviate –ComputerName with –Com (or –com). Not with –co because there is a -Confirm switch in which case PowerShell cannot understand which one you mean. But with –com the switch is uniquely referenced. The same is true for the abbreviations for ReplicationEnabled and ReplicationAllowedFromAnyServer.

Finally, replication is allowed for another Hyper-V Server host called vmhost2. In abbreviated notation:

New-VMReplicationAuthorizationEntry –co vmhost1 –all vmhost2.contoso.com -rep c:\vm –sec trust

Now, let’s assume you have configured virtual machines. The previous post outlines how to do this from PowerShell. Virtual machines are running, replicating, stopped, saved or suspended. You want to get the overall view of what is happening on the host. Again, Get-VM is the command to use to get the overview of virtual machine status.

Get-VM -co vmhost1

clip_image018

Get-VM –co vmhost2

clip_image020

This is nice but what if I have 10 hosts? Can I combine the results of Get-VM into one command? This is PowerShell, so yes! But to do this, you may need additional PowerShell knowledge. How is this done? By looping through a list of hosts with the For-Each cmdlet. Here is the command and result.

(1..2) | ForEach-Object { Get-VM –co vmhost$_ }

clip_image022

The ForEach-Object has an alias in PowerShell (like most cmdlets). It is the percent sign (%).

clip_image024

Now what happens in this command? It tells PowerShell to count from 1 to 2 and issue a Get-VM with vmhost1 and vmhost2 and return the results. $_ is a pipeline variable which takes the number of the counter. So when it starts, $_ is 1. Vmhost$_ then becomes vmhost1. So for each number, PowerShell invokes Get-VM.

You can enhance this command to also display the host name. Simply pipe the above command to Format-Table and specify what you want in the table. The AutoSize switch (-auto) tells Format-Table to properly align the columns.

(1..2) | % { Get-VM -co vmhost$_ } | format-table compu*, name, state, status, cpuu*, uptime, replicationstate -auto

clip_image026

Now you can see how easy this would be with 10 hosts.

What if you wanted to perform virtual machine state transitions like Start, Stop, Suspend, Resume virtual machines based on their state?

First, query for virtual machines that are “Running”.

Get-VM –co vmhost2 | ? { $_.State –eq “Running” }

clip_image028

Suspend all “Running” virtual machines.

Get-VM -co vmhost2 | ? { $_.State -eq "Running" } | Suspend-VM

Resume all “Paused” virtual machines.

Get-VM -co vmhost2 | ? { $_.State -eq "Paused" } | Resume-VM

Configure replication on virtual machine dc02 to Replica server vmhost1.

Set-VMReplication dc02 -ReplicaServerName vmhost1.contoso.com -ReplicaServerPor t 80 -AuthenticationType Integrated -AllowedPrimaryServer vmhost1.contoso.com -ComputerName vmhost2

This only configures replication. Now start the initial replication.

Start-VMInitialReplication dc02 -ComputerName vmhost2

clip_image030

clip_image032

There is much more you can manage around replication. Look at the results of

Gcm –mod hyper-v –noun *repl*

clip_image034

In another post, I will go into Virtual Machine replication specifically. I guess by now that you understand you can manage basically anything of Hyper-V Server from PowerShell. Once you get familiar with and used to using PowerShell you will primarily use it for management.