Cannot attach VHD after moving said VHD from the local machine to a network location

oldcomputergeek 20 Reputation points
2023-02-02T20:39:04.78+00:00

I have a few Windows 10 desktops running Hyper-V and running Windows 7 VMs for access to historical legacy data. I want to free up some local disk space by moving the .vhdx files to a network location with plenty of free space.

I shutdown the VM, deleted the VM and moved the .vhdx to the desired network location (Windows Server 2022).

However, after moving the .vhdx file to the network location, I cannot attach it to the newly created VM on the Windows 10 desktop. I get the following Event IDs: 12620 and 14140. I also get the following message in Hyper-v:

User's image

Am I attempting something that is not possible? I did something similar years ago in my Server 2008 environment.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,733 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 54,806 Reputation points
    2023-02-02T21:01:24.5133333+00:00

    Is it supported? Yes. Refer to the full docs here. Is it recommended? Not really given that hard drive access (which is normally very fast, would consist of network calls now). The perf of your VMs are going to slow unless you have a really, really fast network connection and the file server isn't too busy.

    But there are things to keep in mind. The first thing is that Hyper-V is a Windows service, not a user app. Therefore to get this to work you must grant the machine's account that is trying to run Hyper-V access to the file share and file(s) under it. You'll need to do this for each machine running Hyper-V. This could be construed as a security risk.

    Another thing to bear in mind is that the network needs to be online before the VM can start. I'm not sure if Hyper-V has a dependency on the network subsystem but if you try to start a VM (say autostart) before the network is online then it'll fail.

    Also bear in mind that if multiple people try to use different machines to start the same VM (which has its drives stored on a UNC path) then it'll most likely fail either immediately or catastrophically. I'm not sure how Hyper-V opens the files but at least locally it would lock them for access. I'm not sure how that looks if you do so over the network since you're dealing with multiple machines now and there is no cross-machine locks.

    Finally, the docs make it clear that you need to be using SMB3 so ensure you have that protocol supported.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.