The Hyper-V Enhanced Session increases performance of the VM GUI and adds multimedia capabilities which improves the end user experience of Linux running on Hyper-V.
Follow steps on the post below:
deploy-a-linux-vm-on-hyper-v-with-sound-20-04-edition
Or follow theses steps:
Note - if it asks to reboot and rerun, rerun the install.sh again
Run the following script on the Linux VM:
wget https://raw.githubusercontent.com/Hinara/linux-vm-tools/ubuntu20-04/ubuntu/20.04/install.sh
chmod +x install.sh
sudo ./install.sh
Set-VM -VMName "Your VM Name" -EnhancedSessionTransportType HvSocketInstall prerequisites:
sudo apt-get install git libpulse-dev autoconf m4 intltool build-essential dpkg-dev libtool libsndfile1-dev libspeexdsp-dev libudev-dev -yNote - Can also be enabled from the GUI, using Settings > About > Software & Updates)
sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get updateDownload PulseAudio source in /tmp directory
Note - Do not forget to enable source repositories
sudo apt build-dep pulseaudio -y
cd /tmp
apt source pulseaudioGo to the PulseAudio folder (pulseaudio-<version.number>) and build it from source.
Note - Follow the instructions in the README file, on the section HACKING
cd pulseaudio-<version.number>
meson build
meson compile -C build
build/src/daemon/pulseaudio -n -F build/src/daemon/default.pa -p $(pwd)/build/src/Go back to /tmp folder then use git clone to clone the PulseAudio XRDP module GitHub repo.
cd ..
git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
cd pulseaudio-module-xrdpLike the PulseAudio source, I followed their docs to get this done
Build Doc: pulseaudio-module-xrdp/wiki/Build-on-Debian-or-Ubuntu
scripts/install_pulseaudio_sources_apt_wrapper.sh
./bootstrap
./configure PULSE_DIR=~/pulseaudio.src
sudo make installRestart the VM.
Install Doc: pulseaudio-module-xrdp/wiki/README#install
- https://c-nergy.be/blog/?p=13655
- https://askubuntu.com/questions/844245/how-to-compile-latest-pulseaudio-with-webrtc-in-ubuntu-16-04
- https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list
- https://unix.stackexchange.com/questions/65167/enable-udev-and-speex-support-for-pulseaudio
- https://rudd-o.com/linux-and-free-software/how-to-make-pulseaudio-run-once-at-boot-for-all-your-users
- https://gist.github.com/rkttu/35ecab5604c9ddc356b0af4644d5a226