[SOLVED] What sort of wizardry gets audio to work in linux guest/vm?

retrojp

New Member
Apr 29, 2021
17
2
3
44
Scotland
I can see the audio bars moving inside the guest OS with the various sound devices i've tried, but no audio makes it to the client. I've installed the spice viewer client for windows hoping for some success there but nope. I did try a windows guest install, but the audio kept muting and troubleshooting wanted a reboot (that endless cycle, although, i was raising the bar for GPU passthrough since there seemed to be a few more tutorials on this, and i thought i might be able to use the hdmi audio).

I have verified IOMMU is enabled
added the /etc/modules
verified dmesg | grep 'remapping'
i'm using a xeon processor for IOMMU grouping
I have vt-D and vt-X enabled
Tried going through the PCI (and gpu) passthrough documentation and various other articles/videos, but i seem to find less info about audio (and linux guests), so my last roll of the dice is here. :)
I've tried the default audio hardware devices as well (ich9, intel hda, ac97).
I've tried ubuntu, ubuntu studio, linux mint and kubuntu... i was going to attempt opensuse, but my brain ends now, sleepy time :)
 
What is it that you want to achieve? Meaning, where and in what situation do you need audio from the VM?

If you use spice, did you create an audio device with the spice backend?
 
Thanks for replying :)

My primary objective with a type 1 hypervisor was to explore different linux machines without the overhead of a type 2 hypervisor. I'm reasonably familiar with linux, but i'm no genius with linux. I'm mostly familiar with debian, so thought Proxmox would be a nice place to start. I went to the trouble many years ago of purchasing a network card to use with esxi, but it was a project i put on hold for some time until now, and before going any further with esxi, i thought i'd try proxmox first after reading about the use of debian.
I was planning to try ubuntu studio & kali linux maybe further down the line. I also had the idea of installing steam on some version of ubuntu (i know not all games play well on linux/steam, but as i say, i wanted to explore the options), and see how useful it could be for VM gaming. I'm a hobbyist with this stuff mostly, but i've read a few (large) books and have had a few servers, took part in some tech club projects with servers, and part of me has been thinking about completing a few compTIA courses and maybe switch careers.

I have used windows since xp, but it was always linux & script writing etc that interested me more for some reason, so i'm a little less interested in a windows VM, but if that's what it takes to have a gaming VM, then i could probably be swayed. I'll be 100% honest, i never exhaustively tried to get the audio to work in the windows VM, i did only quickly attempt with the gpu audio. I don't have a spare windows license, and i'm not 100% sure how windows VM licensing works, but i know i could pick up a windows 10 pro license for not much money just now, and i would then be able to remote desktop into a windows VM (i think i've got that right)... this held back my testing, as i read that if i hand over the gpu to the windows vm, i would no longer be able to view the guest windows machine without remote desktop, which is fine, but i want to check if it works first.

Back to linux...
I have tried to load into spice using the three audio devices (i.e. audio0: device=intel-hda,driver=spice), with the spice_enhancements: videostreaming=all config and on the client side i have this installed - virt-viewer Windows. I'm pretty sure i've tried spice_enhancements: videostreaming=filter/off as well. I've also tried the PCI audio, and changing the bios on the VM from seabios to UEFI with i440fx and q35. I connect with the VM using the spice (remote viewer) console button.

I love tinkering, my biggest problem is probably not giving up and i don't often ask for support, but i've probably gone above my capabilities here.

Removing audio from the equation, i have watched some other uses for proxmox and i must say, impressive work! :)
 
Thanks for replying :)

My primary objective with a type 1 hypervisor was to explore different linux machines without the overhead of a type 2 hypervisor. I'm reasonably familiar with linux, but i'm no genius with linux. I'm mostly familiar with debian, so thought Proxmox would be a nice place to start. I went to the trouble many years ago of purchasing a network card to use with esxi, but it was a project i put on hold for some time until now, and before going any further with esxi, i thought i'd try proxmox first after reading about the use of debian.
I was planning to try ubuntu studio & kali linux maybe further down the line. I also had the idea of installing steam on some version of ubuntu (i know not all games play well on linux/steam, but as i say, i wanted to explore the options), and see how useful it could be for VM gaming. I'm a hobbyist with this stuff mostly, but i've read a few (large) books and have had a few servers, took part in some tech club projects with servers, and part of me has been thinking about completing a few compTIA courses and maybe switch careers.

I have used windows since xp, but it was always linux & script writing etc that interested me more for some reason, so i'm a little less interested in a windows VM, but if that's what it takes to have a gaming VM, then i could probably be swayed. I'll be 100% honest, i never exhaustively tried to get the audio to work in the windows VM, i did only quickly attempt with the gpu audio. I don't have a spare windows license, and i'm not 100% sure how windows VM licensing works, but i know i could pick up a windows 10 pro license for not much money just now, and i would then be able to remote desktop into a windows VM (i think i've got that right)... this held back my testing, as i read that if i hand over the gpu to the windows vm, i would no longer be able to view the guest windows machine without remote desktop, which is fine, but i want to check if it works first.

Back to linux...
I have tried to load into spice using the three audio devices (i.e. audio0: device=intel-hda,driver=spice), with the spice_enhancements: videostreaming=all config and on the client side i have this installed - virt-viewer Windows. I'm pretty sure i've tried spice_enhancements: videostreaming=filter/off as well. I've also tried the PCI audio, and changing the bios on the VM from seabios to UEFI with i440fx and q35. I connect with the VM using the spice (remote viewer) console button.

I love tinkering, my biggest problem is probably not giving up and i don't often ask for support, but i've probably gone above my capabilities here.

Removing audio from the equation, i have watched some other uses for proxmox and i must say, impressive work! :)
I am using Linux for pro audio stuff and also Proxmox but not much in combination.

I have tried to run Ardour with sample buffer 1024 or higher and it kinda works but still some dropouts so don't expect good realtime audio but I think you could do some audio stuff with vm's if you want to.

Most of my spice VMs have audio and a couple of usb redirect channels just for comfort and I am planning on passing some GPU resources to my VMs later on.
 
I have read about the use of USB audio devices with proxmox and i do have one. I'll try this thanks :)
in my case I have working audio on my client computer. Adding a virtual audio card to the vm (windows or Linux) will make everything work right away since most operating systems support intel-hda chips naitively.

The key is to use virt-viewer and spice. The rest is automatic

/Anders
 
Hello, i've figured out the issue, i also had a problem with USB audio.

Turns out virt viewer for windows most recent version 10.0, doesn't work (on the PC's i've tried).

I reverted back to virt-viewer-x64-9.0-1.1.msi and now the audio is working :) Happy days, hopefully helps someone else.
 
  • Like
Reactions: aaron

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!