VM image converter (VMDK, VHD, VHDX, IMG, RAW, QCOW and QCOW2), P2V migrator
Moderators: anton (staff), art (staff), Anatoly (staff), Max (staff)
-
Matt_NZ
- Posts: 15
- Joined: Sat Sep 14, 2024 6:19 am
Mon Nov 25, 2024 11:15 pm
When doing a conversion of a VM from VMware to Hyper-V, I've noticed that the current version (9.0.1.554) is cutting off the last character of the diskname. So if the disk in vmware is called "vmmigtest.vmdk" the converted VHDX is called "vmmigtes.vhdx". This isn't really an issue for VMs with a single disk, but I think this is the cause of why I'm having issues with converting VMs with multiple disks. In VMWare, if there are multiple disks, the second disk would be called "vmmigtest_1", third would be "vmmigtest_2" etc. However, during the conversion because it cuts off the last character they both end up trying to be named "vmmigtest_". Windows obviously doesn't allow this duplicate, so the third disk becomes "vmmigtest_(1)" on the file system.
When Starwind then tries to create the VM and attach the disks, I suspect it tries to mount the disks with the filenames of vmmigtes.vhdx, vmmigtest_.vhdx and vmmigtest_.vhdx and obviously fails because a) the two extra disks have the same name due to the character cut off and b) Windows has renamed the third disk with (1) at the end.
I'm not sure of a way to workaround this bug without modifying the VMs in VMware to be named uniquely at the start of their names so the cut off character at the end doesn't matter, or manually converting each extra disk and attaching them to the converted VM.
-
bartolomeo
- Posts: 2
- Joined: Fri Nov 15, 2024 8:23 pm
Tue Nov 26, 2024 6:47 pm
Before conversion you could rename your disks in VMware with unique prefixes or suffixes that ensure even if the last character is truncated, they remain distinct. For example renaming /vmmigtest.vmdk/ to /vmmigtestdisk1.vmdk/ and /vmmigtest_1.vmdk/ to /vmmigtestdisk2.vmdk/
After the conversion manually rename the VHDX files to unique names that match their intended associations. Then manually attach them to the correct VM in Hyper-V Manager. If you're handling a large number of VMs, consider writing a script to rename and attach the disks automatically after conversion
-
Matt_NZ
- Posts: 15
- Joined: Sat Sep 14, 2024 6:19 am
Tue Nov 26, 2024 9:07 pm
bartolomeo wrote: ↑Tue Nov 26, 2024 6:47 pm
Before conversion you could rename your disks in VMware with unique prefixes or suffixes that ensure even if the last character is truncated, they remain distinct. For example renaming /vmmigtest.vmdk/ to /vmmigtestdisk1.vmdk/ and /vmmigtest_1.vmdk/ to /vmmigtestdisk2.vmdk/
After the conversion manually rename the VHDX files to unique names that match their intended associations. Then manually attach them to the correct VM in Hyper-V Manager. If you're handling a large number of VMs, consider writing a script to rename and attach the disks automatically after conversion
Well yeah, renaming in VMWare ahead of migration is an option but it will mean shutting down the VM, manually renaming the files and modifying the config file. Certainly doable but not ideal

I'd need to put the numbers at the start of the name as the 1 & 2 in your example will get cut off by the bug.
I can probably come up with a PowerShell script to try and detect when this error happens, get the details of the VM from VMware and then have the script create the VM in SCVMM and attach the converted disks...but I don't know how reliable that would be.
Any chance there might be a new version coming out shortly that will have a fix for this but tho?

-
yaroslav (staff)
- Staff
- Posts: 3571
- Joined: Mon Nov 18, 2019 11:11 am
Tue Nov 26, 2024 9:21 pm
I will report it to the dev team, yet I am afraid there might not be a new version released that soon.
Thanks for your feedback!