Cloud-init and Centos 7

Discussion in 'Proxmox VE: Installation and configuration' started by Bryn Ellis, Aug 3, 2018.

  1. Bryn Ellis

    Bryn Ellis New Member

    Joined:
    Jun 17, 2018
    Messages:
    8
    Likes Received:
    0
    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.
     
  2. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,213
    Likes Received:
    269
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Bryn Ellis

    Bryn Ellis New Member

    Joined:
    Jun 17, 2018
    Messages:
    8
    Likes Received:
    0
    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?
     
  4. Thomas Munn

    Thomas Munn New Member

    Joined:
    Oct 12, 2018
    Messages:
    3
    Likes Received:
    0
    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......
     
  5. Thomas Munn

    Thomas Munn New Member

    Joined:
    Oct 12, 2018
    Messages:
    3
    Likes Received:
    0
    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.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice