升级到 16.10 后无法打开虚拟机

升级到 16.10 后无法打开虚拟机

我刚刚升级到 16.10(从 16.04 开始),我的 kvm 虚拟机无法再启动。我收到此错误:

Error starting domain: internal error: process exited while connecting to monitor: 2016-10-27T14:47:58.353049Z qemu-system-x86_64: -enable-kvm: unsupported machine type
Use -machine help to list supported machines

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 126, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1402, in startup
    self._backend.create()
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1035, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: process exited while connecting to monitor: 2016-10-27T14:47:58.353049Z qemu-system-x86_64: -enable-kvm: unsupported machine type
Use -machine help to list supported machines

答案1

这对我有用。正在运行...

virsh edit your-virtual-machine-name

它将询问使用什么编辑器,然后显示为虚拟机生成的 XML。本节...

<os>
  <type arch='x86_64' machine='pc-i440fx-vivid'>hvm</type>
  <bootmenu enable='no'/>
</os>

可以改成这样...

<os>
  <type arch='x86_64' machine='ubuntu'>hvm</type>
  <bootmenu enable='no'/>
</os>

根据查看机器帮助...

$ kvm-spice -machine help
Supported machines are:
ubuntu               Ubuntu 16.10 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-yakkety)
pc-i440fx-yakkety    Ubuntu 16.10 PC (i440FX + PIIX, 1996) (default)
pc-i440fx-xenial     Ubuntu 16.04 PC (i440FX + PIIX, 1996)
pc-i440fx-wily       Ubuntu 15.04 PC (i440FX + PIIX, 1996)
pc-i440fx-trusty     Ubuntu 14.04 PC (i440FX + PIIX, 1996)
.
.
.

看起来 pc-i440fx-vivid 不再受支持或被遗漏了(可能是因为它已经达到生命尽头)。

相关内容