qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu: block.c: introducing "fmt:FMT:" prefix to image-f


From: Uri Lublin
Subject: Re: [Qemu-devel] qemu: block.c: introducing "fmt:FMT:" prefix to image-filenames
Date: Thu, 08 Jan 2009 21:15:57 +0200
User-agent: Thunderbird 2.0.0.18 (X11/20081119)

Daniel P. Berrange wrote:
On Thu, Jan 08, 2009 at 09:09:08PM +0200, Uri Lublin wrote:
Daniel P. Berrange wrote:
On Thu, Jan 08, 2009 at 08:15:25PM +0200, Uri Lublin wrote:
The purpose of this prefix is to
1. Provide a way to know the backing file format without probing
  it (setting the format upon creation time).
2. Enable using qcow2 format (and others) over host block devices.
  (only if the user specifically asks for it).

If no fmt:FMT: is provided we go back to probing.
I still don't like the fact that this is inventing a second syntax
for specifying format that's different to the syntax used for the existing -drive parameter, which is

 -drive file=/some/path,format=qcow2,....other disk options...

backing file format is qcow2 (even though it's on a host block device)
$ qemu-img create -b fmt:qcow2:/dev/loop0 -f qcow2 /tmp/uuu.qcow2
I'd prefer to see a '-F' flag to specify format of backing file and
leave syntax of existing -b arg alone

$ qemu-img create -F qcow2 -b /dev/loop0 -f qcow2 /tmp/uuu.qcow2
I can easily modify qemu-img to support -F.
The question is how to represent it such that when we run qemu it "knows" the backing file format. In other words what will '-F qcow2' do ? In this solution it will add 'fmt:qcow2:' as a prefix to the backing-file filename.

Yes the format you write into the qcow2 header can still use the fmt:qcow2: prefix - just no need to expose that particular qcow2 specific implementation detail on the CLI.

OK. I'll prepare a patch that adds '-F fmt' to 'qemu-img create -b ...'

Thanks,
   Uri.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]