Upgrade Microsoft Hyper-V Linux IC from 3.3 to 3.4

Recently I had to upgrade the integration components on a lot of CentOS virtual systems running on a Hyper-V failover cluster. During the upgrade procedure I faced a couple of things, which I'd like you to be aware of. The version on the guest VM is CentOS 6.3, the Hyper-V failover cluster is running under Windows Server 2008 R2 SP1 and consists of 6 nodes.

Below is the output of LVM related commands before starting the upgrade of Linux IC:

[root@CentOS ~]# pvs
  PV         VG     Fmt  Attr PSize PFree
  /dev/sda2  system lvm2 a--  9.50g 4.25g
[root@CentOS ~]# vgs
  VG     #PV #LV #SN Attr   VSize VFree
  system   1   7   0 wz--n- 9.50g 4.25g
[root@CentOS ~]# lvs
  LV   VG     Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  home system -wi-ao-- 256.00m
  opt  system -wi-ao-- 256.00m
  root system -wi-ao--   1.00g
  swap system -wi-ao--   1.00g
  tmp  system -wi-ao-- 256.00m
  usr  system -wi-ao--   2.00g
  var  system -wi-ao-- 512.00m

First of all I removed the old kernel packages, because the installation scripts provided by Hyper-V Linux IC packages re-build the initrd for each kernel they found in the system. The removing of old kernels saves time.

[root@CentOS ~]# rpm -q kernel
kernel-2.6.32-279.2.1.el6.x86_64
kernel-2.6.32-279.5.1.el6.x86_64
kernel-2.6.32-279.5.2.el6.x86_64
kernel-2.6.32-279.9.1.el6.x86_64
kernel-2.6.32-279.11.1.el6.x86_64

I had to find out the version of the running kernel, because its package cannot be removed:
[root@CentOS ~]# uname -a
Linux CentOS 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 15:57:10 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Then removed the old kernel packages:
[root@CentOS ~]# yum remove kernel-2.6.32-279.2.1.el6.x86_64 kernel-2.6.32-279.5.1.el6.x86_64 kernel-2.6.32-279.5.2.el6.x86_64 kernel-2.6.32-279.9.1.el6.x86_64

At this point there was only one kernel package installed:
[root@CentOS ~]# rpm -q kernel
kernel-2.6.32-279.11.1.el6.x86_64

So let's upgrade the Linux Integration Components to the new version:
[root@CentOS ~]# mount -o loop /tmp/LinuxICv34.iso /mnt
[root@CentOS ~]# cd /mnt/RHEL63/
[root@CentOS RHEL63]# ./upgrade.sh
Upgrading the Linux Integration Services for Microsoft Hyper-V...
Preparing...                ########################################### [100%]
   1:kmod-microsoft-hyper-v ########################################### [ 50%]
   2:microsoft-hyper-v      ########################################### [100%]
Saving old initramfs
Installing new initramfs
 Linux Integration Services for Hyper-V has been Upgraded. Please reboot your system

After reboot:

[root@CentOS ~]# rpm -qa | grep hyper-v
microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64
kmod-microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64

But somehow the hdd driver found disks and partitions twice:
[root@CentOS ~]# pvs
  Found duplicate PV T6aUTmcAaWK29Sa3EQTZeztnNqYJu5Kv: using /dev/sdb2 not /dev/sda2
  PV         VG     Fmt  Attr PSize PFree
  /dev/sdb2  system lvm2 a--  9.50g 4.25g
[root@CentOS ~]# vgs
  Found duplicate PV T6aUTmcAaWK29Sa3EQTZeztnNqYJu5Kv: using /dev/sdb2 not /dev/sda2
  VG     #PV #LV #SN Attr   VSize VFree
  system   1   7   0 wz--n- 9.50g 4.25g
[root@CentOS ~]# lvs
  Found duplicate PV T6aUTmcAaWK29Sa3EQTZeztnNqYJu5Kv: using /dev/sdb2 not /dev/sda2
  LV   VG     Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  home system -wi-ao-- 256.00m
  opt  system -wi-ao-- 256.00m
  root system -wi-ao--   1.00g
  swap system -wi-ao--   1.00g
  tmp  system -wi-ao-- 256.00m
  usr  system -wi-ao--   2.00g
  var  system -wi-ao-- 512.00m

The CentOS VM ran without any obvious problems, but I wanted to get rid of the issue. The solution was to re-install the packages.

The first step is to remove Linux IC packages, because the script form the Linux IC installation ISO didn't permit the re-installation or the upgrade, when it found the installed packages:
[root@CentOS ~]# mount -o loop /tmp/LinuxICv34.iso /mnt                           
[root@CentOS ~]# cd /mnt/RHEL63/
[root@CentOS RHEL63]# ./install.sh
Installing the Linux Integration Services for Microsoft Hyper-V...
Preparing...                ########################################### [100%]
        package kmod-microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64 is already installed
Kmod RPM installation failed, Exiting.
[root@CentOS RHEL63]# ./upgrade.sh
Upgrading the Linux Integration Services for Microsoft Hyper-V...
Preparing...                ########################################### [100%]
        package kmod-microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64 is already installed
        package microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64 is already installed
Microsoft-Hyper-V rpm Upgradation failed, Exiting

[root@CentOS RHEL63]# yum -yq remove microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64 kmod-microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64

================================================================================
 Package                  Arch     Version                    Repository   Size
================================================================================
Removing:
 kmod-microsoft-hyper-v   x86_64   rhel63.3.4-1.20120727      installed   4.3 M
 microsoft-hyper-v        x86_64   rhel63.3.4-1.20120727      installed    16 k

Transaction Summary
================================================================================
Remove        2 Package(s)

Create and install initramfs without Hyper-V drivers
Linux Integration Services for Hyper-V has been removed.  Please reboot your system.

After the removing of packages I started the install procedure:
[root@CentOS RHEL63]# ./install.sh                                              
Installing the Linux Integration Services for Microsoft Hyper-V...
Preparing...                ########################################### [100%]
   1:kmod-microsoft-hyper-v ########################################### [100%]
Preparing...                ########################################### [100%]
   1:microsoft-hyper-v      ########################################### [100%]
Saving old initramfs
Installing new initramfs
 Linux Integration Services for Hyper-V has been installed. Please reboot your system.

and re-started the VM after that:
[root@CentOS RHEL63]# reboot

After the re-installation of the packages with a reboot the disks and partitions were detected the correct way: 
[root@CentOS ~]# pvs
  PV         VG     Fmt  Attr PSize PFree
  /dev/sda2  system lvm2 a--  9.50g 4.25g
[root@CentOS ~]# vgs
  VG     #PV #LV #SN Attr   VSize VFree
  system   1   7   0 wz--n- 9.50g 4.25g
[root@CentOS ~]# lvs
  LV   VG     Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  home system -wi-ao-- 256.00m
  opt  system -wi-ao-- 256.00m
  root system -wi-ao--   1.00g
  swap system -wi-ao--   1.00g
  tmp  system -wi-ao-- 256.00m
  usr  system -wi-ao--   2.00g
  var  system -wi-ao-- 512.00m
[root@CentOS ~]# rpm -q kernel
kernel-2.6.32-279.11.1.el6.x86_64
[root@CentOS ~]# rpm -qa | grep hyper-v                                           
kmod-microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64
microsoft-hyper-v-rhel63.3.4-1.20120727.x86_64

5 Kommentare :: Upgrade Microsoft Hyper-V Linux IC from 3.3 to 3.4

  1. Hermann, Thanks, I had the same problem.
    I have installed CentOS on Hyper-V 3 (Server 2012). I still have a message\status in Hyper-V on the networking tab. It saying 'Degraded (Integration service upgrade required'. Any ideas?

    Regards,
    Hans

  2. Have you already looked into the event viewer? If the networking works without any further problems, I would ignore the message.

  3. Thank you!

  4. Finally, a working solution ..
    Thanks

  5. Please test Ubuntu 13.10 with Linux Kernel 3.11 and Microsoft Hyper-V 2008 R2 SP1 and 2012 R2. Thx!

Post a Comment