Description of problem:
as subject. Maybe vmdk only supports regular file(nfs or local file), but block device is very regular block device for users, I think we'd better we can fix it to support or disable it with a friendly message prompt.
Version-Release number of selected component (if applicable):
host info:
2.6.32-412.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.397.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1.create a lvm and create it to VMDK format.
# lvcreate -L 10G -n vmdk-data-disk /dev/vg
Logical volume "vmdk-data-disk" created
# qemu-img create -f vmdk /dev/vg/vmdk-data-disk 10G
Formatting '/dev/vg/vmdk-data-disk', fmt=vmdk size=10737418240 compat6=off zeroed_grain=off
/dev/vg/vmdk-data-disk: error while creating vmdk: Invalid argument
2.try to create VMDK format for block device(e.g: iscsi lun or lvm)
# qemu-img create -f vmdk /dev/disk/by-path/ip-10.66.90.100:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-0971f7d03-1dff49b26885073d-s2-sluo-172259-lun-0 100G
Formatting '/dev/disk/by-path/ip-10.66.90.100:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-0971f7d03-1dff49b26885073d-s2-sluo-172259-lun-0', fmt=vmdk size=107374182400 compat6=off zeroed_grain=off
/dev/disk/by-path/ip-10.66.90.100:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-0971f7d03-1dff49b26885073d-s2-sluo-172259-lun-0: error while creating vmdk: Invalid argument
Actual results:
fail to create VMDK format for block device(e.g: iscsi lun or lvm)
Expected results:
I think we'd better we can fix it to support or disable it with a friendly message prompt.
Additional info:
testing for local file:
# qemu-img create -f vmdk /home/vmdk-data-disk 10GFormatting '/home/vmdk-data-disk', fmt=vmdk size=10737418240 compat6=off zeroed_grain=off
# qemu-img info /home/vmdk-data-disk
image: /home/vmdk-data-disk
file format: vmdk
virtual size: 10G (10737418240 bytes)
disk size: 12K
Since this is a corner case and the reason we want to support vmdk is mostly for read-only use-cases, I'm closing it as wontfix.
BTW, Fam believes that not even VMWare supports the creation of vmdk files on block devices.