RancherOS镜像默认使用内存来加载,如果需要安装到硬盘,方法如下
vi cloud-config.yml
编辑配置文件#cloud-config
rancher:
network:
interfaces:
eth0:
address: 192.168.88.105/24
gateway: 192.168.88.254
mtu: 1500
dhcp: false
ssh_authorized_keys:
- ssh-rsa 公钥内容粘贴写在这里
AAAAB3NzaC1yc2EAAAABJQAAAQEArHgbU09C7hOveQtrEhVnUgfETZu0klojQZqcNY/7lmavNPfIvEHFlrPTWGTeLmBFZsjjX6znYXiZ3xtEqqTgf6NVQEe4QrbbwwY2XJ0UnFLIvx9Si5Tz10b8WU0f5FRwVf6aT1d92TWajYQu/YdZyIgA/WuKjHZf+3yPOouwRNUnd2rhpVsocD8wckAiWcFUMl2Nvj0yTWvX9Z487yUDRfzVDnXYYJzsKCwv/djDjUClt/GzTJO8Z9kgTrp0k4RN8G3hHdDVCzEnelWQmDEccO8vEQVpZp5QREnkbW6MEMW4v1pOyifaO6iwVOMxXctVsKpoJ21cS8kcyzJXTQzjDw==
sudo ros install -c cloud-config.yml -d /dev/sda
sudo passwd rancher