I need to convert a vmdk to vhdx to be used with Hyper-V. I converted the file using this:
qemu-img.exe -p -f vmdk -O vhdx -o subformat=dynamic C:\Hyper-V\Imports\VMWare\FreeRadiusAAMES\FreeRadiusAAMES.vmdk C:\Hyper-V\VHDs\FreeRadius.vhdx
When I attempt to start the Hyper-V virtual machine I get this error:
Failed to Power on with Error 'The requested operation could not be completed due to a virtual disk system limitation. Virtual hard disk files must be uncompressed and unencrypted and must not be sparse.
So, take all this with a grain of salt as I’m in the middle of moving some stuff and have no access to boxen, hence am writing off of my knowledge and access to documentation.
First of all, according to qemu-img’s documentation, you need to specify a command to it. From what you posted:
It seems you forgot to specify the convert command. Your command should probably look like this:
Also, if you can spare the space and thanks to my lack of trust on qemu-img’s proper handling of conversion, could you try doing the conversion as fixed size instead of dynamic? Worse comes to worse, try converting it to a VHD instead of a VHDX. You should be able to then convert from VHD to VHDX from within Hyper-V.
I should be able to do the same tests tomorrow morning and I’ll post the results.
EDIT: Just noticed the post is more than a month old. I’m still getting used to Discourse’s layout. Hopefully (only not) you’re still fighting with this so my post doesn’t come off as useless.
A month is fine, it is not excessively old, and people do find old questions here from Google, so an answer might still help others who stumble across it.
Probably best not go answering all the questions over 9 months old tho…
did the trick.
Now, that image still throws the same error in Hyper-V, both when trying to boot it directly or converting it from VHD to VHDX through Hyper-V’s manager wizard. I was able to boot the image just fine through QEMU (yes, you can boot any of the qemu-img supported image files in QEMU itself).