Home Virtualisation Hyper-V Configure Linux Integration Services on Ubuntu Server 18.04.02 LTS

Configure Linux Integration Services on Ubuntu Server 18.04.02 LTS

7303
4
Reading Time: 2 minutes

In the previous article i blogged about installing Ubuntu 18.04.02 LTS and can be found here – Installing Ubuntu 18.04.02 LTS on Hyper-V

This is the follow on blog post about getting the integration services tools installed and configured for the virtual machine which we just created.

According to the Microsoft Docs for Ubuntu Virtual Machine Link, they state that the LIS package is built into the OS.

However, when you look at the Networking tab Virtual Machine under Hyper-V Manager you can see that the IP Address field is blank.

Now to resolve this, in the past, I had to spend a couple of minutes trying to find the official article from Microsoft (Link) which provided the solution. to save time I took the contents of the article and turned it into a dead simple install script

#!/bin/bash 
# Microsoft Hyper-V Intergration Services (Ubuntu/Debian Install Script)
# Author: Simon Lee
# Script Revision: 1.0
# Description: Install linux-virtual kernal for Ubuntu/Debian Server

# Clear Current Screen
clear

# Check Session Status
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root"
   exit 1
elif [[ $EUID -eq 0 ]]; then
   echo -e "Session Running as \e[36mROOT\e[0m"
fi

# Update Local System Packages 
apt update && apt -y upgrade

# Add hv_modules to /etc/initramfs-tools/modules
echo 'hv_vmbus' >> /etc/initramfs-tools/modules
echo 'hv_storvsc' >> /etc/initramfs-tools/modules
echo 'hv_blkvsc' >> /etc/initramfs-tools/modules
echo 'hv_netvsc' >> /etc/initramfs-tools/modules

# Replace Out of Box Kernal with linux-virtual
apt -y install linux-virtual linux-cloud-tools-virtual linux-tools-virtual

# Update Initramfs
update-initramfs -u

# Reboot Server
reboot

If you want to run this direct on your virtual machine you can execute:

cd /tmp && wget https://raw.githubusercontent.com/hypervlab/hypervlab-resources/master/hyper-v/linux/setup_ubuntulis.sh && sudo bash setup_ubuntulis.sh 

Once the server has rebooted and we refresh the Hyper-V Manger console and look at the Networking tab we now get an IP Address.

4 COMMENTS

  1. the linux-azure package is available now and all the integration services are running w/o modifying the /etc/initramfs-tools/modules. However, in the Fail over cluster manager, the LIS is still listed as 3.1 even though Microsoft says 4.3 is now available.

    My /etc/initramfs-tools/modules is empty.

    ps aux | grep hv
    root 48 0.0 0.0 0 0 ? I< 15:29 0:00 [hv_vmbus_con]
    root 49 0.0 0.0 0 0 ? I< 15:29 0:00 [hv_pri_chan]
    root 50 0.0 0.0 0 0 ? I< 15:29 0:00 [hv_sub_chan]
    root 508 0.0 0.1 7284 1812 ? Ss 15:29 0:00 /usr/lib/linux-tools/5.0.0-1025-azure/hv_kvp_daemon -n
    root 629 0.0 0.0 0 0 ? S 15:29 0:00 [hv_balloon]
    root 1156 0.0 0.0 4512 796 ? Ss 15:29 0:00 /usr/lib/linux-tools/5.0.0-1025-azure/hv_vss_daemon -n
    root 1234 0.0 0.0 4512 800 ? Ss 15:29 0:00 /usr/lib/linux-tools/5.0.0-1025-azure/hv_fcopy_daemon -n

    lsmod | grep hv
    hv_balloon 28672 0 hv_netvsc 73728 0 hv_utils 32768 3

    Any idea what I need to do to get to LIS 4.3?

    I'm running linux-azure 5.0.0.1025.36

  2. When I tested linux-azure on a fresh Ubuntu 18.04 vm it broke quotatool. It would install, but never run without errors.

    Installing generic or virtual kernel, then removing azure cleaned things up and after a purge/install of quota it worked without having to wipe the vhd and fresh install Ubuntu.

    I did not make a note of the specific error after testing.

LEAVE A REPLY

Please enter your comment!
Please enter your name here