FreeNAS 11.1 Rancher Server installation failed

Status
Not open for further replies.

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
Hello
FreeNAS 11.1 - i wished to install the Rancher Server following the guide 14.5.4 Installing the Rancher Server (https://doc.freenas.org/11/vms.html#installing-the-rancher-server )

in my case starting the Shell and connecting with cu ...
but it just show a
Connected

and nothing else no option to enter a Login (or a Ranger text)

also hitting the Enter, nothing change or happen.

have a nice day
vinc
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I'd suggest making sure the basic RancherOS based VM is working before adding the rancher-server.

Sounds like you may not have set up the Docker VM correctly, or it failed after a stop/start. (FYI, you should be able to connect to a running Docker VM after the first boot via ssh using something like "ssh rancher@<ip address of docker vm>" . Until you change the VM's config, it should default to using dhcp, so you could use nmap, or check your router's dhcp leases to see what ip address has been given to the VM. )

How is your Docker VM's raw device configured? I've attached an image of a working example. Note in my case the dataset "mnt/NasPool/VM" already existed, but the raw file "docker.img" did not. I also found it best to give the Docker VM password.
 

Attachments

  • dockervm_raw_device.jpeg
    dockervm_raw_device.jpeg
    20 KB · Views: 977

OliverF

Cadet
Joined
Dec 16, 2017
Messages
7
I found an interesting link for the setup -> https://redmine.ixsystems.com/attachments/download/13184/howto.pdf
In my case the installation of the RangerOS itself didn't work.
The volume for the VM is 20G but I can't find information about the required user/group or any other data for the volume. The only thing I see is that the grub is eating 100% of one CPU but no image is downloaded.
So maybe someone could help me with that.
 
Last edited by a moderator:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
That PDF is a good find and basically equates to the short section in the new FeeNAS 11.1 documentation under VMs.

The grub-bhyve behaviour you're seeing is a sure sign the rancher install has failed.

To be absolutely clear , when looking at the screen image under section 3 of the linked PDF the path given for the RAW FILE is of the form "dataset_mountpoint/file.img". The dataset must have already been created, but the img file must NOT already exist. So in the example given "/mnt/ssd/araujo" was an existing dataset mountpoint and the raw image file name "uj.img" is created with the given size when the OK button is pressed.

The raw image file that is created with "root:wheel" ownership, I don't think the ownership of the dataset matters.

Interesting to see that FreeNAS devs do see this as an all Rancher platform.
 
Last edited:

OliverF

Cadet
Joined
Dec 16, 2017
Messages
7
Here is a picture from the Dataset
Bildschirmfoto 2017-12-19 um 14.26.12.png

Dataset is empty :

root@freenas:/mnt # cd base/VM/vm-storage/
root@freenas:/mnt/base/VM/vm-storage # ls -al
total 1
drwxrwxr-x 2 root wheel 2 Dec 18 13:44 .
drwxrwxrwx 4 root wheel 4 Dec 18 13:44 ..


Image name was given (ui.img) but after starting the VM no image is created.
A window opens with let the magic begin ... Then after pressing yes a window flashes up, but to fast to have a chance zu read or react (2 Buttons on the bottom) and than it hangs.
Stopping the VM with the GUI is impossible. I kill the process in a terminal.

Cut and Paste of pictures is not possible ...
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I cannot reproduce this error. Would suggest just deleting the docker VM and starting again.
 

silverback

Contributor
Joined
Jun 26, 2016
Messages
134
I got this symptom when I failed to include /rancherui.img at the end of the chosen RAW FILE path.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I got this symptom when I failed to include /rancherui.img at the end of the chosen RAW FILE path.

Yes you would, but the OP included an img file as his screen pic shows. The other thing the OP should check is that the rancheros img has downloaded correctly. It should reside in a hidden folder, e.g. :

Code:
root@freenas:/ # ll  /mnt/NasPool/.bhyve_containers/iso_files	
total 45861
-rw-r--r--  1 root  wheel  49363679 Dec 14 11:51 rancheros-bhyve-v1.1.0.img.gz
 
Last edited:

OliverF

Cadet
Joined
Dec 16, 2017
Messages
7
I found a corrupt image in this folder. Deleted it and restart the VM. Now I see a progress bar but download breaks after some percent.
Very strange, because my internet connection is performant and stable.
With the stump in the .bhyve_containers/iso_files the download will not start again.

PS. It came to the point where the message was "Begin downloading prebuild container image" around 2% than it breaks.
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
I also did miss to add /rancherui.img at the end of the file.
but still it is not working
---
i also find out - if i do stop the VM - it still shows running
 

OliverF

Cadet
Joined
Dec 16, 2017
Messages
7
Finaly I found that my DHCP Server propagated a dublicated address for the VM session. That corrupted the download.
As a workaroud download the rancheros-bhyve-v1.1.0.img.gz and put it in the right directory (should end with .bhyve_containers/iso_files)
If you now start the VM it should run (should create a .img file with the name you gave in the RAW File Name in the Dataset dialog)
Then connect to the session (with the cu -l /dev/nm... command)
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
in my case no IP have been requested nor given.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
I found an interesting link for the setup
This is some preliminary notes from araujo (the developer) on the setup. The version in the User Guide was based on this but provides more detail. Please use the User Guide version.
 

OliverF

Cadet
Joined
Dec 16, 2017
Messages
7
As far as I understood the VM will get an IP via DHCP on the named interface. If it can't connect to the internet no download will occur.
Can you connect vi cu if you put the image manual in the Folder and restart the VM.
you have to kill the VM process (is the process with grub and 100% :smile:

In my case there was only a very unstable connection possible (dub IP) so don't know if the file is enough.
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
I deleted all - and restarted creating it - and it works so far, I can reach rancher GUI also.

Is it possible to add a FIXED IP address to a VM?
 
Last edited by a moderator:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
i deleted all - and restartet creating it - and it works so far, i can reach rancher GUI also.

Is it possible to add a FIX IP addresse to a VM?

The answer is yes, you need to edit the /var/lib/rancher/config/cloud-config.yml file, or you could use "ros set config" commands at the rancheros CLI, e.g:

Code:
$ sudo ros config set rancher.network.interfaces.eth0.address 192.168.1.219/24
$ sudo ros config set rancher.network.interfaces.eth0.gateway 192.168.1.254
$ sudo ros config set rancher.network.interfaces.eth0.mtu 1500
$ sudo ros config set rancher.network.interfaces.eth0.dhcp false


Take care not to leave your VM unbootable, so check any config changes with:
Code:
$ sudo ros config validate -i /var/lib/rancher/config/cloud-config.yml

See http://rancher.com/docs/os/v1.1/en/networking/interfaces/ for reference.

P.S. It's probably a good idea to give your VM a FQDN, e.g. rancher.local.com where the domain is the same as your FreeNAS box and add it to your known hosts via the FreeNAS UI.
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
Hello
I have to this on the Rancher@rancher :confused:?
i don't have access to this file
/var/lib/rancher/config/cloud-config.yml
I have a path like
/var/lib/rancher but then a conf where I do not have access
Code:
[rancher@rancher rancher]$ sudo cd /conf
sudo: cd: command not found[/CMD]
It is strange because a cd /var/lib did work.
 
Last edited by a moderator:

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
I have the same issue. I confirmed i have the rancher-bhyve img in the .bhyve_containers. Even replaced it with a fresh file....I've trashed and started fresh about 4 times now.
 

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
Hello
i have to this on the Rancher@rancher :confused:?
i don't have access to this file
/var/lib/rancher/config/cloud-config.yml
i have a path like
/var/lib/rancher but then a conf where i do not have access

[rancher@rancher rancher]$ sudo cd /conf
sudo: cd: command not found

it ist strange because a cd /var/lib did work

You don't need to edit the file. Just run the commands in the interface:

$ sudo ros config set rancher.network.interfaces.eth0.address 192.168.1.219/24
$ sudo ros config set rancher.network.interfaces.eth0.gateway 192.168.1.254
$ sudo ros config set rancher.network.interfaces.eth0.mtu 1500
$ sudo ros config set rancher.network.interfaces.eth0.dhcp false


Replace the values in the first 2 lines with your desired IP

Hope that helps!
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
if i check about the change like in post #16 sayed - i got a error!
[rancher@rancher ~]$ sudo ros config validate -i /var/lib/rancher/config/cloud-config.yml
FATA[0000] open /var/lib/rancher/config/cloud-config.yml: no such file or directory

after 10 minutes i lost the connection to rancher, and also after restart of of the FreeNAS VM i can't find out the ip to start rancher ;-(
 
Last edited:
Status
Not open for further replies.
Top