Hyper-V 2008 R2: Still good enough?

I manage a vSphere environment at work, and it is a real change from the last few years when I spent all of my time talking about Hyper-V.  I want to be clear – it is not better or worse, it is just… different.  We have a number of virtualization hosts, plus a physical domain controller, and one physical server running Windows Server 2008 R2 (Enterprise), which has an app running that precludes us from changing that.  The app hardly uses any memory, so a lot of that was wasted.

While my physical server does not have a lot of RAM (8GB) it has a ridiculous amount of internal storage… I mean terabytes and terabytes of it.  I asked my boss about it, and he said it was there for something that they no longer use the server for… but it’s there… wasted as well… for now.

A few weeks ago I proposed a project that would require use of that space, and it was tentatively approved.  The problem is that the existing application and the proposed application are not supposed to co-exist on the same server.  I would have to come up with a way to segregate them.  No problem… I would install the Hyper-V role onto the physical server, and then create a new virtual machine for my purposes.

Once I explained to my boss that no extra licensing was required – because the physical server is licensed for Windows Server 2008 R2 Enterprise Edition, we could build as many as four virtual machines on the same license on that host – he got excited, and asked the usual ‘what else can we do?’ questions.

‘Can we cluster the virtual machine?’

No.  I mean, we could, but it would require having a second Hyper-V host which we do not have.  There is nothing we can do about that without incurring extra costs… and the purpose of the exercise is to do it for zero dollars.

‘Can we use Storage Spaces?’

No.  Storage Spaces is a great technology – one that I really loved talking about when I was working with Microsoft.  However it is a feature that was only introduced in Windows Server 2012, and we are only on Server 2008 R2.

‘Can we create the VM using 64TB .vhdx drives?’

No.  Again, .VHDX files were only introduced in Windows Server 2012.  We are limited to 2TB .VHD files… which is more than enough for our actual needs anyways.

‘How about UEFI Boot on the VM’

Nope.  Generation 2 hardware was introduced in Windows Server 2012 R2, so we are stuck with Generation 1 hardware.

So after he struck out on all of these questions, he asked me the question I was expecting… ‘Then why bother?’

I became a fan of Hyper-V as soon as it was released in Windows Server 2008.  Yes, the original.  I was not under any delusions that it was as good as or better than ESX, but it was free and it didn’t require anything to install… and if you knew Windows then you didn’t need to learn much more to manage it.

Of course it got much better in Windows Server 2008 R2, and even better in the SP1 release… and then in Windows Server 2012 it broke through, and was (in my opinion) as good as or better than vSphere… in some ways it was almost as good, in some ways it was better, and in the balance it came out even. Of course Server 2012 R2 made even better improvements, but when I spent three years with Microsoft Canada – first as a Virtual Partner Technology Advisor and then as a Virtual Evangelist – criss-crossing the country (and the US and the globe) evangelizing Hyper-V in Windows Server 2012 I was confident when I said that at last Microsoft Virtualization was on a par with VMware.

I would never have said that about Hyper-V in Windows Server 2008 R2. Sorry Microsoft, it was good… but vSphere was better.

However in this case we are not comparing Microsoft versus VMware… we are not deciding which platform to implement, because VMware is not an option. We are not even comparing the features of vOld versus vNew… because vNew is still not an option.

All we are deciding is this: Does the version of Hyper-V that is available to us for this project good enough for what our needs are for the project? Let’s review:

  • We need to create a virtual machine with 4GB of RAM. YES.
  • We need that VM to support up to 4TB of storage. YES. (We cannot do it on a single volume, but that is not a requirement)
  • We need the VM to be able to join a domain with FFL and DFL of Windows Server 2008 R2. YES.
  • We need the virtual machine to be backed up on a nightly basis using the tools available to us. YES

That’s it… we have no other requirements. All of our project needs are met by Hyper-V on Windows Server 2008 R2. Yes, Microsoft would love for us to pay to upgrade the host operating system, but they got their money for this server when we bought the license in 2011, and unless they are willing to give us a free upgrade (there is no Software Assurance on the existing license) and pay to upgrade the existing application to work on Server 2012R2 then there is nothing that we can do for them… and frankly if we were in the position where we were going to have to redeploy the whole server, it would be on VMware anyways, because that is what our virtualization environment runs on.

I spent two years evangelizing the benefits of a hybrid virtualization environment, and how well it can be managed with System Center 2012 R2… and that is what we are going to have. I have purchased the System Center licenses and am thrilled that I will be able to manage both my vSphere and my Hyper-V from one console… and for those of you who were paying attention that is what I spent the last three years recommending.

I can hold my head up high because I am running my environment exactly how I recommended all of you run yours… so many of my audience complained (when I was with Microsoft) that my solutions were not real-world because the real world was not exclusively Microsoft. That was never what I was recommending… I was recommending that the world does not need to be entirely VMware either… the two can coexist very well… with a little bit of knowledge and understanding!

Advertisements

Cloning with Customization Specifications

Being back in a VMware environment, there are a few differences I need to remember from Hyper-V and System Center.  It is not that one is better or worse than the other, but they are certainly different.

Customization Specifications are a great addition in vCenter to Cloning virtual machines.  They allow you to name the VM, join domains, in short set the OOBE (Out of Box Experience) of Windows.  They just make life easier.

The problem is, they do a lot of the same things as Microsoft’s deployment tools… but they do them differently.  We have to remember that Microsoft owns the OS, so when you use the deployment tools from Microsoft, they inject a lot of the information into the OS for first boot.  Customization Specifications work just like answer files… they require a boot-up (or two) to perform the scripts… and while those boots are interactive sessions, you should be careful about what you do in them.  They will allow you to do all sorts of things, but then when they are ready they will perform the next step – a reboot.

I am not saying that you shouldn’t use Customization Specifications… I love the way they work, and will continue to use them.  Just watch out for those little hiccoughs before you go 🙂

Another tough exam…

As a subject matter expert (SME) on virtualization, I was neither excited nor intimidated when Microsoft announced their new exam, 74-409: Server Virtualization with Windows Server Hyper-V and System Center.  Unlike many previous exams I did not rush out to be the first to take it, nor was I going to wait forever.  I actually thought about sitting the exam in Japan in December, but since I had trouble registering there and then got busy, I simply decided to use my visit to Canada to schedule the exam.

This is not the first exam that I have gone into without so much as a glance at the Overview or the Skills Measured section of the exam page on the Internet.  I did not do any preparation whatsoever for the exam… as you may know I have spent much of the last five years living and breathing virtualization.  This attitude very nearly came back to bite me in the exam room at the Learning Academy in Hamilton, Ontario Wednesday morning.

Having taught every Microsoft server virtualization course ever produced (and having written or tech-reviewed many of them) I should have known better.  Virtualization is more than installing Hyper-V.  it’s more than just System Center Virtual Machine Manager (VMM) and Operations Manager (OpsMgr).  It is the entire Private Cloud strategy… and if you plan to sit this exam you had better have more than a passing understanding of System Center Service Manager (ServMgr), Data Protection Manager (DPM), and Orchestrator.  Oh, and your knowledge should extend beyond more than one simple Hyper-V host.

I have long professed to my students that while DPM is Microsoft’s disaster recovery solution, when it comes down to it just make sure that your backup solution does everything that they need, and make sure to test it.  While I stand behind that statement for production environments, it does not hold water when it comes to Microsoft certification exams.  When two of the first few questions were on DPM I did a little silent gulp to myself… maybe I should have prepared a little better for this.

I do not use Service Manager… It’s not that I wouldn’t – I have a lot of good things to say about it.  Heck, I even installed it as recent as yesterday – but I have not used it beyond a passing glance.  The same used to be true of System Center Orchestrator, but over the last year that has changed a lot… I have integrated it into my courseware, and I have spent some time learning it and using it in production environments for repetitive tasks.  While I am certainly not an expert in it, I am at least more than just familiar with it.  That familiarity may have helped me on one exam question.  Had I taken the time to review the exam page on the Microsoft Learning Experience website I would have known that the word Orchestrator does not appear anywhere on the page.

Here’s the problem with Microsoft exams… especially the newer ones that do not simply cover a product, but an entire solution across multiple suites.  Very few of us will use and know every aspect covered on the exam.  That is why I have always professed that no matter how familiar you may be with the primary technology covered, you should always review the exam page and fill in your knowledge gaps with the proper studying.  You should even spend a few hours reviewing the material that you are pretty sure you do know.  As I told my teenaged son when discussing his exams, rarely will you have easy exams… if you feel it was easy it just means you were sufficiently prepared.  Five questions into today’s exam I regretted my blasé attitude towards it – I may be a virtualization expert, but I was not adequately prepared.

As I went through the exam I started to get into a groove… while there are some aspects of Hyper-V that I have not implemented, those are few and far between.  the questions about VHDX files, Failover Clustering, Shared VHDX, Generation 2 VMs, and so many more came around and seemed almost too easy, but like I told my son it just means I am familiar with the material.  There were one or two questions which I considered to be very poorly worded, but I reread the questions and the answers and gave my best answer based on my understanding of them.

I have often described the time between pressing ‘End Exam’ and the appearance of the Results screen to be an extended period of excruciating forced lessons in patience.  That was not the case today – I was surprised that the screen came up pretty quickly.  While I certainly did not ace the exam, I did pass, and not with the bare minimum score.   It was certainly a phew moment for a guy who considers himself pretty smart in virtualization.

Now here’s the question… is the exam a really tough one, or was I simply not prepared and thus considered it tough?  And frankly, how tough could it have been if I didn’t prepare, and passed anyways?  I suppose that makes two questions.  The answer to both is that while I did not prepare for the exam, I am considered by many (including Microsoft) a SME on Hyper-V and System Center.  I can say with authority that it was a difficult exam.  That then leads to the next question, is it too tough?  While I did give that some thought as I left the exam (my first words to the proctor was ‘Wow that was a tough exam!) I do not think it is unreasonably so.  It will require a lot of preparation – not simply watching the MVA Jump Start videos (which are by the way excellent resources, and should be considered required watching for anyone planning to sit the exam).  You will need to build your own environment, do a lot of reading and research, and possibly more.

If you do plan to sit this exam, make sure you visit the exam page first by clicking here.  Make sure you expand and review the Overview and Skills Measured sections.  If you review the Preparation Materials section it will refer you to a five day course that is releasing next week from Microsoft Learning Experience – 20409A- Server Virtualization with Windows Server Hyper-V and System Center (5 Days).  I am proud to say that I was involved with the creation of that course, and that it will help you immensely, not only with the exam but with your real-world experience.

Incidentally, passing the exam gives you the following cert: Microsoft Certified Specialist: Server Virtualization with Hyper-V and System Center.

Good luck, and go get em!

Free ebook: Introducing Microsoft System Center 2012 R2

Folks you will not want to miss this!  Microsoft Press is giving away the ebook Introducing Microsoft System Center 2012 R2: Technical Overview.  It is written by Mitch Tulloch, Symon Perriman, and the System Center team… and is a great way to get up to speed on Microsoft’s private cloud!

Check it out at http://blogs.msdn.com/b/microsoft_press/archive/2013/12/16/free-ebook-introducing-microsoft-system-center-2012-r2.aspx.

Become a Virtualization Expert!

For those who missed the virtualization jump start, the entire course is now available on demand, as is the link to grab a free voucher for exam 409. This is a single exam virt specialist cert. I would encourage you to take the exam soon before all the free spots are booked.   Full info at http://borntolearn.mslearn.net/btl/b/weblog/archive/2013/12/17/earn-your-microsoft-certified-specialist-server-virtualization-title-with-a-free-exam.aspx

What’s New in Windows Server 2012 R2 Lessons Learned Week 1

Dan Stoltz asked me to republish this article, and it is well worth it!  Check out all of the links – a lot of great material! -MDG

It has been an incredible start to the Windows Server 2012 R2 Launch Series.  Here is brief summary of what we covered so far…

  1. Windows Server 2012 R2 Launch Blog Series Index #WhyWin2012R2 the series, opening and index page we learned that from Oct 18th and every day until Thanksgiving we should visit http://aka.ms/2012r2-01 to learn all about Windows Server 2012 R2. You can also follow the excitement on twitter at #WhyWin2012R2. Download the calendar .ICS to populate your calendar here.  This post started the new launch series where Microsoft platform experts would cover  why Windows Server 2012 R2 is important, how to deploy, manage, configure any number of components in Windows Server 2012 R2, how the new OS capabilities stack up against competitors, how R2 integrates with and leverages cloud services like Windows Azure and many, many more categories. This series is deep technical content with lots of How To’s and Step-By-Step instructions. You will learn about storage, cloud integration, RDS, VDI, Hyper-V, virtualization, deduplication, replica, DNS, AD, DHCP, high availability, SMB, backup, PowerShell and much, much more!
  2. Why Windows Server 2012 R2 Rocks! #WhyWin2012R2 – You are probably like most people and realize that Windows Server 2012 was a very substantial upgrade over Windows Server 2008 R2. What would you say to Microsoft doing it again, and even better? WOW! That is exactly what Windows Server 2012 R2 has done. In this post we will look at some of the coolest additions and improvements to Windows Server 2012 R2. Regardless of which of the four pillars of focus (Enterprise-Class, Simple and Cost-Effective, Application Focused, User Centric) you are most interested in, you will find plenty in this post to appreciate! @ITProGuru will show you as he counts the top 10 biggest, most relevant and/or most differentiated new features in Windows Server 2012 R2.
  3. Where Are All The Resources For Windows Server 2012 R2? – We learned where to do go get free resources for Windows Server 2012 R2 including downloading a Free Trial of Windows Server 2012 R2, Free online cloud serversFree EBook on Windows Server 2012 R2, Free Posters, Free Online Training from Microsoft Virtual Academy, and much more.
  4. Implementing Windows Server 2012 R2 Active Directory Certificate Services Part 1 &
  5. Implementing Windows Server 2012 R2 Active Directory Certificate Services Part 2PKI is heavily employed in cloud computing for encrypting data and securing transactions. While Windows Server 2012 R2 is developed as a building block for cloud solutions, there is an increasing demand for IT professionals to acquire proficiency on implementing PKI with Windows Server 2012 R2. This two-part blog post series is to help those who, like me, perhaps do not work on Active Directory Certificate Services (AD CS) everyday while every so often do need to implement a simple PKI for assessing or piloting solutions better understand and become familiar with the process.
  6. Step-by-Step: Automated Tiered Storage with Storage Spaces in R2 – Windows Server 2012 R2 includes a number of exciting storage virtualization enhancements, including automated storage tiering, scale-out file server re-balancing and performance tuning for high-speed 10Gbps, 40Gbps and 56Gbps storage connectivity.  IT Pros with which I’ve spoken are leveraging these new enhancements to build cost-effective SAN-like storage solutions using commodity hardware.In this article, we’ll begin part 1 of a two-part mini-series on storage.  I’ll provide a technical comparison of Windows Server 2012 R2 storage architecture to traditional SAN architecture, and then deep-dive into the new Storage Spaces enhancements for storage virtualization.  At the end of this article, I’ll also include Step-by-Step resources that you can use to build your own Storage Spaces lab.  In part 2 of this mini-series, we’ll finish our storage conversation with the new improvements around Scale-Out File Servers in Windows Server 2012.
  7. iSCSI Target Server – Super Fast Mass Server Deployment! – #WhyWin2012R2 – There have been some significant updates to Windows Server 2012 with the R2 release. One of these updates helps IT Pros deal with a growing problem – How do I deploy a large number of servers quickly, at scale without adding massive amounts of storage?The updates to the iSCSI target server technologies allow admins to share a single operating system image stored in a centralized location and use it to boot large numbers of servers from a single image. This improves efficiency, manageability, availability, and security. iSCSI Target Server can boot hundreds of computers by using a single operating system image!
  8. Why Windows Server 2012 R2: Reducing the Storage Cost for your VDI Deployments with VHD De-duplication for VDI – Windows Server 2012 introduced a data deduplication for your storage workloads customers saw phenomenal storage reduction.  Windows Server 2012 R2 deduplucation now supports live VHDs for VDI, which means that data de-duplication can now be performed on open VHD/VHDX files on remote VDI storage with CSV volume support. Remote VHD/VHDX storage de-duplication allows for increased VDI storage density significantly reducing
    VDI storage costs, and enabling faster read/write of optimized files and advanced caching of duplicated data.
  9. Importing & Exporting Hyper-V VMs in Windows Server 2012 R2 One of the biggest benefits of server virtualization is the ability to backup or restore entire systems easily and quickly.  Though they are infrequently used features, Hyper-V import and export are very fast, versatile, and easy to use.  In Windows Server 2012 R2 these features get even better.  I will take a look at how this functionality works and why it is useful.  I’ll also discuss how they are very different from the commonly used checkpoints in Hyper-V, and how you can automate this process.

Keep plugged in to the series to continue learning about Windows Server 2012 R2

– See more at: http://itproguru.com/expert/2013/10/whats-new-in-windows-server-2012-r2-lessons-learned-week-1/#sthash.JWWX9vKZ.dpuf

A response to a VMware article… written by someone I respect.

English: VMware vSphere in the Enterprise

While he may not be very well know to the Microsoft community, Mike Laverick is a legend in VMware circles.  Mike owns a blog called RTFM Education, a source of white papers for VMware technology, although he did start out as a Microsoft Certified Trainer.  He now works for VMware as a Senior Cloud Infrastructure Evangelist.  I was very happy to read on his blog that he has decided to try learning Hyper-V and Microsoft’s Private Cloud.  Unfortunately from what I can tell he was still trying to think way too VMware, rather that trying to learn the Microsoft way of doing things.

(To read the article follow this link:

http://www.mikelaverick.com/2013/10/i-cant-get-no-validation-windows-hyper-v-r2eality-fail-over-clustering/)

This is a problem that I see all the time, and going both ways.  When I was teaching vSphere Infrastructure classes my Microsoft-focused students had a hard time getting out of the Microsoft mindset.  When I teach Microsoft courses, my VMware students have the same problem going the other direction.  It would be much easier if people would open their minds and just let the technology flow… but then I have been a Star Wars fan for too long so I believe in that sort of thing.

I found several points of the article quite amusing.  Mike opens the article with a picture and quote from the book Windows NT Microsoft Cluster Server.  The first words that he actually types are ‘Mmm, so much has changed since then or has it?’  I am sorry Mike, but to even insinuate that Microsoft Clustering in Windows Server 2012 R2 is anywhere near the disaster that was clustering in Windows NT (or Server 2000, or Server 2003) is a joke.  Yes, you have to have the proper pieces in place, and yes, you have to configure it properly.  You even have to spend a little time learning Microsoft Clustering and how it works.  If you were to spend thirty minutes with someone like me I’d say you’d be good.

Also, I know you don’t like that you have to install the Failover Clustering Feature to all of the servers before you can create your cluster.  However please remember that unlike a pure hypervisor, Windows Server is an operating system that does many things for many people.  To install all of the possible features out of the box is a ridiculous notion – for one thing, it would triple the footprint and multiply exponentially the attack surface of Windows Server… to say nothing of having code running that you don’t need which takes resources.

To save time, I recommend the following PowerShell cmdlets:

Install-WindowsFeature –Name Failover-Clustering –IncludeManangementTools –ComputerName MyServer1
Install-WindowsFeature –Name Failover-Clustering –IncludeManangementTools –ComputerName MyServer2
Install-WindowsFeature –Name Failover-Clustering –IncludeManangementTools –ComputerName MyServer3
New-Cluster –Name MyCluster –Node MyServer1, MyServer2, MyServer3 –StaticAddress 172.17.10.5

(There are probably ways to wildcard that – -ComputerName * or something, but that is not the point of the article).

The point of this article is not to Mike’s article apart – for one thing, he is probably doing better on Microsoft technology than I would have when I was new to VMware, for another I have great respect for him, both as a person and as an IT Pro.  I just find it amusing that a VMware evangelist is struggling to learn Hyper-V and System Center, just as so many of the Microsoft evangelists have been struggling to learn VMware.  There is a huge learning curve to be sure… no matter which way you go.

While I am reasonably fluent and certified in both technologies, there is no question that I favour Microsoft… just as Mike favours VMware.  I am glad to see that he is trying to learn Microsoft though… even though some of the ways he is going about it may be questionable.

The one thing that I will point out though is that Mike is right… there are two ways of building a Microsoft Cluster – you can use the Failover Cluster Manager, or you can use System Center VMM.  Michael points out that these technologies would do well to communicate better.  I agree, and recommend that users pick one or the other.  I would also like to point out that in vCenter Server you can create a cluster, but if you are only using ESXi (Vmware’s hypervisor) without vCenter Server there is no way to create a cluster… the technology is simply not supported unless you pay for it.  Score one for Microsoft.

Mike, on a personal note, I would love to sit with you and show you the vastness of System Center and Microsoft’s Private Cloud one day.  Geography seems to work against us, as you are (I believe) in Scotland, and I am in Japan.  There is a catch though… I will gladly teach you Microsoft’s virtualization stack from top to bottom… but I want you to do the same for me with the vSphere stack.  I know the technology and am certified, but I would cherish the opportunity to relearn it from you, as I have followed your articles with reverence for many years.

If you ever do care to take me up on the offer Mike, my email address is mitch@garvis.ca.  Drop me a line, we’ll figure it out.  I suspect that we would both be able to write some great articles following those sessions, and we would both have newfound respect for the other’s technology of choice.

Building the IT Camp with PowerShell Revisited

I always said I am not hard to please… I only need perfection.  So when I wrote my PowerShell script to build my environment the other day I was pleased with myself… until I realized a huge flaw in it.  Generation 1.

Actually to be fair, there is nothing wrong with Generation 1 virtual machines in Hyper-V; they have served us all well for several years.  However how could I claim to live on the bleeding edge (Yes, I have made that claim many times) and yet stay safe with Generation 1?

In the coming weeks Windows Server 2012 R2 will become generally available.  One of the huge changes that we will see in it is Generation 2 virtual machine hardware.  Some of the changes in hardware levels include UEFI, Secure Boot, Boot from SCSI, and the elimination of legacy hardware (including IDE controllers and Legacy NICs).

Of course, since Generation 1 hardware is still fully supported, we need to identify when we create the VM which Generation it will be, and this cannot later be changed.

I had forgotten about this, and when I created the script (of which I was quite proud) I did not think of this.  It was only a few hours later, as I was simultaneously installing nine operating systems, that I noticed in the details pane of my Hyper-V Manager that all of my VMs were actually Gen1.

Crap.

Remember when I said a couple of paragraphs ago that the generation level cannot be changed?  I wasn’t kidding.  So rather than living with my mistake I went back to the drawing board.  I found the proper cmdlet switches, and modified my script accordingly.

As there is a lot of repetition in it, I am deleing six of the nine VMs from the list.  You are not missing out on anything, I assure you.

# Script to recreate the infrastructure for the course From Virtualization to the Private Cloud (R2).
# This script should be run on Windows Server 2012 R2.
# This script is intended to be run within the Boot2VHDX environment created by Mitch Garvis
# All VMs will be created as Generation 2 VMs (except the vCenter VM for which it is not supported).
# All VMs will be configured for Windows Server 2012 R2
# System Center 2012 R2 will be installed.

# Variables

$ADM = "Admin"                # VM running Windows 8.1 (for Administration)
$ADMMIN = 512MB                # Minimum RAM for Admin
$ADMMAX = 2GB                # Maximum RAM for Admin
$ADMVHD = 80GB                # Size of Hard Drive for Admin

$SQL = "SQL"                # VM (SQL Server)
$SQLMIN = 2048MB            # Minimum RAM assigned to SQL
$SQLMAX = 8192MB            # Maximum RAM assigned to SQL
$SQLCPU = 2                # Number of CPUs assigned to SQL
$SQLVHD = 200GB                # Size of Hard Drive for SQL

$VCS = "vCenter"             # VM (vSphere vCenter Cerver) (Windows Server 2008 R2)
$VCSMIN = 2048MB             # Minimum RAM assigned to vCenter
$VCSMAX = 4096MB             # Maximum RAM assigned to vCenter
$VCSCPU = 2                 # Number of CPUs assigned to vCenter
$VCSVHD = 200GB                # Size of Hard Drive for vCenter

$VMLOC = "C:\HyperV"            # Location of the VM and VHDX files

$NetworkSwitch1 = "CorpNet"        # Name of the Internal Network

$W81 = "E:\ISOs\Windows 8.1 E64.iso"            # Windows 8.1 Enterprise
$WSR2 = "E:\ISOs\Windows Server 2012 R2.iso"        # Windows Server 2012 R2
$W2K8 = "E:\ISOs\Windows Server 2008 R2 SP1.iso"     # Windows Server 2008 R2 SP1

# Create VM Folder and Network Switch
MD $VMLOC -ErrorAction SilentlyContinue
$TestSwitch1 = Get-VMSwitch -Name $NetworkSwitch1 -ErrorAction SilentlyContinue; if ($TestSwitch1.Count -EQ 0){New-VMSwitch -Name $NetworkSwitch1 -SwitchType Internal}

# Create & Configure Virtual Machines
New-VM -Name $ADM -Generation 2 -Path $VMLOC -MemoryStartupBytes $ADMMIN -NewVHDPath $VMLOC\$ADM.vhdx -NewVHDSizeBytes $ADMVHD -SwitchName $NetworkSwitch1
Set-VM -Name $ADM -DynamicMemory -MemoryMinimumBytes $ADMMIN -MemoryMaximumBytes $ADMMAX
Add-VMDvdDrive $ADM | Set-VMDvdDrive -VMName $ADM -Path $W81

New-VM -Name $SQL -Generation 2 -Path $VMLOC -MemoryStartupBytes $SQLMIN -NewVHDPath $VMLOC\$SQL.vhdx -NewVHDSizeBytes $SQLVHD -SwitchName $NetworkSwitch1
Set-VM -Name $SQL -DynamicMemory -MemoryMinimumBytes $SQLMIN -MemoryMaximumBytes $SQLMAX -ProcessorCount $SQLCPU
Add-VMDvdDrive $SQL | Set-VMDvdDrive -VMName $SQL -Path $WSR2

New-VM -Name $VCS -Path $VMLOC -MemoryStartupBytes $VCSMIN -NewVHDPath $VMLOC\$VCS.vhdx -NewVHDSizeBytes $VCSVHD -SwitchName $NetworkSwitch1
Set-VM -Name $VCS -DynamicMemory -MemoryMinimumBytes $VCSMIN -MemoryMaximumBytes $VCSMAX -ProcessorCount $VCSCPU
Set-VMDvdDrive -VMName $VCS -Path $W2K8

#Start Virtual Machines
Start-VM $ADM
Start-VM $SQL
Start-VM $VCS

In the script you can see a few differences between my original script (in the article) and this one.  Firstly on all machines that are running Windows 8.1 or Windows Server 2012 R2 I have set the switch –Generation 2.  That is simple enough.

Adding the virtual DVD was a little trickier; with Generation 1 hardware there was a ready IDE port for you to connect the .ISO file to.  In Gen 2 it is all about SCSI, so you have to use the Add-VMDvdDrive cmdlet, and then connect the .ISO file (Set-VMDvdDrive –VMName <Name> –Path <ISO Path>Not only for simplicity but also to demonstrate that you can I have put these two cmdlets on a single line, connected with a pipe (the | key).

I want to thank a couple of colleagues for helping me out with the Generation 2 hardware and DVD issues… especially Sergey Meshcheryakov , who was quick to answer.  The exact cmdlet switches were not easy to track down!

…and remember, if I can learn it, so can you!  Even the great Sean Kearney once did not know anything about PowerShell… and now look at him!

Managing Hyper-V Virtual Machines with Windows PowerShell

Warning: The following post was written by a scripting luddite.  The author readily admits that he would have difficulty coding his way out of a paper bag, and if the fate of the world depended on his ability to either write code or develop software then you had better start hoarding bottled water and cans of tuna.  Fortunately for everyone, there are heroes to help him!

I love the Graphical User Interface (GUI).  I use it every day in both the Windows client and Windows Server operating systems.  It makes my life easier on a day to day basis.

With that being said, there are several tasks that administrators must do on a regular basis.  There is no simple and reliable way to create repetitive task macros in the GUI.  Hence we can either work harder, or we can learn to use scripting tools like Windows PowerShell.

Along the way I have gotten some help from some friends.  Ed Wilson’s books have provided a wealth of information for me, and Sean Kearney has been my go-to guy when I need help.  There was a time when I was teaching a class and was asked ‘Can PowerShell do that?’  I replied by saying that if I asked Sean Kearney to write a PowerShell script to tie my shoes, I was reasonably sure he could do it because PowerShell can do ANYTHING.  Well one of my students posted that comment on Twitter, and got the following reply from Sean (@EnergizedTech):

Get-Shoe | Invoke-Tie

It makes sense too…because PowerShell works with a very simple Verb-Noun structure, and if you speak English it is easy to learn.

I may be a scripting luddite, but I do know a thing or two about virtualization, and especially Hyper-V.  So it only stands to reason that if I was going to start learning (and even scarier, teaching) PowerShell, I would start with the Hyper-V module.  As a good little Microsoft MVP and Community Leader, it only makes sense that I would take you along for the ride 🙂

Most of what can be done in PowerShell can also be done in the GUI.  If I want to see a list of the virtual machines on my system, I simply open the Hyper-V Manager and there it is.

Get-GUI

PowerShell is almost as simple… Type Get-VM.

Get-PS

By the way you can filter it… if you only want virtual machines that start with the letter S, try:

Get-VM S*

One of the advantages of PowerShell is that it allows you to manage remote servers, rather than having to log into them you can simply run scripts against them.  If you have a server called SWMI-Host1, you can simply type:

Get-VM –Server SWMI-Host1

Starting and stopping virtual machines is simple…

Start-VM Admin

Stop-VM VMM

Again, your wildcards will work here:

Start-VM O*

This command will start all VMs that start with the letter O.

If you want to check how much memory you have assigned to all of your virtual machines (very useful when planning as well as reporting) simply run the command:

Get-VMMemory *

Get-VMMemory

I did mention that you could use this command for reporting… to make it into an HTML report run the following:

Get-VMMemory * | ConvertTo-HTML | Out-File c:\VMs\MemReport.htm

To make it into a comma separated values (CSV) file that can easily be read in Microsoft Office Excel, just change the command slightly:

Get-VMMemory * | ConvertTo-CSV | Out-File c:\VMs\MemReport.csv

The report created is much more detailed than the original screen output, but not so much so as to be unusable.  See:

Making Changes

So far we have looked at VMs, we have started and stopped them… but we haven’t actually made any changes to them. Let’s create a new virtual machine, then make the changes we would make in a real world scenario.

New-VM –Name PSblog –MemoryStartupBytes 1024MB –NewVHDPath c:\VHDs\PSblog.vhdx –NewVHDSizeBytes 40GB –SwitchName CorpNet

With this simple script I created a virtual machine named PSblog with 1024MB of RAM, a new virtual hard disk called PSblog.vhdx that is 40GB in size, and connected it to CorpNet.

Now that will work, but you are stuck with static memory.  Seeing as one of the great features of Hyper-V is Dynamic Memory, let’s use it with the following script:

Set-VMMemory –VMName PSblog –DynamicMemoryEnabled $true –MinimumBytes 512MB –StartupBytes 1024MB MaximumBytes 2048MB

Now we’ve enabled dynamic memory for this VM, setting the minimum to 512MB, the maximum to 2048MB, and of course the startup RAM to 1024MB.

For the virtual machine we are creating we might need multiple CPUs, and because some of our hosts may be newer and other ones older we should set the compatibility mode on the virtual CPU to make sure we can Live Migrate between all of our Intel-based hosts:

Set-VMProcessor –VMName PSblog –Count 4 –CompatibilityForMigrationEnabled $true

At this point we have created a new virtual machine, configured processor, memory, networking, and storage (the four food groups of virtualization), and are ready to go.

I will be delving deeper into Hyper-V management with PowerShell over the next few weeks, so stay tuned!

NOTE: While nothing in this article is plagiarized, I do want to thank a number of sources, on whose expertise I have leaned rather heavily.  Brien Posey has a great series of articles on Managing Hyper-V From the Command Line on www.VirtualizationAdmin.com which is definitely worth reading.  He focuses on an add-on set of tools called the Hyper-V Management Library (available from www.Codeplex.com) so many of the scripts he discusses are not available out of the box, but the articles are definitely worth a read.  Rob McShinsky has an article on SearchServerVirtualization (a www.TechTarget.com property) called Making sense of new Hyper-V 2012 PowerShell cmdlets which is great, and links to several scripts for both Server 2008 R2 and Server 2012.  Thanks to both of them for lending me a crutch… you are both worthy of your MVP Awards!

Counting Down the Classics with the US IT Evangelists

 

On the first day of Christmas my true love gave to me…”

Ninety-nine bottles of beer on the wall…”

“Thirty-five articles on Virtualization…”

Pale AleAll of these are great sing-along songs, whether for holidays, camping, bus-rides, or comparing virtualization technology.  Each one is a classic.

Wait… you’ve never heard the last one? That’s okay, we are happy to teach it to you.  It has a pretty catchy tune – the tune of cost savings, lower TCO, higher ROI, and a complete end-to-end management solution.

Even if you can’t remember the lyrics, why don’t you open up the articles – each one written by a member of Microsoft’s team of IT Pro Evangelists in the United States.

You can read along at your own pace, because no matter how fast or slow you read, as long as you are heading in the right direction then you are doing it right! –MDG

The 35 Articles on Virtualization:

Date Article Author
12-Aug-13 Series Introduction Kevin Remde – @KevinRemde
13-Aug-13 What is a “Purpose-Built Hypervisor? Kevin Remde – @KevinRemde
14-Aug-13 Simplified Microsoft Hyper-V Server 2012 Host Patching = Greater Security and More Uptime Chris Avis – @ChrisAvis
15-Aug-13 Reducing VMware Storage Costs WITH Windows Server 2012 Storage Spaces Keith Mayer – @KeithMayer
16-Aug-13 Does size really matter? Brian Lewis – @BrianLewis_
19-Aug-13 Let’s talk certifications! Matt Hester – @MatthewHester
20-Aug-13 Virtual Processor Scheduling Tommy Patterson – @Tommy_Patterson
21-Aug-13 FREE Zero Downtime Patch Management Keith Mayer – @KeithMayer
22-Aug-13 Agentless Protection Chris Avis – @ChrisAvis
23-Aug-13 Site to Site Disaster Recovery with HRM Keith Mayer – @KeithMayer
25-Aug-13 Destination: VMWorld Jennelle Crothers – @jkc137
26-Aug-13 Get the “Scoop” on Hyper-V during VMworld Matt Hester – @MatthewHester
27-Aug-13 VMWorld: Key Keynote Notes Kevin Remde – @KevinRemde
28-Aug-13 VMWorld: Did you know that there is no extra charge? Kevin Remde – @KevinRemde
29-Aug-13 VMWorld: A Memo to IT Leadership Yung Chou – @YungChou
30-Aug-13 Moving Live Virtual Machines, Same But Different Matt Hester – @MatthewHester
02-Sep-13 Not All Memory Management is Equal Dan Stolts – @ITProGuru
03-Sep-13 Can I get an app with that? Matt Hester – @MatthewHester
04-Sep-13 Deploying Naked Servers Matt Hester – @MatthewHester
05-Sep-13 Automated Server Workload Balancing Keith Mayer – @KeithMayer
06-Sep-13 Thoughts on VMWorld Jennelle Crothers – @jkc137
09-Sep-13 Shopping for Private Clouds Keith Mayer – @KeithMayer
11-Sep-13 Dynamic Storage Management in Private Clouds Keith Mayer – @KeithMayer
12-Sep-13 Replaceable? or Extensible? What kind of virtual switch do you want? Chris Avis – @ChrisAvis
13-Sep-13 Offloading your Storage Matt Hester – @MatthewHester
16-Sep-13 VDI: A Look at Supportability and More! Tommy Patterson – @Tommy_Patterson
17-Sep-13 Agentless Backup for Virtual Environments Special Guest Chris Henley – @ChrisJHenley
19-Sep-13 How robust is your availability? Kevin Remde – @KevinRemde
20-Sep-13 VM Guest Operating System Support Brian Lewis – @BrianLewis_
23-Sep-13 How to license Windows Server VMs Brian Lewis – @BrianLewis_
24-Sep-13 Comparing vSphere 5.5 and Windows Server 2012 R2 Hyper-V At-A-Glance Keith Mayer – @KeithMayer
25-Sep-13 Evaluating Hyper-V Network Virtualization as an alternative to VMware NSX Keith Mayer – @KeithMayer
26-Sep-13 Automation is the Key to Happiness Matt Hester – @MatthewHester
27-Sep-13 Comparing Microsoft’s Public Cloud to VMware’s Public Cloud Blain Barton – @BlainBar
30-Sep-13 What does AVAILABILITY mean in YOUR cloud? Keith Mayer – @KeithMayer

…and as for me? Well it’s pretty simple… just go to www.garvis.ca and type Virtualization into the search bar.  You’ll see what I have to say too!

Virtualization: CPUs and Cores and Sockets… Oh My!

I have been getting a lot of questions recently about virtual machine CPU usage, especially around things like Symmetric Multi-Threading (SMT).  Jeff Woosley, the Principal Product Manager (WSSC) at Microsoft, recently sent out this clarification which many of you will find enlightening. –MDG

Q: Should Symmetric Multi-Threading (SMT) be enabled or disabled?

A: Hyper-V works fine with Symmetric Multi-Threading and we recommend leaving it on. There’s really one corner case where you’d want to disable SMT:

>>  if you’re running on a system that has more logical processor than is supported by Hyper-V <<

While this isn’t going to happen anytime soon with Windows Server 2012 Hyper-V, it can happen with earlier versions such as Windows Server 2008 R2 Hyper-V and previous. For example, if you’re running Windows Server 2008 R2 Hyper-V (which support a maximum of 64 logical processors) on a system that has a total of 80 logical processors (4 sockets, 10 cores per socket with SMT). Let’s discuss.

In this case, Windows Server 2008 R2 Hyper-V will use the first 64 logical processors and ignore the rest. This results in a bunch of idle cores in the system while SMT is used because of the way logical processors are enumerated during boot up. When the OS boots it starts with socket 1 and enumerates all logical processors:

  • on socket 1 it enumerates logical processors 1-20
  • on socket 2 it enumerates logical processors 21-40
  • on socket 3 it enumerates logical processors 41-60
  • and on socket 4 it would see 61-64

Notice that 65-80 are not enumerated and thus are ignored/not used by the system. This is because Windows Server 2008 R2 Hyper-V only support up to 64 logical processors total. (Again, with Windows Server 2012/Microsoft Hyper-V Server 2012 it now supports up to 320 logical processors per server.) While SMT provides a good performance boost, a thread doesn’t equal a core, and you don’t want to leave any cores idle. Thus, in this case, we recommend disabling SMT so that Windows Server 2008 R2 uses all 40 cores. Let me again stress, this is a relative corner case.

The best solution is to use Windows Server 2012 and leave SMT enabled because it supports up to 320 logical processors and can take full advantage of the hardware resources.

===========================================================================

Q: Windows Server 2012 Hyper-V supports up to 320 logical processors and virtual machines with up to 64 virtual processors per virtual machine. However, the industry isn’t standing still and will create larger servers were with more sockets and cores. How does Microsoft view scalability?

A: Scalability, like performance, is an ongoing engineering commitment. We are never “done” with improving scalability and performance. Just a few years ago 32 logical processors in a server seemed like a huge, scale up system. Now, that’s an industry standard 2 socket server. Today’s mainstream server is yesterday’s scale up system. That said, we pushed the envelope very far with Windows Server 2012 and lead the industry. We’re going to watch and listen closely to what’s most important for our customers.

If you are interested in evaluating Windows Server or System Center 2012 you can can do so by clicking here:

Virtual Networking in Hyper-V 2012

Microsoft has released a poster diagramming virtual networking in Hyper-V 2012.  Much of it revolves around Virtual Machine Manager, and is actually branded System Center 2012 SP1.  If you are building or managing datacenters – even smaller ones – you should download this document and review it.  We all have something to learn from it!

The VMM networking poster is available for download here.

Now: If you are going to be at MMS, I am told that the Windows Server team will be giving out printed copies – I had one of the original Hyper-V environment and wore it out – it was my most referenced document for months!

If you are interested in evaluating Windows Server or System Center 2012 you can can do so by clicking here:

What not to Learn… Revisited for 2013!

In October, 2011 I posted an article called vPTA: What NOT to take away from my 1-day virtualization training!  It was only partly tongue-in-cheek on the environment that I have been using for several years to demonstrate server virtualization from a pair of laptops.  A few months later Damir Bersinic took that list and made some modifications, and published it on this blog as Things NOT To Take Away from the IT Virtualization Boot CampBecause we spend so much time in our IT Camps demonstrating similar environments, I decided it was a good time to rewrite that article.

Normally when I revisit an article I would simply republish it.  There are two reasons that I decided to rewrite this one from scratch:

  • The improvements in Windows Server 2012, and
  • My more official position at Microsoft Canada

Since writing that original article I have tried to revise my writing style so as to not offend some people… I am trying to be a resource to all IT Professionals in Canada, and to do that I want to eliminate a lot of the sarcasm that my older posts were replete with.  At the same time there are points that I want to reinforce because of the severity of the consequences.

Creating a lab environment equivalent to Microsoft Canada’s IT Camps, with simple modifications:

1. In our IT Camps we provide the attendees with hardware to use for their labs.  Depending on the camp attendees will work in teams on either one or two laptops.  While this is fine for the Windows 8 camps, please remember that in your environment – even in a lab where possible – you should be using actual server hardware.  With virtualization it is so simple to create a segregated lab environment on the same server as your production environment, using virtual switches and VLAN tagging.  In environments where System Center 2012 has already been deployed it is easy enough to provision private clouds for your test/dev environments, but even without that it is a good idea.  The laptops that we use for the IT Camps are great for the one- or two-day camps, but for longer than that you are going to risk running into a plethora of crashes that are easy enough to anticipate.

2. You should always have multiple domain controllers in any environment, production or otherwise.  Depending on who you speak to many professionals will tell you that at least one domain controller in your domain should be on a physical box (as opposed to a virtual machine).  I am still not convinced that this does not fall into the category of ‘Legacy Thinking’ but there is certainly an argument to be made for this.  Whether you are going to do this in physical or virtual, you should never rely on a single domain controller.  Likewise your domain controllers should be dedicated as such, and should not also be file or application servers.

3. I strongly recommend shared storage for your virtualization hosts be implemented on Storage Area Networks (SANs).  SAN devices are a great method of sharing data between clustered nodes in a failover cluster.  In Windows Server 2012 we have included the iSCSI Software Target that was previously an optional download (The Microsoft iSCSI Software Target is now free).  While this is still not a good replacement of physical SANs, it is a fully supported solution for Windows Failover Cluster Services, including for Hyper-V virtual machine environments.  It is even now recognized as an option for System Center 2012 private clouds.  As well the Storage Pools feature in the new Server is a compelling feature to consider.  However there are some caveats to consider:

A. Both iSCSI software targets and Storage Pools rely on virtual storage (VHDX files) for their LUNs and Pools.  While VHDX files are very stable, putting one VHDX file into another VHDX file is a bad idea… at least for long-term testing and especially for production environments.  If you are going to use a software target or Storage Pool (which are both fully supported by Microsoft for production environments) it is strongly recommended that you put them onto physical hardware.

B. While Storage Pools are supported on any available drive architecture (including USB, SATA, etc…) the only architecture that will be supported for clustered environments are iSCSI and SAS (Serial Attached SCSI).  Do not try to build a production (or long-term test environment) cluster on inexpensive USB or SATA drives.

C. In our labs we use a lot of thin-provisioned (dynamically expanding, storage-on-demand) disks.  While these are fully supported, it is not necessarily a best practice.  Especially on drives where you may be storing multiple VHDX files you are simply asking for fragmentation issues.

4. If you are building a lab environment on a single host, you may run into troubles when trying to join your host to the domain.  I am not saying that it will not work – as long as you have properly configured your virtual network it likely will – but there are a couple of things to remember.  Make sure that your virtual domain controller is configured to Always Start rather than Always start if it was running when the service stopped.  As well it is a good idea to configure a static IP address for the host, just in case your virtual DHCP server fails to start properly, or in a timely fashion.

5. Servers are meant to run.  Shutting down your servers on a daily basis has not been a recommended practice for many years, and the way we do things – at the end of the camp we re-image our machines, pack them into a giant case and ship them to the next site – is a really bad idea.  If you are able I strongly recommend leaving your lab servers running at all times.

6. While it is great to be able to demo server technologies, when at all possible you should leave your servers connected (and turned on) in one place.  If you are able to bring your clients to you for demos that is ideal, but it is so easy these days to access servers remotely on even the most basic of Internet connections.  If your company does not have a static IP address I would recommend using a dynamic DNS service (such as dyndns.com) with proper port-forwarding configured in your gateway router to access then remotely.

7. I am asked all the time how many network adapters you need for a proper server environment.  I always answer ‘It depends.’  There are many factors to consider when building your hosts, and in a demo environment there are concessions you can make.  However unless you have absolutely no choice it should be more than one.  For a proper cluster configuration (excluding multi-pathing and redundancy) you should have a production network, a storage network, and a heartbeat network… and that is three just for the bare minimum.  Some of these can share networks and NICs by configuring VLANs, but again, preferably only in lab environments.  Before building your systems consider what you are willing to compromise on, and what is absolutely required.  Then build your architectural plan and determine what hardware is required before making your purchase.

7a. While on the subject of networks, in our demo environment the two laptop-servers are connected to each other by a single RJ-45 cable.  BUY SWITCHES… and the ones that are good enough for you to use at home are usually not good enough for your production environment! Smile

8. When it is at all possible your storage network should be physically segregated from your production network.  When physical segregation is not possible then at least separating the streams by using vLANs is strongly recommended.  The first offers security as well as bandwidth management, the second only security.

9. Your laptop and desktop hardware are not good-enough substitutes for server-grade hardware.  I know we mentioned this before, but I still feel it is important enough to state again.

10. In Windows Server 2008 R2 we were very adamant that snapshots, while handy in labs and testing, were a bad idea for your production environment.  With the improvements to Hyper-V in Windows Server 2012 we can be a little less adamant, but remember that you cannot take a snapshot and forget about it.  When you delete or apply a snapshot it will now merge the VHDX and AVHDX files live… but snapshots can still outgrow your volume so make sure that when you are finished with a snapshot you clean up after yourself.

11. Breaking any of these rules in a production environment is not just a bad idea, it would likely result in an RGE (Resume Generating Event).  In other words, some of these can be serious enough for you to lose your job, lose customers, and possibly even get you sued.  Follow the best practices though and you should be fine!

Converting VHDs to VHDX and other questions…

Many of the articles I write for both The World According to Mitch and the Canadian IT Pro Connection come directly from people I meet through my travels.  They send me questions about technology by e-mail and rather than simply replying to them, if I feel the questions are relevant, I write them up as articles.  So if you meet me at one of my sessions and you ask me a question, do not be surprised if I ask you to e-mail it to me… oftentimes I will need to research the answer, but sometimes it is because I think that it would make for an interesting write-up.

I have known Betty for as long as I have been going to her home town, and while she loves to give me grief I know that she is always attentive and learns from my presentations.  She recently sent me an e-mail with two very good questions on Hyper-V following my IT Camp on Windows Server 2012.

QUESTION 1:

I have several virtual machines that were created on Server 2008R2, and I would like to convert them to VHDX to take advantage of all the new features on Windows 2012. Is this possible?

The process for exporting the virtual machine from Hyper-V on Windows Server 2008 R2 and then importing it as a virtual machine onto a host running Windows Server 2012 is fairly simple: Export, then Import.  However as I am sure you realize this does not convert the disk file format… ViVo in this case stands for VHD in, VHD out.  However the Edit Disk Wizard in the new Hyper-V is your friend here.

  1. Ensure that your virtual machine is powered down (or better yet disconnected).
  2. From the Actions Pane of the Hyper-V Manager click Edit Disk…
  3. On the Before You Begin page click Next.
  4. On the Locate Virtual Hard Disk page navigate to the location of our VHD file (use Browse if you like!).  Click Next.
  5. On the Choose Action page select the radio marked Convert and click Next.
  6. On the Convert Virtual Hard Disk page select the radio marked VHDX and click Next.
  7. On the second Convert Virtual Hard Disk page select the disk format you prefer (Fixed or Dynamically Expanding) and click Next.
  8. On the third Convert Virtual Hard Disk page enter the name and location of your new VHDX file and click Finish.
    Depending on the size of your source disk it may take a few minutes to create the new file; for larger disks you might want to run the Edit Disk Wizard to compact it before proceeding.  However once you are done you will have both the Source and the Destination disks, and all you have to do is edit the settings of your VM and attach the new drive, and you are ready to rock!image
  • Notice that your new file is about 145 MB larger than the original.  That is perfectly normal and nothing to be concerned about.

      PowerShell: I’ve Got The Power!!
      Thanks to folks like Ed Wilson and our very own Sean Kearney it is once again cool to use the command line… or rather, the cmdlet.   Nearly anything that you can do in the GUI can also be done in PowerShell, hence allowing us to create scripts to use at various clients or sites.  If you want to convert your VHD to VHDX in PowerShell here’s how:

    Convert-VHD -Path C:\ClusterStorage\Volume1\VHDsVM-1.vhd -DestinationPath C:\ClusterStorage\Volume1\VHDsVM-1.vhdx

    SNAGHTML6c7c42

    Again, it is important to remember that a) Your hard drive be off-line (or disconnected), and b) that once you have created the new VHDX file you must attach it to the VM before spinning it back up.  As well you will notice the difference in file size.  Nothing to be concerned by.

    (This cmdlet can also be used to convert VHDX files back to VHD files)

    QUESTION 2:

    Do the virtual machines have to be Server 2012 for me to take advantage of the new features of Hyper-V in Windows Server 2012, and especially the new .VHDX file format?

    Of course not.  Remember that the host and the guest have no real conception that the other is there; as long as you can install it on x86 hardware, you can install it in a Hyper-V virtual machine.  With that being said, there is a difference between can and is supported.  Remember that your Windows NT, 2000, DOS 3.3 and OS/2 Warp VMs are not supported by Microsoft… even though they will work just fine Winking smile 

    For Bonus Points:

    What is possible technologically is not always allowed legally.  It is important to make sure that all of the operating systems in your VMs are licensed on that host.  I have seen too many companies perform P2V migrations of physical servers that had OEM licenses attached to them, only to discover during an audit that they were out of compliance.  Make sure you have verified all of your licensing so that nobody will get their nose out of joint Smile