Cloud-init and Centos 7

Bryn Ellis

New Member
Jun 17, 2018
8
0
1
49
Hi

I'm completely confused with the proxmox support for Cloud-init so hoping someone can help.

I've not done very much cloud-init work but I did test it out a few months ago on some VM's in Parallels on my Mac. For that I pretty much had to create a meta-data file, a user-data file and then use genisoimage to create an ISO that I attached to the VM specification along with the Centos7 installation ISO.

I'm confused as to whether I have to do this process for PVE? When I click on 'Cloud-init' in the web GUI I just get a message saying 'No cloudinit drive found' for all my VMs.

What I've done is create some template VM's with all the packages I want in them. Now I want to roll out a number of VM's based on these templates but set their hostnames during installation. They're set to get IP from DHCP so not bothered about using cloud-init to set IP details as that should be covered by the VM template (i.e. it should just get an IP from the DHCP server then I'll reserve that).

Could someone please explain the process for doing this?

Thanks very much.
 
Hi Dietmar

Thanks for reply. I had seen that article but couldn’t really make out which bits were relevant to me. I don’t see any instructions about how to create the cloud-init ISO that needs to be attached to the VM? Maybe I’m not doing this right at all and cloud-init isn’t what I need seeing as I already have a VM that I just want to clone and have the hostname changed during the cloning?
 
A couple of things do matter, if you are expecting the system to 'auto register' with your dynamic dns server, there is a known bug due to network manager not updating connection hostname correctly. Need to run nmcli manually and put in additional dhcp hostname. Probably will write an ansible script to fix......
 
Basically create the vm, bring it up, configure the way you want, yum install cloud-init, power down. Go to gui, add hardware, cloud-init drive, chagne cloud-init section as you would, then boot. Bear in mind that system will not auto-reg dns with dhcp server w/o manual intervention.
 

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!