Centos

無法在 Centos 7 kvm 主機上導入 Ubuntu 虛擬機

  • December 30, 2016
[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

所以我執行 /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

那麼我需要安裝一些軟體包嗎?VM 是在 Ubuntu KVM 主機上創建的。

您看到此錯誤是因為 Ubuntu 將他們自己的自定義設置到其 libvirt 和 qemu/KVM 版本中。當然,RHEL 也做了同樣的事情。

但總有一種機器類型可以工作,即pc. 這始終是定義 VM 時虛擬機管理程序上可用的最新 i440fx 機器類型的別名。

在 XML 的某個地方,您會發現類似的內容:

<type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>

只需將其更改為:

<type arch='x86_64' machine='pc'>hvm</type>

(請注意,如果您使用新pc-q35-xxx機器類型,則通用機器類型為q35。)

引用自:https://serverfault.com/questions/697269