Bug 615757 - missing -device spicevmc, required by spice for guest agent
Summary: missing -device spicevmc, required by spice for guest agent
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Daniel Berrange
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-18 13:54 UTC by Alon Levy
Modified: 2014-08-04 22:08 UTC (History)
12 users (show)

Fixed In Version: libvirt-0_8_1-19_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-11 14:48:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Support spice agent device (8.19 KB, patch)
2010-07-22 15:09 UTC, Daniel Berrange
no flags Details | Diff

Description Alon Levy 2010-07-18 13:54:58 UTC
Description of problem:

Spice switched from vdi_port pci device to a more standard virtio-serial based port device called spicevmc (hw/spice-vmc.c). It is still not a standard device (i.e. not in qemu-upstream or qemu-kvm upstream), but it is already in rhel-6 qemu-kvm and is now required with the newer vdagent to get proper mouse under WAN conditions, and automatic resolution change support.

To use it, a new parameter to -device is required, and creation of the virtio-serial bus (if not already created for some other virtio-serial port like virtio-console), which can be accomplished with the following flags to qemu:

-device virtio-serial -device spicevmc

Additionally, we may want to pin the port number, so a nr=X parameter (X=0 for instance) is also required:

-device spicevmc,nr=0

Comment 2 RHEL Product and Program Management 2010-07-18 14:17:31 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Daniel Berrange 2010-07-20 11:28:16 UTC
There are a couple of options for representing this in libvirt

1. Pretend this is a new type of chardev backend

    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.com.spice.0'/>

2. Pretend this is a 'null' chardev backend, and detect solely based on name

    <channel type='null'>
      <target type='virtio' name='com.redhat.com.spice.0'/>

3. Invent a new type of channel and use null chardev backend still

    <channel type='null'>
      <target type='spicevmc'/>

I'm leaning towards option 2 currently.

Comment 4 Amit Shah 2010-07-20 11:32:47 UTC
Option 2 above would start a -device virtserialport,name=com.redhat.spice.0, right? That won't work.

I think -device spicevmc,name=foo,nr=NN is needed, so it more closely matches option 3 above.

Comment 5 Daniel Berrange 2010-07-20 11:36:15 UTC
Don't worry about what it maps to at the command line. All these options will require special hacks in libvirt, so that they map to the same command line Alan shows in the initial description. I'm more concerned about which description is most extendable/flexible at the XML level to cope with any extra features related to spicevmc in future.

Comment 7 Daniel Berrange 2010-07-22 15:08:25 UTC
This patch in fact implements option 1. An example usage is

         <channel type='spicevmc'>
           <target type='virtio' name='com.redhat.spice.0'/>
           <address type='virtio-serial' controller='1' bus='0' port='3'/>
'name' *must* equal 'com.redhat.spice.0' for now. We include this to allow for future expansion when/if spice needs multiple channels. Address can be omitted & will be auto-filled, unless an explicit virtio serial port number is required.

Comment 8 Daniel Berrange 2010-07-22 15:09:13 UTC
Created attachment 433727 [details]
Support spice agent device

Comment 9 Dave Allan 2010-07-27 23:19:30 UTC
libvirt-0_8_1-19_el6 has been built in RHEL-6-candidate with the fix.


Comment 11 yanbing du 2010-08-20 06:41:07 UTC
#virsh edit rhel6-x86_64
Add the feature as following:
         <channel type='spicevmc'>
           <target type='virtio' name='com.redhat.spice.0'/>
#virsh start rhel6-x86_64

Log in the guest, and run:
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Qumranet, Inc. Virtio network device
00:04.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:05.0 SCSI storage controller: Qumranet, Inc. Virtio block device
00:06.0 RAM memory: Qumranet, Inc. Virtio memory balloon
00:07.0 Communication controller: Qumranet, Inc. Virtio console

the output has the new device "Communication controller"
Status move to VERIFIED.

Comment 12 releng-rhel@redhat.com 2010-11-11 14:48:44 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.