Can't use spice even though qemu-kvm-spice is installed

Bug #975165 reported by Fabián Rodríguez
This bug report is a duplicate of:  Bug #962376: spicevmc not supported in QEMU binary. Edit Remove
64
This bug affects 14 people
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

EVen having spice enabled via the mentioned package, virt-manager guest creation crashes with the following message when choosing spice as the remote display method:
Unable to complete install: 'unsupported configuration: spicevmc not supported in this QEMU binary'

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: virt-manager 0.9.1-1ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-20.33-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
Date: Fri Apr 6 09:52:19 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_CA:en
 TERM=xterm
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: virt-manager
UpgradeStatus: Upgraded to precise on 2012-03-06 (30 days ago)

Revision history for this message
Fabián Rodríguez (magicfab) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virt-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
MvW (2nv2u) wrote :

Although I didn't create the VM with spice, changing VNC to spice results in unbootable VM.
I've also installed qemu-kvm-spice, but it doesn't make a difference.

Error starting domain: unsupported configuration: spicevmc not supported in this QEMU binary

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 975165] Re: Can't use spice even though qemu-kvm-spice is installed

@Reason,

please show us the exact changes you made to the xml.

Revision history for this message
MvW (2nv2u) wrote :

@Serge, I did not change the XML but used virt-manager instead.

The XML without spice is:
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <video>
      <model type='vmvga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

With Spice:
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes'/>
    <video>
      <model type='vmvga' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

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

Do you have the spice-vdagent package installed?

Can you look at https://wiki.ubuntu.com/SergeHallyn_spice? In particular, what is the <emulator> line in your xml? If you replace the video model type='wmvga' with model type='qxl', does that help?

Revision history for this message
Sean (seanrijs) wrote :

solved this by doing the following:

sudo apt-get install qemu-kvm-spice
cd /usr/bin/
sudo rm kvm
sudo ln -s qemu-system-x86_64-spice kvm

Maybe we need to inform the package maintainer to change the qemu-kvm-spice dpkg package to do this?

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

Quoting Sean (<email address hidden>):
> solved this by doing the following:
>
> sudo apt-get install qemu-kvm-spice
> cd /usr/bin/
> sudo rm kvm
> sudo ln -s qemu-system-x86_64-spice kvm
>
> Maybe we need to inform the package maintainer to change the qemu-kvm-
> spice dpkg package to do this?

libvirt looks for kvm-spice before kvm. After apt-get install
qemu-kvm-spice, libvirt should prefer to use kvm-spice over kvm.

Revision history for this message
Tom Vaughan (tvaughan) wrote :

@Sean's suggestion worked for me. libvirt didn't do it on its own. This is on an up-to-date 12.04. FYI.

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

@Tom

then my guess would be that your VM definition has an <emulator>/usr/bin/kvm</emulator> line in it, which should be removed (or updated). Can you check to see whether that is the case? If not, then I don't know what is going on.

Perhaps there is something virt-manager could do, but I do not want the qemu-kvm-spice package (which is in universe) removing the kvm binary belonging to qemu-kvm (which is in main).

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

Ah, sorry, I just read the comment you linked to. Yes, that is precisely what I'd expect.

Revision history for this message
Tom Vaughan (tvaughan) wrote :

@Serge. Yes. It did. I put the kvm binaries back they way they were. I removed "<emulator>" as described. And it worked.

The problem may be that I created the VM *before* I installed and switched to SPICE. I just noticed that virt-manager has a setting for which video mode to use for new VM's - VNC or SPICE. I never looked at this prior to the SPICE install.

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

Thanks, Tom. Do you have any suggestions for a good place to document this? I have it documented at https://wiki.ubuntu.com/SergeHallyn_spice but that's not helpful for most people. Perhaps a short section could go into the server guide, but as it's not in main i'm not sure that is appropriate.

Revision history for this message
Tom Vaughan (tvaughan) wrote :

I don't know. The problem seems to be with virt-viewer. The workaround is to edit the virtual machine's XML definition in /etc/libvrit/qemu. According to `dpkg -S` that's owned by libvirt-bin.

Perhaps we could add a "Common Problems and Workarounds" section to this wiki: http://virt-manager.org/page/Main_Page. A google search for "qemu kvm spice blank screen" doesn't turn up anything we could edit, including the virt-manager wiki. Which means anything we do may not be seen by anyone.

The right long-term solution seems to make virt-viwer switch to kvm-spice automatically when SPICE is chosen, and make the virt-viewer package depend on qemu-kvm-spice as long as it offers SPICE as a valid option.

Revision history for this message
Marco (marcodefreitas) wrote :

Do it on:

# virsh list
# virsh edit <KVM_GUEST>

Revision history for this message
Felipe van Schaik Willig (felipevsw) wrote :

C'mon, Cannonical... It's 2014 and we can't use spice on Virtual Machine Manager on Ubuntu out of the box?!?! We shouldn't need to do all these bazillions workarounds to make it work.

Revision history for this message
Aaron (boxerab) wrote :

Thank you guys!!!!! I had a similar problem, spent a whole day trying to upgrade qemu
and spice, and in the end just had to remove one line from the xml. Hallelujah!!

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.