To install RancherOS on your ESXi server, first of all, download rancheros ISO image from its website here
1. Create new Virtual Machine for RancherOS
On ESXi, create a new Virtual Machine with at least 1GB memory. After you created appliance, upload rancheros.iso to your ESXi datastore and set CD/DVD rom to use it.
2. Start rancheros
Once you clicked start button, the OS will boot up rapidly and prompt for login. Now rancheros is running in your RAM, you can login with credential rancher/rancher. Anything you change now will not be saved after you reboot. What we need is a docker ready OS so we need to install Rancher OS to our disk.
3. Prepare your cloud-config.yml
Before we install rancheros to our hard disk, you need to setup cloud-config first.
You also need to generate a new SSH key for
cloud-config.yml file by following this article
Add your public key to
cloud-config.yml file like following:
This is for rancher os first boot configuration after installation, you can use your private key to connect this host.
Next, we are going to configure network before installation. Following is an example, you need to configure DNS, IP address of interface and default gateway.
#cloud-config ssh_authorized_keys: - ssh-rsa AAAAB3NzaCURHZlGvtcq4bZXxkl email@example.com hostname: rancheros-cd01 rancher: network: dns: nameservers: - 126.96.36.199 interfaces: eth*: dhcp: false eth0: address: 188.8.131.52/28 gateway: 184.108.40.206 mtu: 1500
Make sure you only have one ethernet interface, current rancher os installer has problem when configuring multiple NICs.
At last, you need to put your
cloud-config.yml to rancher os. After you login, configure a accessible temporary IP address and default gateway on eth0, then
cloud-config.yml to it.
Following is an example
On RancherOS, configure IP and default gateway
$ sudo ip addr add 10.138.103.63/24 dev eth0 $ sudo route add default gw 10.138.103.254
On your local machine, copy your
cloud-config.yml to RancherOS via SCP or other method.
You should be all set if you done everything right in previous steps. Now we can call installer to initiate installation.
$ ros install -c cloud-config.yml -d /dev/sda --append "rancher.password=rancher"
Installer will download rancher/os to your system and format
At last, installer will prompt for reboot, after manual reboot you can configure own rancher os now.