Resource icon

[HOWTO] FreeNAS 11, RancherOS (Docker), and Portainer

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
Last edited:

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
your vm is not running you need to start it
sudo iohyve start ranch

if to many terminals are open there is a iohyve command to kill them iohyve conreset
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
ok start from the beginning

iohyve conreset
iohyve install RancherOS rancheros.iso


open a new shell

sudo iohyve list
sudo iohyve start RancherOS
sudo iohyve list (running?)
sudo iohyve console RancherOS
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
Please stop linking to outside image hosts--this forum is perfectly capable of hosting the images itself. Simply paste them in, or use the "Upload a File" button.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,176
Let's make that a mod note:

Please do not use external image hosts. They have pretty much no advantage for most situations and a truckload of disadvantages (potential for broken links, shady ads, more clicks, ...).

New links to external image hosts may be removed without further notice.
 

nfdevil

Dabbler
Joined
May 5, 2014
Messages
15
Sorry, didn't know I could just paste the images in. I clicked the Image button and it asks for an url, no upload button...

ok start from the beginning

iohyve conreset
iohyve install RancherOS rancheros.iso


open a new shell

sudo iohyve list
sudo iohyve start RancherOS
sudo iohyve list (running?)
sudo iohyve console RancherOS

I've done the commands, I gave the 'start' command 2 minutes for the last 2 times that I listed, still not running. Console in still gives the OK prompt.

upload_2017-8-26_10-54-51.png
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
sorry for this, if the vm does not start and is not running connecting to it does not make sense. I am guessing you just followed all prior steps. if not forcekill your ranch and delete ranch and start from the very beginning. I have installed rancher this exact way at least 50 times.

i.e iohyve set RancherOS loader=grub-bhyve ram=2G cpu=1 con=nmdm0 os=debian


Setting up the VM using iohyve:
  • open a ssh connection to your FreeNAS and acquire sudo permissions with sudo su

  • setting up the iohyve enviroment in FreeNAS 9.10 RC4
    iohyve setup pool=ssd kmod=1 net=igb0
    ssd refers to the zpool and igb0 to the NIC of your choice. FreeNAS will create datasets on your zpool for me it created /mnt/ssd/iohyve

  • fetch the RancherOS ISO file with
    iohyve fetch https://github.com/rancher/os/releases/download/v0.6.1/rancheros.iso i use 0.6.1 due to the familiarity of grub also RancherOS will automatically update

  • type:
    iohyve create RancherOS 26G which creates a new 26GiB zpool under /mnt/ssd/iohyve/RancherOS
    iohyve set RancherOS loader=grub-bhyve ram=16G cpu=8 con=nmdm0 os=debian
    iohyve install RancherOS rancheros.iso

  • open a new shell
    sudo iohyve list
    sudo iohyve start RancherOS
    sudo iohyve console RancherOS
 

nfdevil

Dabbler
Joined
May 5, 2014
Messages
15
sorry for this, if the vm does not start and is not running connecting to it does not make sense. I am guessing you just followed all prior steps. if not forcekill your ranch and delete ranch and start from the very beginning. I have installed rancher this exact way at least 50 times.

i.e iohyve set RancherOS loader=grub-bhyve ram=2G cpu=1 con=nmdm0 os=debian


Setting up the VM using iohyve:
  • open a ssh connection to your FreeNAS and acquire sudo permissions with sudo su

  • setting up the iohyve enviroment in FreeNAS 9.10 RC4
    iohyve setup pool=ssd kmod=1 net=igb0
    ssd refers to the zpool and igb0 to the NIC of your choice. FreeNAS will create datasets on your zpool for me it created /mnt/ssd/iohyve

  • fetch the RancherOS ISO file with
    iohyve fetch https://github.com/rancher/os/releases/download/v0.6.1/rancheros.iso i use 0.6.1 due to the familiarity of grub also RancherOS will automatically update

  • type:
    iohyve create RancherOS 26G which creates a new 26GiB zpool under /mnt/ssd/iohyve/RancherOS
    iohyve set RancherOS loader=grub-bhyve ram=16G cpu=8 con=nmdm0 os=debian
    iohyve install RancherOS rancheros.iso

  • open a new shell
    sudo iohyve list
    sudo iohyve start RancherOS
    sudo iohyve console RancherOS

Thanks, this indeed gave me a 'grub >' when I connected to the console the first time. However, I could not type, ex. 'clear' gave 'command 'cla' not found. The other commands from the guide gave the same kind of errors, like it cuts of my commands.

I then tried to reconnect in a shell window, but the VM was not running. When I tried to login to the console anyway, it was stuck after 'Connected' and I could not get out with ~~. or exit, I could not type.

Anyway, I guess I'll better wait for the docker support of Freenas 11.1 (hopefully it arrives then).
Thanks anyway for the great help Zwck!
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
Thanks, this indeed gave me a 'grub >' when I connected to the console the first time. However, I could not type, ex. 'clear' gave 'command 'cla' not found. The other commands from the guide gave the same kind of errors, like it cuts of my commands.

I then tried to reconnect in a shell window, but the VM was not running. When I tried to login to the console anyway, it was stuck after 'Connected' and I could not get out with ~~. or exit, I could not type.

Anyway, I guess I'll better wait for the docker support of Freenas 11.1 (hopefully it arrives then).
Thanks anyway for the great help Zwck!

yes, this is a bug, dunno where it comes from. you have to repeat the first steps until you can write into the grub> console and what you type is represented in the shell.
 

Rudi Pittman

Contributor
Joined
Dec 22, 2015
Messages
161
I've just gotten into docker. I have it running in rancheros via iohyve on freenas 9.10. Now that I've converted a few of my apps my question is am I going to lose all this when I upgrade to freenas 11 and "their" setup for docker or will there be a method to "import" my existing containers/data? (I suppose the data is the most important part)
 

scottc9

Cadet
Joined
Sep 10, 2017
Messages
1
A quick reply to those who are having the issue that rancheros doesn't get an outside accessible IP address on eth0..
In order for me to get the network bridge working and my rancheros to boot on startup I had to add the following two post-init startup commands:

/bin/sh /usr/local/sbin/iohyve start RancherOS
/usr/local/sbin/iohyve setup net=igb0

Change igb0 for the FreeNAS NIC you want bridged. I had no luck with enabling this via rc.conf as the howto suggests. Anyways, I'm happy, on system reboot I can now count on my VM rancherOS starting with my collection of containers.

YMMV
 

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
Still no possibility to launch rancheros as a vm via the FN11 gui?
 

Ed_

Cadet
Joined
Sep 27, 2016
Messages
5
This isn't working for me.
  • type:
    iohyve create RancherOS 26G which creates a new 26GiB zpool under /mnt/ssd/iohyve/RancherOS
    iohyve set RancherOS loader=grub-bhyve ram=16G cpu=8 con=nmdm0 os=debian
    iohyve install RancherOS rancheros.iso

Code:
[esiefker@huhlab ~]$ sudo iohyve install RancherOS rancheros.iso
Installing RancherOS...
GRUB Process does not run in background....
If your terminal appears to be hanging, check iohyve console RancherOS in second terminal to complete GRUB process...
Could not create VM ioh-RancherOS
Error in initializing VM
vm_create: Device not configured



VMM and NMDM are loaded. I don't know what else to check.

Code:
[esiefker@huhlab ~]$ kldstat | grep vmm.ko
5  1 0xffffffff82827000 3337ee  vmm.ko
esiefker@huhlab ~]$ kldstat | grep nmdm.ko
6  1 0xffffffff82b5b000 30c4  nmdm.ko


I figured out what else to check. VT-x is apparently disabled. Leaving this post to help future googlers.

Code:
[esiefker@huhlab ~]$ grep VT-x /var/run/dmesg.boot
  VT-x: (disabled in BIOS) PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  VT-x: (disabled in BIOS) PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  VT-x: (disabled in BIOS) PAT,HLT,MTF,PAUSE,EPT,UG,VPID
 
Last edited:

miich94

Dabbler
Joined
Mar 26, 2016
Messages
41
How can i use 2 networks? because i want to try it for the last time to get this working otherwise im going back to FreeNas with docker :) had my server for a long time offline already, moving to a new location but Docker isnt still here in 11.1 :'(

-> NIC 1 -> for family -> series
-> NIC 2 -> VPN -> Download
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
Give the guide a try and report back if something doesn't work.
 

miich94

Dabbler
Joined
Mar 26, 2016
Messages
41
How to fix this? :)

root@freenas:~ # sudo iohyve console RancherOS
Sorry, user root is not allowed to execute '/usr/local/sbin/iohyve console rancheros' as root on freenas.local.
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
try root@freenas:~ # iohyve console RancherOS
 

miich94

Dabbler
Joined
Mar 26, 2016
Messages
41
Do i need to get an other screen when using iohyve console RacherOS? because im waiting for a few minutes now.

upload_2017-11-2_22-30-4.png


EDIT: pressed enter again and it started :)
 
Top