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(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org