Used cloud image Ubuntu server for creating a template and, of course, used cloud-init. For my templates and (initial) clones, I have it set to dhcp, just to be sure access can be had. However, I static assign all of my devices after cloning. This is actually the first time I have used this method and noticed that since I used cloud-init, that it seems to be controlling all IP Addressing within. (i.e. no
(Note, this is what it looks like after I assign a static). This might be a basic question, but it seemed to me that logically I go into the cloud-init image, change to static with the proper info, regenerate image, reboot and have it continue to provide the networking. Is this the best way to handle it? It doesn't really matter to me much, was just curious and couldn't find the answer elsewhere.
/etc/netplan/01-netcfg.yaml
file. Instead, I have a /etc/netplan/50-cloud-init.yaml
, e.g.
YAML:
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
eth0:
addresses:
- 192.168.10.40/24
gateway4: 192.168.10.5
match:
macaddress: ae:61:e7:0f:64:b2
nameservers:
addresses:
- 192.168.10.5
search:
- miller.home
set-name: eth0
(Note, this is what it looks like after I assign a static). This might be a basic question, but it seemed to me that logically I go into the cloud-init image, change to static with the proper info, regenerate image, reboot and have it continue to provide the networking. Is this the best way to handle it? It doesn't really matter to me much, was just curious and couldn't find the answer elsewhere.