From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USms5-0002vl-2o for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:19:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USms2-00053l-9M for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:19:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USms2-00053g-12 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:19:18 -0400 Date: Thu, 18 Apr 2013 19:19:12 +0800 From: Fam Zheng Message-ID: <20130418111912.GA18282@localhost.localdomain> References: <20130418070855.GA6942@localhost.localdomain> <20130418073903.GD19195@stefanha-thinkpad.redhat.com> <20130418100845.GA21610@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] qemu-iotests 042: zero size image on VMDK List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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