Trouble Creating Ubuntu VM on FreeNAS 11

Status
Not open for further replies.

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Hi,

I'm looking to create a Ubuntu VM on FreeNAS. I'm creating VMs with the included byhyve software.

Problem is, every time I start my VM, It would refuse to work. It would just shutdown.

Any Ideas why this might be?

Thanks in advance,
Michael L.
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Your problem description is rather vague. Are you using FreeNAS 11 Nightly, or FreeNAS11 RC? Are you attempting to create a Ubuntu VM from the CLI , or by using the webUI. Which Ubuntu ISO are you using? What phase of the VM creation have your reached, installation or beyond this?
 
D

dlavigne

Guest
And to add to Krisbee's points:

Yes, the virtualbox template was removed some time ago. Have you read the VM section in the 11 Guide yet?

Anything in /var/log/messages when you try to start the VM?
 

maydo

Contributor
Joined
Jan 9, 2017
Messages
159
ubuntu server 17.04. running fine on my end.
created per iohyve
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Thanks for your responses,

I am using FN11 release candidate, I'm creating the VM from the GUI, I'm using Ubuntu 16.04.2 LTS Server edition.
I am having trouble starting the VM just after creation.

I looked in var/log/messages and nothing interesting popped up. - or at least nothing related to the VMs... I believe.
I got a bunch of similar messages like
69db46d49c.png

Sorry I couldn't put in code, I had a hard time copying from nano text editor.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Sorry for the late reply, I was away from home for a while.

I have not yet reached the stage of being able to install anything to the VM. I have used the FreeNAS GUI to create a VM and attach the devices, but I haven't been able to connect. Much less install any OS.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Sorry for the late reply, I was away from home for a while.

I have not yet reached the stage of being able to install anything to the VM. I have used the FreeNAS GUI to create a VM and attach the devices, but I haven't been able to connect. Much less install any OS.
Download TightVNC, or any VNC client software of your choice (TightVNC is usually the 1st or 2nd rated VNC client by tech sites), then connect to the VM via the IP of your FreeNAS server and the port listed in the VM tab (for example: 192.168.1.100:4902).

Once that's done, you'll need to create a device (highlight VM -> Devices -> Add Device) for the media you want it to boot from (CD-ROM, then select install ISO). Once Ubuntu is installed, you'll need to edit the *.efi boot file hierarchy on the FAT32 partition (see thread linked to above by @KrisBee)
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Is the VM showing a VNC port in the VM list in the gui, or is it blank? Are you using the VM tab in the GUI?

There is a bug in 11-RC where if you change the VNC device, it will set the port to be blank, and then the VM won't start, like you describe. Setting it to "0" will resolve.

https://bugs.freenas.org/issues/23974
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Never saw the bug as I've always set the VNC port number to a specific value in the default tcp port 5900+N range. The validation of input fields in 11-RC appears to be work in progress.
 

Nicholas M

Dabbler
Joined
Jan 11, 2016
Messages
19
Ensure your vm's local disk Zvol is not under a dataset. Try creating a zvol at the top level of the pool. I had the very same issue where the machine starts and immediately stops with no errors.

Edit: I can actually see an error in the console, but I'm not sure if it occurred on zvol creation or VM boot-

"ZFS Warning: Unable to create ZVOL RAID-Z2-5x2TB/VirtualMachines/ubuntu-2 (error=22)"

The 'ubuntu-2' vol does appear in the ui, both in the storage tab, and in the vm tab (when adding a disk to a vm).
 
Last edited:

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Download TightVNC, or any VNC client software of your choice
Thats the issue, I cannot connect to VNC at all. It gives me the errors connection refused or connection timed out.

Is the VM showing a VNC port in the VM list in the GUI, or is it blank? Are you using the VM tab in the GUI?
Hmm, I am getting the VNC Port but the status of the machine on GUI just says "STOPPED".

Ensure your VM's local disk Zvol is not under a dataset. Try creating a zvol at the top level of the pool. I had the very same issue where the machine starts and immediately stops with no errors.

Edit: I can actually see an error in the console, but I'm not sure if it occurred on zvol creation or VM boot-

"ZFS Warning: Unable to create ZVOL RAID-Z2-5x2TB/VirtualMachines/ubuntu-2 (error=22)"

The 'ubuntu-2' vol does appear in the UI, both in the storage tab and in the VM tab (when adding a disk to a VM).
I double Checked and my zvol device is in root of one of my ZPools.

As for that error, I can't find that error that you referenced to. It's not in the picture I posted. In any case, the pool I'm using consists of a vdev [Mirror] of two SSDs (2x120GB) So I'm not sure why it says "Unable to create ZVOL RAID-Z2-5x2TB/VirtualMachines/ubuntu-2 (error=22)"

I do not have a 5 x 2TB disk vdev.
What settings have you given the VM?

hmm, I've created the VM with default settings, they are as follows:
NIC: Intel e82545 (e1000)
VNC: Port 5092 - the auto port I was given
Disk: zvol: /VXi/VMUbuntu - Type: AHCI
CDROM: UBUNTU ISO Server 16.04.2
 

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Update: I have deleted the old VM and created a new one. This VM appears to start - or at least GUI indicates that it is running. But still unable to connect.
VNC Error is given: Connection unexpectedly closed
 

Brer

Explorer
Joined
Mar 2, 2017
Messages
63
Update: I have deleted the old VM and created a new one. This VM appears to start - or at least GUI indicates that it is running. But still unable to connect.
VNC Error is given: Connection unexpectedly closed

How much memory did you assign? It is in MiB not GiB so you have to assign 2000 for 2Gb. I got the same error as you when I set 2 for memory allocation thinking it was Gb.
 

mike360x1

Contributor
Joined
Dec 25, 2012
Messages
107
Shoot! You're right, my mistake entirely.

It's working now!!! Thanks so much XD Sorry for making such a silly mistake.
 

Brer

Explorer
Joined
Mar 2, 2017
Messages
63
Shoot! You're right, my mistake entirely.

It's working now!!! Thanks so much XD Sorry for making such a silly mistake.

The DEV team should change it, I mean when was the last time you walked into PC World and asked for a 1,000,000 Mb hard drive? :)o_O

Glad you got it sorted my friend :)
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
The DEV team should change it, I mean when was the last time you walked into PC World and asked for a 1,000,000 Mb hard drive
It would do more harm than good since a VM can utilize as little as a few MBytes in RAM depending on what it's being used for... Everyone has interacted with devices that utilize VMs with only a few MBytes of RAM, as java VMs are a critical part of Android.
 
Joined
Jun 6, 2017
Messages
3
Just for the record. I had a similare connection problem from my Mac to FreeNAS 11 RC4 (stable train). Turned out to be the VNC client I was using.

Everything worked fine with TigerVNC Viewer for me.

/Andreas
 
Status
Not open for further replies.
Top