Assigning secondary IP address using Cloud-Init

Loredo

New Member
Feb 21, 2012
27
0
1
Munich
Hi,

I would like to assign secondary IP addresses to a single network device using the cloud-init configuration.
I can read from the specification that this is possible to do. However, the Proxmox API and frontend does not allow to enter more than a single IP address. It would be great to allow multiple IP's using a comma separated list type. Shouldn't be too hard to loop through it and put this to the 50-cloud-init.yaml file in the correct format.

Sadly no public source code seems to be available so I can't provide a patch to you guys :-(
May I ask if you could put this into your backlog?

-----

Meanwhile, I was looking for a workaround by manually putting a file somewhere within the image. Ideally that would be a single command like

Code:
ip address add 192.168.6.2/32 dev eth0

but it seems I am unable to find the right point to put this. Tried to use a file in /etc/cloud/cloud.cfg.d/10_network_aliases.cfg like this:

Code:
runcmd:
 - [ ip address add 192.168.1.2/32 dev eth0 ]

without success. Any ideas besides waiting for the feature improvement in the Proxmox code?


Many thanks,
Julian
 
Last edited:
I did read the documentation, it doesn't say anything about multiple IP address assignment. Trying to put multiple "ip=" settings into the ---ipconfigX parameter would result in an error message stating only a single "ip=" setting may be used.

Thanks for pointing me to the dev info, Google did not give me that page or other information about the repo. Will have a look but not sure if a patch could be developed being new to the code structure. If you can, I would still appreciate to have that as part of the official backlog.
 
Out of curiosity, do you remember what you googled with? Maybe we can try to improve on that grounds. And thanks for sending patches in already. :)
 

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!