On Fri, Jun 12, 2020 at 9:23 AM Florian Schmid via Users <users@ovirt.org> wrote:
> Hi, > > we are using cloud-init for several years now and it looks like, that > cloud-init needs a config for every boot, otherwise, it will use the > default network config, which is DHCP. > > We come around this issue by adding this file: > cat /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg > network: {config: disabled} > > by cloud-init itself on the first run. > > With this, cloud-init creates only once the network config and never > touches it again. > I would not completely disable cloud-init, because this could also have > some drawbacks, like not being able to create a root/user password anymore, > if on worst case, ssh is not working anymore... > > What we also fix on the first boot is the datasource_list > -> datasource_list: ["NoCloud", "ConfigDrive"] > > Otherwise, we have an extremely long boot process (up to 5 minutes or so), > because cloud-init tries to reach several cloud-config URLs. > > BR Florian > > ----- Ursprüngliche Mail ----- > Von: "Jp" <justin.obfusc...@gmail.com> > An: "users" <users@ovirt.org> > Gesendet: Donnerstag, 11. Juni 2020 16:54:31 > Betreff: [ovirt-users] Re: cloud-init: reverts on reboot > > I re-read the docs on creating VMs. > > What is the difference between the Run Once w/ it's pop-up form vs the > Initial Run with it's embedded form? > >From an engine point of view it's quite a difference, run once creates a one-time configuration to start the VM with and then roll back to the existing. As for cloud-init, when you set it in the Edit VM, initial run (without run-once), on the first time you will run the VM in your environment(first boot for that VM in your environment), cloud-init will use it. While, on run-once, it will use the configuration again. > > If an (updated) doc were to have a sequential workflow for using > cloud-init in oVirt for a new VM's setup, would it look like this: > > * assume cloud-init already installed, ex. Glance image; so > SysPre/Cloud-Init process already done* > > Glance Image Method > > 1. Import Image + Create Template > 2. Create VM (_don't_ use Run; and _don't_ populate Initial Run tab) > 3. start VM with Run Once (_not_ Run) > 4. fill out Run Once pop-up form > 5. VM boots as usual > 6. remote Console/shell into VM to verify setting > 7. Reboot or Shutdown/Run > 8. use cloud-init'd VM like any other non-cloud-init'd VM > > That ^ look right? > I don't really understand point 8. But from at 5 the VM should consume the cloud-init configuration and it should stay in the VM. You may try and reconfigure if you use run-once again, setting cloud-init configuration again. It looks OK. > Is CentOS8.2 out? I checked blog.centos.org but it looks like they had build issues to still resolve as of last week ... I'm not sure about centos8.2, adding +Sandro Bonazzola <sbona...@redhat.com> . > _______________________________________________ > Users mailing list -- users@ovirt.org > To unsubscribe send an email to users-le...@ovirt.org > Privacy Statement: https://www.ovirt.org/privacy-policy.html > oVirt Code of Conduct: > https://www.ovirt.org/community/about/community-guidelines/ > List Archives: > https://lists.ovirt.org/archives/list/users@ovirt.org/message/LXA4TCGENOQ3PPNGTCRPZQQJYXSR52QI/ > _______________________________________________ > Users mailing list -- users@ovirt.org > To unsubscribe send an email to users-le...@ovirt.org > Privacy Statement: https://www.ovirt.org/privacy-policy.html > oVirt Code of Conduct: > https://www.ovirt.org/community/about/community-guidelines/ > List Archives: > https://lists.ovirt.org/archives/list/users@ovirt.org/message/CE7MMZEETR3E5CQUGQ3RBI6KXFVOLUMD/ >
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/KO4JDDJ33RMXWY3B6VWIDGJDXARQVP2Z/