Bug 37423 - Installation as Hyper-V generation 2 (UEFI) instance not possible
Installation as Hyper-V generation 2 (UEFI) instance not possible
Status: NEW
Product: UCS
Classification: Unclassified
Component: UCS Installer - DVD
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-02 10:53 CET by Janis Meybohm
Modified: 2021-07-13 14:49 CEST (History)
12 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.206
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review: Yes
Ticket number: 2016031821000204, 2019010821000294
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Meybohm univentionstaff 2015-01-02 10:53:26 CET
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.
Comment 1 Janis Meybohm univentionstaff 2015-01-02 14:08:48 CET
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
Comment 2 Stephan Luft univentionstaff 2016-03-18 09:49:06 CET
requested/mentioned by a partner: Ticket#2016031821000204
Comment 3 Stefan Gohmann univentionstaff 2019-01-03 07:20:49 CET
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.
Comment 4 Valentin Heidelberger univentionstaff 2019-01-03 14:08:37 CET
Had this issue with UCS 4.3 on a school customer's HyperV
Comment 5 Erik Damrose univentionstaff 2019-01-07 12:54:35 CET
Workaround is to use the HyperV Image provided on our download page on https://www.univention.com
Comment 6 Christian Völker univentionstaff 2019-01-08 09:43:44 CET
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".
Comment 8 Christian Völker univentionstaff 2019-01-09 14:27:59 CET
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/
Comment 9 Christian Völker univentionstaff 2019-04-01 16:53:29 CEST
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.
Comment 10 Erik Damrose univentionstaff 2019-04-02 09:26:57 CEST
NEEDMOREINFO: Which well-known workaround did the customer try, that do not work?
Comment 11 Christian Völker univentionstaff 2019-04-02 09:32:29 CEST
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
Comment 12 Christian Völker univentionstaff 2019-04-03 11:37:30 CEST
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.
Comment 13 Philipp Hahn univentionstaff 2019-04-03 12:13:23 CEST
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
Comment 14 Christian Völker univentionstaff 2019-06-17 11:49:36 CEST
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
Comment 15 Mathieu Simon 2019-07-04 17:31:29 CEST
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?
Comment 17 chesire47 2020-05-07 22:02:48 CEST
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.
Comment 18 Ingo Steuwer univentionstaff 2021-07-13 14:49:05 CEST
IMHO this should work with UCS 5.0, but I haven't seen a test report yet.