How To Install Hyper-V Integration Services in Linux VM

Many modern Linux distributions already include Hyper-V Linux Integration Services (LIS) by default, providing better performance and host integration. If your Linux VM does not have LIS pre-installed, you can follow these steps to enable or install it.

Debian-Based Distributions

For Debian 10+ (Buster, Bullseye, Bookworm) and Ubuntu, LIS is built into the kernel. For additional optimizations on Ubuntu running in Hyper-V or Azure, install the Azure kernel:

sudo apt install linux-azure
sudo update-grub
sudo reboot

For Debian 12 (Bookworm), LIS modules are already included, but you can enable them manually:

sudo apt install hyperv-daemons
sudo modprobe hv_vmbus hv_netvsc hv_storvsc hv_balloon

Verify LIS is running:

lsmod | grep hv

For Debian 9 and older, manually enable LIS modules:

echo 'hv_vmbus' | sudo tee -a /etc/initramfs-tools/modules
echo 'hv_storvsc' | sudo tee -a /etc/initramfs-tools/modules
echo 'hv_blkvsc' | sudo tee -a /etc/initramfs-tools/modules
echo 'hv_netvsc' | sudo tee -a /etc/initramfs-tools/modules
sudo update-initramfs -u
sudo reboot

Red Hat-Based Distributions

For RHEL 7 and newer, LIS is built into the kernel. If needed, install LIS daemons:

sudo dnf install hyperv-daemons   # RHEL 8+
sudo yum install hyperv-daemons   # RHEL 7

Enable and start services:

sudo systemctl enable hypervkvpd hypervvssd hypervfcopyd
sudo systemctl start hypervkvpd hypervvssd hypervfcopyd

Arch-Based Distributions

LIS is not officially supported, but you can manually install required modules:

sudo pacman -S linux-headers
sudo modprobe hv_vmbus hv_netvsc hv_storvsc hv_balloon

Verify LIS is running:

lsmod | grep hv

openSUSE-Based Distributions

LIS is included in the kernel, but you may need additional tools:

sudo zypper install hyperv-tools

Enable and start services:

sudo systemctl enable hv_fcopy hv_vmbus hv_storvsc hv_netvsc
sudo systemctl start hv_fcopy hv_vmbus hv_storvsc hv_netvsc

Alternatively, manually load modules:

sudo modprobe hv_vmbus hv_netvsc hv_storvsc hv_balloon

Adjust Screen Resolution in Hyper-V

If your Linux VM screen resolution is incorrect, edit GRUB settings:

sudo nano /etc/default/grub

Modify the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"

Save, update GRUB, and reboot:

sudo update-grub
sudo reboot

Clipboard and Copy-Paste Limitations

Enhanced Session Mode is only available for Windows VMs. Linux guests in Hyper-V have limited clipboard functionality. Workarounds include:

  • Using an RDP connection with XRDP for full clipboard and peripheral support.
  • Setting up Samba or NFS for file sharing.
  • Using cloud-based syncing tools like OneDrive, Google Drive, or Syncthing.

Final Result

After enabling LIS, your Linux VM will benefit from improved networking, dynamic memory support, and better integration with the host system. These enhancements make your virtualization experience smoother and more efficient.

By configuring Hyper-V Integration Services, you ensure that your Linux VM runs optimally, offering seamless interaction with the host and enhanced performance.

Post a Comment

Previous Post Next Post

Contact Form