For our readers who use Microsoft Hyper-V — and there are a lot of them — Brien Posey’s advice, knowledge, and in-depth tutorials are indispensable. One of the problems with Hyper-V is that it is usually so reliable, so when problems arise users are at a loss. In this tutorial from January, Brien offers answers for a perplexing problem: What to do when a Hyper-V virtual machine won’t start. Brien’s solution saved many IT admins from days of stress, and that’s why this article is one of our 20 Best of 2020.
Although Hyper-V is normally very reliable, I have on occasion run into situations in which a previously functioning VM refuses to start. In this article, I wanted to outline a few different potential causes and solutions in case you find yourself with a Hyper-V virtual machine that won’t start.
The error message
When a virtual machine fails to start, the underlying cause is usually obvious. If, for example, the VM is asking for more memory than what the Hyper-V host can provide, then you will receive an error message like the one shown below.
Other times, however, Hyper-V does not give you any information regarding the error’s underlying cause. This morning, for example, I tried to boot a previously healthy virtual machine that I hadn’t used in a few months. Upon doing so I received the error message shown below.
I have encountered this and similar error messages on real-world, production systems on a few occasions. The biggest mistake that I typically see admins make as they try to resolve the problem is that of assuming that the virtual hard disk is to blame. While it is true that guest operating system corruption can cause a boot failure, error messages like the one shown above occur before Hyper-V even tries to load the guest OS. Remember, the error message indicates that Hyper-V is unable to change the virtual machine’s state. The guest OS cannot boot until the VM reflects a state of “running.” Hence, the problem is tied to the virtual machine’s configuration, not to the guest operating system.
The event logs
When faced with a VM that is refusing to start for an unknown reason, the very first thing that I recommend doing is checking the event logs. Specifically, I recommend checking out the Applications and Services \ Microsoft \ Windows \ Hyper-V-VMMS \ Admin log. In many cases, this log will tell you the exact cause of the error. In the case of the event logs indicating that the reason why the VM cannot start is because its virtual DVD drive is pointing to an ISO file that no longer exists. You can see what this looks like in the screenshot below.
This brings up another important point. If you look at the virtual machine’s settings, which you can see in the next screenshot, you will notice that this VM is configured to boot from a virtual hard disk. Therefore, a misconfigured virtual DVD drive can cause a VM boot failure, even if the VM is not attempting to boot from the virtual DVD.
Virtual network problems
Believe it or not, virtual network configuration errors can also cause a condition in which a VM is unable to start. I’m not even necessarily talking about a VM that has been configured to perform a PXE boot. Here is what a network-related VM boot problem looks like:
Once again, the error message is less than helpful because it doesn’t provide any information that tells why the VM cannot be started. In case you are wondering though, the event log that I mentioned earlier does provide the reason for the failure.
The way that I caused the error shown above was to create a virtual machine and then delete the virtual switch that the VM was configured to use. If you look at the VM settings in the screenshot below, you can see that the virtual machine’s network adapter is reflecting a configuration error.
As you can see in the next screenshot, the Event Viewer specifically states that an error has occurred because the virtual switch could not be found.
There is at least one more problem that can cause a VM to be unable to start. Earlier in this article, I mentioned that errors in which a VM is unable to change states are not related to the contents of the VM’s virtual hard disk. Even so, the error message shown below might initially seem to suggest otherwise since it indicates that the VM failed to start because a file could not be found.
Although this error message mentions that a file could not be found, it is not talking about an operating system file within the VM’s virtual hard disk. What the error message is really telling you is that Hyper-V could not find the virtual hard disk itself. In fact, I triggered this error by creating a new VM and then deleting its virtual hard disk. You can see the corresponding event log entry in the screenshot below.
Hyper-V virtual machine won’t start? Always check the Event Viewer
Over the years, I have seen several situations in which a Hyper-V virtual machine won’t start even though there was plenty of memory (and other host resources) available. The vast majority of the real-world situations that I have encountered were tied to storage mapping problems. For example, a host might have lost its connectivity to iSCSI storage, or someone moved some files in order to free up space and forgot to reconfigure the VM.
If you find yourself with a Hyper-V virtual machine that won’t start, I strongly recommend using the Event Viewer as the very first step in the troubleshooting process. In most cases, the Event Viewer will give you detailed information about the error message that is far more helpful than the information provided by the Hyper-V Manager.
Featured image: Shutterstock