mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
There is no technical reason for this at the moment, but UEFI is the de facto firmware for x86-64, so let's be modern.
50 lines
1.6 KiB
Django/Jinja
50 lines
1.6 KiB
Django/Jinja
<domain type='kvm'>
|
|
<name>$vm_name</name>
|
|
<memory unit='MiB'>{{ gitlab_runner_libvirt_vm_memory }}</memory>
|
|
<vcpu>4</vcpu>
|
|
<sysinfo type='smbios'>
|
|
<oemStrings>
|
|
<entry>io.systemd.credential:system.hostname=$vm_name</entry>
|
|
<entry>io.systemd.credential.binary:ssh.authorized_keys.root=$ssh_authorized_keys_root</entry>
|
|
</oemStrings>
|
|
</sysinfo>
|
|
<os firmware='efi'>
|
|
<type arch='x86_64' machine='q35'>hvm</type>
|
|
<smbios mode='sysinfo'/>
|
|
</os>
|
|
<features>
|
|
<acpi/>
|
|
<apic/>
|
|
</features>
|
|
<cpu mode='host-passthrough'/>
|
|
<!-- https://github.com/virt-manager/virt-manager/blob/7ae10b5566ac4d8c7afd94499a9733ed42cf3d07/virtinst/domain/clock.py#L49-L59 -->
|
|
<clock offset='utc'>
|
|
<timer name='rtc' tickpolicy='catchup'/>
|
|
<timer name='pit' tickpolicy='delay'/>
|
|
<timer name='hpet' present='no'/>
|
|
</clock>
|
|
<devices>
|
|
<disk type='file' device='disk'>
|
|
<driver name='qemu' type='qcow2' discard='unmap'/>
|
|
<source file='/var/lib/libvirt/images/$vm_name.qcow2'/>
|
|
<target dev='sdb' bus='scsi'/>
|
|
</disk>
|
|
<controller type='pci' model='pcie-root'/>
|
|
<controller type='scsi' model='virtio-scsi'/>
|
|
<controller type='usb' model='none'/>
|
|
<interface type='network'>
|
|
<source network='default'/>
|
|
<model type='virtio'/>
|
|
<filterref filter='clean-traffic'/>
|
|
</interface>
|
|
<memballoon model='virtio' freePageReporting='on'/>
|
|
<rng model='virtio'>
|
|
<backend model='random'>/dev/urandom</backend>
|
|
</rng>
|
|
<video>
|
|
<model type='virtio'/>
|
|
</video>
|
|
<graphics type='vnc'/>
|
|
</devices>
|
|
</domain>
|