Guest sound on host?

shawly

Member
Nov 8, 2015
25
2
23
Hi,

I have an external USB DAC connected to my host and I want to hear the sound of all my guests over my hosts DAC.
Instead of passing through the whole DAC to a single guest I want to create something like virtual sound devices, which send the audio directly to my host where it gets mixed with PulseAudio into one output for the DAC. Is this possible, for example with JACK?

This way I won't have to use multiple soundcards for each guests.

Thanks!

Edit: On Proxmox 1.8 you could use the -soundhw parameter, which required to have the host running ALSA to hear the sound, does it still work this way?
 
Last edited:
Hi,

Edit: On Proxmox 1.8 you could use the -soundhw parameter, which required to have the host running ALSA to hear the sound, does it still work this way?

I did`t test it but generally qemu supports this flag so it should work.
 
Great, I wasn't really sure since the wiki only covered SPICE audio and the post with the -soundhw flag was back in Proxmox 1.8. But after executing kvm -soundhw I saw that it still works.

Is there any way to pass through the host microphone input to the guest?
 
You don't need JACK for that. If you create a virtual soundcard in qemu via the -soundhw or -device switches they'll use ALSA which - if you have pulseaudio installed - will be using pulseaudio anyway. If you set it up accordingly you can even control the volume of each machine separately in pavucontrol...
Since VMs currently run as root you either need to have pulseaudio running as system service or change root's ~/.pulse/client.conf to use a user's server (similar to the alternative below:)

Alternatively you can use pulseaudio's native networking and just load the module-native-protocol-tcp module (with pactl or by editing your user's ~/.pulse/default.pa) and have the VMs use that (by setting `default-server = <hostip>` in the VM's /etc/pulse/client.conf or ~/.pulse/client.conf.

EDIT: As for microphone: I'm not sure. Although pulseaudio's networking might cover that if you use that from within the VM.
 
  • Like
Reactions: Vazhnov
Since the machines I'll be running have Windows, I can't use pa's server, but since -soundhw still works I'm good to go, thanks for the info regarding pa running as system service!

Guess for the microphone part I will need JACK, since it's crossplatform it should work. I just have to figure out a way to minimize latency.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!