Centos 6.9 Hyper-V Generation-2 on Server 2016 VM boot issue

Issues related to applications and software problems
Post Reply
nkef
Posts: 2
Joined: 2018/02/12 07:41:36

Centos 6.9 Hyper-V Generation-2 on Server 2016 VM boot issue

Post by nkef » 2018/02/12 12:18:37

Hi all,
I am having an issue with Centos 6.9 with Hyper-V Generation-2 virtual machines on Windows Server 2016 that is related to block devices initialization.
A fresh install Centos 6.9 minimal x64 iso with latest updates and kernel 2.6.32-696.20.1.el6.x86_64 takes about 88 seconds to boot compared to a fresh install of Centos 8 minimal x64 iso that takes 7 seconds with 2.6.32-696 kernel series.

In order to get accurate time for printk messages I removed rhgb quit and added printk.time=1 to kernel line at grub.conf
As it can be seen from the attached kernel log, the kernel pauses:

For 20 seconds at:

Code: Select all

[    0.694904] sr 0:0:0:1: Attached scsi CD-ROM sr0
[   20.837103] dracut: Starting plymouth daemon
For 30 seconds at:

Code: Select all

[   20.865167] dracut: rd_NO_MD: removing MD RAID activation
[   51.092274] dracut: Scanning devices sda3  for LVM logical volumes VolGroup/lv_swap VolGroup/lv_root 
And finally for another 30 seconds at:

Code: Select all

[   53.465081] sr 0:0:0:1: Attached scsi generic sg1 type 5
[   84.576559] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: 
The behavior does not change by altering the VM configuration as long it is a generation-2 Hyper-V with 2.6.32-696 kernel series.
The Centos 6.8 kernel minimal iso kernel kernel 2.6.32-642.el6.x86_64 kernel boots without any issue.
Centos 2.6.32-696 kernel series does not have that issue withand Hyper-V Generation-1 vms.

The Hyper-V Generation-2 VM is configured with 8192 MB of ram, 4 Virtual processors, one scsi contoller with a dynamic expanding 127 Gib virtual disk at position 0 and one cdrom at position 1.

I am attaching dmesg, messages and hyper vm configuration.
Attachments
hyper-vm-conf.txt.gz
(1.53 KiB) Downloaded 139 times
messages.log.gz
(10.33 KiB) Downloaded 137 times
dmesg.log.gz
(10.44 KiB) Downloaded 146 times

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Centos 6.9 Hyper-V Generation-2 on Server 2016 VM boot issue

Post by TrevorH » 2018/02/12 12:24:19

The behavior does not change by altering the VM configuration as long it is a generation-2 Hyper-V with 2.6.32-696 kernel series.
Even if you remove the CD drive from the VM? All your waits seem to be something to do with it... perhaps just insert some media in it and see if that helps.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

nkef
Posts: 2
Joined: 2018/02/12 07:41:36

Re: Centos 6.9 Hyper-V Generation-2 on Server 2016 VM boot issue

Post by nkef » 2018/02/12 18:42:09

TrevorH wrote:
The behavior does not change by altering the VM configuration as long it is a generation-2 Hyper-V with 2.6.32-696 kernel series.
Even if you remove the CD drive from the VM? All your waits seem to be something to do with it... perhaps just insert some media in it and see if that helps.
Thank you TrevorH,
I removed the virtual scsi cdrom drive and all the pauses are gone. Now Centos 6.9 booted at 8 seconds.
I checked the Centos 6.8 kernel logs more thoroughly and there are a couple of the following messages:

Code: Select all

storvsc: Sense Key : Not Ready [current]
storvsc: Add. Sense: Medium not present - tray closed
storvsc: Sense Key : Not Ready [current]
storvsc: Add. Sense: Medium not present - tray closed
storvsc: Sense Key : Not Ready [current]
and they not appear in Centos 6.9 kernel log.
For some reason the Centos 6.9 kernel cannot determine that the virtual scsi cdrom drive has no medium.

Post Reply