In Hyper-V 2016, I'm getting an error "Operation not supported" when attempting to move my VM configurations from a USB drive to the default folders. I have only one host machine; I exported them to the drive so I could perform some hardware upgrades that necessitated an OS reinstall. (The new disk array is still building, so I'll forego moving the VHDXs for now. The configurations are working, but I'd like to get them off the USB drive.)
The options I'm choosing are detailed in the screenshots below.
Things I've tried:
- Shutting down the VM (An Ubuntu Server instance)
- Moving just the main configuration, leaving out Checkpoints and Smart Paging
- Running the migration in PowerShell
PowerShell:
$Path = "C:\ProgramData\Microsoft\Windows\Hyper-V"
Move-VM -Name "MATRIX" -DestinationHost "SERVER1" -VirtualMachinePath $Path -SnapshotFilePath $Path -SmartPagingFilePath $Path
This fails with the same error:
The operation is not supported.
How can I successfully move these configurations to their default locations on the Hyper-V host?
The error was occurring because I was trying to migrate a VM from one location to another on the same host. This action isn't supported—the concept of VM migration implies two separate hosts. (But not storage migration; this can be done within the same host without any problem. I suppose that's what left me thinking that I could do the same for configurations.)
I ended up doing this for each VM:
This worked just fine.
Frustration: If the error message had stated the true problem, it would have saved us all a lot of trouble. In literally a second I would have decided to approach the task in the way I've described, had I known what was really happening. I learned during my investigations that Hyper-V is infamous for this error reporting shortcoming. Somebody somewhere took some ill-advised shortcuts.