Univention Bugzilla – Bug 37423
Installation as Hyper-V generation 2 (UEFI) instance not possible
Last modified: 2021-07-13 14:49:05 CEST
http://forum.univention.de/viewtopic.php?f=48&t=3676 It is not possible to install UCS 4 as a Hyper-V generation 2 (UEFI) guest. generation 1 (BIOS) installation works fine. Debian 7 does not work: <http://technet.microsoft.com/en-us/library/dn614985.aspx> Red Hat/CentOS (>=7.0), SLES (>=12), Ubuntu (>=10.04) work: <http://technet.microsoft.com/en-us/library/dn531026.aspx> <http://technet.microsoft.com/en-us/library/dn531027.aspx> <http://technet.microsoft.com/en-us/library/dn531029.aspx> In my opinion this is only a minor issue as microsoft states (<http://technet.microsoft.com/en-us/library/dn282285.aspx>): Q: Is there a performance gain to generation 2 virtual machines? A: In the daily running of a virtual machine, there is no performance difference between generation 1 and generation 2 virtual machines. You might see a slight improvement in virtual machine boot and installation times with generation 2 virtual machines.
Debian testing (new GRUB) works too. Raising to "normal" as converting from gen1 to gen2 is not officially supported by MS. http://blogs.technet.com/b/jhoward/archive/2013/11/14/hyper-v-generation-2-virtual-machines-part-10.aspx
requested/mentioned by a partner: Ticket#2016031821000204
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Had this issue with UCS 4.3 on a school customer's HyperV
Workaround is to use the HyperV Image provided on our download page on https://www.univention.com
Even though the workaround seems to work an installation must be possible as especially for enterprise customers pre-build images are often a "no-go".
Even the downloaded image does not boot - see attached screenshot (private). The following link might help to install UCS on Hype-V Gen2 VMs. https://www.thomasmaurer.ch/2018/06/how-to-install-ubuntu-in-a-hyper-v-generation-2-virtual-machine/
Getting urgent for customer. Workaround not available. System does not boot neither pre-configured image (not for Gen2) nor installation works. Well-known workarounds do not work.
NEEDMOREINFO: Which well-known workaround did the customer try, that do not work?
Ie. the one mentioned in comment #8 Further links already tested and failed: https://docs.microsoft.com/de-de/windows-server/virtualization/hyper-v/Best-Practices-for-running-Linux-on-Hyper-V
I am unsure but it looks like we have an issue with UEFI boot, correct? Couple of forum threads mention the same. See https://help.univention.com/t/installation-not-possible-minimale-bash-like-line/11504/12 AS UEFI is getting more and more important I guess we should check what is wrong with our installer or kernel.
I know of issues with our ISO on USB sticks, maybe HyperV has the same issue: - Bug #47248: UEFI installation fails on Intel NUC - Bug #47330: Booting via UEFI from USB was not possible - Bug #44714: Install UCS ISO from boot USB stick
Issue was reported in Forum as customers download the image and expect to be able to install in the (now default) Gen2 VM. But are failing with the GRUB prompt. Possibly we should put a warning to the download page? See thread: https://help.univention.com/t/ucs-4-4-0-iso-booting-to-grub-prompt-on-hyper-v/12340
I can't really help with debugging but I can share what I could quickly see when comparing Hyper-V Gen2 VM (Server 2012 R2) and VirtualBox, both in UEFI mode. A a thing specific to Server < 2016 Hyper-V hosts: Only with Server 2016 third-party UEFI Secure Boot signatures can be enabled i.e. through PowerShell: 'Set-VMFirmware "VM Name" -SecureBootTemplate MicrosoftUEFICertificateAuthority' by default and before Server 2016 only Windows guests can be booted with Secure Boot enabled. The guest boots and loads data from the CD. Before going to the grub shell, the only outputs are: Booting in insecure mode Loading step 1 On VirtualBox it goes continues with step 2 etc. the boots. The output of 'ls' in the grub shell is interesting when comparing it against Debian 10/buster netinstall ISO (9/stretch works as well) - both on Hyper-V 2012 R2: - UCS 4.4-0: (proc) - buster: (proc) (hd0) (hd1) (hd1,apple) (hd2,apple) (hd1,msdos) While booting UCS 4.4-0 ISO in a Virtualbox VM set to UEFI works, when the ISO is attached to a IDE CD-ROM (it doesn't when on SATA), 'ls' shows more disks like Debian buster on Hyper-V. I think one thing to point out is that Gen2 VMs only support SCSI controllers, while Gen1 also supported IDE. This means that both hard disks and optical drives are attached to the SCSI controller of Hyper-V. Maybe UCS ISO are doing something different at boot compared to plain Debian that causes issues with the SCSI CD-ROM? It should be noted that buster should come with working UEFI Secure Boot as they have been able to get a Microsoft-signed shim loader into this release, maybe you can look at upstream and take the good things?
Hi! I successfully installed UCS 4.4-4 in Hyper-V Gen2 VM. My WorkAround: 1. We need VM GEN2 configured like this: * cd-roms1 - super_grub2_disk_hybrid_2.04s1.iso * cd-roms2 - UCS-Installation-amd64.iso * Secureboot turned off * other setting as you wish 2. Boot from cd-roms1 - super_grub2_disk_hybrid_2.04s1.iso * Choose "Boot manually" menu entry * Choose "grub.cfg - Extract entries" menu entry * Highlight "Start with default settings" menu entry * Press "e" to edit * Change "linuxefi" to "linux" "initrdefi" to "initrd" * Press Ctrl+X or F10 to boot 3. After "Select a language" page appeared, eject cd-roms1 - super_grub2_disk_hybrid_2.04s1.iso 4. Install UCS * restart after installation * login into system * shutdown the VM 5. Turn on Secureboot with "Microsoft UEFI Certificate Authority" option 6. Start the UCS Gen2 VM! Q: Why it works? A: I dont know! If someone will exlplain it will be very usefull.
IMHO this should work with UCS 5.0, but I haven't seen a test report yet.