mr.*_*zog 1 centos libvirt qemu kvm-virtualization
[root@kvm ~]# virsh create /root/ns1.jesse64.xml
error: Failed to create domain from /root/ns1.jesse64.xml
error: internal error: process exited while connecting to monitor: qemu-kvm: -machine pc-i440fx-trusty,accel=kvm,usb=off: Unsupported machine type
Run Code Online (Sandbox Code Playgroud)
所以我运行 /usr/libexec/qemu-kvm -machine ?看看
Supported machines are:
none empty machine
pc RHEL 7.0.0 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-rhel7.0.0)
pc-i440fx-rhel7.0.0 RHEL 7.0.0 PC (i440FX + PIIX, 1996) (default)
rhel6.6.0 RHEL 6.6.0 PC
rhel6.5.0 RHEL 6.5.0 PC
rhel6.4.0 RHEL 6.4.0 PC
rhel6.3.0 RHEL 6.3.0 PC
rhel6.2.0 RHEL 6.2.0 PC
rhel6.1.0 RHEL 6.1.0 PC
rhel6.0.0 RHEL 6.0.0 PC
Run Code Online (Sandbox Code Playgroud)
那么我需要安装一些软件包吗?VM 是在 Ubuntu KVM 主机上创建的。
您看到此错误是因为 Ubuntu 将他们自己的自定义放入其 libvirt 和 qemu/KVM 版本中。当然,RHEL 也做了同样的事情。
但是总有一种机器类型可以工作,即pc. 这始终是定义 VM 时管理程序上可用的最新 i440fx 机器类型的别名。
在 XML 中的某处,您会发现类似以下内容:
<type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
Run Code Online (Sandbox Code Playgroud)
只需将其更改为:
<type arch='x86_64' machine='pc'>hvm</type>
Run Code Online (Sandbox Code Playgroud)
(请注意,如果您使用新pc-q35-xxx机器类型,则通用机器类型为q35。)