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

Peter Krempa pkrempa at redhat.com
Wed Aug 14 13:18:18 UTC 2019


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20190814/213c0cb9/attachment.sig>


More information about the libvirt-users mailing list