#695371 virt-manager: Virtual machine does not support sound

#695371#5
Date:
2012-12-07 16:46:36 UTC
From:
To:
Dear Maintainer,
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).

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

#695371#10
Date:
2014-10-09 10:17:33 UTC
From:
To:
Hi,

Singer Michael wrote (07 Dec 2012 16:46:36 GMT) :

Sound support works just fine for me in virt-manager on current
Debian unstable, in a VM that has the Spice channels configured.
Are you still experiencing this problem?

Cheers,
--
intrigeri