Welcome to MSDN Blogs Sign in | Join | Help

Illustrated Installation of Hyper-V Server

As the stand-alone Hyper-V Server is now available, I would like to demonstrate what the process is for installing Hyper-V Server on a physical computer.  The requirements for Hyper-V Server are that your computer be a x64 computer with hardware virtualization support.  Once you have downloaded the installation ISO and burned it to a DVD disk, you can boot off of it.  Then:

  1. You will be asked to specify your language and locale:
    HyperVServerInstall2 HyperVServerInstall3
  2. Then you can start the installation and accept the EULA (after reading it thoroughly):
    HyperVServerInstall4 HyperVServerInstall5
  3. Next you specify the installation type and the location for Hyper-V Server on the disk:
    HyperVServerInstall6 HyperVServerInstall7
  4. Once this is done, installation will progress by itself:
    HyperVServerInstall8 HyperVServerInstall12
  5. After the installation is complete you can login as "Administrator" (with no password) and specify the new Administrator password:
    HyperVServerInstall13 HyperVServerInstall17
  6. Once you have done this you can login as Administrator.  At this point in time Hyper-V is now installed and enabled.  The only thing left to do is to configure things like the IP address, domain membership, etc...  Thankfully Hyper-V Server comes with a handy utility to allow you to configure all of these types of settings in a quick and easy manner.  This utility is opened automatically when you first login:
    HyperVServerInstall20
  7. After completing the configuration of the server using this UI - Hyper-V is ready to go.

As you can see the installation process is actually quite fast and simple.  Once this is all done you need to setup the Hyper-V management UI on a remote computer in order to administrate the system.

Cheers,
Ben

The Server Unleashed

Okay, I admit it, I am a sucker for IT advertising - so I am really happy to see some cool advertising coming out for Windows Server 2008 and Hyper-V:

Hyper-V

That's right - it is a robot computer holding a can of "Hyper-V".  Now a number of you have seen the robot around the place (his name is "IT 24-7") and have already pinged me asking for pictures / resources to use.  Well - today is your lucky day.  If you go to http://www.serverunleashed.com and click on the "Toy Box" option you can download wallpapers, screen savers and buddy icons featuring IT 24-7. 

You can also go to the "Meet IT 24-7" section to see some of the adds that we are running.  "Rodeo" is my favorite (of course).

Cheers,
Ben

Hyper-V Server Now Available!

The free Hyper-V Server is now available here: http://www.microsoft.com/servers/hyper-v-server/how-to-get.mspx

If you have not been paying attention as to what Hyper-V Server is - let me steal some content from the official web page:

Microsoft Hyper-V Server 2008 provides a simplified, reliable, and optimized virtualization solution, enabling improved server utilization and reduced costs. Since Hyper-V Server is a dedicated stand-alone product, which contains only the Windows Hypervisor, Windows Server driver model and virtualization components, it provides a small footprint and minimal overhead. It easily plugs into customers’ existing IT environments, leveraging their existing patching, provisioning, management, support tools, processes, and skills.

And here is the official comparison table:

The following table outlines which Hyper-V–enabled product would suit your needs:

Virtualization Needs

Microsoft Hyper-V Server 2008

Windows Server 2008 Standard

Windows Server 2008 Enterprise

Windows Server 2008 Datacenter

Server Consolidation

Available Available Available Available

Test and Development

Available Available Available Available

Mixed OS Virtualization (Linux and Windows)

Available Available Available Available

Local Graphical User Interface

  Available Available Available

High Availability—Clustering

    Available Available

Quick Migration

    Available Available

Large Memory Support (Host OS) > 32 GB RAM

    Available Available

Support for > 4 Processors (Host OS)

    Available Available

Ability to Add Additional Server Roles

  Available Available Available

Virtualization Rights per Server License

Each VM Guest requires a server license

1 Physical + 1 VM

1 Physical + 4 VMs

1 Physical + Unlimited VMs

So go grab a copy and check it out!

Cheers,
Ben

Posted by Virtual PC Guy | 11 Comments
Filed under:

Hyper-V: Scripting Fixed VHD Creation

This script is practically identically to the one for creating a dynamically expanding virtual hard disk.  The big thing to be aware of is that creation of a fixed size virtual hard disk takes a lot longer - so you need to make sure you handle the concrete job object and use it to know when the virtual hard disk has finished being created.

VBScript:

Option Explicit
 
'Setup constant to use for getting the right value for the new VHD size
const Size1G = &H40000000
 
Dim HyperVServer
Dim VHDName
Dim VHDSize
Dim WMIService
Dim Msvm_ImageManagementService
Dim Result
Dim Job
Dim InParam
Dim OutParam
 
'Prompt for the Hyper-V Server to use
HyperVServer = InputBox("Specify the Hyper-V Server to create the fixed virtual hard disk on:")
 
'Get name for VHD
VHDName = InputBox("Specify the name of the new fixed virtual hard disk:")
 
'Get size for VHD
VHDSize = InputBox("Specify the size of the new fixed virtual hard disk (in GB):") * Size1G
 
'Get an instance of the WMI Service in the virtualization namespace.
Set WMIService = GetObject("winmgmts:\\" & HyperVServer & "\root\virtualization")
 
'Get the Msvm_ImageManagementService object
Set Msvm_ImageManagementService = WMIService.ExecQuery("SELECT * FROM Msvm_ImageManagementService").ItemIndex(0)
 
'Setup the input parameter list
Set InParam = Msvm_ImageManagementService.Methods_("CreateFixedVirtualHardDisk").InParameters.SpawnInstance_()
InParam.Path = VHDName 
InParam.MaxInternalSize = VHDSize
 
'Execute the method and store the results in OutParam
Set OutParam = Msvm_ImageManagementService.ExecMethod_("CreateFixedVirtualHardDisk", InParam) 
 
'Check to see if the job completed synchronously
if (OutParam.ReturnValue = 0) then
   Wscript.Echo "The virtual hard disk has been created."
elseif (OutParam.ReturnValue <> 4096) then
   Wscript.Echo "The virtual hard disk has not been created."
else   
 
   'Get the job object
   set Job = WMIService.Get(OutParam.Job)
 
    'Wait for the job to complete (3 == starting, 4 == running)
   while (Job.JobState = 3) or (Job.JobState = 4)
      Wscript.Echo "Creating VHD. " & Job.PercentComplete & "% complete"
      WScript.Sleep(1000)
 
      'Refresh the job object
      set Job = WMIService.Get(OutParam.Job)
   Wend
 
   'Provide details if the job fails (7 == complete)
   if (Job.JobState <> 7) then
      Wscript.Echo "The virtual hard disk has not been created."
      Wscript.Echo "ErrorCode:" & Job.ErrorCode
      Wscript.Echo "ErrorDescription:" & Job.ErrorDescription
   else
      Wscript.Echo "The virtual hard disk has been created."
   end If
end if

PowerShell:

# Setup constant to use for getting the right value for the new VHD size
[UInt64]$Size1G = 0x40000000
 
# Prompt for the Hyper-V Server to use
$HyperVServer = Read-Host "Specify the Hyper-V Server to use (enter '.' for the local computer)"
 
# Get name for VHD
$VHDName = Read-Host "Specify the name of the new fixed virtual hard disk"
 
# Get size for VHD
[UInt64]$VHDSize = Read-Host "Specify the size of the new fixed virtual hard disk (in GB)" 
 
# Get the Msvm_ImageManagementService object
$ImageManagementService = gwmi Msvm_ImageManagementService -namespace "root\virtualization" -computername $HyperVServer
 
# Create the VHD
$result = $ImageManagementService.CreateFixedVirtualHardDisk($VHDName, $VHDSize * $Size1G)
 
#Return success if the return value is "0"
if ($Result.ReturnValue -eq 0)
   {write-host "The virtual hard disk has been created."} 
 
#If the return value is not "0" or "4096" then the operation failed
ElseIf ($Result.ReturnValue -ne 4096)
   {write-host "The virtual hard disk has not been created.  Error value:" $Result.ReturnValue}
 
  Else
   {#Get the job object
    $job=[WMI]$Result.job
 
    #Provide updates if the jobstate is "3" (starting) or "4" (running)
    while ($job.JobState -eq 3 -or $job.JobState -eq 4)
      {write-host "Creating. "$job.PercentComplete "% complete"
       start-sleep 1
 
       #Refresh the job object
       $job=[WMI]$Result.job}
 
     #A jobstate of "7" means success
    if ($job.JobState -eq 7)
       {write-host "The virtual hard disk has been created."}
      Else
       {write-host "The virtual hard disk has not been created."
        write-host "ErrorCode:" $job.ErrorCode
        write-host "ErrorDescription" $job.ErrorDescription}
   }

Cheers,
Ben

Update for Hyper-V to support 24 logical processor systems

Last week we released an update that enables Hyper-V to run on systems with 24 logical processors.  For example, a quad processor 6-core system.  The update also allows you to run up to 192 virtual machines on such a system.  A couple of things to note:

  • This update does not allow you to run more virtual machines on 16 logical processor or smaller systems.  Our supported limit is 8 virtual processors per logical processor, 8 times 24 is 192.
  • Unless you are running on a system with greater than 16 logical processors, there is no need to install this update.
  • Once you install the update on the parent partition, you will need to update the integration services inside the virtual machine.

Otherwise you can get the update from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=fe36823a-7e5a-4262-9bf5-d6b3ae3ad375&DisplayLang=en

Cheers,
Ben

Posted by Virtual PC Guy | 3 Comments
Filed under:

SimAnt under Virtual PC

This is one of my favorite not-so-well-known computer games.  Released in 1991, designed by Will Wright (the maker of SimCity) it is a quite whacky game.  You lead an Ant colony and attempt to:

  • Build your nest
  • Secure a food supply
  • Defeat -
    • Spiders
    • Caterpillars
    • An opposing group of ants

With an ultimate goal of forcing the local human residents to evacuate.

simant1 simant2 simant3

As a concept it sounds odd, but the game is well constructed and quite addictive.  Plus it runs perfectly under Virtual PC.

Cheers,
Ben

Hyper-V: Scripting Dynamic VHD Creation

Today I would like to show you some basic scripts for creating a new dynamically expanding virtual hard disk.  The tricky thing about doing this is that the WMI interfaces for creating virtual hard disks expect the size of the new virtual hard disk to be specified as a UINT64.  This requires some special handling - but can be done in both VBScript and PowerShell.

VBScript:

Option Explicit
 
'Setup constant to use for getting the right value for the new VHD size
const Size1G = &H40000000
 
Dim HyperVServer
Dim VHDName
Dim VHDSize
Dim WMIService
Dim Msvm_ImageManagementService
Dim Result
Dim Job
Dim InParam
Dim OutParam
 
'Prompt for the Hyper-V Server to use
HyperVServer = InputBox("Specify the Hyper-V Server to create the dynamic virtual hard disk on:")
 
'Get name for VHD
VHDName = InputBox("Specify the name of the new dynamic virtual hard disk:")
 
'Get size for VHD
VHDSize = InputBox("Specify the size of the new dynamic virtual hard disk (in GB):") * Size1G
 
'Get an instance of the WMI Service in the virtualization namespace.
Set WMIService = GetObject("winmgmts:\\" & HyperVServer & "\root\virtualization")
 
'Get the Msvm_ImageManagementService object
Set Msvm_ImageManagementService = WMIService.ExecQuery("SELECT * FROM Msvm_ImageManagementService").ItemIndex(0)
 
'Setup the input parameter list
Set InParam = Msvm_ImageManagementService.Methods_("CreateDynamicVirtualHardDisk").InParameters.SpawnInstance_()
InParam.Path = VHDName 
InParam.MaxInternalSize = VHDSize
 
'Execute the method and store the results in OutParam
Set OutParam = Msvm_ImageManagementService.ExecMethod_("CreateDynamicVirtualHardDisk", InParam) 
 
'Check to see if the job completed synchronously
if (OutParam.ReturnValue = 0) then
   Wscript.Echo "The virtual hard disk has been created."
elseif (OutParam.ReturnValue <> 4096) then
   Wscript.Echo "The virtual hard disk has not been created."
else   
 
   'Get the job object
   set Job = WMIService.Get(OutParam.Job)
 
    'Wait for the job to complete (3 == starting, 4 == running)
   while (Job.JobState = 3) or (Job.JobState = 4)
      Wscript.Echo "Creating VHD. " & Job.PercentComplete & "% complete"
      WScript.Sleep(1000)
 
      'Refresh the job object
      set Job = WMIService.Get(OutParam.Job)
   Wend
 
   'Provide details if the job fails (7 == complete)
   if (Job.JobState <> 7) then
      Wscript.Echo "The virtual hard disk has not been created."
      Wscript.Echo "ErrorCode:" & Job.ErrorCode
      Wscript.Echo "ErrorDescription:" & Job.ErrorDescription
   else
      Wscript.Echo "The virtual ha