Skip to content

weshayutin/ansible-kvm-vm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

TripleO Standalone Lab Setup

Create a VM on a RHEL+KVM hypervisor that is ready to deploy TripleO Standalone

Requirements

  • Expects a working RHEL+KVM hypervisor to target
  • Either physical virtualization or nested virtualization

Role Variables

Variable Required Default Description
kvm_vm_hostname ✔️ The FQDN for the VM
kvm_vm_public_ip ✔️ The reachable public IP for the VM
kvm_vm_root_pwd ✔️ Password for the root user of the VM
kvm_vm_base_img ✔️ Name of the base image located in /var/lib/libvirt/images on the KVM hypervisor
kvm_vm_vcpus 4 Number of vCPUS to assign to the VM
kvm_vm_ram 8192 Amount of ram to give to the VM in megabytes
kvm_vm_os_disk_name {{ kvm_vm_hostname }} Name of the OS disk in /var/lib/libvirt/images
kvm_vm_os_disk_size 50G Size of OS disk for the VM
kvm_vm_nics ✔️ see example playbook Dictionary of NICs to create for the VM

Dependencies

None

Example Playbook

- hosts: kvm
  tags: provision
  vars:
    kvm_vm_hostname: "vm1.example.com"
    kvm_vm_public_ip: 192.168.122.10
    kvm_vm_root_pwd: "p@ssw0rd"
    kvm_vm_base_img: CentOS-7-x86_64-GenericCloud.qcow2
    kvm_vm_vcpus: "4"
    kvm_vm_ram: "8192"
    kvm_vm_os_disk_name: "{{ kvm_vm_hostname }}"
    kvm_vm_os_disk_size: "30G"
    kvm_vm_nics:
      - name: eth0
        bootproto: static
        onboot: yes
        ip: "{{ kvm_vm_public_ip }}"
        prefix: "24"
        gateway: "192.168.122.1"
        dns_server: "192.168.122.1"
        config: "--type network --source default --model virtio"
      - name: eth1
        bootproto: static
        onboot: yes
        ip: "192.168.122.253"
        prefix: "24"
        gateway: "192.168.122.1"
        dns_server: "192.168.122.1"
        config: "--type network --source default --model virtio"
  tasks:
    - name: Create KVM VM
      include_role:
        name: tripleo-standalone-lab

License

GPLv3

Author Information

Red Hat World Wide TripleO Flying Owls

Red Hat North American Public Sector Solution Architects

About

Create a VM on a RHEL+KVM hypervisor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 97.0%
  • Python 3.0%