[pve-devel] RFC: qemu-server : add cloudinit support
Alexandre DERUMIER
aderumier at odiso.com
Thu Jun 11 12:51:42 CEST 2015
>>For one, it seems to be started on several points during the init
>>process. There seem to be 5 different systemd units specified for it
>>even.
yes, I'm seeing this 4 units.
I'm think they are related to different cloud-init stage (init,config,final , see /etc/cloud/cloud.cfg).
cloud-config.service loaded active exited LSB: Cloud init modules --mode config
cloud-final.service loaded active exited LSB: Cloud init modules final jobs
cloud-init-local.service loaded active exited LSB: Cloud init local
cloud-init.service loaded active exited LSB: Cloud init
If I remember, init stage is done only at first boot.
cloud_init_modules:
- migrator
- bootcmd
- write-files
- resizefs
- set_hostname
- update_hostname
- update_etc_hosts
- ca-certs
- rsyslog
- users-groups
- ssh
I'm not sure about other stage.
>>Then there seems to be a system-wide configuration in /etc/cloud that
>>defines not just datasources but also default configurations, like a
>>default user, and whether root may login with a password, etc.
users,keys,password are not defined in /etc/cloud/cloud.cfg but in configdrive
They are some system default thing, like admin account for debian for example (but no password)
but the main thing is the the datasource provider (I'm using configdrive like openstack|ovirt)
other things are list of modules we can call from configdrive
>>At this
>>point I'm wondering whether this configuration will be re-applied on
>>every boot. (The documentation doesn't mention any of this actually, I
>>found this part on the ArchWiki[1]...)
>>And does that mean cloud-init keeps overwriting the systems's regular
>>configuration files?
If you don't provide the configdrive (no datasource), it'll do nothing.
That's why I remove the configdrive after first init.
>>The documentation only mentions a directory structure in /var. [2]
>>Now I'm left to wonder... does the cloud init process somehow
>>overwride/interfere with the regular initialization process? Does it
>>actually perform physical merging of configuration files from the
>>datasource into /var? (The documentation also mentions merging[3])
I don't see nothing special in /var/lib/cloud, no config cache or something like that
>>Finally: OS support. It seems to only ship with support linux (few
>>specific distros even) and freebsd [4]. For that purpose it seems a
>>little overengineered.
linux distro : centos,rhel,fedora,debian,ubuntu,suse,archlinux,gentoo
bsd: freebsd
windows
http://thornelabs.net/2014/06/01/where-to-find-openstack-cloud-images.html
don't seem too bad ?
----- Mail original -----
De: "Wolfgang Bumiller" <w.bumiller at proxmox.com>
À: "aderumier" <aderumier at odiso.com>
Cc: "dietmar" <dietmar at proxmox.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Jeudi 11 Juin 2015 10:24:38
Objet: Re: [pve-devel] RFC: qemu-server : add cloudinit support
There are a few things that still confuse me about cloud-init, and the
documentation lacks a description of the very basic mode of operation of
cloud-init. (When does which part start and where does it do what
exactly. The source isn't easy to navigate either without more
documentation... (it's a big load of python))
For one, it seems to be started on several points during the init
process. There seem to be 5 different systemd units specified for it
even.
Then there seems to be a system-wide configuration in /etc/cloud that
defines not just datasources but also default configurations, like a
default user, and whether root may login with a password, etc. At this
point I'm wondering whether this configuration will be re-applied on
every boot. (The documentation doesn't mention any of this actually, I
found this part on the ArchWiki[1]...)
The documentation only mentions a directory structure in /var. [2]
Now I'm left to wonder... does the cloud init process somehow
overwride/interfere with the regular initialization process? Does it
actually perform physical merging of configuration files from the
datasource into /var? (The documentation also mentions merging[3])
And does that mean cloud-init keeps overwriting the systems's regular
configuration files?
To me the entire thing still seems a bit cloudy. (no pun intended...)
Finally: OS support. It seems to only ship with support linux (few
specific distros even) and freebsd [4]. For that purpose it seems a
little overengineered.
[1] https://wiki.archlinux.org/index.php/Cloud-init
[2] https://cloudinit.readthedocs.org/en/latest/topics/dir_layout.html
[3] https://cloudinit.readthedocs.org/en/latest/topics/merging.html
[4] https://cloudinit.readthedocs.org/en/latest/topics/availability.html
On Thu, Jun 11, 2015 at 08:11:45AM +0200, Alexandre DERUMIER wrote:
> Also,
>
> cloud-init feature is only usefull when creating a new vm,
>
> so cloning a clean template with cloud-init support.
>
>
> Maybe we could simply pass options to qm clone .... -nameserver -searchdoman -eth0 ipaddress gateway ....
>
> start the vm after cloning, and cloud-init shutdown it when finished.
>
>
>
> (We could also add some kind of import template like for container, they are a lot of cloud-init templates available on the net)
>
>
> ----- Mail original -----
> De: "aderumier" <aderumier at odiso.com>
> À: "dietmar" <dietmar at proxmox.com>
> Cc: "pve-devel" <pve-devel at pve.proxmox.com>
> Envoyé: Jeudi 11 Juin 2015 07:54:06
> Objet: Re: [pve-devel] RFC: qemu-server : add cloudinit support
>
> >>And is that reboot necessary? Its a bit clumsy, because the boot-loader
> >>is presented 2 times to the user.
>
> I forgot to say that I shutdown the vm (with cloudinit) at the end of the setup, not reboot.
> That's why I setup in pending removal ide3.
>
>
>
> ----- Mail original -----
> De: "aderumier" <aderumier at odiso.com>
> À: "dietmar" <dietmar at proxmox.com>
> Cc: "pve-devel" <pve-devel at pve.proxmox.com>
> Envoyé: Jeudi 11 Juin 2015 07:17:33
> Objet: Re: [pve-devel] RFC: qemu-server : add cloudinit support
>
> >>And is that reboot necessary? Its a bit clumsy, because the boot-loader
> >>is presented 2 times to the user.
>
> No, but I just want to clean remove the cdrom config.
> I setup it as ide3. (in case if use have already a cdrom is default ide2).
>
>
> It could be possible to eject cd from guest in cloudinit config, but currently we can't catch qemu events.
>
>
> ----- Mail original -----
> De: "dietmar" <dietmar at proxmox.com>
> À: "aderumier" <aderumier at odiso.com>
> Cc: "pve-devel" <pve-devel at pve.proxmox.com>
> Envoyé: Jeudi 11 Juin 2015 07:13:53
> Objet: Re: [pve-devel] RFC: qemu-server : add cloudinit support
>
> > >>How long does such configuration cycle run (start/cloudinit/stop)?
> >
> > It's fast, maybe <15s after grub for basic network config.
> > But for example if you want to upgrade packages at first boot or launch
> > puppet/chef,
> > it can take a lot more.
>
> And is that reboot necessary? Its a bit clumsy, because the boot-loader
> is presented 2 times to the user.
More information about the pve-devel
mailing list