No Sound on Ubuntu in Hyper-V

36,191

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!

Share:
36,191

Related videos on Youtube

Kenneth Dold
Author by

Kenneth Dold

Updated on September 18, 2022

Comments

  • Kenneth Dold
    Kenneth Dold over 1 year

    I installed Ubuntu 14.04.4 LTS on my computer using Hyper-V Manager. I am running Windows 10 Pro as the primary system. Sound will not work on Ubuntu, but works fine on Windows 10. I don't know what to turn on or change to get sound to work. It says Dummy Output under Sound. Please help I am new to Linux and want to learn.

  • Suncatcher
    Suncatcher almost 6 years
    It may be possible to install xrdp XRDP doesn't support sound as well. I swear.
  • apaderno
    apaderno almost 6 years
    And even blogs.technet.microsoft.com/virtualization/2018/02/28/… makes you install XRDP, which means that not even Hyper-V running Ubuntu 18.04 would give you the sound.
  • DennisK
    DennisK about 5 years
    Now XRDP supports sound with a PulseAudio plugin (though with no Microphone support on MS clients yet): github.com/neutrinolabs/pulseaudio-module-xrdp/wiki/README
  • Tim Leach
    Tim Leach about 4 years
    This might have been true in 2016, but now the solution further down works.
  • Willian
    Willian almost 4 years
    Thank you @Sean J. It worked fine for me!!
  • Aserian
    Aserian almost 4 years
    This is the correct answer. Please note that in order to do what he has said in the first method above, you need to go to Software and Updates -> Click the check box "Source code" (enter password) -> Close this window -> It will prompt you to reload, do so. Then follow the instructions
  • Daniel Bişar
    Daniel Bişar over 3 years
    Note: cd /tmp/pulseaudio* is wrong it must be cd cd /tmp/pulseaudio and then just press tab (in the case above the name is /tmp/pulseaudio-11.1
  • hao
    hao over 3 years
    On ubuntu 20.04, may need to install libsnapd-glib-dev