Skip to content

jamescassell/ansible-role-libvirt-vm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libvirt-vm

Create a libvirt VM using virt-install.

Requirements

Role assumes that the virt-install command is functional. Typically this requires libvirt, qemu-kvm, and virt-install packages. These also require hardware-assisted virtualization, as indicated by vmx or smx being present in the output of lscpu.

The controller host requires the netaddr python module to parse the IP address of the guest.

Role Variables

See defaults/main.yml

Dependencies

None.

Example Playbook

- name: install a VM on virthost
  hosts: virthost
  pre_tasks:
  - name: ensure virt packages are available on virthost
    package:
      name:
      - virt-install
      - libvirt
      - qemu-kvm
  roles:
     - role: libvirt-vm
       libvirt_vm_name: virtguest
       libvirt_vm_os_variant: rhel7.6

License

Apache-2.0 or MIT or BSD-3-Clause

Author Information

James Cassell

About

Create a libvirt/kvm-based VM using virt-install

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published