[HOWTO] How-to Boot Linux VMs using UEFI

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
Could I ask you how you booted to gparted? Did you use a gparted-live iso & added it as a cdrom to your vm?
When I start the vm like this I cannot connect to it using vnc.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Could I ask you how you booted to gparted? Did you use a gparted-live iso & added it as a cdrom to your vm?
When I start the vm like this I cannot connect to it using vnc.

Yes, and don't forgot you need a VNC device too.
 

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
Last edited:

Andy C

Explorer
Joined
Feb 18, 2015
Messages
67
It would be extremely helpfull to have someone explain how I setup up a centos7 vm from scratch in FN11 (using latest nightlies)

You're in luck. CentOS doesn't need all this UEFI hacking. It just works.

1. Create a zvol for storage. I use 20GB for a minimal setup.
2. Create a CentOS VM with 1CPU/1024GB. Use the default Boot method UEFI.
3. Associate the newly created storage zvol with that VM ('Add Device').
4. Download and add the CentOS ISO as a CD-ROM device to the VM.
5. Start the VM. Use a VNC client to run the installer. [ The IP is of the FreeNAS server and the port is listed in VM's. ]
6. Remove the ISO device when installation is complete.
7. Reboot. Should now be able to access the VM using VNC or ssh (check you enable ssh during the install).

HTH
--
Andy
 

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
Step 5 immediately drops to grub-shell. I'm not seeing an installer.
The centos7-iso has a grub loader only.

But no worries. I made progress using iohyve. I've got a running centos7 there.
I found the missing lines in https://github.com/pr1ntf/iohyve/wiki/Installing-CentOS-7-on-FreeNAS.
There's a step missing. you first need to set
Code:
iohyve set ipa-slave ram=1G cpu=1 os=centos7 loader=grub-bhyve

then launch it, let it load and forcekill it.
both devices.map & grub.cfg are then generated in /iohyve/ipa-slave
Then set it to
Code:
os=custom
and continue the procedure.


But maybe I need to generate a proper iso first
https://gist.github.com/vkanevska/fd624f708cde7d7c172a576b10bc6966
 
Last edited:

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
I am. k. lemme create a new one.
...
same deal.

edit: SOLVED
The minimal cd I had didn't do it in the VM gui, although I was able to install from it using iohyve !!!
I've succesfully installed the minimal centos7 as a VM from the everything-dvd.
 

Attachments

  • upload_2017-5-18_16-42-53.png
    upload_2017-5-18_16-42-53.png
    23.1 KB · Views: 785
Last edited:

Stephen304

Dabbler
Joined
Oct 25, 2015
Messages
16
Is there an issue filed somewhere for this? I've been creating a lot of Ubuntu vms and it would be ideal for things to just work out of the box.
 

Teeps

Dabbler
Joined
Sep 13, 2015
Messages
37
With the centos everything dvd iso you can also install Gnome desktop as an option for centos and immediately jump into installing some basic apps like crashplan. The auto-partitioning gave 1GB to /boot which seems a bit excessive but otherwise incredibly easy compared to battling Ubuntu on this one. I used VirtIO for the disk as well.

oh and rebooting after the installer finishes actually reboots the VM properly instead of just hanging.
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
quick question, when you create a VM using iohyve does it show up for you in the VM tab? For me it doesnt, is there a way to make it tho ?
 

microbug

Dabbler
Joined
Dec 14, 2016
Messages
44
quick question, when you create a VM using iohyve does it show up for you in the VM tab? For me it doesnt, is there a way to make it tho ?
It doesn't show up in the VMs tab because it wasn't created through the GUI. You can't make it show up (unless you edit the config database or something).
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
It doesn't show up in the VMs tab because it wasn't created through the GUI. You can't make it show up (unless you edit the config database or something).

I am aware that i have not created the vm with a gui, however the VM GUi is just a front end for bhyve, so i'd would have thought it might be possible to see it there at some point.
A good example is portainer, if i add a docker container via shell, portainer still shows it to me.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I am aware that i have not created the vm with a gui, however the VM GUi is just a front end for bhyve, so i'd would have thought it might be possible to see it there at some point.
A good example is portainer, if i add a docker container via shell, portainer still shows it to me.
I said don't use the cli for anything! It will not work correctly and break things.

Anything you do on the cli is unsupported and will not work in the ui.

Sent from my Nexus 5X using Tapatalk
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
I said don't use the cli for anything! It will not work correctly and break things.

Anything you do on the cli is unsupported and will not work in the ui.

Sent from my Nexus 5X using Tapatalk

I am aware of that as well, if there would be a tutorial available that shows how to create a vm in the gui, I'd follow that.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I am aware of that as well, if there would be a tutorial available that shows how to create a vm in the gui, I'd follow that.
You don't need a tutorial. You click the create vm button. There are also post on the forums for troubleshooting.

Sent from my Nexus 5X using Tapatalk
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
You don't need a tutorial. You click the create vm button. There are also post on the forums for troubleshooting.
Clicking trough the gui buttons never worked for me tho.
 

Cypress

Dabbler
Joined
Jan 23, 2017
Messages
11
Thanks a lot, I have been studying this issue for a while. Will try if it solve mine soon.
 

lukyjay

Contributor
Joined
May 13, 2016
Messages
134
Is there a bug report for this?

Other server platforms don't require you do this, I'm sure this isn't the intended design.

Just wondering because it hasn't been fixed in the last few rcs?
 

craigdt

Explorer
Joined
Mar 10, 2014
Messages
74
Is there a bug report for this?

Other server platforms don't require you do this, I'm sure this isn't the intended design.

Just wondering because it hasn't been fixed in the last few rcs?


When I was researching this on the net, I discovered a thread where they were talking about this problem, last statement was that they were putting a fix in to get the bhyve uefi shell settings to be remembered:

https://lists.freebsd.org/pipermail/freebsd-virtualization/2016-September/004808.html

There is a fix in progress for this to write out the UEFI nvvars to
file so they can be preserved across a bhyve VM power cycle.

However I never did find this documented anywhere else.

This would be a good solution to the problem, sorta like when you go into the bios of a PC and you save the settings, at least that we could customize the uefi settings per VM machine if they ever do implement such a fix.

Copying the bootx64.efi file into the correct place I wouldn't call a permanent fix, until Ubuntu or other distros start doing it automatically during install, then the issue of the original file being updated but the copied version doesn't get updated still could be a potential problem.

I would be curious to know how the other hyper-visors handle this situation as well? are they like template based or do they code enough smarts in them to search out the correct efi file ?
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
Is there a way to install rancherOS via the VM tab?
 
Top