Overview
While many cloud-init
capable images will automatically configure all interfaces to use DHCP—required to get the correct IP from the VPC—not all OS vendors configure their cloud images to do so.
In these cases you will need to do one of two things, either connect to the VM via the first interface and enable DHCP on the rest, or use a custom cloud-init
config to enable DHCP on these interfaces during VM creation.
Manually Configuring Additional Interfaces
- create the VM as normal
- log into the VM by connecting via the first interface's (E)IP
- enable DHCP for each additional interface
Using cloud-init
to Configure Additional Interfaces
Please ensure you familiarize yourself with the documentation for `cloud-init`: https://cloudinit.readthedocs.io/en/latest/
This option can be used only if you are creating a new VM instance. You will need to write and provide a cloud-init configuration at the time of VM creation.
You can see our zCompute - 09 - Instances video for a brief demonstration of how you can add cloud-init
configs.
The specific configuration needed will differ depending on your OS and other configuration requirements, but a simple example might look as follows:
#cloud-config
network:
version: 2
ethernets:
eth1:
dhcp4: true
eth2:
dhcp4: true
eth3:
dhcp4: true