4ipnet_ConfEditor

cloudinit http:\/\/cloudinit.readthedocs.io\/en\/latest\/

Set static ip of ubuntu server

echo -e "
iface eth0 inet static\n
address 100.64.144.4\n
gateway 100.64.144.254\n
netmask 255.255.255.0\n" >> /etc/network/interfaces

/etc/init.d/network restart (restart network service)

裡面比較特別可以用的是

cloud-init-per cloud-init

You can check by ubuntu help of these two commands.

Upload I

Use bash in cloud init

Add bash in $(genisoimage) to make it into user-data, and it can become a root level script

Last updated

Was this helpful?