VM Console

Status
Not open for further replies.
Joined
Apr 23, 2017
Messages
6
Hi everyone. Quick newb question. I'm running 11-MASTER-201704230409. How do I console into a VM that was created in the GUI? I don't see a Console button in the GUI so I assume that isn't built in yet, but how about in the CLI? I can SSH into my FreeNAS, I just don't know what to do from there. Any help is much appreciated!
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
You'll need to have VNC on your computer. When the VM is running, you'll see a VNC address to connect to. Connect to that and you'll be attached to your VM console.
 
Joined
Apr 23, 2017
Messages
6
Thank you for your reply! Where would I see the VNC address? When I look at my VM list in the GUI, it gives a VNC port but no address.
 

Attachments

  • 20170423_112731.png
    20170423_112731.png
    210 KB · Views: 853

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Check your router to see if it's listed in your DHCP leases.
 
Joined
Apr 23, 2017
Messages
6
It doesn't look like it's getting an IP from DHCP. It's most likely sitting at the Ubuntu installer since the ISO is mounted and the virtual disk is empty. That's why I was hoping I could console to it somehow.
 
Joined
Apr 23, 2017
Messages
6
I tried VNC'ing to <IP of FreeNAS>:5901 (In my case, 192.168.10.200:5901) and it says "The connection was refused".
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
It doesn't look like it's getting an IP from DHCP. It's most likely sitting at the Ubuntu installer since the ISO is mounted and the virtual disk is empty. That's why I was hoping I could console to it somehow.

Are you sure the Ubuntu installer ISO works with UEFI? You can create a VM and choose the UEFI loader but it's not going to work unless the ISO supports UEFI. There appears to be no sanity check in FreeNAS at the moment.

Even if the ISO does support UEFI you can find yourself dumped into the EFI shell after making a VNC connection once the Tianocore splash screen flashes past ...

I can't find out what is supposed to happen if you pick UEFI-CSM as the bootloader.

Perhaps the Ubuntu Installer needs to be used with the grub-byve bootloader.
 
Last edited:
Joined
Apr 23, 2017
Messages
6
I did VNC from a different machine, but thank you for the suggestion. I assume the Ubuntu ISO supports UEFI, but even if it doesn't, I still need to find a way to either VNC or console into the VM (preferable console).
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
My use of VMs in the nightlies has proved to be hit and miss. E.G A debian install would only complete if I used virtio for the virtual disk mode. On first post-install reboot I was dumped into the EFI shell and had to find the "grub64.efi" file to boot the new install manually.

You can see that debian was installed with the correct EFI partition, but where does the byhve bootrom expect to find the EFI grub file?

Code:
root@debian-vm:/# fdisk -l

Disk /dev/vda: 10 GiB, 10737418240 bytes, 20971520 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 16384 bytes 
I/O size (minimum/optimal): 16384 bytes / 16384 bytes 
Disklabel type: gpt 
Disk identifier: B0934893-8896-47A2-B241-A871EE064C86 

Device  Start  End  Sectors  Size Type 
/dev/vda1  2048  1050623  1048576  512M EFI System 
/dev/vda2  1050624 18876415 17825792  8.5G Linux filesystem 
/dev/vda3  18876416 20969471  2093056 1022M Linux swap   


So you cannot ditch the VNC connection and simply ssh into the VM. THe GUI might show the VM is running but there is no distinction between this and a "booting" state in the VM. Be prepared to kill byhve processes and destroy failed VMs using byhvectl at the FreeNAS cli when testing.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Created an Ubuntu VM installing from http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso and using virtIO from both NIC and disk. Stopped VM, removed virtual CDROM and turned off wait in VNC.

On first boot was dropped to EFI shell so had to exit and use byvhe EFI menu screens to get to the grub64.efi file on the virtual disk via boot maitenance manager and the boot from file option.

It took several attemps to get the VM to boot properly from the virtual disk.
 

Attachments

  • ubuntu-vm.jpeg
    ubuntu-vm.jpeg
    34.5 KB · Views: 704
Last edited:

AnimeAi

Dabbler
Joined
Jan 21, 2017
Messages
10
Created an Ubuntu VM installing from http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso and using virtIO from both NIC and disk. Stopped VM, removed virtual CDROM and turned off wait in VNC.

On first boot was dropped to EFI shell so had to exit and use byvhe EFI menu screens to get to the grub64.efi file on the virtual disk via boot maitenance manager and the boot from file option.

It took several attemps to get the VM to boot properly from the virtual disk.
Could you explain how you did this? I can install Ubuntu (16.10) Server, but get as far as the EFI shell, exit that and boot to the grub prompt using boot from file. From here I'm lost though, I have no idea what to do through grub.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
If I've understood your question correctly, then if you have reached the grub menu of your ubuntu VM there is nothing to do, it should just boot after a few seconds delay.
 

AnimeAi

Dabbler
Joined
Jan 21, 2017
Messages
10
If I've understood your question correctly, then if you have reached the grub menu of your ubuntu VM there is nothing to do, it should just boot after a few seconds delay.
It didn't as it wasn't the grub menu sadly - it was a grub command prompt normally used for repairing broken systems. Funnily enough, I tried a CentOS install after and it works perfectly - no need to mess with the EFI shell or BIOS.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
It didn't as it wasn't the grub menu sadly - it was a grub command prompt normally used for repairing broken systems. Funnily enough, I tried a CentOS install after and it works perfectly - no need to mess with the EFI shell or BIOS.

That's purely because CentOS creates the default UEFI file /EFI/BOOT/bootx64.efi, as does FreeBSD. See the "BOOT PROCESS" here: https://wiki.freebsd.org/UEFI
 
Status
Not open for further replies.
Top