You are not logged in.

#1 2014-02-13 06:59:22

taro
Member
Registered: 2013-11-08
Posts: 17

[Solved] No sound from VM (Windows 7) on qemu with virt-manager

I posted this in Newbie corner,
https://bbs.archlinux.org/viewtopic.php?id=176131
but let me re-post here becase it is about sound matter.

***

I have installed Windows 7 (64bit) on qemu with virt-manager.
It seems that audio works fine inside the guest os, but I can hear no sound.

[Guest]
Guest os: Windows 7 (64 bit)
Sound driver: ich6
Console: Spice (VNC doesn't work.)

[Host]
linux 3.12.8-1 (base)
qemu 1.7.0-1
virt-manager 0.10.0-4
libvirt 1.2.1-1

According to
https://bbs.archlinux.org/viewtopic.php?id=157604
I did as follow before launch the VM, but it doesn't solve the problem.
export QEMU_AUDIO_DRV=alsa

What shoud I check and do?
Followings are some additional information:

* If I put the same command above
% /usr/sbin/qemu-system-x86_64 -name win7qemu002...
It produces error.
char device redirected to /dev/pts/4 (label charserial0)
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied

* According to the someone's discussion,
I added my user to kvm group
% sudo gpasswd -a taro kvm
or edited /etc/libvirt/qemu.conf, but they don't fix this errors.
% sudo vi /etc/libvirt/qemu.conf
- #user = "root"
+ user = "taro"

* Everytime I launch the virt-manager,
a dialog "Authentication" pops-up and asks
for my user password (not root password).

% ps aux | grep kvm                                                     [~]
root       252  0.0  0.0      0     0 ?        S<   02:25   0:00 [kvm-irqfd-clea
n]
nobody   10199 63.0 27.0 1613768 1070088 ?     Sl   11:31   0:34 /usr/sbin/qemu-system-x86_64 -name win7qemu002 -S -machine pc-i440fx-1.7,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 00b5056b-9055-aa4f-d7a6-aef72cc8edd4 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win7qemu002.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -boot menu=off,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/mnt/win/win7qemu002,if=none,id=drive-ide0-0-0,format=raw -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=22,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=08:00:27:8f:ff:84,bus=pci.0,addr=0x7,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x3 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
root     10201  0.0  0.0      0     0 ?        S    11:31   0:00 [kvm-pit/10199]
taro     10340  0.0  0.0  10668  1060 pts/2    S+   11:32   0:00 grep kvm

Last edited by taro (2014-02-15 12:36:43)

Offline

#2 2014-02-15 12:35:52

taro
Member
Registered: 2013-11-08
Posts: 17

Re: [Solved] No sound from VM (Windows 7) on qemu with virt-manager

Self reply.

Finally, I got to hear sound from windows 7 as guest OS.
I gave up to use virt-manager and launches OS image by command line
like follows.
% export QEMU_AUDIO_DRV=alsa
% qemu-system-x86_64 /mnt/win/win7qemu002 -cpu kvm64,+nx -enable-kvm -m 1536 -soundhw hda -usb

Then, sounds works good.
# However, the quality is bad because of heavy CPU load.
Virt-manager may make things complex..


Sorry for the duplicated post.
https://bbs.archlinux.org/viewtopic.php?pid=1373935

Last edited by taro (2014-02-15 12:36:19)

Offline

Board footer

Powered by FluxBB