Closed Nojinverse closed 1 month ago
Hi @Nojinverse, thanks for reporting this problem.
I may have made a typo when selecting formats for qemu-img (or missed an update), as the list of supported formats, as indicated by qemu-img --help
, is as follows:
Supported formats: blkdebug blklogwrites blkreplay blkverify bochs cloop copy-on-read dmg file ftp ftps host_cdrom host_device http https iscsi iser luks nbd null-aio null-co nvme parallels qcow qcow2 qed quorum raw rbd replication sheepdog ssh throttle vdi vhdx vmdk vpc vvfat
There is no vhd
but vhdx
. Using vhdx
as an extension in the d2vm ...
command will not work because validation will reject it.
Would updating the format list to change vhd
to vhdx
and adding vpc
solve your problem?
Image format conversion is only supported by convenience for the most common formats. For more advanced needs I think it's better to work in raw format and use qemu-img directly yourself.
Implementing the validation of these options would increase the maintenance work required for a relatively uncommon use.
@Adphi I am running into the same issue as @Nojinverse and since I also need VmWare vmdk
output besides Hyper-V, I will go with raw
output from d2vm
(very very great tool by the way!) and calling qemu-img
manually 2 times (1 for Hyper-V vhdx
and 1 for VmWare vmdk
).
Hey gang. I had this issue as well and just created a PR that corrects it. https://github.com/linka-cloud/d2vm/pull/49
Issue
from the documentation: d2vm build [context directory] [flags]
Flags: -o, --output string The output image, the extension determine the image format, raw will be used if none. Supported formats: qcow2 qed raw vdi vhd vmdk (default "disk0.qcow2")
but when trying to build a .vhd the build fails with
Cause
The underlying qemu-img convert argument is vpc not vhd
see https://docs.openstack.org/image-guide/convert-images.html
Side note
it would be nice to be able to use additional options for qemu-img convert etc: