109 lines
1.8 KiB
YAML
109 lines
1.8 KiB
YAML
---
|
|
# Group vars for virtual machines
|
|
type: kvm
|
|
name: my_vm_name
|
|
instance_id: "iid-{{ name }}"
|
|
packages:
|
|
- nfs-common
|
|
- openssh-server
|
|
- prometheus-node-exporter
|
|
- qemu-guest-agent
|
|
memory:
|
|
unit: MiB
|
|
value: 4096
|
|
vcpu:
|
|
placement: static
|
|
value: 1
|
|
os:
|
|
type:
|
|
arch: x86_64
|
|
machine: pc-q35-5.2
|
|
value: hvm
|
|
boot:
|
|
dev: hd
|
|
cpu:
|
|
mode: host-model
|
|
check: none
|
|
emulator: /usr/bin/qemu-system-x86_64
|
|
disks:
|
|
- type: file
|
|
device: disk
|
|
driver:
|
|
name: qemu
|
|
type: qcow2
|
|
source:
|
|
file: /var/lib/libvirt/images/{{ name }}.qcow2
|
|
target:
|
|
dev: vda
|
|
bus: virtio
|
|
- type: file
|
|
device: cdrom
|
|
driver:
|
|
name: qemu
|
|
type: raw
|
|
source:
|
|
file: /var/lib/libvirt/images/{{ name }}.iso
|
|
target:
|
|
dev: sda
|
|
bus: sata
|
|
interfaces:
|
|
- type: network
|
|
source:
|
|
network: wan
|
|
model:
|
|
type: virtio
|
|
channels:
|
|
- type: unix
|
|
target:
|
|
type: virtio
|
|
name: org.qemu.guest_agent.0
|
|
address:
|
|
type: virtio-serial
|
|
controller: 0
|
|
bus: 0
|
|
port: 1
|
|
inputs:
|
|
- type: tablet
|
|
bus: usb
|
|
address:
|
|
type: usb
|
|
bus: 0
|
|
port: 1
|
|
- type: mouse
|
|
bus: ps2
|
|
- type: keyboard
|
|
bus: ps2
|
|
graphics:
|
|
type: spice
|
|
autoport: 'yes'
|
|
listen:
|
|
type: address
|
|
image:
|
|
compression: 'off'
|
|
video:
|
|
model:
|
|
type: qxl
|
|
ram: 65536
|
|
vram: 65536
|
|
vgamem: 16384
|
|
heads: 1
|
|
primary: yes
|
|
memballoon:
|
|
model: virtio
|
|
rng:
|
|
model: virtio
|
|
backend:
|
|
model: random
|
|
value: /dev/urandom
|
|
devices:
|
|
emulator: "{{ emulator }}"
|
|
disks: "{{ disks }}"
|
|
filesystems: "{{ filesystems }}"
|
|
interfaces: "{{ interfaces }}"
|
|
channels: "{{ channels }}"
|
|
inputs: "{{ inputs }}"
|
|
graphics: "{{ graphics }}"
|
|
video: "{{ video }}"
|
|
memballoon: "{{ memballoon }}"
|
|
rng: "{{ rng }}"
|