Results 1 to 3 of 3

Thread: Are you supposed to removed cloud-init

  1. #1
    Join Date
    Jan 2019

    Are you supposed to removed cloud-init

    As far as i understand it, cloud-init handles early initialization of a cloud instance.
    Ive been using it to help build KVM VMs and it works really well.

    One aspect of cloud-init I dont understand is what happens once its done the initial creation of the instance.

    Does it automatically disable itself so it never runs again?
    Can it execute again under certain circumstances? (I'm pretty sure I got it to re-run by running
    sudo rm -rf  /var/lib/cloud/*
    Should I be uninstalling cloud-init once my instance has been built and its gone into production?

  2. #2
    Join Date
    Jan 2020

    Re: Are you supposed to removed cloud-init

    Technically you could remove them and it wont cause an issue but those files are used for troubleshooting.
    Here is a snipit from the cloudinit docs.

    Where are the data files?

    Inside the /var/lib/cloud/ directory there are two important subdirectories:

    The /var/lib/cloud/instance directory is a symbolic link that points to the most recenlty used instance-id directory. This folder contains the information cloud-init received from datasources, including vendor and user data. This can be helpful to review to ensure the correct data was passed.
    It also contains the datasource file that containers the full information about what datasource was identified and used to setup the system.
    Finally, the boot-finished file is the last thing that cloud-init does.


    The /var/lib/cloud/data directory contain information related to the previous boot:

    • instance-id: id of the instance as discovered by cloud-init. Changing this file has no effect.
    • result.json: json file will show both the datasource used to setup the instance, and if any errors occured
    • status.json: json file shows the datasource used and a break down of all four modules if any errors occured and the start and stop times.

  3. #3
    Join Date
    Mar 2010
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Are you supposed to removed cloud-init

    I've removed cloud-init from my KVM servers, but Canonical's dependencies (or more likely "install-recommended" options for APT keep reinstalling it.
    I don't do "cloudy" things, but I definitely do lots of virtualization. Big proponent of self-hosting everything possible here.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts