.. _virt: virt `````````````````````````````` .. versionadded:: 0.2 Manages virtual machines supported by *libvirt*. .. raw:: html
parameter | required | default | choices | comments |
---|---|---|---|---|
state | no | no |
|
Note that there may be some lag for state requests like shutdown since these refer only to VM states. After starting a guest, it may not be immediately accessible. |
command | no | in addition to state management, various non-idempotent commands are available. See examples | ||
name | yes | name of the guest VM being managed |
Example from Ansible Playbooks
virt guest=alpha state=running
Example guest management with /usr/bin/ansible
ansible host -m virt -a "guest=alpha command=status"
Other non-idempotent commands are: status
, pause
, unpause
, get_xml
, autostart
, freemem
, list_vms
, info
, nodeinfo
, virttype