Our first guest post (http://blogs.technet.com/tonyso/archive/2008/10/07/your-hyper-v-blog-post-here.aspx) comes from Jeremy Hagan. Thanks Jeremy!
One problem I have had when trying to do my first round of P2Vs for my Hyper-V implementation that I didn’t notice in testing is that you can’t size the VHD of the VM smaller than the corresponding physical disk of the original machine. Since it is best practice to have one LUN per VM and it is also best practice to have fixed VHDs, this can cause a lot of wasted SAN space. In my planning for the P2V process I monitored the target servers for 1 month so that I could get an idea of the CPU and memory use, but also the data growth. I decided to plot the percentage of data growth, extrapolate this for 3 years and then add a 15% premium on top of this then rounded up to the nearest 5 GB. This ended up being the SAN LUN size for each VM. The problem I then had was that I didn’t have enough SAN space available to P2V my machines.
What I decided I needed to do was to P2V each machine to a sufficiently large scratch LUN, then shrink down the VHDs to be the size I wanted then migrate the VM off the scratch LUN to the desired LUN. Easy right? Well maybe not. After much searching I have managed to come up with a recipe for doing this. See the example below. In this case it was a Windows XP machine with a 40 GB hard disk, but only 9.5 GB of data. If you want to play with this I recommend making a copy of the VHD file as a backup rather than taking a snapshot. Snapshots will interfere with final step using VHDResizer to create the final fixed VHD file.
Steps (assumes a single disk with a single partition):
Now if you think that is laborious and annoying, you’d be right. Hopefully Microsoft will come up with a better way to do this in the future. Now before I get a million comments about this, I did try to just use WinPE and DISKPART SHRINK, but no matter how many times I defragmented, precompacted and compacted I couldn’t get the partition to shrink down to less than about 24 GB.
Microsoft Hyper-V Server 2008 is out. Read about Hyper-V Server here: http://www.microsoft.com/servers/hyper-v-server/default.mspx.
One of the differences between Hyper-V on Windows Server 2008 core, and Microsoft Hyper-V Server 2008 is that Hyper-V Server comes with a set of scripts that make setup easier from the command line. These scripts are collectively called HVCONFIG and makes the setup experience look like this:
as opposed to this:
which some people find easier for that first POC/I-want-to-kick-the-tires install. Most enterprises will use automated installs, but still, for getting to know this FREE (as in beer) new virtualization product, HVCONFIG is helpful.
There is no supported way to take the scripts from the free download of Microsoft Hyper-V Server, and use it on a server core installation of Windows Server 2008 to install and configure Hyper-V, but I have heard it works just fine. Of course, if your purpose is to test/proof-of-concept - why wouldn't you use the Microsoft Hyper-V Sever instead of server core? I did mention it is FREE-as-in-beer, right? And there is no activation step in setup - not required - because Microsoft Hyper-V Server is FREE:-)
Microsoft Hyper-V Server 2008 Configuration Guide will provide you with all the information you need to setup and configure Hyper-V Server 2008. It covers setup up local administrator passwords, the new Hyper-V configuration tool (HVCONFIG) and remote management: http://www.microsoft.com/downloads/details.aspx?FamilyId=E1E111C9-FA69-4B4D-8963-1DD87804C04F
To learn more about the FREE Microsoft Hyper-V Server take a look at the Edge video: First Look: Hyper-V Server.
When you migrate your Virtual Server or Virtual PC virtual machine to Hyper-V, you:
If you have trouble in this process, and it looks like the integration services did non install correctly (mouse doesn't work correctly, for example), you may have a HAL mismatch.
By default, Hyper-V will install an APIC MP HAL when the Integration Services are installed in the virtual machine. If the VM had a different HAL, try changing it.
To change the HAL
Click the Boot tab, and then click Advanced options…
Check Detect HAL, click OK twice, and then restart the virtual machine.
Note Changing the HAL will usually trigger an operating system re-activation.
Here's another guest post from Jeremy Hagan, thanks again Jeremy!
If you are planning on using High Availability for Hyper-V there are a number of things to keep in mind while planning your deployment and there are a number of best practices that will impact on your planning. I will cover the best practices first then discuss how these impact your pre-deployment decision making.
Best Practice 1 – One VM per LUN
High Availability in Hyper-V is provided through WS08 Failover Clustering. When you fail-over a cluster resource with a dependent disk that disk can only be active on one cluster node at a time. So if your cluster disk has more than one VM on it, then they must all fail over as a group. Essentially there is nothing wrong with this, so long as you know what you are doing when you decide to go down this path. The benefit of one VM per LUN is that you have the best granularity in terms of moving workloads between cluster nodes for maintenance or for smoothing out performance bottlenecks.
Imagine if you had 5 VMs running on one LUN in a 5 node cluster. One of your cluster nodes is over-utilized and one is under-utilized. If you were to move the 5-VM group to the under-utilized node then you might end up moving the bottleneck. If the 5 VMs were split you could fail them over individually. This would allow you to smooth out the utilizations more evenly.
Best Practice 2 – Fixed VHD files
VHD files can be Dynamic (i.e. the VHD is the size of the data in the VHD) or Fixed (i.e. the VHD is the size of the data and free space). Having Fixed VHD files confers a performance benefit since there is no requirement to continually allocate new space to the VHD file. Fixed VHD files also prevent performance issues caused by file fragmentation (especially when combined with one VM per LUN).
With these two best practices in mind I will now explain how they may affect your planning decisions around LUN sizing for a HA Hyper-V cluster. My first attempt at planning my LUN sizes consisted of monitoring the physical servers I was going to virtualize for a period (in my case, three weeks) and extrapolating their observed data growth out to 3 years’ worth and then adding a 15% premium. After that I rounded up to the nearest 5 GB and then ordered my LUNs from the SAN team.
My first mistake was that I forgot to factor in the amount of memory I planned to allocate to each VM in the calculations (a real beginner's mistake). The next thing I didn’t think about until it came time to implement was that even though you might have a Fixed VHD file with 5 GB of free space inside that file, as soon as you take a snapshot, that 5 GB of free space becomes immediately inaccessible since now all changes are written to a differencing VHD file until the snapshot is deleted.
So if you decide to go for both of the above best practices you really need to think hard about, not only your LUN sizes, but also your management practices regarding snapshots. In my environment I have decided that no Production VM will be allowed to run on a snapshot beyond a certain period. So if you decide to make a snapshot of a VM prior to making a change, once the change is accepted and you have decided not to revert, then the snapshot should be deleted. This will cause the changes to be committed to the original VHD on the next reboot.
If you decide to ignore best practice number 1 make sure you do it with your eyes open. Know what you are getting yourself in for and have a bailout plan ready. Oh and if you do ignore BP #1 I wouldn’t recommend ignoring BP #2. The benefits of pooling VMs on a LUN are significant. It simplifies your SAN configuration, reduces the chances that you will run out of drive letters on your parent partition and best of all you don’t have to make as many hard decisions about locking away disk space. You can just go ahead and create a 1 TB LUN and start putting VMs on it, run with as many snapshots as you like and not worry. Until you start to reach a performance bottleneck that is.
In summary, think hard about sizing your LUNs. Consequences of under-sizing are significant, no room for snapshots, no room for boosting the amount of memory allocated to a VM. If you have the luxury of copious amounts of SAN space (hey storage is cheap, right?) then overspec.
I recently recorded a podcast with TechNet's Social Platform team, discussing the social platform, and the new TN social bookmarking in particular. Listen to the podcast, and then leave feedback here.
Some points to think about:
Check out the TechEd video Windows Server 2008 Hyper-V: Scripting & Programmatic Management for Fun & Profit (VBS & PowerShell) by John Kelbley, and Alexander Lash.
Some of John's example script are newly posed in the Official Scripting Guys Forum!, for example:
Thanks to John for sharing these.
By default, the free-as-in-beer Microsoft Hyper-V Server 2008 is configured for manual updates. In other words, it is NOT configured out of the box to go fetch automatic updates. This is desired behavior for most installs. However, if there are critical issues, like those you might find on the secbuls page, then you must remember to go manually update your Hyper-V Server.
Let's go do that right now.
No, really, stop what you are doing and go patch your Microsoft Hyper-V Server 2008 boxes right now. Here's how:
Note: This may take some time.
You may be prompted with “A restart is required to complete Windows Updates. Restart now?” Click Yes to initiate a restart. By default, running virtual machines will automatically be saved prior to restarting the Hyper-V Server.
For more info see http://www.microsoft.com/downloads/details.aspx?FamilyID=2a429ea3-e33b-414f-ae49-2eead9f5b351
Think of it as a contest. Have a Hyper-V blog post you want to share with the world, but no place to post it? Send it to me, I'll post the best ones here and send the lucky blogger a prize from the vast pool of Microsoft swag we keep in a room on the second floor. Send your post to firstname.lastname@example.org.
In the scripting forum someone :-) asked:
"Can anyone suggest the way to create AzMan scopes for VMs (I can assign VMs to scopes) with Powershell/WMI/VBScript?"
4 scripts are provided for managing your AzMan scopes in Hyper-V:
John's blog post describes free-as-in-beer training materials you can download and reuse with your users, including an intranet SharePoint site so users can self-serve. These are based on the materials Microsoft IT provides to Microsoft employees.
The zip download file contains a model of the intranet site for your own use with editable content in the EPE Docs folder. When you customize the documents, the HTML model will link automatically to the guides updated to fit your environment.
There is a new TechNet Edge screencast from Jeff Alexander demonstrates Microsoft Hyper-V Server 2008. OBTW, Microsoft Hyper-V Server 2008 is free-as-in-beer.
The RoboChamps is similar to the DARPA Urban Challenge, only it is a SIM. Participants must program a robotic car to navigate to a series of checkpoints in an urban environment.
Check out the website for the software, challenge kits, training materials, and a video podcast: www.robochamps.com.
You know those little dishes beside cash registers marked "Give a penny, take a penny"? It is one manifestation of the "pay-it-forward' meme. I give an extra penny from my transaction change now when I don't need it, and I take one later when I do.
Folks who follow the Getting Things Done methodology are always looking for the equivalent in action mangement. An easy example: so that you won't forget to take the <important thing> with you in the morning, put it in front of the door before you go to bed. See what I mean?
Anyway, in that spirit I offer this little insight into an invaluable time-saving Outlook 2007 feature if you have RM installed We do here at Microsoft: on the Permissions menu. select Do Not Reply All, and you have saved everyone on the mail the time it takes to delete all the replies if they are not interested in the thread.
Well we can claim it anyway - the next version of Windows is named... Windows 7 :-)
Read about it on Mike Nash's blog post: Introducing Windows 7.
Watch Chris Slemp's video* for an overview of TN/MSDN's "social platform" that includes:
Community Content (ak.a. "wiki") - for example see http://technet.microsoft.com/en-us/library/cc753637.aspx
Forums - for example, did you know the Scripting Guys have a forum?
Oh yeah, search is now part of the social platform
*Hey, who's profile is that on the screen at about timecode 2:07?
In the coming months it will be even more important for IT to show how it adds value to the company. One way to add value is to shave costs, Microsoft can help:
*For instance, did you know there is a free-as-in-beer library of PowerShell cmdlts for managing Hyper-V on CodePlex?
Did you notice that the URL for search on TechNet changed recently?
It is now social.technet.microsoft.com/search.
Check out the new "refinements" (that work like "filters", only, I guess "filters" sounds too prole...) and the "Related To:" listings that bring you "pre-refined" searches, nifty.
Bothered by English-language results being categorized higher on the search results page than non-English results? Check out the new ability to exclude English results.
Follow the Rob Veliz blog for more info.
Have a listen to this podcast on SEO with Rob Veliz, then check out these tools:
Keyword Research: https://adwords.google.com/select/KeywordToolExternal
Keyword Research: tools.seobook.com/keyword-list/generator.php
Link Research: http://siteexplorer.search.yahoo.com/
Analytics: adCenter Add-inBeta for Excel 2007
Webmaster tools: http://webmaster.live.com/
The Springboard content series on TechNet has a blog. AFAIK this is the first time a content series has started a blog, as opposed to a product group. Check it out and keep an eye on it around the PDC timeframe for announcements and information about planning and deploying Windows 7.
Here's looking forward to an "Exchange Administrator's Guide blog", or a "Windows Server 2008 ResKit blog" or, (my favorite) a "PowerShell Command Line Reference blog".
The TN and MSDN social platform, including the new bookmarking apps, just went virtual to improve perf as more and more IT Pros and Devs twig to what's going on. Read about it on Chris's blog post. 24 VMs and growing...
Live search continues to rock the "free-as-in-beer images while you search" game. Wow!
Think of it as fire-and-forget ammo for those afflicted with "I am my brother's keeper" syndrome.
Splogbane: If you are reading this on a blog other than http://blogs.technet.com/tonyso, why not stop patronizing a splog and come over to the original?
Marcus Anthony and Scott Bullens have a startup that makes me sad/glad. Sad we need it, glad it is there. My Mobile Witness allows you to use the camera in your phone and text messaging to send a photo of someone (or, say a license plate) that can be retrieved by law enforcement without a warrant. This can be a powerful deterrent.
Say a friend leaves a party with a person they've just met against your advice and having had too much to drink. You snap their pic and inform them you expect your friend to get home safely, if they don't the authorities will have the info they need to follow up.
The service is free - but there will be ad-support in their somewhere I'm sure.
You already read my blog post about MAP 3.1, right? The beta of the newest version Microsoft Assessment and Planning (MAP) Toolkit (3.2) is available on Connect, including new modules:
Don't forget to lurk the forum: http://blogs.technet.com/tonyso/archive/2008/03/13/new-map-forum.aspx