Creating Virtual Machines Using Hyper-V


As I walk through creating Hyper-V virtual machines I wanted to share with you some interesting points I learned from the Installing and Configuring Windows Server 2012 R2 Training Guide written by Mitch Tulloch that may save you a call to the Help Desk or at least you won’t have to miss your kid’s softball game because you have to work later than planned.

As you know, before you can create any virtual machines you must install the Hyper-V role on the host server.  To accomplish this you can utilize Server Manager or Windows PowerShell.  The preferred method for installation of most roles and features these days is via Windows PowerShell. There is however an advantage to using the Add Roles and Features Wizard to install the Hyper-V role on a server.  The wizard will present you with four Hyper-V configuration options that you would have to configure separately using different cmdlets after role installation when installing the Hyper-V role using windows PowerShell. 

It is important to plan for disaster recovery.  One of basic but often overlooked tasks is performing regular backups.  With Hyper-V you should include the following:  The management OS on the Hyper-V host as well as the configuration, virtual hard disks, checkpoints, and other files associated with each virtual machine running on the host.  Backups of disk volumes on Windows servers use the Volume Shadow Copy Service (VSS).  VSS allows volume backups to be performed while applications and services running on the server continue to write to the same volumes being backed up.  Introduced with WS 2012 is the ability for VSS aware backup applications that store data on SMB 3.0 file shares (e.g. file shares on a Scale-Out File Server).  While WS Backup does not support  this functionality System Center DPM as well as the Diskshadow.exe command line utility does.  For information on how to take advantage of the Diskshadow.exe command utilize the reference provided via TechNet. 

Another interesting point about backup is the virtual switches you create are not included in backup so if the case you need to restore a host you will also need to re-create the host’s virtual switches and reconnect the virtual network adapters in each virtual machine to the appropriate virtual switch.  For this reason it is important to make sure you document the configuration of all virtual switches on your Hyper-V.

When you configure your virtual machine storage you can create either VHD or VHDX.  If you plan to move your virtual machine to Azure remember that currently only VHD is supported.  While you can convert from VHDX to VHD but you might want to save yourself the steps if you know you will be moving  to Azure any time soon. 

As part of the virtual machine creation, a default location for where virtual hard disks and virtual machine configuration files are stored is specified.  The default location is the host system drive.  Keep in mind if this drive become filled the host could fail to function and you would be in a heap of trouble so plan accordingly – which means plan to change the default location to something that makes sense.   Review this MSDN blog for details.

Finally, a reminder that the best things are often free.  In the case of Hyper-V this is so true!  When you purchase Windows Server you  purchase licensing based on  the number  processors and of virtual machines that will license Windows Server.  As an example, for Windows Server 2012 R2 you can purchase a Standard license which will cover two processors and two virtual machines or Datacenter which will cover two processors and unlimited virtual machines.  There is no cost for installing Windows Server 2012 R2 on the virtual machines.   Additionally, you can download a Windows Server that is dedicated to being used as a Hyper-V host for free.  While the virtualization rights are not included; you could use the host to virtualize servers you have already licensed, Linux guest operating systems, or limited time trial editions in order to learn about a new windows server release before purchasing. 

Kathleen Molosky 2013

Kathleen Molosky

Comments (0)

Skip to main content