[libvirt] [PATCH 5/5] Add new domblkinfo command to virsh

Eric Blake eblake at redhat.com
Tue Apr 27 23:00:22 UTC 2010

On 04/27/2010 01:35 PM, Daniel P. Berrange wrote:
>   virsh # domblkinfo demoguest /dev/hda2
>   Capacity:       1048576000
>   Allocation:     104857600
>   Physical:       104857600
> * tools/virsh.c: Implement domblkinfo command mapping to the
>   new virDomainGetBlockInfo API

And the changes to tools/virsh.pod?

>  /*
> + * "domblkinfo" command
> + */
> +static const vshCmdInfo info_domblkinfo[] = {
> +    {"help", N_("domain information")},
> +    {"desc", N_("Returns basic information about the domain.")},

Seems like too much copy and paste from dominfo.  Maybe:

Returns information about a block device used by the domain.

> +static const vshCmdOptDef opts_domblkinfo[] = {
> +    {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
> +    {"device", VSH_OT_DATA, VSH_OFLAG_REQ, N_("block device")},
> +    {NULL, 0, 0, NULL}
> +};

Is there an easy way to query all of the block devices currently tied to
a domain, so that it is possible to script a loop that calls domblkinfo
for each of those devices?  Or would we need to add a new command, maybe
'domblkinfo uuid --all', in addition to your implementation of
'domblkinfo uuid blk'.

I think there's enough findings here to request seeing v2 of the patch
before giving ack.

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100427/2c2e179b/attachment-0001.sig>

More information about the libvir-list mailing list