1.5 KiB
1.5 KiB
title, description, published, date, tags, editor, dateCreated
title | description | published | date | tags | editor | dateCreated |
---|---|---|---|---|---|---|
Machine definition | Virtual machine hardware | true | 2025-06-01T17:41:22.711Z | markdown | 2025-06-01T17:37:29.262Z |
Virtual machine hardware
Libvirt uses XML files to define virtual machine hardware.
In the context of libvirt, a virtual machine or guest system is called a domain. In turn, a domain type refers to the hypervisor used for running the virtual machine.
Domain type
At the moment, Phyllome OS focuses solely on hardware-assisted virtualization with KVM and QEMU. Therefore, the domain type KVM is the one used by default.
<domain type='kvm'>
[...]
</domain>
Not all QEMU commands are supported by Libvirt. To pass QEMU commands, one need to use the following instead and add the QEMU command line at the end :
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
[...]
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='ipmi-bmc-sim,id=bmc0'/>
<qemu:arg value='-device'/>
<qemu:arg value='smbus-impi,bmc=bmc0'/>
<qemu:env name='QEMU_MODULE_DIR' value='/usr/lib64/qemu'/>
</qemu:commandline>
</domain>
If QEMU command lines are not immediately provided, it will automatically revert to simply
<domain type='kvm'>
upon writing changes to the domain {.is-info}
Under QEMU, the said domain definition translates to:
qemu-system-x86_64 -enable-kvm [...]