This is a guide from a user of the VM that wanted to use it with 2 generation Hyper-V.
NOTE: The Hyper-V VM is now generation 2 by default, so this guide is not needed.
Download latest Ubuntu Desktop .iso:
What is the Goal?
Creating an efi Partition in “*Nextcloud_VM_www.hanssonit.se-disk1.vhdx” and use boot-repair to set it up as boot partition
Prepare the Virtual Machine:
New Virtual Machine, following the documentation and different settings for:
- Of course, Generation 2 VM
- RAM: i recommend 4GB for this workaround
Virtual Machine Settings:
- Security: Enable Secure Boot and choose “Microsoft UEFI Certificate Authority”
- Processor: I recommend 4 Virtual processors
- Add *Nextcloud_VM_www.hanssonit.se-disk2 following install instructions
- SCSI-Controller: Create a new DVD-Drive and choose the ubuntu desktop .iso file as Imagefile
- Firmware: make sure “DVD-Drive” is the first boot device by put it at first order
Expand *disk1.vhdx (Space needed for efi Partition):
- SCSI-Controller: select …disk1.vhdx and click “Edit” Button
- skip first dialog and Choose Action “Expand”
- set New size to “41 GB” and click finish
Create efi partition and make it bootable using boot-repair and Ubuntu Desktop:
Start the VM. “Try Ubuntu” is selected and this should bring you to the Ubuntu Desktop
- Open a new Terminal and type gparted then press Enter
- In Gparted choose disk1 in the top right drop-down menu (with 41 GiB) and right click on the “unallocated”
space and choose “New”
- Only change “File system” to fat32 and click Add
- Apply All Operations (green hook)
- Right click on new created fat32 partition and “Manage Flags” select boot and Close
- Cnnect to the Internet
- Open a new Terminal, then type the following commands (press Enter after each line):
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
- After the last command boot-repair should start.
- Click “No” on the first dialog
- Click “Recommended repair”
- Follow the instructions
- A window starting with “Boot successfully repaired”
is telling you all went fine and you can shutdown the vm
- Remove DVD-Drive under SCSI-Controller
- Now the VM is ready to Start!