Well, the week is over so I thought I would quickly share some links.
Vijay has posted a great article on how to install the SP1 beta on our standalone Hyper-V Server product. So now you really have no excuse to not be looking at dynamic memory / RemoteFX (both of which are supported on Hyper-V Server).
Meanwhile – the Virtualization launch page on TechNet (http://technet.microsoft.com/en-us/bb802511.aspx) has been updated with a “Hyper-V Tools” section that gives you pointers to a number of home grown tools from Microsoft for working with Hyper-V:
Cheers,
Ben
If you are thinking about trying out dynamic memory in the Windows Server 2008 R2 SP1 beta release – here are some handy resources to read before you get going:
Dynamic Memory Technical Overview whitepaper
This paper talks about what dynamic memory is, what it does and how it does it. It is a good read for those curious to understand what is happening under the covers.
Hyper-V Dynamic Memory Evaluation Guide
This article steps you through the process of setting up SP1 and enabling dynamic memory. It also gives you some good tips on configuration and troubleshooting.
http://technet.microsoft.com/en-us/library/ff817651(WS.10).aspx
Windows Server 2008 R2 Service Pack 1 – TechNet Center
For all things “Windows Server 2008 R2 Service Pack 1” related – the TechNet Center has you covered.
http://technet.microsoft.com/en-us/library/ff817647(WS.10).aspx
Hyper-V: Dynamic Memory Survival Guide
The TechNet Wiki also has a “Dynamic Memory Survival Guide” article with some extra links.
Cheers,
Ben
At TechEd this year we announced that dynamic memory would be supported for virtual machines that were running the following guest operating systems:
But not all of these operating systems will support dynamic memory with the beta release. Only the following operating systems are supported with the beta release:
The following guest operating systems will be supported after the beta release:
Cheers,
Ben
Starting today you can download the Windows Server 2008 R2 SP1 beta release. For Hyper-V this specifically means that you can start evaluating the following new Hyper-V features:
You can register to download the beta here: http://www.microsoft.com/windowsserver2008/en/us/sp1.aspx
Note that while registration is required, there is no approval process and you will get immediate access to the bits.
Cheers,
Ben
Over the last couple of weeks I have been playing around with some new (for me) server technology. This has been a lot of fun – and I have been learning a lot. However, a couple of days ago things started to go wrong.
Specifically I started seeing all sorts of strange problems with my Hyper-V server. Virtual machines started going offline randomly. The whole system would go unresponsive for a couple of minutes and then come back. Once or twice the management operating system stopped responding, while virtual machines continued to respond over the network.
This was concerning to say the least.
However, as I have been busy this week I did not have time to investigate properly. After three nights dealing with this behavior, I was starting to wonder if I had some failing hardware, and was thinking about what I would need to do over the weekend to track down the cause of the problem.
Then - as I was driving home yesterday – I suddenly realized what the problem was. Last weekend I had setup a login script for my domain that would install antivirus automatically on any domain-joined computer that did not have antivirus on it already. When I got home I checked – and there it was. I setup exclusions for Hyper-V and my server has been rock solid ever since.
Now, why am I feeling quite foolish to recount this story? Apart from the obvious fact that it took me days to figure out what the problem was – I have already blogged about this exact problem. Twice.
Sigh…
Cheers,
Ben
For a while now I have been seeing random people complaining about the fact that they cannot install Windows Virtual PC on Windows 7 Home Editions (Basic or Premium). This always struck me as odd – as I was sure that this was a supported configuration – but I did not reply as I did not have the time to try this configuration myself and confirm that it did in fact work.
I finally had the chance to try this out – and while I can confirm that running Windows Virtual PC on Windows 7 Home Editions is supported and does work – I also stumbled upon the probable cause of peoples confusion.
If you go to the official Virtual PC website (http://www.microsoft.com/virtualpc) and indicate that you are running Windows 7 Home – you will be (correctly) informed that you are not eligible to run Windows XP Mode:
Unfortunately this page does not explain that you are eligible to run Windows Virtual PC.
To clarify – “Windows Virtual PC” is the virtualization program that allows you to create and run virtual machines on Windows 7. “Windows XP Mode” is a free pre-configured Windows XP virtual machine. “Windows XP Mode” is not available for people running Windows 7 Home editions; but these users can download Windows Virtual PC and use a separate (fully licensed) copy of Windows XP to create their own Windows XP virtual machines and get all the functionality of Windows XP Mode.
You can download Windows Virtual PC directly from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=2B6D5C18-1441-47EA-8309-2545B08E11DD
And as you can see – on this page it does state that Windows 7 Home editions are supported:
Hopefully the main webpage can be updated to make this less confusing in the future.
Cheers,
Ben
Here is a good question:
If you are using iSCSI for all of your storage needs; should you use a software iSCSI initiator inside the virtual machine to connect the iSCSI storage directly to the virtual machine, or should you connect the iSCSI storage to the management operating system (in the parent partition) and then store virtual hard disks / use pass through disks?
The answer is (as usual) not that simple. Generally speaking – you should always connect the iSCSI storage to the management operating system. The reason for this is that virtual machines can only connect to iSCSI devices with a software iSCSI initiator, where as the management operating system will be able to use hardware host-bus adapters (HBAs).
That said, there is a time when you will want to use a software iSCSI initiator inside the virtual machine and connect the storage directly to the virtual machine. You will want to do this if you are trying to cluster the guest operating system inside the virtual machine (as opposed to clustering Hyper-V itself). In this scenario; having iSCSI storage connected directly to the guest operating system is the only option that works.
Some common questions that I have heard around these recommendations include:
Cheers,
Ben
Recently I have had a couple of different people approach me with this problem:
They are developing software to manage / work with virtual machines – and they need a way to associate custom data with a virtual machine. The problem that they face is how to do this in a way that will survive if the virtual machine gets backed up, failed over, live migrated, snapshotted, etc…
Thankfully there is a simple answer. In Windows Server 2008 R2 we extended the Key-Value Pair (KVP) functionality to include the concept of “host-only” KVPs. Simply put – these are key value pairs that get stored in the virtual machine configuration file and can be written / read from the parent partition; but never get sent into the virtual machine. The way this works is that you use AddKvpItems to add a Msvm_KvpExchangeDataItem where the source field has been set to “4” – which indicates that this is a host-only KVP.
Combining this with some of my existing code from my general DVD tool script and my parent KVP script – results in this hand “all purpose host-only KVP script”:
# Function for handling WMI jobs / return values Function ProcessResult($result, $successString, $failureString) { #Return success if the return value is "0" if ($result.ReturnValue -eq 0) {write-host $successString} #If the return value is not "0" or "4096" then the operation failed ElseIf ($result.ReturnValue -ne 4096) {write-host $failureString " 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 $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 $successString} Else {write-host $failureString write-host "ErrorCode:" $job.ErrorCode write-host "ErrorDescription" $job.ErrorDescription} } } # Filter for parsing XML data filter Import-CimXml { # Create new XML object from input $CimXml = [Xml]$_ $CimObj = New-Object -TypeName System.Object # Iterate over the data and pull out just the value name and data for each entry foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY[@NAME='Name']")) { $CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE } foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY[@NAME='Data']")) { $CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE } # Display output $CimObj } # Prompt for the Hyper-V Server to use $HyperVServer = Read-Host "Specify the Hyper-V Server to use (enter '.' for the local computer)" # Prompt for the virtual machine to use $VMName = Read-Host "Specify the name of the virtual machine" # Get the management service $VMMS = gwmi Msvm_VirtualSystemManagementService -namespace root\virtualization -computername $HyperVServer # Get the virtual machine object $VM = gwmi MSVM_ComputerSystem -namespace root\virtualization -computername $HyperVServer | where {$_.ElementName -eq $VMName} # Get the virtual machine setting data $VSSD = $VM.getRelated("Msvm_VirtualSystemSettingData") | where {$_.SettingType -eq 3} # Setup parameters for main menu prompt $message = "What do you want to do with host-only KVPs?" $list = New-Object System.Management.Automation.Host.ChoiceDescription "&List", "List the current host-only KVPs." $add = New-Object System.Management.Automation.Host.ChoiceDescription "&Add", "Add a new host-only KVP / update an existing one." $delete = New-Object System.Management.Automation.Host.ChoiceDescription "&Delete", "Delete a host-only KVP." $quit = New-Object System.Management.Automation.Host.ChoiceDescription "&Quit", "Exit the HostKVPTools script." $options = [System.Management.Automation.Host.ChoiceDescription[]]($list, $add, $delete, $quit) do { # Setting up $KVPSettingData needs to be done inside the loop - as this value needs to be # refreshed after any add / modify / delete operation # Get KVP settings object $Query = "Associators of {$VSSD} Where ResultClass=Msvm_KvpExchangeComponentSettingData" $KvpSettingData = gwmi -Query $Query -namespace root\virtualization -computername $HyperVServer # Ask the user what they want to do with the host-only KVPs write-host $promptResult = $host.ui.PromptForChoice("", $message, $options, 0) write-host switch ($promptResult) { 0 {# Display existing host-only KVPs $KvpSettingData.HostOnlyItems | Import-CimXml } 1 {# Add a new host-only KVP / update an existing host-only KVP # Prompt for the name for the new KVP $NewKVPName = Read-Host "Specify the name of the KVP to add / update" # Prompt for the KVP data $NewKVPData = Read-Host "Specify the data for the KVP" # Create new Msvm_KvpExchangeDataItem object $wmiClassString = "\\" + $HyperVServer + "\root\virtualization:Msvm_KvpExchangeDataItem" $newKvpExchangeDataItem = ([WMIClass]$wmiClassString).CreateInstance() # Populate the KVP data item - a source of "4" indicates that it is "host-only" $newKvpExchangeDataItem.Name = $NewKVPName $newKvpExchangeDataItem.Data = $NewKVPData $newKvpExchangeDataItem.Source = 4 # Check to see if we can find the key $matchingString = '<PROPERTY NAME="Name" TYPE="string"><VALUE>' + $NewKVPName $existingKVP = $KvpSettingData.HostOnlyItems | ? {$_ -match $matchingString} # If the key exists - modify it. If not, create it. if ($existingKVP) {$result = $VMMS.ModifyKvpItems($Vm, $newKvpExchangeDataItem.GetText(1))} else {$result = $VMMS.AddKvpItems($Vm, $newKvpExchangeDataItem.GetText(1))} # Handle the results ProcessResult $result "The host-only KVP has been added." "Failed to add host-only KVP." } 2 {# Delete an existing host-only KVP # Prompt for the name for the KVP to delete $KVPName = Read-Host "Specify the name of the KVP to delete" # Check to see if we can find the key $matchingString = '<PROPERTY NAME="Name" TYPE="string"><VALUE>' + $KVPName $existingKVP = $KvpSettingData.HostOnlyItems | ? {$_ -match $matchingString} # If the key exists - remove it. if ($existingKVP) {$result = $VMMS.RemoveKvpItems($Vm, $existingKVP) ProcessResult $result "The host-only KVP has been deleted." "Failed to delete host-only KVP."} else {write-host "No host-only KVP exists with that name"} } } } until ($promptResult -eq 3)Cheers,
Ben
When we released Windows Server 2008 R2 we stated that we would support up to 384 virtual machines running on a single instance of Hyper-V – but only up to 64 virtual machines running on a node of a cluster.
Last week we announced that we now support up to 384 virtual machines running on a node of a cluster – as long as the total number of running virtual machines in the cluster does not exceed 1000.
You can read more about this on the “Requirements and Limits” page on TechNet: http://technet.microsoft.com/en-us/library/ee405267(WS.10).aspx
Cheers,
Ben
A while ago I made an open offer to people to contact me if they had experienced issues using Hyper-V backup. A number of you contacted me with reports of large registry files in the parent partition – that would slow down system boot over time.
Well, after a lot of investigation we have figured out the cause and a hotfix is now available. You can download it from here:
http://support.microsoft.com/kb/982210
I recommend that if you are using backup regularly on Hyper-V that you install this hotfix.
Note – that despite the title of the KB article, this fix applies to Windows Server 2008 R2 (not Windows Server 2008).
So what was the cause of the problem?
A short description is as follows:
Whenever we backup a virtual machine using VSS, we momentarily connect the backup copy of the virtual machines virtual hard disks to the parent partition in order to clean them up after backup. Unfortunately with Windows Server 2008 R2 a new plug-and-play entry would get created in the Windows registry each time that we did this. Over time this would cause the registry to get larger and larger, which would in turn slow down the Windows boot process.
Cheers,
Ben
While I did not realize it - my presentation on Dynamic Memory at TechEd US 2010 this week was recorded - and is now available for all to see:
Which means that everyone can see how my demo went off the tracks for a moment! (sigh). Apart from that - there is lots of good information about dynamic memory in there. You can also download a copy for offline viewing from the official TechEd site here: http://www.msteched.com/2010/NorthAmerica/VIR304
Finally, I should also say thanks to Matt McSpirit - aka virtualboy - for alerting me to the existence of this video.
Cheers,
Ben
I had a great time today at TechEd talking about Dynamic Memory in Hyper-V R2 SP1. I am going to do some detailed posts about it in the coming days – but for now I am just posting the presentation files that I used today (click on the title of this post to get the files).
Cheers,
Ben
When I was getting ready to head out to TechEd this week I copied a bunch of my Windows Virtual PC virtual machines onto a USB disk. 60 of them to be precise. But then I had the problem of how to get them all registered.
Sure, you can register a virtual machine with Windows Virtual PC by just double clicking on the .VMC file for the virtual machine – but this also starts the virtual machine. I did not want to have to start (and stop) all 60 virtual machines just to get them registered. So I threw together this little PowerShell script to do the job for me:
# Switch to using Single-Threaded Apartment model - needed by WinForms if([Threading.Thread]::CurrentThread.ApartmentState -ne "STA") { PowerShell -NoProfile -STA -File $myInvocation.MyCommand.Definition return } # Make new folder browse dialog - and display it [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null $OpenFileDialog = New-Object System.Windows.Forms.folderbrowserdialog $OpenFileDialog.Description = "Select a folder to register virtual machines from." $OpenFileDialog.ShowDialog() | Out-Null # Only move on if the user actually selected a folder if ($OpenFileDialog.SelectedPath) { # Find all .VMC files under the directory selected by the user $files = get-childitem $OpenFileDialog.SelectedPath -recurse | where {$_.extension -eq ".vmc"} # Get the VPC object $vpc = new-object –com VirtualPC.Application –Strict # Go through each of the .VMC files and register them Foreach ($file in $files) { $vpc.RegisterVirtualMachine($file.Name,$file.DirectoryName) | Out-Null } }When you run this script – you will be presented with a folder selection dialog. Once you have selected a folder the script will then look for – and register – all .VMC files that exist underneath that folder. Very handy!
Cheers,
Ben
I am now on the ground in New Orleans, have a hotel room and have registered at the show. I thought I would quickly share my schedule so that you can track me down:
Date / Time Location Monday, Jun 07, 2010, 5:30pm – 7:30pm At the server virtualization booth in the Exhibition hall Tuesday, Jun 08, 2010, 1:30pm – 2:45pm Talking about Dynamic Memory in Room 295 Tuesday, Jun 08, 2010, 2:45pm – 5:00pm At the server virtualization booth in the Exhibition hall Wednesday, Jun 09, 2010, 12:00pm – 3:00pm At the server virtualization booth in the Exhibition hallAt other times I will be wondering around the Exhibition hall or hanging out at the community lounge (right next to the hands on labs).
Finally – I would like to leave you with some local flavor:
This was my lunch. The lighter colored sushi was actually a “Cajun crawfish sushi roll” – which was surprisingly yummy.
Cheers,
Ben
If you are at TechEd US 2010 this year and are interested in virtualization – we have quite a full schedule for you. Here is the summary of all of the virtualization sessions that are going on this week:
Date and Time
Session
Session
Session
Monday, Jun 07, 2010
1.00 – 2.15 pm
VIR 206: Virtualization 360: Microsoft Virtualization Strategy, Products, and Solutions for the New Economy
VIR02-Int (Interactive Session): Hyper-V Live Migration over Distance. A Multi datacenter approach
Monday, Jun 07, 2010 2.45 – 4.00 pm
VIR317: Desktop Virtualization: You have a choice
Monday, Jun 07, 2010 4.30 – 5.45 pm
VIR204: Understanding how Microsoft Virtualization Compares with VMware
VIR07-Int (Interactive Session): Solving the VDI Licensing puzzle
Tuesday, Jun 08, 2010
8.00 - 9.15 am
WSV305: Deploying, Virtualizing, and Managing Linux and UNIX with Hyper-V
VIR318: Datacenter Virtualization: It's More than a Hypervisor
Tuesday, Jun 08 2010 9.45 – 11 am
WSV307: Windows Server 2008 R2 SP1
VIR06-Int (Interactive Session: Failover Clustering with Hyper-V Unleashed with Windows Server 2008 R2
VIR305: Microsoft RemoteFX: Rich Windows Desktop Experience for VDI and Session Virtualization
Tuesday, Jun 08, 2010 1.30 – 2.45 pm
VIR304: Hyper-V and Dynamic Memory in Depth
VIR311: Planning and Deploying Microsoft VDI with Management Technologies
Tuesday, Jun 08, 2010 3.15 – 4.30 pm
VIR307: Getting the Most out of Windows Server 2008 R2 Hyper-V with the Integration of the System Center Suite
Tuesday, Jun 08, 2010 5.00 – 6.15 pm
VIR310: Networking and Windows Server 2008 R2 Hyper-V: Deployment Considerations
Wednesday, Jun 09, 2010, 8.00 – 9.15am
VIR315: Windows Server 2008 R2 Hyper-V Performance Analysis: How You Can Get the Most out of Hyper-V
WSV309: Microsoft RemoteFX: USB and Device Support
Wednesday, Jun 09 2010 9.45 – 11 am
WSV316: Hyper-V and Storage: Maximizing Performance and Deployment Best Practices in Windows Server 2008 R2
VIR403: Virtualization FAQ, Tips, and Tricks
Wednesday, Jun 09, 2010 11.45 – 1.00 pm
VIR313: VDI from Microsoft and Citrix: What is it? How do I manage it? What benefits does it provide?
Wednesday, Jun 09, 2010, 1.30 – 2.45 pm
VIR03-Int (Interactive Session): Hyper-V for the VMware Administrator
Wednesday, Jun 09, 2010 3.15 – 4.30 pm
VIR316: Remote Desktop Session Host vs. Virtual Desktop Infrastructure Smackdown
Wednesday, Jun 09, 2010 5.00 – 6.15 pm
VIR09-Int (Interactive Session): Virtualization Round Table Discussion
Thursday, Jun 10, 2010 8.00 – 9.15 am
WSV13-Int (Interactive Session): Next Generation VDI with Microsoft RemoteFX
VIR314: Virtualization Scenarios for Business Critical Applications
VIR312: Realizing a Dynamic Datacenter Environment with Windows Server 2008 R2 Hyper-V and Partner Solutions
Thursday, Jun 10, 2010 9.45 – 11.00 am
VIR309: Microsoft System Center Virtual Machine Manager 2008 R2: Advanced Virtualization Management
Thursday, Jun 10, 2010, 1.30 – 2.45 pm
VIR01-Int (Interactive Session): Disaster Recovery and Virtualization Protection with Microsoft System Center Data Protection Manager (DPM) 2010
MGT312: Microsoft System Center Operations Manager and Virtual Machine Manager: Monitoring the Service Stack
Thursday, Jun 10, 2010 5.00 – 6.15 pm
VIR080-Int (Interactive Session): Virtualization: Security Tales from the Twilight Zone!
VIR322: Hyper-V Backup: A Look Under The Hood
Cheers,
Ben
I think I may have just seen my favorite localization bug report to date. A tester recently opened a bug against our Czech localization of Hyper-V – where the sentence:
The guest operating system (guest) is the operating system that runs inside the virtual machine
Was localized into:
Hostovaný operační systém (host) je operační systém, který běží uvnitř virtuálního počítače
The tester saw this section of the localized string:
Hostovaný operační systém (host) je operační systém, který běží uvnitř virtuálního počítače
And immediately thought that not only had the string not been translated – it had somehow been swapped from “guest” to the opposite term “host”. When this was sent to the localization team – their response was quick:
The Czech word for “guest” is actually “host”.
Cheers,
Ben
Next week I will be hanging out in New Orleans. As well as doing my share of booth duty – and walking around talking to people about virtualization – I will be presenting on Dynamic Memory. Here are the details:
Code Session Room Day Time VIR304 Hyper-V and Dynamic Memory in Depth Rm 295 Tuesday, June 8 1:30 PM - 2:45 PM Dynamic memory is a new feature of Hyper-V coming to Windows Server 2008 R2 SP1. Come to learn how Dynamic Memory enables Hyper-V to more efficiently utilize system resource, and how this can benefit your environment. Also learn how Dynamic Memory works under the covers and what you should be preparing for with the release of Windows Server 2008 R2 SP1.
See you there!
Cheers,
Ben
Our documentation team has done a great job of putting together a detailed Windows Server 2008 R2: Hyper-V Component Architecture Poster. They were nice enough to give us on the development team some physical copies – but you can download the .PDF to create your own:
The poster provides details on the inner workings of things like:
Cheers,
Ben
I have a blogged about this before - but we maintain a list of all updates / hotfixes that have been released for Hyper-V on Windows Server 2008 R2. We update this list regularly - and have just rolled out the latest updates. You can review the list here:
http://technet.microsoft.com/en-us/library/ff394763(WS.10).aspx
You should make sure to check this article regularly as we are always updating it.
We also have a similar list that we provide for Hyper-V on Windows Server 2008:
http://technet.microsoft.com/en-us/library/dd430893(WS.10).aspx
Cheers,
Ben
Windows Virtual PC only officially supports Windows XP, Windows Vista and Windows 7 as guest operating systems. Thankfully it has great compatibility and can run many operating systems that are not officially supported.
I recently needed to setup a Windows 98 virtual machine for my wife – who has some genealogy software that will not even run on Windows XP. To do this I created a new virtual machine and configured it with 64mb of RAM and a 16GB virtual hard disk.
I was then able to install Windows 98 with no real problems:
Some things to be aware of when doing this:
After installation both networking and sound work correctly – but the video is kind of “sucky” and you need to capture / release the mouse whenever you use the virtual machine. Luckily you can address both of these issues by installing older virtual machine additions in the virtual machine. Doing this will give you:
But you will not get:
But how do you do this? The trick is to extract the old virtual machine additions out of a previous product. In my case I decided to get the virtual machine additions out of Virtual Server 2005 R2. To do this what you will need to do is:
At this stage you should start up your Windows 98 virtual machine and login. Then attach the VMAdditions.iso file to the virtual machine. The virtual machine additions installer should start automatically inside the virtual machine:
After this you will need to reboot the virtual machine.
With all this in place – some parting notes that I have are:
Cheers,
Ben