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: Daniel P. Berrange
Subject: Re: [Qemu-devel] qemu: block.c: introducing "fmt:FMT:" prefix to image-filenames
Date: Thu, 8 Jan 2009 18:52:56 +0000
User-agent: Mutt/1.4.1i

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

> force backing file format to raw (no probing)
> $ qemu-img create -f raw /tmp/image1.raw 10G
> $ qemu-img create -b fmt:raw:/tmp/image1.raw -f qcow2 /tmp/image1.qcow2

  $ qemu-img create -F raw -b /tmp/image1.raw -f qcow2 /tmp/image1.qcow2

> Use together with other protocols, e.g. nbd
> $ qemu-nbd -v -n --snapshot -t -k /tmp/uuu.socket 
> fmt:qcow2:/tmp/images/uuu.qcow2 &

Should just add  a -f arg to qemu-nbd to specify format so it
follows qemu-img style, eg

 $ qemu-nbd -v -n --snapshot -t -k /tmp/uuu.socket \
    -f qcow2 /tmp/images/uuu.qcow2 &

> $ qemu-img info nbd:unix:/tmp/uuu.socket
> $ qemu-system-x86_64 -snapshot -hda nbd:unix:/tmp/uuu.socket
> 
> Or fat
> $ qemu-system-x86_64 -hda fmt:qcow2:/tmp/uuu.qcow2 -hdb 
> fat:floppy:/tmp/images

This is unneccessary, since -hda is deprecated, and there's a 
new -drive arg that already has ability to set format explicitly,
as well as many other flags that you need when setting up disks.

   $ qemu-system-x86_64 \ 
         -drive index=0,format=qcow2,file=/tmp/uuu.qcow2 \
         -drive index=1,format=fat:floppy,file=/tmp/images

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




reply via email to

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