我试图在一个在嵌套虚拟化中运行oVirt Node的主机上创建以下域(它不会永远嵌套,只是暂时):
<domain type="kvm">
<name>clara</name>
<memory unit="MiB">4096</memory>
<vcpu>2</vcpu>
<os>
<type>hvm</type>
<boot dev="hd"></boot>
</os>
<features>
<pae></pae>
<acpi></acpi>
<apic></apic>
</features>
<cpu></cpu>
<devices>
<disk type="volume" device="disk">
<driver name="qemu" type="qcow2"></driver>
<source pool="default" volume="clara-rootfs"></source>
<target dev="vda" bus="scsi"></target>
<wwn>05abcd62857fe8f1</wwn>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"></driver>
<source file="/var/lib/libvirt/images/cloudinit.clara.iso"></source>
<target dev="hdd" bus="ide"></target>
</disk>
<controller type="scsi" model="virtio-scsi"></controller>
<interface type="bridge">
<mac address="E2:F5:2A:A9:4A:42"></mac>
<source bridge="bridge0"></source>
<model type="virtio"></model>
</interface>
<channel type="unix">
<target type="virtio" name="org.qemu.guest_agent.0"></target>
</channel>
<graphics type="spice" autoport="yes"></graphics>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
</rng>
</devices>
</domain>
当我这样做的时候,我会得到这样的错误:
# virsh define clara.xml
error: Failed to define domain from clara.xml
error: invalid argument: could not get preferred machine for /usr/libexec/qemu-kvm type=kvm
这个错误意味着什么,以及如何修复它?
发布于 2022-06-02 03:37:36
弄明白了。发生此错误的原因是两个问题的组合:
<type>hvm</type>
中指定,并且在试图发现“首选”默认值时发生了错误。设置arch
和machine
字段显示,在我的设置中没有真正的machine
,因为主机在嵌套虚拟化中运行。将<domain type="kvm">
更改为<domain type="qemu">
使其工作。https://stackoverflow.com/questions/72469555
复制相似问题