Hi all

I have installed RHEL 5.4 to understand KVM.  Audio works perfectly fine on
host machine. I am unfortunately not able to hear audio in the guests,
though the sound hardware seems to be in place. Pls do let me know how to
enable audio in the guests. The audio hardware is detected in the guests as
ac97. The detailed scenario is mentioned below =>

Host config =>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
RHEL 5.4

#uname -a => Linux xxx.yyy.zzz 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT
2009 x86_64 x86_64 x86_64 GNU/Linux

#grep -m 1 vmx /proc/cpuinfo
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm
constant_tsc ida pni monitor ds_cpl *vmx* est tm2 cx16 xtpr lahf_lm

#lsmod | grep kvm
kvm_intel              86248  1
kvm                   223264  2 ksm,kvm_intel

#rpm -qa | grep kvm
kmod-kvm-83-105.el5
kvm-83-105.el5
kvm-qemu-img-83-105.el5
kvm-tools-83-105.el5
etherboot-zroms-kvm-5.4.4-10.el5

#rpm -qa | grep kmod
kmod-kvm-83-105.el5

#rpm -qa | grep virt
python-virtinst-0.400.3-5.el5
virt-manager-0.6.1-8.el5
libvirt-devel-0.6.3-20.1
libvirt-python-0.6.3-20.1
libvirt-0.6.3-20.1

##############################################################
Sound Card Hardware on host =>
#lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio
Controller (rev 03)

Sound Modules on host =>
#lsmod | grep snd
snd_hda_intel         584593  1
snd_seq_dummy          37061  0
snd_seq_oss            65473  0
snd_seq_midi_event     41025  1 snd_seq_oss
snd_seq                87777  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device         41557  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            77377  0
snd_mixer_oss          49985  1 snd_pcm_oss
snd_pcm               116681  2 snd_hda_intel,snd_pcm_oss
snd_timer              57161  2 snd_seq,snd_pcm
snd_page_alloc         44113  2 snd_hda_intel,snd_pcm
snd_hwdep              43593  1 snd_hda_intel
snd                   100073  11
snd_hda_intel,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep
soundcore              41825  1 snd
################################################################

SELinux on host => permissive

In /etc/libvirt/qemu.conf, security_driver="none"

xml of guest =>
###################

<domain type='kvm'>
  <name>vbg-work</name>
  <uuid>8e91f01d-92f8-18fa-9d8f-f4f86d12659f</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>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/libexec/qemu-kvm</emulator>
    <disk type='file' device='cdrom'>
      <source file='/iso/Fedora/Fedora_12_i386_DVD.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <disk type='block' device='disk'>
      <source dev='/dev/mapper/vbgos-vgwork'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <mac address='54:52:00:2c:5d:1b'/>
      <source network='default'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/4'/>
      <target port='0'/>
    </serial>
    <console type='pty' tty='/dev/pts/4'>
      <source path='/dev/pts/4'/>
      <target port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
    <sound model='ac97'/>
  </devices>
</domain>


qemu-kvm command startup =>

# ps -ef | grep qemu
root      4279     1 16 08:31 ?        00:09:56 /usr/libexec/qemu-kvm -S -M
pc -m 1024 -smp 1 -name vbg-work -uuid 8e91f01d-92f8-18fa-9d8f-f4f86d12659f
-no-kvm-pit-reinjection -monitor pty -pidfile
/var/run/libvirt/qemu//vbg-work.pid -boot c -drive
file=/iso/Fedora/Fedora_12_i386_DVD.iso,if=ide,media=cdrom,index=2 -drive
file=/dev/mapper/vbgos-vgwork,if=virtio,index=0,boot=on -net
nic,macaddr=54:52:00:2c:5d:1b,vlan=0,model=virtio -net
tap,fd=15,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb
-usbdevice tablet -vnc 127.0.0.1:0 -k en-us -soundhw ac97

log file on host =>

#tailf /var/log/libvirt/qemu/vbg-work.log

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/libexec/qemu-kvm -S
-M pc -m 1024 -smp 1 -name vbg-work -uuid
8e91f01d-92f8-18fa-9d8f-f4f86d12659f -no-kvm-pit-reinjection -monitor pty
-pidfile /var/run/libvirt/qemu//vbg-work.pid -boot c -drive
file=/iso/Fedora/Fedora_12_i386_DVD.iso,if=ide,media=cdrom,index=2 -drive
file=/dev/mapper/vbgos-vgwork,if=virtio,index=0,boot=on -net
nic,macaddr=54:52:00:2c:5d:1b,vlan=0,model=virtio -net
tap,fd=15,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb
-usbdevice tablet -vnc 127.0.0.1:0 -k en-us -soundhw ac97
char device redirected to /dev/pts/2
char device redirected to /dev/pts/3
interface_audio_init:
line_in_init:
line_out_init: freq 44100 channels 2 format AUD_FMT_S16 HOST_ENDIANNESS

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Client (FC 12 details) =>

#uname -a
Linux vbg-work.knafl.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7
21:25:57 EST 2009 i686 i686 i386 GNU/Linux

#lspci | grep audio
00:04.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio
Controller (rev 01)
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

I can see the sound control and files also play, but there is no audio
output. I guess it has something to do with audio tunelling back to the
host.

Looking fwd to suggestions for making audio work on the guests ....


Regards

-- 
Varad Gupta
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to