Posey's Tips & Tricks

The Assumptions Hyper-V Manager Makes on Your Behalf

Some of these assumptions are perfectly valid for most situations, but others -- despite Microsoft's best intentions -- are a bit more puzzling.

Microsoft offers three separate tools for interacting with Hyper-V.

First, there's the Hyper-V Manager. That's the GUI-based tool that gets installed along with the Hyper-V service. Next, there is PowerShell. You can perform pretty much any Hyper-V-related management task using PowerShell, but most administrators don't. As someone who has worked extensively with PowerShell, I can tell you from first-hand experience that although PowerShell has its place, it isn't the best tool for one-off virtual machine (VM) creation unless you have a script that can automate the process.

The third tool for managing Hyper-V is, of course, System Center Virtual Machine Manager (SCVMM). SCVMM is arguably the best management tool for Hyper-V, but it is not included with Hyper-V. If you want to use SCVMM, you are going to need a System Center license.

Being that I work with Hyper-V on a daily basis, I use all three of these tools almost every day. One thing that I have noticed in doing so is that each tool has its own nuances when it comes to VM creation. The Hyper-V Manager, for example, includes the New Virtual Machine Wizard, which makes the process of creating a new VM really quick and painless. However, the trade-off to that simplicity is that Hyper-V Manager makes certain assumptions on your behalf, rather than pestering you with a million questions.

Some of these assumptions are perfectly valid for most situations. For example, when you create a new VM using the Hyper-V Manager, that VM will be equipped with a single virtual network adapter. You can always add extra virtual network adapters later on, but the default creation of a single virtual network adapter is fine, because most VMs only need one network adapter.

Other default behaviors are a little bit more puzzling. When you create a new VM, for example, the Hyper-V Manager will only provision that VM with a single virtual processor. Sure, you can change the number of virtual processors after the VM has been created, but that isn't really the point.

All modern Windows operating systems benefit from having multiple virtual processors. I get that the architects of Hyper-V probably chose to use a single virtual processor by default as a way of conserving physical CPU resources. However, unless an administrator knows that they need to go into the settings and set the number of virtual processors to a value that is more appropriate for the VM's guest operating system, the VM's performance is likely to suffer.

Another assumption that the Hyper-V Manager makes on your behalf when you create a new VM pertains to storage provisioning. When you create a new virtual hard disk in Hyper-V, you can create it in one of two ways. One option is to create a fixed-length virtual hard disk. This option causes the virtual hard disk to claim all required space immediately. If, for example, you create a 20GB virtual hard disk, then Hyper-V will immediately take a 20GB chunk of physical storage and reserve it for use by the VM.

According to most sources, fixed-length virtual hard disks yield the best performance, but I have had people argue that point tooth and nail.

The other option for virtual hard disk creation is to create a thinly provisioned virtual hard disk. When you create a thinly provisioned virtual hard disk, you are essentially telling Hyper-V the maximum size that the virtual disk should ever grow to. Regardless of the size that you specify, the virtual hard disk file starts out at less than 1GB in size, and gradually grows as you add data to the virtual hard disk.

When you create a new VM in the Hyper-V Manager, you are given the option of creating a new virtual hard disk, or using an existing virtual hard disk. If you opt to create a new virtual hard disk, then you can specify the size (127GB is the default), but you cannot select the type. Hyper-V Manager automatically creates a thinly provisioned virtual hard disk. If you want to use a fixed-length virtual hard disk, then you will need to create it in advance, and then tell Hyper-V Manger that you want the VM to use your existing virtual hard disk.

These are just a few of the assumptions that the Hyper-V Manager makes on your behalf. Others include things like security settings and VM version numbers. I may end up talking about some of these additional attributes in a future column. Incidentally, SCVMM gives you far more granular control over VM creation through the use of templates.

About the Author

Brien Posey is a 16-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.

Featured

comments powered by Disqus
Most   Popular

Office 365 Watch

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.