W3cubDocs

/Ansible 2.10

community.libvirt.libvirt_qemu – Run tasks on libvirt/qemu virtual machines

Note

This plugin is part of the community.libvirt collection.

To install it use: ansible-galaxy collection install community.libvirt.

To use it in a playbook, specify: community.libvirt.libvirt_qemu.

New in version 2.10: of community.libvirt

Synopsis

  • Run commands or put/fetch files to libvirt/qemu virtual machines using the qemu agent API.

Parameters

Parameter Choices/Defaults Configuration Comments
executable
string
Default:
"/bin/sh"
var: ansible_executable
Shell to use for execution inside container
remote_addr
string
Default:
"inventory_hostname"
var: ansible_host
Virtual machine name
virt_uri
string
Default:
"qemu:///system"
var: ansible_libvirt_uri
libvirt URI to connect to to access the virtual machine

Notes

Note

  • Currently DOES NOT work with selinux set to enforcing in the VM.
  • Requires the qemu-agent installed in the VM.
  • Requires access to the qemu-ga commands guest-exec, guest-exec-status, guest-file-close, guest-file-open, guest-file-read, guest-file-write.

Authors

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/libvirt/libvirt_qemu_connection.html