I rebuilt my Hyper-V virtual machines / virtual network by deleting the old ones and building new machines on a portable external hard drive. So after a while of not starting up the host laptop, I could not start any of the machines. First, I noticed that the state of the machines on the Hyper-V Manager now says “Off-critical.” I am getting this connection error: Failed to lock virtual machine’s configuration. Unspecified error (0×80004005).
I checked the Hyper-V Setting and I found out that the folder path of the Hard Disks and Virtual Machines files has been changed to its default setting. I’m not sure why but that’s exactly what happened: (This has nothing to do with this error. See correction at the bottom of this post.) Needless to say, I just needed to change that to the appropriate path, which is my external hard drive: The real issue in this case is the Hyper-V not recognizing the external hard drive because of the fact that the Hyper-V Virtual Machine Management Service was started before the external hard drive was attached via the USB.
I could have simply restarted the service or the laptop after I attached the external hard drive, and that would have fixed the issue.
After the change, I just performed a quick a restart and that fixed the connection issue:
CORRECTION: The path setting described above has nothing to do with this connection error. The Hyper-V Setting path, illustrated above, has nothing to do with the Hyper-V configuration not finding the correct path. This path setting tells Hyper-V where you want the succeeding virtual machines stored. For more information on this “Failed to lock virtual machine’s configuration” error, please read: Why is my virtual machine “Off-Critical”?