How to set network device names for in cloud-init configuration for VMs?

Mitchell Monahan

New Member
Jun 3, 2018
4
0
1
25
Creating a cloud-init based VM to try and make it easier to manage, but noticed that proxmox generates a cloud-init network-config file like this:
Code:
version: 1
config:
  - type: physical
    name: eth1
    (rest of network info for that interface)
  - type: nameserver
    address:
    - 8.8.8.8
    - 8.8.4.4

The issue i'm having with that configuration is that it hardcodes the network interface name into the configuration, assuming the VM uses the non-predictable network interface naming system that most distros use nowdays. In my case, the VM's network interface is ens18, but proxmox (and thus cloud-init) is using eth0. How do I tell proxmox the names of my interfaces I'm putting on the VM?
 
Also, maybe add a feature for adding custom stuff to the cloud-config configuration so people can use it to, say, run a script? That would make it pretty easy to have Juju deploy to Proxmox VE.
 
The issue i'm having with that configuration is that it hardcodes the network interface name into the configuration, assuming the VM uses the non-predictable network interface naming system

No, we assume that cloud-init handles the assignment correctly.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!