* [Qemu-devel] qemu-iotests 042: zero size image on VMDK
@ 2013-04-18 7:08 Fam Zheng
2013-04-18 7:39 ` Stefan Hajnoczi
0 siblings, 1 reply; 5+ messages in thread
From: Fam Zheng @ 2013-04-18 7:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi
Hi,
Currently VMDK block driver fails qemu-iotest case 042 because it
refuses to create block with zero size (silently). Is support for zero
size image desired or should this case be skipped?
$ qemu-img create -f vmdk t.vmdk 0
Formatting 't.vmdk', fmt=vmdk size=0 compat6=off
qemu-img: t.vmdk: error while creating vmdk: No such file or directory
--
Best regards,
Fam Zheng
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-iotests 042: zero size image on VMDK
2013-04-18 7:08 [Qemu-devel] qemu-iotests 042: zero size image on VMDK Fam Zheng
@ 2013-04-18 7:39 ` Stefan Hajnoczi
2013-04-18 10:08 ` Fam Zheng
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2013-04-18 7:39 UTC (permalink / raw)
To: qemu-devel, Kevin Wolf
On Thu, Apr 18, 2013 at 03:08:55PM +0800, Fam Zheng wrote:
> Currently VMDK block driver fails qemu-iotest case 042 because it
> refuses to create block with zero size (silently). Is support for zero
> size image desired or should this case be skipped?
>
> $ qemu-img create -f vmdk t.vmdk 0
> Formatting 't.vmdk', fmt=vmdk size=0 compat6=off
> qemu-img: t.vmdk: error while creating vmdk: No such file or directory
Is there a reason to refuse 0-sized images? The VMware tools can resize
images so it would be possible to grow them later (i.e. the use case is
weird but might still be valid).
It's also worth checking if VMware tools allow you to create 0-sized
image and whether they can operate on them. If they fail to open or
inspect 0-sized images, then QEMU should not create them.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-iotests 042: zero size image on VMDK
2013-04-18 7:39 ` Stefan Hajnoczi
@ 2013-04-18 10:08 ` Fam Zheng
2013-04-18 11:02 ` Stefan Hajnoczi
0 siblings, 1 reply; 5+ messages in thread
From: Fam Zheng @ 2013-04-18 10:08 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Kevin Wolf, qemu-devel
On Thu, 04/18 09:39, Stefan Hajnoczi wrote:
> On Thu, Apr 18, 2013 at 03:08:55PM +0800, Fam Zheng wrote:
> > Currently VMDK block driver fails qemu-iotest case 042 because it
> > refuses to create block with zero size (silently). Is support for zero
> > size image desired or should this case be skipped?
> >
> > $ qemu-img create -f vmdk t.vmdk 0
> > Formatting 't.vmdk', fmt=vmdk size=0 compat6=off
> > qemu-img: t.vmdk: error while creating vmdk: No such file or directory
>
> Is there a reason to refuse 0-sized images? The VMware tools can resize
> images so it would be possible to grow them later (i.e. the use case is
> weird but might still be valid).
>
> It's also worth checking if VMware tools allow you to create 0-sized
> image and whether they can operate on them. If they fail to open or
> inspect 0-sized images, then QEMU should not create them.
Not possible for VMware tools, either. See the vmware-vdiskmanager behavior here:
$ ../vmdk.py t.vmdk resize 0
OK
$ ../vmdk.py t.vmdk show
*** Header ***
magic : 1447904331
version : 1
flags : 3
capacity : 0
grain_size : 128
descriptor_offset : 1
descriptor_size : 20
num_gtes_per_gt : 512
rgd_offset : 21
gd_offset : 278
overhead : 640
unclean_shutdown : False
single_endline_char :
non_endline_char :
double_endline_char :
double_endline_char2 :
compress_algorithm : 0
*** Embeddd Descriptor ***
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=fffffffe
parentCID=ffffffff
isNativeSnapshot="no"
createType="monolithicSparse"
# Extent description
RW 0 SPARSE "t.vmdk"
# The Disk Data Base
#DDB
ddb.deletable = "true"
ddb.virtualHWVersion = "6"
ddb.longContentID = "ff7abf4bda4302142e8ba8593ad0bdb6"
ddb.uuid = "60 00 C2 94 2e a6 38 d0-8b 2c 21 37 49 8b 15 70"
ddb.geometry.cylinders = "2048"
ddb.geometry.heads = "64"
ddb.geometry.sectors = "32"
ddb.adapterType = "lsilogic"
$ vmware-vdiskmanager -x 2G t.vmdk
=> Failed to open the disk 't.vmdk' : The file specified is not a virtual disk (0xf00003ebf).
Failed to open disk 't.vmdk' : The file specified is not a virtual disk (0xf00003ebf).
=> $ ../vmdk.py t.vmdk resize 1
OK
$ vmware-vdiskmanager -x 2G t.vmdk
=> Grow: 0% done.Disk expansion completed successfully.
WARNING: If the virtual disk is partitioned, you must use a third-party
utility in the virtual machine to expand the size of the
partitions. For more information, see:
http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647
--
Fam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-iotests 042: zero size image on VMDK
2013-04-18 10:08 ` Fam Zheng
@ 2013-04-18 11:02 ` Stefan Hajnoczi
2013-04-18 11:19 ` Fam Zheng
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2013-04-18 11:02 UTC (permalink / raw)
To: Stefan Hajnoczi, qemu-devel, Kevin Wolf
On Thu, Apr 18, 2013 at 12:08 PM, Fam Zheng <famz@redhat.com> wrote:
> On Thu, 04/18 09:39, Stefan Hajnoczi wrote:
>> On Thu, Apr 18, 2013 at 03:08:55PM +0800, Fam Zheng wrote:
>> > Currently VMDK block driver fails qemu-iotest case 042 because it
>> > refuses to create block with zero size (silently). Is support for zero
>> > size image desired or should this case be skipped?
>> >
>> > $ qemu-img create -f vmdk t.vmdk 0
>> > Formatting 't.vmdk', fmt=vmdk size=0 compat6=off
>> > qemu-img: t.vmdk: error while creating vmdk: No such file or directory
>>
>> Is there a reason to refuse 0-sized images? The VMware tools can resize
>> images so it would be possible to grow them later (i.e. the use case is
>> weird but might still be valid).
>>
>> It's also worth checking if VMware tools allow you to create 0-sized
>> image and whether they can operate on them. If they fail to open or
>> inspect 0-sized images, then QEMU should not create them.
>
> Not possible for VMware tools, either. See the vmware-vdiskmanager behavior here:
There is a possibility that the vmdk.py script is "buggy". Can you
use only VMware tools to create a 0-byte disk?
If the answer is yes, then there's a bug in vmdk.py and the vmdk block
driver should support creating 0-byte disks.
If no, then we should not allow it either. This prevents confusion
when users find the qemu-img 0-byte VMDK does not work with VMware or
other tools.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-iotests 042: zero size image on VMDK
2013-04-18 11:02 ` Stefan Hajnoczi
@ 2013-04-18 11:19 ` Fam Zheng
0 siblings, 0 replies; 5+ messages in thread
From: Fam Zheng @ 2013-04-18 11:19 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Kevin Wolf, qemu-devel
On Thu, 04/18 13:02, Stefan Hajnoczi wrote:
> On Thu, Apr 18, 2013 at 12:08 PM, Fam Zheng <famz@redhat.com> wrote:
> > On Thu, 04/18 09:39, Stefan Hajnoczi wrote:
> >> On Thu, Apr 18, 2013 at 03:08:55PM +0800, Fam Zheng wrote:
> >> > Currently VMDK block driver fails qemu-iotest case 042 because it
> >> > refuses to create block with zero size (silently). Is support for zero
> >> > size image desired or should this case be skipped?
> >> >
> >> > $ qemu-img create -f vmdk t.vmdk 0
> >> > Formatting 't.vmdk', fmt=vmdk size=0 compat6=off
> >> > qemu-img: t.vmdk: error while creating vmdk: No such file or directory
> >>
> >> Is there a reason to refuse 0-sized images? The VMware tools can resize
> >> images so it would be possible to grow them later (i.e. the use case is
> >> weird but might still be valid).
> >>
> >> It's also worth checking if VMware tools allow you to create 0-sized
> >> image and whether they can operate on them. If they fail to open or
> >> inspect 0-sized images, then QEMU should not create them.
> >
> > Not possible for VMware tools, either. See the vmware-vdiskmanager behavior here:
>
> There is a possibility that the vmdk.py script is "buggy". Can you
> use only VMware tools to create a 0-byte disk?
>
> If the answer is yes, then there's a bug in vmdk.py and the vmdk block
> driver should support creating 0-byte disks.
>
> If no, then we should not allow it either. This prevents confusion
> when users find the qemu-img 0-byte VMDK does not work with VMware or
> other tools.
Yep I forgot to mention, 1MB minimun applies for creating too.
fam@localhost:~$ vmware-vdiskmanager -c -s 0 -t 0 t.vmdk -a lsilogic
Either the disktype or the disksize is missing or is invalid.
fam@localhost:~$ vmware-vdiskmanager -c -s 2048 -t 0 t.vmdk -a lsilogic
Creating disk 't.vmdk'
Virtual disk creation successful.
Also tried in Workstation GUI, where 0-byte disk can't be created either.
--
Fam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-18 11:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 7:08 [Qemu-devel] qemu-iotests 042: zero size image on VMDK Fam Zheng
2013-04-18 7:39 ` Stefan Hajnoczi
2013-04-18 10:08 ` Fam Zheng
2013-04-18 11:02 ` Stefan Hajnoczi
2013-04-18 11:19 ` Fam Zheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).