[libvirt] Get disk size for disk type="network"

Qiang Fu fuqiang2310 at gmail.com
Tue Mar 11 01:09:15 UTC 2014


Hi,

In the output of "virsh dumpxml" command the disk section is as follows:

<disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <auth username='svl-cc1-cinder-user'>
        <secret type='ceph' uuid='e80afa94-a64c-486c-9e34-d55e85f26406'/>
      </auth>
      <source protocol='rbd'
name='svl-cc1-cinder-volume-1/volume-0a4cdeab-863d-4394-845f-008b993bc4e9'>
        <host name='10.34.114.211' port='6789'/>
        <host name='10.34.114.212' port='6789'/>
        <host name='10.34.114.213' port='6789'/>
      </source>
      <target dev='vda' bus='virtio'/>
      <serial>0a4cdeab-863d-4394-845f-008b993bc4e9</serial>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </disk>

In this case how can I use libvirt to get the disk/volume size information?

Thanks,
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140310/e37db9a7/attachment-0001.htm>


More information about the libvir-list mailing list