* [Qemu-devel] qemu-img help missing backing file
@ 2010-03-30 12:22 Alexander Graf
2010-03-30 12:30 ` [Qemu-devel] " Kevin Wolf
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Graf @ 2010-03-30 12:22 UTC (permalink / raw)
To: qemu-devel Developers; +Cc: Kevin Wolf
Howdy,
I just wanted to create a backed qcow2 image and was irritated by qemu-img not showing me the correct command line option. It's just missing from the list:
> agraf@s390t27:~/git/qemu> ./qemu-img --help
> qemu-img version 0.12.50, Copyright (c) 2004-2008 Fabrice Bellard
> usage: qemu-img command [command options]
> QEMU disk image utility
>
> Command syntax:
> check [-f fmt] filename
> create [-f fmt] [-o options] filename [size]
^- missing -b
> commit [-f fmt] filename
> convert [-c] [-f fmt] [-O output_fmt] [-o options] filename [filename2 [...]] output_filename
> info [-f fmt] filename
> snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename
> rebase [-f fmt] [-u] -b backing_file [-F backing_fmt] filename
>
> Command parameters:
> 'filename' is a disk image filename
> 'fmt' is the disk image format. It is guessed automatically in most cases
> 'size' is the disk image size in bytes. Optional suffixes
> 'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)
> and T (terabyte, 1024G) are supported. 'b' is ignored.
> 'output_filename' is the destination disk image filename
> 'output_fmt' is the destination format
> 'options' is a comma separated list of format specific options in a
> name=value format. Use -o ? for an overview of the options supported by the
> used format
> '-c' indicates that target image must be compressed (qcow format only)
> '-u' enables unsafe rebasing. It is assumed that old and new backing file
> match exactly. The image doesn't need a working backing file before
> rebasing in this case (useful for renaming the backing file)
> '-h' with or without a command shows this help and lists the supported formats
^- missing -b
>
> Parameters to snapshot subcommand:
> 'snapshot' is the name of the snapshot to create, apply or delete
> '-a' applies a snapshot (revert disk to saved state)
> '-c' creates a snapshot
> '-d' deletes a snapshot
> '-l' lists all snapshots in the given image
>
> Supported formats: cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2 parallels nbd host_cdrom host_floppy host_device raw
Is this intentional? The actual command still works:
> agraf@s390t27:~/git/qemu> qemu-img-kvm create -f qcow2 -b /media/studio/images/SUSE/s390/sles11.raw /dev/shm/sles11-zipl.qcow2
> Formatting '/dev/shm/sles11-zipl.qcow2', fmt=qcow2 size=21474836480 backing_file='/media/studio/images/SUSE/s390/sles11.raw' encryption=off cluster_size=0
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: qemu-img help missing backing file
2010-03-30 12:22 [Qemu-devel] qemu-img help missing backing file Alexander Graf
@ 2010-03-30 12:30 ` Kevin Wolf
2010-03-30 12:32 ` Alexander Graf
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Wolf @ 2010-03-30 12:30 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel Developers
Am 30.03.2010 14:22, schrieb Alexander Graf:
> Howdy,
>
> I just wanted to create a backed qcow2 image and was irritated by qemu-img not showing me the correct command line option. It's just missing from the list:
[...]
> Is this intentional? The actual command still works:
>
>> agraf@s390t27:~/git/qemu> qemu-img-kvm create -f qcow2 -b /media/studio/images/SUSE/s390/sles11.raw /dev/shm/sles11-zipl.qcow2
>> Formatting '/dev/shm/sles11-zipl.qcow2', fmt=qcow2 size=21474836480 backing_file='/media/studio/images/SUSE/s390/sles11.raw' encryption=off cluster_size=0
-b still works to maintain compatibility with older versions. The
documented way is -o backing_file=foo (the qemu-img output you quote
even contains this option).
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: qemu-img help missing backing file
2010-03-30 12:30 ` [Qemu-devel] " Kevin Wolf
@ 2010-03-30 12:32 ` Alexander Graf
2010-03-30 12:49 ` Kevin Wolf
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Graf @ 2010-03-30 12:32 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel Developers
On 30.03.2010, at 14:30, Kevin Wolf wrote:
> Am 30.03.2010 14:22, schrieb Alexander Graf:
>> Howdy,
>>
>> I just wanted to create a backed qcow2 image and was irritated by qemu-img not showing me the correct command line option. It's just missing from the list:
> [...]
>> Is this intentional? The actual command still works:
>>
>>> agraf@s390t27:~/git/qemu> qemu-img-kvm create -f qcow2 -b /media/studio/images/SUSE/s390/sles11.raw /dev/shm/sles11-zipl.qcow2
>>> Formatting '/dev/shm/sles11-zipl.qcow2', fmt=qcow2 size=21474836480 backing_file='/media/studio/images/SUSE/s390/sles11.raw' encryption=off cluster_size=0
>
> -b still works to maintain compatibility with older versions. The
> documented way is -o backing_file=foo (the qemu-img output you quote
> even contains this option).
Interesting O_o. Maybe it'd be a good idea to give some examples in the help output? The same way the -e and -b options were having examples there too. That really makes them easier to find.
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: qemu-img help missing backing file
2010-03-30 12:32 ` Alexander Graf
@ 2010-03-30 12:49 ` Kevin Wolf
2010-03-30 13:04 ` Juan Quintela
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Wolf @ 2010-03-30 12:49 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel Developers
Am 30.03.2010 14:32, schrieb Alexander Graf:
>
> On 30.03.2010, at 14:30, Kevin Wolf wrote:
>
>> Am 30.03.2010 14:22, schrieb Alexander Graf:
>>> Howdy,
>>>
>>> I just wanted to create a backed qcow2 image and was irritated by qemu-img not showing me the correct command line option. It's just missing from the list:
>> [...]
>>> Is this intentional? The actual command still works:
>>>
>>>> agraf@s390t27:~/git/qemu> qemu-img-kvm create -f qcow2 -b /media/studio/images/SUSE/s390/sles11.raw /dev/shm/sles11-zipl.qcow2
>>>> Formatting '/dev/shm/sles11-zipl.qcow2', fmt=qcow2 size=21474836480 backing_file='/media/studio/images/SUSE/s390/sles11.raw' encryption=off cluster_size=0
>>
>> -b still works to maintain compatibility with older versions. The
>> documented way is -o backing_file=foo (the qemu-img output you quote
>> even contains this option).
>
> Interesting O_o. Maybe it'd be a good idea to give some examples in the help output? The same way the -e and -b options were having examples there too. That really makes them easier to find.
Feel free to submit a patch. ;-)
Examples sound like an easy way to make these features more visible
again. Even better, but a bit more work, would be to include a
dynamically generated list of all supported options like this:
backing_file: File name of a base image (qcow, qcow2, vmdk)
backing_fmt: Image format of the base image (qcow2)
encryption: Encrypt the image (qcow, qcow2)
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: qemu-img help missing backing file
2010-03-30 12:49 ` Kevin Wolf
@ 2010-03-30 13:04 ` Juan Quintela
2010-03-30 13:23 ` Kevin Wolf
0 siblings, 1 reply; 6+ messages in thread
From: Juan Quintela @ 2010-03-30 13:04 UTC (permalink / raw)
To: Kevin Wolf; +Cc: Alexander Graf, qemu-devel Developers
Kevin Wolf <kwolf@redhat.com> wrote:
> Am 30.03.2010 14:32, schrieb Alexander Graf:
>>
>> On 30.03.2010, at 14:30, Kevin Wolf wrote:
>>
>>> Am 30.03.2010 14:22, schrieb Alexander Graf:
>>>> Howdy,
>>>>
>>>> I just wanted to create a backed qcow2 image and was irritated by qemu-img not showing me the correct command line option. It's just missing from the list:
>>> [...]
>>>> Is this intentional? The actual command still works:
>>>>
>>>>> agraf@s390t27:~/git/qemu> qemu-img-kvm create -f qcow2 -b /media/studio/images/SUSE/s390/sles11.raw /dev/shm/sles11-zipl.qcow2
>>>>> Formatting '/dev/shm/sles11-zipl.qcow2', fmt=qcow2 size=21474836480 backing_file='/media/studio/images/SUSE/s390/sles11.raw' encryption=off cluster_size=0
>>>
>>> -b still works to maintain compatibility with older versions. The
>>> documented way is -o backing_file=foo (the qemu-img output you quote
>>> even contains this option).
>>
>> Interesting O_o. Maybe it'd be a good idea to give some examples in the help output? The same way the -e and -b options were having examples there too. That really makes them easier to find.
>
> Feel free to submit a patch. ;-)
>
> Examples sound like an easy way to make these features more visible
> again. Even better, but a bit more work, would be to include a
> dynamically generated list of all supported options like this:
>
> backing_file: File name of a base image (qcow, qcow2, vmdk)
> backing_fmt: Image format of the base image (qcow2)
> encryption: Encrypt the image (qcow, qcow2)
You can look at how this was done for -cpu
you do -cpu ?model
and it list the models.
Later, Juan.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: qemu-img help missing backing file
2010-03-30 13:04 ` Juan Quintela
@ 2010-03-30 13:23 ` Kevin Wolf
0 siblings, 0 replies; 6+ messages in thread
From: Kevin Wolf @ 2010-03-30 13:23 UTC (permalink / raw)
To: Juan Quintela; +Cc: Alexander Graf, qemu-devel Developers
Am 30.03.2010 15:04, schrieb Juan Quintela:
> Kevin Wolf <kwolf@redhat.com> wrote:
>> Am 30.03.2010 14:32, schrieb Alexander Graf:
>>>
>>> On 30.03.2010, at 14:30, Kevin Wolf wrote:
>>>
>>>> Am 30.03.2010 14:22, schrieb Alexander Graf:
>>>>> Howdy,
>>>>>
>>>>> I just wanted to create a backed qcow2 image and was irritated by qemu-img not showing me the correct command line option. It's just missing from the list:
>>>> [...]
>>>>> Is this intentional? The actual command still works:
>>>>>
>>>>>> agraf@s390t27:~/git/qemu> qemu-img-kvm create -f qcow2 -b /media/studio/images/SUSE/s390/sles11.raw /dev/shm/sles11-zipl.qcow2
>>>>>> Formatting '/dev/shm/sles11-zipl.qcow2', fmt=qcow2 size=21474836480 backing_file='/media/studio/images/SUSE/s390/sles11.raw' encryption=off cluster_size=0
>>>>
>>>> -b still works to maintain compatibility with older versions. The
>>>> documented way is -o backing_file=foo (the qemu-img output you quote
>>>> even contains this option).
>>>
>>> Interesting O_o. Maybe it'd be a good idea to give some examples in the help output? The same way the -e and -b options were having examples there too. That really makes them easier to find.
>>
>> Feel free to submit a patch. ;-)
>>
>> Examples sound like an easy way to make these features more visible
>> again. Even better, but a bit more work, would be to include a
>> dynamically generated list of all supported options like this:
>>
>> backing_file: File name of a base image (qcow, qcow2, vmdk)
>> backing_fmt: Image format of the base image (qcow2)
>> encryption: Encrypt the image (qcow, qcow2)
>
> You can look at how this was done for -cpu
>
> you do -cpu ?model
>
> and it list the models.
We do have something like this for block options, -o ? displays this
information - however, it displays them only for a given format, just
like cpu -? displays them only for one architecture.
What is different with my suggestion is that you would iterate over all
image formats and coalesce duplicates into a single line. It shouldn't
be really hard, but a little more work than just changing the help
string to contain some examples.
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-30 13:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 12:22 [Qemu-devel] qemu-img help missing backing file Alexander Graf
2010-03-30 12:30 ` [Qemu-devel] " Kevin Wolf
2010-03-30 12:32 ` Alexander Graf
2010-03-30 12:49 ` Kevin Wolf
2010-03-30 13:04 ` Juan Quintela
2010-03-30 13:23 ` Kevin Wolf
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).