VM's in FreeNAS 11

Status
Not open for further replies.

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
So far I've tried to setup a few vm's in the latest master FreeNAS-11-MASTER-201704220432 (9a8e790) without any success. Ubuntu won't start something about EFI disk, debian...well I don't know because I can't reconnect via vnc after installation.
Are there any guides etc on how to setup a vm in FreeNAS 11?

P.S I have setup many vm's on virtual box and vmware previously but not in FreeNAS.

Sent from my SM-G930F using Tapatalk
 

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
Thanks, also if I manage to get it working I'll post results.

Sent from my SM-G930F using Tapatalk
 

jkmuk

Dabbler
Joined
Mar 11, 2015
Messages
24
As they say, seek and you shall find. I was looking to ask the same question, but did a search and found someone has already asked the same. Awaiting some documentation on VM setup. Will FreeNAS 11 (when it releases) officially support VMs ?
 
Last edited by a moderator:

TinkerGuy

Cadet
Joined
Aug 11, 2016
Messages
7
Yep. I'm also putzing around, searching the forum, etc... I keep getting this error when I boot up my VM (Ubuntu 16.04/64 bit did install successfully):

http://i.imgur.com/EmmEy5L.png

I'll keep searching the forum and update here if I find a link with a solution. I've tried UEFI install, non UEFI ubuntu install - no dice.

EDIT: FOUND SOLUTION! (I'm not using LVM)

1. rebooted with the ubuntu 16.04 ISO
2. select rescue mode
3. go through process to reinstall EFI on buggy systems, or whatever it's called.

Now if I could just figure out why the VM won't reboot without manually stop/start the VM in the FreeNAS 11 GUI (Using latest nightly)
 
Last edited:

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
Trying this now. Just going through the install of Ubuntu 17.04.
@TinkerGuy
How did you deal with this? Pressing enter wont reboot. It does nothing.
Untitled.jpg
 
Last edited:

TinkerGuy

Cadet
Joined
Aug 11, 2016
Messages
7
Trying this now. Just going through the install of Ubuntu 17.04.
@TinkerGuy
How did you deal with this? Pressing enter wont reboot. It does nothing.
View attachment 18026

Hey! I didn't try with 17.04. I used a server installer ISO of 16.04. I'll try 17.04 at work when I get in and see how far I get with today's FreeNAS 11 nightly as a base.

EDIT: There is no unmount/disconnect cdrom drive feature which kinda threw me off. Did you try stopping the instance, delete the cdrom device from the FreeNAS gui then start the VM? I looked at your image and it looks like that is all you really ned to do IF it installed right & EFI installed right too.
 
Last edited:

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@TinkerGuy Just an FYI: That's the EFI shell, which is the default boot option should a boot option not be specified or should all other boot options fail to boot into an OS. More likely than not, the EFI boot folder on the FAT32 partition was off by one level, which occurs in some VMs.
  • You can verify this by entering the Ubuntu repair shell and listing the directories in the EFI mount on a new VM.
  • You can also find the instructions on how to do this via google, as it's a fairly common problem.
 

SavageAUS

Patron
Joined
Jul 9, 2016
Messages
418
Hey! I didn't try with 17.04. I used a server installer ISO of 16.04. I'll try 17.04 at work when I get in and see how far I get with today's FreeNAS 11 nightly as a base.

EDIT: There is no unmount/disconnect cdrom drive feature which kinda threw me off. Did you try stopping the instance, delete the cdrom device from the FreeNAS gui then start the VM? I looked at your image and it looks like that is all you really ned to do IF it installed right & EFI installed right too.
Yeah I tried stopping the vm but it wouldn't stop unless i used the ctrl alt del option in vnc a few times. Even after repairing grub (apt-get install boot-repair) I still couldn't get it to boot. I've also tried 16.04.x as well.

Will have to do some googling on vm efi repair or something as @zoomzoom suggested.

Sent from my SM-G930F using Tapatalk
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Yeah I tried stopping the vm but it wouldn't stop unless i used the ctrl alt del option in vnc a few times. Even after repairing grub (apt-get install boot-repair) I still couldn't get it to boot. I've also tried 16.04.x as well.

Will have to do some googling on vm efi repair or something as @zoomzoom suggested.
It's a simple fix (grub is not the problem)... IIRC, the issue is there's an extra level in the EFI directory that shouldn't be there for Ubuntu, so the .efi file need to be moved. It should only take a few minutes of googling to find the instructions on what to do as it is a common problem that goes back years.
 

TinkerGuy

Cadet
Joined
Aug 11, 2016
Messages
7
@TinkerGuy Just an FYI: That's the EFI shell, which is the default boot option should a boot option not be specified or should all other boot options fail to boot into an OS. More likely than not, the EFI boot folder on the FAT32 partition was off by one level, which occurs in some VMs.
  • You can verify this by entering the Ubuntu repair shell and listing the directories in the EFI mount on a new VM.
  • You can also find the instructions on how to do this via google, as it's a fairly common problem.

I understand it isn't a problem with bhyve. In my case it is the OS installer. In the past day or two I've begun to understand this and can resolve it with the rescue mode built into most linux installers, not just Ubuntu.

I've yet to figure out why my linux VM's (ubuntu/centos) hang when I reboot from the guest's shell. The guest receives the shutdown signal and reaches halt, disconnects VNC but doesn't actually send a stopped signal to FreeNAS. I'm googling how to debug this.

I've years of VMWare esxi infrastructure support and bhyve has me scratching my head. pathetic (me, not bhyve)
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
I understand it isn't a problem with bhyve. In my case it is the OS installer. In the past day or two I've begun to understand this and can resolve it with the rescue mode built into most linux installers, not just Ubuntu.
The rescue mode performs the operations I've described above...
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
A few ways of fixing EFI boot issues due to grubx64.efi missing from \EFI\ubuntu\ or \EFI\boot\
  1. From EFI shell:
    1. Issue: edit startup.nsh
    2. Add Line: FS0:\EFI\Path\To\grubx64.efi
      • Such as: \EFI\ubuntu\grubx64.efi
    3. Save:
      1. CTRL + O
      2. ALT + D
      3. ENTER
      4. CTRL + X
    4. Reboot: exit

  2. From LiveBoot:
    1. Copy grubx64.efi to \EFI\ubuntu\ or \EFI\boot\ depending on distro used.
 
Last edited:

TinkerGuy

Cadet
Joined
Aug 11, 2016
Messages
7
The rescue mode performs the operations I've described above...

1.
Code:
poweroff
wil show stopped status in the GUI.
2.
Code:
reboot
shows RUNNING status in gui but bhyvectl shows "VM:ubuntu is not created"

I'm aware of what rescue mode's operations are. Starting the VM works every time. Rebooting does not work.

With all due respect, I don't think this is UEFI related. I may be wrong, but I just don't think that is where I should look anymore.
 
Last edited:

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@TinkerGuy Look at my reply... I was replying to the portion of your post regarding grubx64.efi not being in the correct directory.
 

TinkerGuy

Cadet
Joined
Aug 11, 2016
Messages
7
@TinkerGuy Look at my reply... I was replying to the portion of your post regarding grubx64.efi not being in the correct directory.
I already did this and followed some steps recommended from the ubuntu forums. The files are in the right place. Ubuntu does boot. It doesn't 'sudo reboot'. That is my only problem left.

EDIT: For a moment I'm going to try installing pfsense 2.4 which also has UEFI install for a sanity check and see if reboot works.
EDIT2: pfsense also can shutdown. can boot from poweroff state. cannot reboot. same error - FreeNAS gui shows running while bhyvectl says VM p fsense not created.

Need coffee. BRB

EDIT3: Issued bug report https://bugs.freenas.org/issues/23591 feels like the right thing here. Thanks @zoomzoom et all for the help.
EDIT4: Windows 10 is doing the same thing for me - no reboot. Boots from STOPPED state.

Please continue to add tips if you have any. I'll reference this thread in the bug report.
 
Last edited:

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@TinkerGuy Just to confirm, sudo reboot did not work from the EFI [firmware] shell? If not, I'll need to do some more research online to find the proper command then.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
You have sudo in an EFI shell?
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
You have sudo in an EFI shell?
not sure, as I've never had to go into the EFI shell on my MB. There was a thread on stack exchange I pulled those commands from, and while I though it was a bit odd since it's it's based on DOS, I didn't have a way to check.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Status
Not open for further replies.
Top