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

TDavLinguist

New Member
May 12, 2023
3
17
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
 

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!