Posey's Tips & Tricks

Hyper-V for Newbies: 4 Things To Know Before Getting Started

If you're new to Hyper-V, here are some pointers that can save you a lot of grief.

Although Microsoft's Hyper-V is easier to use than some of the competing hypervisors, it does have its nuances.

As such, I thought that I would put together a column consisting of random tidbits of information related to things that tend to surprise those who are new to Hyper-V.

1. A Virtual Machine Is Just an Object
Even to this day, I sometimes catch myself thinking of a virtual machine (VM) as the sum of its parts. In reality, though, a VM is really just an object. The virtual hard disk is a VHD or VHDX file that is connected to the VM.

So why does this matter? When you take action on a VM, that action may not necessarily impact the VHD or the guest operating system (the operating system that is running on the VM). Let me give you an example.

The Hyper-V Manager (the native GUI tool for managing Hyper-V) contains an option to delete a VM. When you delete a VM, however, only the VM object is removed; the VHD remains. This behavior is great if you accidentally delete a VM because you can just create a new VM and attach the orphaned VHD. However, if you do not know that the VHD gets left behind, you could end up wasting a lot of storage space.

Another thing to be aware of is when you delete a VM, the deletion process does not interact with the guest operating system. If the VM was domain-joined, for example, then the VM's computer account will remain in Active Directory unless you manually remove it.

2. Virtual Machine Names Can Be Inconsistent
When you create a new VM, the Hyper-V Manager asks you to provide a name for the new VM. However, this name is not automatically applied to the guest operating system. Let me show you what I mean.

Figure 1 shows a Hyper-V VM. The remote desktop window's title is Office 2019 on Hyper-V-4 Virtual Machine Connection. In other words, the VM is named Office 2019 and it is running on a Hyper-V host that is named Hyper-V-4. If you look at the Rename Your PC window, however, you can see that the computer name is DESKTOP-S6MPIEP. In other words, the VM name and the computer name do not match.

[Click on image for larger view.] Figure 1: The VM name and the computer name do not match.

As such, I recommend taking the time to modify the computer name so that it matches the VM name. Doing so can help to avoid a lot of confusion.

3. Checkpoints Can Cause Problems
One of the things I wish someone had told me before I used Hyper-V for the first time is that checkpoints can cause problems. Checkpoints are a native Hyper-V feature that allows you to almost instantly revert a VM back to a previous point in time. Many people create checkpoints prior to making a configuration change within a VM so that if something goes wrong, the change can easily be undone.

There are three things that you need to know about checkpoints before you try using them. First, checkpoints are not backups. The differencing disk files that are used by checkpoints are usually stored alongside the VM's VHD files. This means that a checkpoint will not protect you against a physical hard disk failure like a backup would.

The second thing that you need to know about checkpoints is that they diminish read performance. The effect isn't usually noticeable if you only create a couple of checkpoints, but if you start to accumulate large numbers of checkpoints for a VM, the VM's performance will begin to suffer.

The third thing that you need to know is that checkpoints can cause consistency problems. Suppose for a moment that you created a checkpoint for a domain-joined VM and then installed an Active Directory-integrated application. If you later decided to use the checkpoint to roll back the VM to an earlier state, the application would be removed from the VM's VHD, but the changes that had been made to Active Directory would not be undone. You have to be very careful using checkpoints any time that an application spans multiple physical or virtual machines, uses an external database, or uses Active Directory.

4. Hyper-V Manager Isn't the Best Management Tool
The Hyper-V Manager works fine in small Hyper-V deployments, but it is not the tool that you want to be using if you have more than two or three Hyper-V hosts. A better option is System Center Virtual Machine Manager (SCVMM).

SCVMM provides you with a consolidated view of your entire Hyper-V environment, while also exposing features that are not found in Hyper-V Manager. SCVMM is part of the System Center suite and is not included with a Windows Server license.

About the Author

Brien Posey is a 22-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

Subscribe on YouTube