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

Re: [libvirt] [PATCH] virsh: add snapshot backing store support to vol-create-as



On Wed, Jun 09, 2010 at 02:08:30AM +1000, Justin Clift wrote:
> This patch adds two new parameters to the vol-create-as command:
> 
>  --snapshot-backing-vol <volume-name-or-key-or-path>
>  --snapshot-backing-vol-format <format-of-backing-vol>
> 
>   virsh # vol-create-as guest_images_lvm snapvol1 5G --snapshot-backing-vol \
>               rhel6vm1lun1
>   Vol snapvol1 created
> 
>   virsh # vol-create-as image_dir qcow2snap2 5G --format qcow2 \
>               --snapshot-backing-vol imagevol1.qcow2 \
>               --snapshot-backing-vol-format qcow2
>   Vol qcow2snap2 created
> 
> Additionally, the virsh man page update fixes incorrect snapshot
> parameters that were included in my prior bulk volume command patch.
> ---
>  tools/virsh.c   |   61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  tools/virsh.pod |   10 ++++----
>  2 files changed, 65 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 1e00114..497c7d4 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -5274,6 +5274,8 @@ static const vshCmdOptDef opts_vol_create_as[] = {
>      {"capacity", VSH_OT_DATA, VSH_OFLAG_REQ, N_("size of the vol with optional k,M,G,T suffix")},
>      {"allocation", VSH_OT_STRING, 0, N_("initial allocation size with optional k,M,G,T suffix")},
>      {"format", VSH_OT_STRING, 0, N_("file format type raw,bochs,qcow,qcow2,vmdk")},
> +    {"snapshot-backing-vol", VSH_OT_STRING, 0, N_("the backing volume if taking a snapshot")},
> +    {"snapshot-backing-vol-format", VSH_OT_STRING, 0, N_("format of backing volume if taking a snapshot")},

I think this naming is a little too long. We can shorten
to just 'backing-vol' and 'backing-vol-format', since that
matches the XML nameing too

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


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