Bug 999816

Summary: fail to create VMDK format for block device(e.g: iscsi lun or lvm)
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Fam Zheng <famz>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, bsarathy, chayang, famz, flang, juzhang, michen, mkenneth, qzhang, stefanha, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 999818 (view as bug list) Environment:
Last Closed: 2013-09-05 15:33:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 999818    

Description Sibiao Luo 2013-08-22 07:56:03 UTC
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

Comment 1 Sibiao Luo 2013-08-22 08:00:27 UTC
BTW, create qcow2 and raw for lvm are ok.
# qemu-img create -f qcow2 /dev/vg/vmdk-data-disk 10G
Formatting '/dev/vg/vmdk-data-disk', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 
# qemu-img create -f raw /dev/vg/vmdk-data-disk 10G
Formatting '/dev/vg/vmdk-data-disk', fmt=raw size=10737418240 

# 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

Best Regards,
sluo

Comment 2 Ademar Reis 2013-09-05 15:33:22 UTC
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.