virt-manager can not create new virtual machine

Bug #1305191 reported by Kent Stanwood Gordon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Unable to complete install: 'internal error: process exited while connecting to monitor: qemu-system-x86_64: -machine trusty,accel=kvm,usb=off: Unsupported machine type
Use -machine help to list supported machines!
'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1983, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1246, in start_install
    noboot)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1314, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3199, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -machine trusty,accel=kvm,usb=off: Unsupported machine type
Use -machine help to list supported machines!

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: virt-manager 0.9.5-1ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-23.45-generic 3.13.8
Uname: Linux 3.13.0-23-generic x86_64
ApportVersion: 2.14.1-0ubuntu1
Architecture: amd64
Date: Wed Apr 9 12:11:49 2014
ExecutablePath: /usr/share/virt-manager/virt-manager.py
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Kent Stanwood Gordon (kent-gordon) wrote :
Revision history for this message
Kent Stanwood Gordon (kent-gordon) wrote :

creating simple vm using default for above error (local iso, 1GBmem, 1cpu, 8GM disk).
Similar errors occur with other configurations.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug. Could you please show us your qemu and libvirt versions?

dpkg -l | egrep "(qemu|libvirt)"

Changed in virt-manager (Ubuntu):
importance: Undecided → High
Revision history for this message
Kent Stanwood Gordon (kent-gordon) wrote :

tiger@ubuntu:~/tmp$ dpkg -l | egrep "(qemu|libvirt)"
ii ipxe-qemu 1.0.0+git-20131111.c3d1e78-2ubuntu1 all PXE boot firmware - ROM images for qemu
ii libvirt-bin 1.2.2-0ubuntu11 amd64 programs for the libvirt library
ii libvirt0 1.2.2-0ubuntu11 amd64 library for interfacing with different virtualization systems
ii python-libvirt 1.2.2-0ubuntu1 amd64 libvirt Python bindings
ii qemu-keymaps 2.0.0~rc1+dfsg-0ubuntu2 all QEMU keyboard maps
ii qemu-kvm 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU Full virtualization on x86 hardware (transitional package)
ii qemu-system 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries
ii qemu-system-arm 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (arm)
ii qemu-system-common 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-mips 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (mips)
ii qemu-system-misc 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (miscelaneous)
ii qemu-system-ppc 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (ppc)
ii qemu-system-sparc 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (sparc)
ii qemu-system-x86 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (x86)
ii qemu-utils 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU utilities
tiger@ubuntu:~/tmp$

Revision history for this message
Ryan Beisner (1chb1n) wrote :

I am able to create a new vm on up-to-date Trusty using using local iso and all other defaults in the virt-manager wizard without error.

Here is my environment:

rbeisner@bcu:~$ virsh list
 Id Name State
----------------------------------------------------
 2 isotest3 running

rbeisner@bcu:~$ apt-cache policy virt-manager
virt-manager:
  Installed: 0.9.5-1ubuntu3
  Candidate: 0.9.5-1ubuntu3
  Version table:
 *** 0.9.5-1ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

rbeisner@bcu:~$ python --version
Python 2.7.6

rbeisner@bcu:~$ uname -a
Linux bcu 3.13.0-23-generic #45-Ubuntu SMP Fri Apr 4 06:58:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

rbeisner@bcu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04
Codename: trusty

rbeisner@bcu:~$ virsh --version
1.2.2

rbeisner@bcu:~$ qemu-system-x86_64 --version
QEMU emulator version 1.7.91 (Debian 2.0.0~rc1+dfsg-0ubuntu2), Copyright (c) 2003-2008 Fabrice Bellard

rbeisner@bcu:~$ grep 'model name' /proc/cpuinfo
model name : AMD Phenom(tm) II X6 1075T Processor
model name : AMD Phenom(tm) II X6 1075T Processor
model name : AMD Phenom(tm) II X6 1075T Processor
model name : AMD Phenom(tm) II X6 1075T Processor
model name : AMD Phenom(tm) II X6 1075T Processor
model name : AMD Phenom(tm) II X6 1075T Processor

rbeisner@bcu:~$ qemu-system-x86_64 -machine help
Supported machines are:
pc-0.13 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.0 Standard PC (i440FX + PIIX, 1996)
pc-1.0 Standard PC (i440FX + PIIX, 1996)
pc-q35-1.7 Standard PC (Q35 + ICH9, 2009)
pc-1.1 Standard PC (i440FX + PIIX, 1996)
q35 Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-2.0)
pc-q35-2.0 Standard PC (Q35 + ICH9, 2009)
pc-i440fx-1.4 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.5 Standard PC (i440FX + PIIX, 1996)
pc-0.14 Standard PC (i440FX + PIIX, 1996)
pc-0.15 Standard PC (i440FX + PIIX, 1996)
xenfv Xen Fully-virtualized PC
pc-q35-1.4 Standard PC (Q35 + ICH9, 2009)
isapc ISA-only PC
pc-0.10 Standard PC (i440FX + PIIX, 1996)
pc Ubuntu 14.04 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-trusty)
pc-i440fx-trusty Ubuntu 14.04 PC (i440FX + PIIX, 1996) (default)
pc-1.2 Standard PC (i440FX + PIIX, 1996)
pc-0.11 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.7 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-1.6 Standard PC (i440FX + PIIX, 1996)
none empty machine
xenpv Xen Para-virtualized PC
pc-q35-1.5 Standard PC (Q35 + ICH9, 2009)
pc-q35-1.6 Standard PC (Q35 + ICH9, 2009)
pc-0.12 Standard PC (i440FX + PIIX, 1996)
pc-1.3 Standard PC (i440FX + PIIX, 1996)

Revision history for this message
Ryan Beisner (1chb1n) wrote :

rbeisner@bcu:~$ dpkg -l | egrep "(qemu|libvirt)"
ii ipxe-qemu 1.0.0+git-20131111.c3d1e78-2ubuntu1 all PXE boot firmware - ROM images for qemu
ii libvirt-bin 1.2.2-0ubuntu11 amd64 programs for the libvirt library
ii libvirt0 1.2.2-0ubuntu11 amd64 library for interfacing with different virtualization systems
ii python-libvirt 1.2.2-0ubuntu1 amd64 libvirt Python bindings
ii qemu-common 2.0.0~rc1+dfsg-0ubuntu2 all dummy transitional package from qemu-common to qemu-keymaps
ii qemu-keymaps 2.0.0~rc1+dfsg-0ubuntu2 all QEMU keyboard maps
ii qemu-kvm 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU Full virtualization on x86 hardware (transitional package)
ii qemu-system-common 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-x86 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (x86)
ii qemu-utils 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU utilities
rbeisner@bcu:~$

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI - environment difference in packages:

TIGER (bug reporter) has these packages, which the BCU (working) box does not have:
+++ii qemu-system 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries
+++ii qemu-system-arm 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (arm)

+++ii qemu-system-mips 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (mips)
+++ii qemu-system-misc 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (miscelaneous)
+++ii qemu-system-ppc 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (ppc)
+++ii qemu-system-sparc 2.0.0~rc1+dfsg-0ubuntu2 amd64 QEMU full system emulation binaries (sparc)

BCU (working) has this package, which TIGER (bug reported) does not have:
---ii qemu-common 2.0.0~rc1+dfsg-0ubuntu2 all dummy transitional package from qemu-common to qemu-keymaps

Revision history for this message
Kent Stanwood Gordon (kent-gordon) wrote :

I have one trusty machine that is working and another that is not.
The problem seems to be in the machine name handed to qemu

working machine:
 ps -ef |grep qemu| grep -v color
libvirt+ 7872 1 99 13:41 ? 00:03:14 qemu-system-x86_64 -enable-kvm -name test3 -S -machine pc-i440fx-trusty,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 4a0ece9e-1274-7465-4f63-911d32d2ab60 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/test3.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/test3.img,if=none,id=drive-ide0-0-0,format=raw -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -drive file=/home/tiger/Downloads/trusty-server-amd64.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 -netdev tap,fd=24,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:41:c3:61,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

broken machine:

libvirt+ 26583 1 0 13:45 ? 00:00:00 qemu-system-x86_64 -enable-kvm -name test -S -machine trusty,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1d8090e7-15ff-916c-2a54-4260fdd9bc8a -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/test.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x2 -drive file=/var/lib/libvirt/images/test.img,if=none,id=drive-ide0-0-0,format=raw -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -drive file=/home/tiger/Downloads/trusty-server-amd64.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 -netdev tap,fd=24,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:35:22:e9,bus=pci.0,addr=0x1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

qemu-systemx86_64 is passed -machine trusty on broken machine instead of -machine pc-i440fx-trusty

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1305191] Re: virt-manager can not create new virtual machine

On the broken machine, please make sure to stop and undefine the
not-working vm, then

sudo stop libvirt-bin
sudo start libvirtbin

(make sure that you are on at least libvirt-bin version 1.2.2-0ubuntu11
and qemu-system-x86 2.0.0~rc1+dfsg-0ubuntu2 on that machine)

Revision history for this message
Kent Stanwood Gordon (kent-gordon) wrote :

starting/stopping libvirt-bin solved the problem
thank you for the help.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks Kent.

It might be worthwhile to add 'trusty' as an alias for the new machine type, though not many people will created such a machine in the brief time that type existed.

Changed in virt-manager (Ubuntu):
status: New → Fix Released
Revision history for this message
Waldek (rifster) wrote :
Download full text (6.3 KiB)

Hi All,
I have similar issue to Kent's. Not much is on Google and I did all according to your posts and VMM still does not want to add a VM machine. I'm a linux newbie and there is definitely something I have missed. Please help. Thanks!

Unable to complete install: 'internal error: process exited while connecting to monitor: qemu-system-x86_64: -machine pc-i440fx-2.1,accel=kvm,usb=off: Unsupported machine type
Use -machine help to list supported machines!
'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1983, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1246, in start_install
    noboot)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1314, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3202, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -machine pc-i440fx-2.1,accel=kvm,usb=off: Unsupported machine type
Use -machine help to list supported machines!

========================================================================

Below is some output from my PC:

========================================================================
wwozniak@wwozniak-PC:~$ dpkg -l | egrep "(qemu|libvirt)"
ii ipxe-qemu 1.0.0+git-20131111.c3d1e78-2ubuntu1 all PXE boot firmware - ROM images for qemu
ii libvirt-bin 1.2.2-0ubuntu13.1.5 amd64 programs for the libvirt library
ii libvirt0 1.2.2-0ubuntu13.1.5 amd64 library for interfacing with different virtualization systems
ii python-libvirt 1.2.2-0ubuntu2 amd64 libvirt Python bindings
ii qemu-common 2.0.0+dfsg-2ubuntu1.5 all dummy transitional package from qemu-common to qemu-keymaps
ii qemu-keymaps 2.0.0+dfsg-2ubuntu1.5 all QEMU keyboard maps
ii qemu-kvm 2.0.0+dfsg-2ubuntu1.5 amd64 QEMU Full virtualization on x86 hardware (transitional package)
ii qemu-system 2.0.0+dfsg-2ubuntu1.5 amd64 QEMU full system emulation binaries
ii qemu-system-arm 2.0.0+dfsg-2ubuntu1.5 amd64 QEMU full system emulation binaries (arm)
ii qemu-system-common 2.0.0+dfsg-2ubuntu1.5 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-mips 2.0.0+dfsg-2ubuntu1.5 amd64 QEMU full system emulation binaries (mips)
ii qemu-system-misc 2.0.0+dfsg...

Read more...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting Waldek (<email address hidden>):
> Hi All,
> I have similar issue to Kent's. Not much is on Google and I did all according to your posts and VMM still does not want to add a VM machine. I'm a linux newbie and there is definitely something I have missed. Please help. Thanks!
>
> Unable to complete install: 'internal error: process exited while connecting to monitor: qemu-system-x86_64: -machine pc-i440fx-2.1,accel=kvm,usb=off: Unsupported machine type

Hi,

It appears that your virt-manager is trying to create a pc-i440fx-2.1 machine type,
but your qemu version is 2.0, which only supports up to pc-i440fx-2.0. You should
be able to work around this by manually selecting the pc-i440fx-2.0 or
pc-i440fx-trusty machine type.

The default in virt-manager (we just tested) is pc-i440fx-trusty, so I'm curious
how precisely you created this VM? Did you simply choose all the defaults
when creating a new vm?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hold on, I see:

> wwozniak@wwozniak-PC:~$ qemu-system-x86_64 --version
> QEMU emulator version 2.1.2, Copyright (c) 2003-2008 Fabrice Bellard
...
> wwozniak@wwozniak-PC:~$ qemu-system-x86_64 -machine help
> Supported machines are:
...
> pc-i440fx-2.1 Standard PC (i440FX + PIIX, 1996) (default)

This suggests that you have a custom built qemu in your PATH
which is not in libvirt's PATH. What does

which qemu-system-x86_64

and

/usr/bin/qemu-system-x86_64 -M ?

show?

My guess is that virt-manager uses qemu 2.1 from your path to
detect machine types, chooses the newest available, then asks
libvirt to start that VM, but libvirt runs the 2.0 qemu which
can't start that newer machine type.

Revision history for this message
Waldek (rifster) wrote :

Hi Serge,
Before I saw your reply I manage to fix it by removing qemu from all location on my PC and reinstalling it again. Now it's working. You're probably right with two different paths. I compiled and installed qemu 2.1.2 and then also installed the package with 2.0. Thanks for your insight and have a good one!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.