qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qemu-iotests 042: zero size image on VMDK
Date: Thu, 18 Apr 2013 19:19:12 +0800	[thread overview]
Message-ID: <20130418111912.GA18282@localhost.localdomain> (raw)
In-Reply-To: <CAJSP0QVCAot4HfY0FUwmaGQtmDu6uOcRq2P7-W+bN=K6csurTQ@mail.gmail.com>

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

      reply	other threads:[~2013-04-18 11:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130418111912.GA18282@localhost.localdomain \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).