Re: [libvirt-users] Libvirt API for attaching volume to domain

2019-08-14 Thread Varsha Verma
Thanks, this is exactly what I needed.

Is there some documentation where I can get how to exactly call this
function along with the arguments?




On Wed, Aug 14, 2019 at 6:48 PM Peter Krempa  wrote:

> On Wed, Aug 14, 2019 at 18:23:30 +0530, Varsha Verma wrote:
> > Hi,
> >
> > I wanted to know if there is any Python API exposed for libvirt using
> which
> > I can attach a libvirt volume to a libvirt domain/VM.
> >
> > I intend to do something similar to the `attach-disk` command of virsh
> > using python.
>
> virsh uses the virDomainAttachDeviceFlags API in the 'attach-disk'
> command wrapper. the python bindings expose it as 'attachDeviceFlags'
> method of the virDomain class.
>


-- 

*Regards,*

*Varsha Verma*

*Third Year Undergraduate*

*Department of Electrical Engineering*

*IIT-BHU, Varanasi*
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Libvirt API for attaching volume to domain

2019-08-14 Thread Varsha Verma
Hi,

I wanted to know if there is any Python API exposed for libvirt using which
I can attach a libvirt volume to a libvirt domain/VM.

I intend to do something similar to the `attach-disk` command of virsh
using python.

-- 

*Regards,*

*Varsha Verma*

*Final Year Undergraduate*

*Department of Electrical Engineering*

*IIT-BHU, Varanasi*
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

[libvirt-users] Libvirt API for getting disk capacity from VM XML

2019-06-14 Thread Varsha Verma
Hello everyone,
I am doing an outreachy internship at Openstack Ironic. In the sushy-tools
project, we are using libvirt VMs to simulate bare metal machines for
testing purposes.

In the XML description of a domain, there are a bunch of disk elements
giving information about the various storage devices attached to the
domain. Is there some way to get the size/capacity of those disks using the
libvirt API?

-- 

*Regards,*

*Varsha Verma*

*Fourth Year Undergraduate*

*Department of Electrical Engineering*

*IIT-BHU, Varanasi*
___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users