Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to enable KVM virtual machine to use speakers and microphones

Shulou Source: shulou.com Published: 2022-05-31 18:31:51 10月03日 Update

This article is about how to enable the KVM virtual machine to use speakers and microphones. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Virt-install-- arch=x86_64-- accelerate-v-n windows2008_2-r 1024-- vcpus=3-c / media/windows2008.iso-- vnc-- vncport=5903-- vnclisten=0.0.0.0-- virt-type=kvm-- disk path=/dev/vg01/sys2008_2,cache=writeback,bus=virtio,device=disk-- disk path=/media/virtio.vfd,device=floppy-w bridge:br1,model=virtio-- soundhw=ac97-- video=cirrus-os-type='windows'-- os-variant=win2k8-- connect qemu:///system

Or modify the xml file directly:

Since there is only windows version of Rosetta Stone software, I want to create a KVM virtual machine on Linux to run windows. This paper records some problems encountered in the process of using speaker and microphone in KVM virtual machine.

1, windows xp or windows 7

At first, the speed of the picture is fast, the installation is a deeply simplified version of windows xp, but after entering the virtual machine, the general report can not find a pci, audio, video driver, the use of online driver wizard failed. Later, it was changed to windows 7, and the sound card driver chose ich7 is easy to use.

2, speaker and microphone

However, in the above method (using ich7 driver), after entering the virtual machine, you can only see the speaker driver, but not the microphone driver, because the microphone is neither a pci device nor a usb device, but a line-in device, and the virtual machine does not recognize it, so use the following configuration. See: http://comments.gmane.org/gmane.comp.emulators.spice.devel/9078

3, VNC or rdesktop

The virtual machine created by virt-manager by default uses vnc. Vnc cannot penetrate sound. A method is spread on the Internet. Set vnc_allow_host_audio = 1 in / etc/libvirt/qemu.conf, and the actual test does not work.

So instead use the-r sound:local parameter of rdesktop to use the host speaker, which works, but the sound is a little stuck, and the microphone doesn't work well.

Sudo rdesktop-z-r sound:local-g workarea-D-K-a 16-u Administrator-p password 192.168.100.6

4, spice

Finally think of spice, speakers and microphones can be used.

A) sudo apt-get install libspice-server1 python-spice-client-gtk qemu-kvm-spice spice-client spice-client-gtk python-spice-client-gtk build-essential libspice-server1 libspice-protocol-dev

B) change the Video driver to QXL in virt-manager

C) change Display to Spice

Thank you for reading! This is the end of the article on "how to make the KVM virtual machine use speakers and microphones". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Virtual machine microphone Mike speaker drive good equipment content sound more article good practical not big not good lieutenant general method parameter only sound card Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi OPPO Reno NVidia Huawei