serverbee.qemu_kvm
QEMU-KVM Role
This role installs virtualization tools qemu-kvm along with other tools (like libvirtd, libvirt-client, etc.).
Variables
General
qemu_kvm_packages
: [optional]: a list of packages to install (check defaults/main.yml for details).qemu_kvm_use_rhev_version
: [optional, default istrue
]: choose whether to use the virt7-kvm-common-candidate repo (only for el7).qemu_kvm_remove_default_network
: [optional, default istrue
]: remove the default qemu-kvm network.
Configure
qemu_kvm_libvirtguests_onshutdown
: [optional, default issuspend
]: set the ON_SHUTDOWN= variable (in /etc/sysconfig/libvirt-guests). Possible values:shutdown
orsuspend
.
Examples
- Playbook
qemu-kvm.yml
- hosts:
- hostname
roles:
- qemu-kvm
To Install:
ansible-playbook --user=username --become qemu-kvm.yml
To Configure (set the variable ON_SHUTDOWN=shutdown):
ansible-playbook --user=username --become --extra-vars="qemu_kvm_libvirtguests_onshutdown=shutdown" qemu-kvm.yml --tags=libvirt-guests-configure
Or you can set the variable
qemu_kvm_libvirtguests_onshutdown: "shutdown"
inhost_vars\hostname
.
NOTE
After changing the ON_SHUTDOWN value in /etc/sysconfig/libvirt-guests, the libvirt-guests service does NOT restart automatically (otherwise, all VMs will be shut down or suspended).
License
GPLv3 license
Author Information
Vitaly Yakovenko