Bug 802355 - Can't get sound to work locally when connected remotely through ssh
Can't get sound to work locally when connected remotely through ssh
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Michal Privoznik
Virtualization Bugs
spice
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 06:41 EDT by Luwen Su
Modified: 2012-03-16 10:32 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-16 10:32:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The guest's xml (2.38 KB, text/plain)
2012-03-12 06:46 EDT, Luwen Su
no flags Details

  None (edit)
Description Luwen Su 2012-03-12 06:41:52 EDT
Description of problem:
There is a guest with spice on the remote host.
And can't get sound to work locally when connected the host remotely through ssh

Version-Release number of selected component (if applicable):
libvirt-0.9.10-4.el6.x86_64
qemu-kvm-0.12.1.2-2.236.el6.x86_64

spice-server-0.10.1-3.el6.x86_64
spice-client-0.8.2-7.el6.x86_64
spice-gtk-0.11-1.el6.x86_64
spice-glib-0.11-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest with spice on remote host like this.The full xml is in attachment .
---------------------------------------------------------------------
     <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
     </channel>

    <sound model='es1370'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
  
    <graphics type='spice' autoport='yes'/>
------------------------------------------------------------------------

2.Use ssh connect from local to the remove host
  #ssh root@$hostip -X

3.Open the virt-manager debug model then open the guest graphic in virt-manager.
  The log will be seen in terminal when the guest boots up or try to play some      music in the guest.

----------------------------------------------------------------------------
(virt-manager:5986): GSpice-WARNING **: PulseAudio context failed Connection refused

(virt-manager:5986): GSpice-WARNING **: pa_context_connect() failed: Connection refused
2012-03-12 17:24:54,970 (cli:85): Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 481, in _channel_new_cb
    self.audio = spice.Audio(self.spice_session)
RuntimeError: could not create SpiceAudio object
None
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 481, in _channel_new_cb
    self.audio = spice.Audio(self.spice_session)
RuntimeError: could not create SpiceAudio object
------------------------------------------------------------------------------


Actual results:
can't get the sound

Expected results:
can get the sound

Additional info:
1.I test ich6 and ac97 sound device both in rhel6-x86_64 and win7-x86-64 guest
2.Because there is bug in spice-server-0.10.1-4  ,so i use spice-server-0.10.1-3 instead of.
Comment 1 Luwen Su 2012-03-12 06:44:47 EDT
I'm not sure if the bug belongs to libvirt.So please help me to change the component to where it should be if you know.Thanks
Comment 2 Luwen Su 2012-03-12 06:46:21 EDT
Created attachment 569354 [details]
The guest's xml
Comment 4 Andrew Cathrow 2012-03-12 07:34:58 EDT
(In reply to comment #2)
> Created attachment 569354 [details]
> The guest's xml

  <model type='cirrus' vram='9216' heads='1'/>

You're not configured to use QXL
Comment 5 Peter Krempa 2012-03-13 06:47:35 EDT
This is probably a usage problem. SSH X forwarding does not forward sounds to the client. This has to be done by some other way (eg. use pulseaudio network streaming, which is not enabled by default). You might hear the sounds on the machine you are connecting to, but that depends on the configuration.

The optimal solution would be to run the virt-manager or other spice client on your local computer and use the ssh connection support of libvirt to connect to the remote machine (this may need setting up ssh public key authentication) (use the uri qemu+ssh://user@host/system ).

If you tried to configure remote sound, then you might just ran into troubles with pulseaudio as the error message states that the connection was refused.
Comment 6 Michal Privoznik 2012-03-14 11:25:55 EDT
I am not sure pulseaudio is supposed to work after simple unpacking from box. Can you please try to configure it (maybe this will be useful http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User) and then reproduce?
Comment 7 Dave Allan 2012-03-14 23:03:15 EDT
(In reply to comment #5)
> This is probably a usage problem. SSH X forwarding does not forward sounds to
> the client. This has to be done by some other way (eg. use pulseaudio network
> streaming, which is not enabled by default). You might hear the sounds on the
> machine you are connecting to, but that depends on the configuration.

I haven't been paying complete attention to the details here, but if that's what's going on here IMO this BZ can be closed as NOTABUG without further investigation.

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