No Sound on Ubuntu in Hyper-V

Solution 1:

For Ubuntu 18.04 LTS hosted on a Windows 10 Pro Hyper-V VM. I was able to do it using the following on a system that was one of the quick start VMs. The only audio device listed before was "Dummy Audio" or "Dummy Output" or something like that and after it was "xrdp sink" and after I started this in the VM was I had to follow install instructions at [http://c-nergy.be/blog/?p=12469][http://c-nergy.be/blog/?p=12469] and then reboot. Also ensure your client connection to the iva XRDP is passing audio.

Short version is below in case link goes dead.

# Configure system to accept source repos
cd /tmp
sudo apt source pulseaudio 
cd /tmp/pulseaudio*
sudo ./configure
cd /usr/src/xrdp-pulseaudio-installer
sudo make PULSE_DIR="/tmp/pulseaudio-11.1"
sudo install -t "/var/lib/xrdp-pulseaudio-installer" -D -m 644 *.so
# Restart the VM and reconnect

Note: I also happened to install the following from some other guides, but I beleive that it would have worked without it

sudo apt-get install ubuntu-restricted-extras
sudo apt-get install pavucontrol

Solution 2:

It looks like you're doing fine, Hyper-V does not support audio to Linux guests. There is a lot of information on the internet that says to enable Enhanced Sessions in Hyper-V...but Enhanced Sessions are for Windows guests only. It may be possible to install xrdp or another Linux RDP package but I have not tried this as I use Ubuntu Server more than desktop and just SSH in anyways.

Lack of audio support in Hyper-V for Linux is one of several trade offs of using Linux guests on Hyper-V hosts. I have had luck using VirtualBox as the Hypervisor which allows audio, but you must uninstall/deactivate the Hyper-V feature before running/installing VirtualBox as Hyper-V locks the virtualization for Hyper-V's usage.

With that said, I have used Linux (Arch, Ubuntu, Debian, Kali, etc.) and *BSDs as guests in Hyper-V for years and am very satisfied with the overall performance and minimal issues. Best of luck on your Linux journey!