Bug 885209

Summary: No sound in the guest system available
Product: [Community] Virtualization Tools Reporter: Singer Michael <info>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, dyasny
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-16 16:00:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Singer Michael 2012-12-07 19:05:13 UTC
System information:

Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.6-9.towo-siduction-amd64 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages virt-manager depends on:
ii  gconf2             3.2.5-1+build1
ii  librsvg2-common    2.36.1-1
ii  python             2.7.3-3
ii  python-dbus        1.1.1-1
ii  python-glade2      2.24.0-3
ii  python-gnome2      2.28.1+dfsg-1
ii  python-gtk-vnc     0.5.1-2
ii  python-gtk2        2.24.0-3
ii  python-ipy         1:0.75-1
ii  python-libvirt     0.9.12-5
ii  python-support     1.0.15
ii  python-urlgrabber  3.9.1-4
ii  python-vte         1:0.28.2-5
ii  virtinst           0.600.3-2
hi  virt-manager       0.9.4-2

Versions of packages virt-manager recommends:
pn  gnome-icon-theme         <none>
ii  libvirt-bin              0.9.12-5
ii  python-spice-client-gtk  0.12-5


Description of problem:

The virt-manager has in a VM configured via GUI no sound support. The VM is configured with the audio device ac97 and SPICE (see the XML config file).

I can reproduce the issue on demand.

In the log file of virt-manager the following entry when starting the VM is created.

virt-manager.log:
[Fr, 07 Dez 2012 16:36:25 virt-manager 7970] DEBUG (cli:83) Uncaught exception:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/console.py", line 518, in _channel_new_cb
self.audio = spice.Audio(self.spice_session)
RuntimeError: could not create SpiceAudio object

By the way, if I have the VM only with qemu-kvm start working the sound. Use the command:

kvm \
 -name sidutest2 \
 -net nic,vlan=0,macaddr=12:A1:00:12:02:09,model=virtio \
 -net tap,vlan=0,ifname=tap1 \
 -drive if=virtio,file=./siduction-12.2.0-rc2-kde-amd64.img,media=disk,cache=unsafe \
 -soundhw ac97 \
 -m 3072 \
 -pidfile /var/tmp/tap1_5900_sidutest2.img.pid \
 -boot order=d \
 -vga qxl \
 -spice port=5900,addr=127.0.0.1,disable-ticketing \
 -device virtio-serial \
 -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
 -chardev spicevmc,id=spicechannel0,name=vdagent \
 -daemonize \
spicec -h 127.0.0.1 -p 5900

Here is the XML config file in my virtual machine that has the problem with the lack of sound.

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE 
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit sidutest2
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>sidutest2</name>
  <uuid>73db1bbd-a6a8-f88d-f0e9-417f28b57720</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-1.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/vm/normal/virtman_img/siduction-12.2.0-rc2-kde-amd64.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:32:58:72'/>
      <source bridge='bri0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes'/>
    <sound model='ac97'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

What can I do that gets the VM sound support? Is this a bug in virt-manager or a misconfiguration on my part?

Regards
Michael Singer

Comment 1 Cole Robinson 2012-12-16 16:00:19 UTC
I've never seen that error before, and my guess is that it isn't a virt-manager issue since that's a very basic spice-gtk call that's expected to succeed.

I'd recommend filing a bug with your distro against spice-gtk, my guess is that package is broken. Maybe try and find others that can reproduce.

Comment 2 Singer Michael 2012-12-17 18:59:32 UTC
Why would the spice packet to be broken, if it works correctly when called via kvm. I think there works the interplay between the virt-manager and no spice. Why else would it show up in the log file, and just because they have seen the error is still the far is not a problem of virt-manager. It is always very easy to suspect the problem only once in other packages, as in his own.

I think it is sad that they did not even bother to make my bug report accurately read.