Posey's Tips & Tricks
Four Common Hyper-V Errors and How To Correct Them
Hyper-V administrators can quickly resolve four common errors by identifying their root causes--from permissions and VM corruption to network switch conflicts and storage access issues--and applying straightforward corrective steps.
Although Hyper-V has been around long enough to be stable and extremely reliable, problems can and sometimes do occur. Thankfully, the problems that occur most often tend to have easy solutions. That being the case, I wanted to talk about four of the most common Hyper-V problems and what you can do about them.
Access Denied
Of the four problems that I am going to be discussing, the Access Denied error is probably the least common. In fact, I have only run into this one a couple of times. If you receive an Access Denied error when attempting to start (or possibly modify) a virtual machine, it generally means one of two things.
One possibility is that you are logged in using an account that lacks the permissions needed to interact with virtual machines. If you happen to be managing a virtual machine through PowerShell, then you should also check to make sure that you are working from an elevated PowerShell session.
Another thing that can cause an Access Denied error is that the virtual machine has been copied from another machine and is retaining it's old NTFS permissions. You may have to take ownership of the virtual machine files or modify the NTFS permissions to allow the VM to run on its new host.
The Application Encountered an Error While Attempting to Change the State of the VM
The second error that I wanted to talk about involves a message stating that an application error was encountered when changing the VM state. This error typically occurs when trying to start or stop a virtual machine.
This error most commonly stems from VM corruption, although it can happen as a result of the hypervisor being stopped or a conflict with other virtualization tools that might have been installed on the host.
If you receive the Application Encountered an Error While Attempting to Change the State of the VM error, then the first thing that I would recommend doing is to reboot the host (if you can get away with doing so). If you can't reboot the host, then try live migrating the virtual machine to a different host and see if you can get it to start there. This will help you to determine if you are dealing with a hypervisor problem or a VM problem.
If you determine that the virtual machine is corrupt, then make sure to back up the virtual machine before you do anything else. Once you have done so, detach the virtual hard disks and move them to a safe location. Now, delete and recreate the virtual machine. Reattach the virtual hard disks and then try booting the VM. If the corruption exists at the virtual machine level (as opposed to there being corruption within the virtual hard disk), then this method will usually fix the problem.
Failed To Create Virtual Switch
Another extremely common Hyper-V error involves a message indicating that a virtual switch could not be created. This error almost always stems from trying to create an external virtual switch using a network adapter that is already being used by another virtual switch. However, there are a few other things that can cause the problem. Most notably, being logged in with an account that lacks the necessary permissions can cause a virtual switch creation failure.
The presence of third party firewalls or VPN software can also cause virtual switch creation failure. Remember, Hyper-V expects to have full control over the physical NIC that will be bound to the external virtual switch. If you have installed a third party firewall or VPN then Hyper-V may not be able to gain exclusive access to the NIC.
Virtual Machine is in a Saved Critical State
The fourth error that I wanted to talk about involves an error message stating that the virtual machine is in a saved critical state. In my experience, this one almost always occurs because Hyper-V is unable to access the virtual machine files. For example, if the storage array where the virtual machine resides were to go offline, then the virtual machines could be put into a saved critical state.
You can often fix this problem by verifying that the virtual machine components and the virtual hard disks are accessible at the locations specified within the virtual machine settings. You might also check to make sure that there are no permissions that have changed, making the virtual machine components inaccessible to Hyper-V.
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.