from Hyper-V
-
If you have problem migrating from Hyper-V to XCP-ng with vhd importing, you can try Vinchin Backup & Recovery to perform a full machine migration.
-
I'm fine with third-party vendors, but only when they are clearly identified as such. Only 2 posts to say the same thing with a specific UTM, that's really not greatβ¦
-
We have a simplified process now.
- Shutdown VM in Hyper-V
- Convert VHDX to VHD using PowerShell
- Move VHD to xcp-ng using SSH
- Generate new name using uuidgen
- Rename VHD
- Create VM in XO and attach VHD
After much trial and error this works every time.
-
Do you have the Powershell command to do this? We can use that to improve the current doc Or you can even send us a pull request directly @McHenry
-
Convert-VHD -Path <source path> -DestinationPath <destination path> -VHDType Dynamic
Disk type is set by extension so ensure the destination path filename ends in ".vhd"
-
Not sure how to send a pull request sorry.
-
Don't worry, I'm adding @thomas-dkmt in the conversation so he can see how to update our doc for this
-
@olivierlambert Thanks! I'll add it to the documentation.
-
@McHenry I need some clarification on the exporting process in Hyper-V. Should the disk be converted prior to exporting, or the other way around?
-
Either way.
-
If you can have the server offline then shutdown and create the VHD from the VHDX. The process creates another disk file so the original remains unchanged and if it all goes wrong you can simply restart the VM in Hyper-V and try again another day. You will need enough disk space for the original VM & the new VHD file.
-
If the server cannot be offline then export the VM and then convert the VHDX to VHD. The issue being the original will VM still be updated whilst the migration to xcp-ng takes place. You will need enough disk space for the original VM, the exported VM and the new VHD file.
-
-
Our Hyper-V servers have no GUI and the process I use is:
- RDP to the Hyper-V host
- Open PowerShell
- Get a list of the VMs on the host
Get-VM
- Stop the VM
STOP-VM -Name <name of VM>
- Identify the VM's disk(s) for conversion
Get-VMHardDiskDrive -VMName <name of VM>
- Convert the VHDX to VHD (destination file extension sets the type so use ".vhd")
Convert-VHD -Path <source path> -DestinationPath <destination path> -VHDType Dynamic
To transfer the newly created .vhd files to xcp-ng we use Putty via the cli