Adding Additional IPs To Your KVM VM Print

  • KVM
  • 0

By default KVM virtual machines (VMs) will only deploy with 1 main IP.

If you wish to add additional IPs to your VM, you will need to do so manually.

For template-based VMs you'll need to disable cloud-init network configuration & then manually edit the network configuration files.

Disable cloud-init Networking

Create /etc/cloud/cloud.cfg.d/99-custom-networking.cfg & add:

network: {config: disabled}

Configuring Networking

You should now edit your network configuration files manually.

The file you'll need to edit depends on the OS & version you are running.

Debian based (Debian, Ubuntu): Edit /etc/network/interfaces

Red Hat based based: Edit /etc/sysconfig/network-scripts/ifcfg-[INTERFACE]

Where [INTERFACE] is the network interface name (e.g. eth0, etc.)


Was this answer helpful?

« Back