assign ip to ubuntu 20.04 at boot time (packer)
by vincix from LinuxQuestions.org on (#5NX0S)
Hello,
I'm trying to provision a Ubuntu 20.04.3 installation with packer (1.7.4) on proxmox (6.4-9). Canonical has changed the way you provision Ubuntu, in that they've given up debian-installer and it seems that everything should work with cloud-init or something to that effect.
With debian-installer I could assign an IP in the kernel parameters (before installing it proper) and then it could access through that IP the rest of the preseed configuration file (so also part of the debian-installer) on a web server (provided by packer).
Code: "/install/linux ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=en_US auto=true locale=en_US kbd-chooser/method=us ",
"console-setup/ask_detect=false keyboard-configuration/layoutcode=us ",
"netcfg/disable_autoconfig=true ",
"netcfg/get_ipaddress=10.88.88.159 ",
"netcfg/get_netmask=255.255.0.0 ",
"netcfg/get_gateway=10.88.88.126 ",
"netcfg/get_domain=ejobs.internal ",
"netcfg/get_nameservers=1.1.1.1 ",
"hostname=packer ",
"initrd=/install/initrd.gz quiet --- <enter>"(part of packer config file)
But with Ubuntu 20.04 I'm not sure anymore how I am able to do that. All the examples I've come across on the internet simply fail to mention the network part, so I'm not really sure how their setup seems to work. Any help/references are welcome.
I'm trying to provision a Ubuntu 20.04.3 installation with packer (1.7.4) on proxmox (6.4-9). Canonical has changed the way you provision Ubuntu, in that they've given up debian-installer and it seems that everything should work with cloud-init or something to that effect.
With debian-installer I could assign an IP in the kernel parameters (before installing it proper) and then it could access through that IP the rest of the preseed configuration file (so also part of the debian-installer) on a web server (provided by packer).
Code: "/install/linux ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=en_US auto=true locale=en_US kbd-chooser/method=us ",
"console-setup/ask_detect=false keyboard-configuration/layoutcode=us ",
"netcfg/disable_autoconfig=true ",
"netcfg/get_ipaddress=10.88.88.159 ",
"netcfg/get_netmask=255.255.0.0 ",
"netcfg/get_gateway=10.88.88.126 ",
"netcfg/get_domain=ejobs.internal ",
"netcfg/get_nameservers=1.1.1.1 ",
"hostname=packer ",
"initrd=/install/initrd.gz quiet --- <enter>"(part of packer config file)
But with Ubuntu 20.04 I'm not sure anymore how I am able to do that. All the examples I've come across on the internet simply fail to mention the network part, so I'm not really sure how their setup seems to work. Any help/references are welcome.