[TUTORIAL] Noob Guide to Getting Audio to Work in Linux Guests

TDavLinguist

New Member
May 12, 2023
3
19
3
Hi, everyone. I am a relatively new Proxmox VE user and I must admit that I'm not even running it on bare metal! I'm running it inside of qemu on my Linux Mint machine. Nonetheless, I am enjoying what Proxmox VE has to offer and strangely enough, I was able to get some VMs running on Proxmox VE that I could not even get running on my qemu (hmm).

I just wanted to make this guide for newbies like me who would like to have working audio in their Proxmox guest VMs. So, I'm going to explain what I did to get it working.

VM Details

I am running a Linux Mint Cinnamon VM inside of Proxmox VE. It's a relatively simple VM with bare minimum specs, as seen in this Neofetch screenshot:
Screenshot.png

Setting Up The VM​

To state things simply, in order to get audio to work you're going to need the SPICE audio driver. But in order for the SPICE audio driver to work, you're going to need the SPICE graphics driver. So, when setting up a new VM, in the Hardware tab, be sure to select one of the SPICE options for Graphic Card. If you do not choose a SPICE graphics card, nothing will work.
Screenshot.png
Notice that I did not click the "Qemu agent" box in the "System" tab. That was deliberate. Don't worry, we'll get back to it.
Continue setting up the VM to your specifications and then install it as necessary.

Installing Guest Agent Inside Guest​

After you've set up the VM, installed the OS, and updated your guest packages, install the qemu-guest-agent in your package manager.
After that's installed, do a soft shutdown of your machine.

Adding Audio Device in PVE​

Before adding the audio device, let's make sure PVE knows that the guest agent is installed. Go to your node and select the Options tab. Within that, edit the "QEMU Guest Agent" option so that it is enabled:
Screenshot.png
Click OK.
Next, go to the Hardware tab, click Add and add an Audio Device, making sure that SPICE is the driver for whatever virtual device you select. Here's what I chose:
Screenshot.png
Click OK.

Booting your VM​

Now, you want to make sure that your host machine has some sort of SPICE-compatible virtual machine viewer. Here's what I have:
Screenshot.png
Click the Start button in PVE to boot your VM and then make sure that you select SPICE in the Console drop-down menu. In my web browser, a download dialog appears and I select "Open With: Remote Viewer"
Screenshot.png
Remote viewer should load with your virtual desktop. I went into Linux Mint Cinnamon's sound panel and saw that my virtual sound device was indeed recognized rather than some "Dummy Sound" device:
Screenshot.png
And upon testing the sound, I was able to hear everything through my own headphones plugged into the host! Not only that, but I was pleased to see that SPICE picked up my microphone input as well! Let me remind you that I am essentially running a Linux Mint VM inside of PVE which is a guest VM on my own machine. So that's three layers that my sound devices are traveling through!

Let me know how I could improve the advice or whether I got anything wrong. I'm happy to make edits. Thanks, Proxmox Community, for this wonderful software!
 
Last edited:
Hi,
you can edit the forum thread and select the [TUTORIAL] prefix. This helps other users to recognize it more quickly as such :)
 
I appreciate your work here!
I just set up Proxmox on a laptop, and have set up 3 linux VMs.
I am doing this purely for fun, I like to look at different linux distros.
But, dang, that is a lot of work just to get audio!
It was fun to get to the point where I could get some VMs running, but for my purposes, it'll be back to VMWare Fusion.
You have provided a great resource here, thank you! I tried some internet searches, but did not find anything like what you have put together here.
 
  • Like
Reactions: jimcc66
Very interesting tutorial.
All was great until I got to the virt-manager part.

I have a (intel) Mac and could not find any direction on how to install the right app onto it.
I found jeffreywildman/homebrew-virt-manager -s viewer, however it does not work. It looked like that particular viewer does not accept .vv files.
It was also impossible to pick up the app by double clicking as the installed virt-viewer does not show up and not possible to select it rom the dialog box.
 
Very interesting tutorial.
All was great until I got to the virt-manager part.

I have a (intel) Mac and could not find any direction on how to install the right app onto it.
I found jeffreywildman/homebrew-virt-manager -s viewer, however it does not work. It looked like that particular viewer does not accept .vv files.
It was also impossible to pick up the app by double clicking as the installed virt-viewer does not show up and not possible to select it rom the dialog box.


Get virt-viewer from here:
https://www.spice-space.org/download.html
The OSX client might still be experimental:
https://www.spice-space.org/osx-client.html
 
Just asking in case someone has come with a solution for this Issue.

I have a Windows VM on Proxmox with SPICE, I use it to connect, using a VPN to my employer workstation. They have a stupid policy to not use Teams outside the company, I will not enter in details in here, but I can't login to my teams account, I don't have the password.

Since Team resides only in the workstation, the output and input, come from my PC, goes to Proxmox+Spice+VM, and to the company workstation.
The sound is good but everyone is getting their sound back when my Mic is open.

I investigate and when the input come to the VM, the Mic grab it and send it back, I was only able to see/hear it when I enable the option to hear what my mic is picking.

I was not able until now to resolve this, I tried to lower the mic volume and output volume but only let it stay a little less worst than before.
I am using Teams in a push to talk way right now..
 
Installing the Qemu guest agent does nothing.. can anyone elaborate that a bit more? In the windows vm I have downloaded and ran the virtio-win-guest-tools.exe. but on the WIKI it says to then "Attach the ISO to your windows VM (virtio-*.iso)." What the hell does that mean? And "PCI Simple Communications Controller" is not in Device Manager. The VM is already running from the Windows iso, sooooooo wtf? These people are SO not helping us noobs migrate to these systems by speaking in such jargon and sh*t, makes everything so damn difficult. soooorrrry I'm not a programmer or whatever. sheesh

FOR NOOBS ONLY: Here are good YouTube videos for solutions to places where I got struck what these devs mean by "attaching ISO to your Windows VM," and setting up Spice so that you can hear audio AND COPY/PASTE!).
https://www.youtube.com/watch?v=fupuTkkKPDU
https://www.youtube.com/watch?v=1Xy4JDDBdqw
 
Last edited:
@used1d What audio card are you using(on proxmox vm), intel-hda? AC97 didn't worked when I tried to change from Intel to AC97 to try fix the "audio return" on microfone, the device was unrecognizable, but with a clean installation it could work.
The ISO part is, go to proxmox and on Disks, add the CD/DVD with the ISO of virtio, link for the latest version bellow, pull the ISO and attach it to your VM, probably you are with windows installation cd/dvd attached, which you used for install it.

https://fedorapeople.org/groups/vir...ownloads/archive-virtio/virtio-win-0.1.271-1/
 
Last edited: