DOMAIN-XML-LAB(1)
Build a domain definition
Change the guest model and inspect the XML libvirt would persist. This is a teaching surface; it does not connect to the host daemon.
Explain my current choices
There is no single correct VM definition here. The workbench grades against teaching guardrails, then explains the tradeoff so a WARN never becomes a mystery.
Memory: 4096 MiB clears this lab's 1 GiB teaching baseline. It is not a universal libvirt minimum; the guest OS and workload determine the real requirement.
vCPU: 2 stays inside this lab's 8-vCPU guardrail. The guardrail is here to teach deliberate sizing, not to imply that libvirt is limited to eight vCPUs.
Firmware: UEFI adds a pflash firmware loader and is a common modern guest choice. BIOS remains valid for guests that require or intentionally use legacy firmware.
Disk bus: virtio is the lab-preferred paravirtualized disk path because it avoids unnecessary device emulation and normally offers better virtualized I/O behavior.
Network: network='default' uses a libvirt-managed virtual network, normally including host-side bridge/NAT services. It is the least surprising starting point for a first lab guest.
<domain type='kvm'>
<name>field-lab01</name>
<memory unit='MiB'>4096</memory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='q35'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.fd</loader>
</os>
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/field-lab01.qcow2'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type='network'>
<source network='default'/>
<model type='virtio'/>
</interface>
</devices>
</domain>Preflight
- PASSMemory is at least 1 GiB
- PASSLab CPU allocation remains within the 8-vCPU guardrail
- PASSParavirtualized disk bus selected
- PASSNetwork supports normal host-managed connectivity
PASS means the selection matches this lab's preferred teaching baseline. WARN means “understand the consequence,” not “libvirt will reject this XML.” Open Explain my current choices for the reason behind every result.