[pve-devel] RFC: qemu-server : add cloudinit support

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Jun 19 12:06:05 CEST 2015


> > > Do you think to keep config files in /etc/pve ? (to avoid need to rsync 
(...)
> > I don't think this is necessary at all, because when the kvm process is 
(...)
> /etc/pve/cloud-init/132/openstack/latest/meta_data.json

I had to change my mind there (again).
If we add template support it might actually be a better idea to copy it
off into /tmp and rsync it over after all. Because even if we do keep vm
config changes as pending changes, template files which come from a
different storage could be modified independently of the VM.
Keeping it as files still shaves off a good 90% of the data ;-) (The
isos were over 300K and the files only a few K)

-rw-r--r-- 1 root root 362K Jun 19 08:59 configdrive.iso

# du -sh /tmp/cloudinit/112/files
28K     /tmp/cloudinit/112/files

Here's the kicker :-P
-rw-r--r-- 1 root root 1.5K Jun 19 08:59 configdrive.iso.gz
-rw-r--r-- 1 root root 1.2K Jun 19 08:59 configdrive.iso.xz

362K down to 1.2K, I want that for ALL my files ;-)

On Fri, Jun 19, 2015 at 11:02:46AM +0200, Alexandre DERUMIER wrote:
> >>That data can change, so it would be safer to generate an iso, and use rsync
> >>to copy that image when we migrate the VM?
> 
> Maybe it was not clear,
> but I was talking about wolfgang patch to use vfat drive, which should allow to not generate an iso,
> but map files from host to guest directly
> 
> something like
> 
> /etc/pve/cloud-init/132/openstack/latest/meta_data.json
> /etc/pve/cloud-init/132/openstack/latest/user_data
> 
> qemu -drive file=fat:/etc/pve/cloud-init/132/
> 
> 
> 
> (of course we need to keep config in vmid.conf, pending,.... and generat this files when needed)
> 
> 
> 
> ----- Mail original -----
> De: "dietmar" <dietmar at proxmox.com>
> À: "Wolfgang Bumiller" <w.bumiller at proxmox.com>, "aderumier" <aderumier at odiso.com>
> Cc: "pve-devel" <pve-devel at pve.proxmox.com>
> Envoyé: Vendredi 19 Juin 2015 09:24:14
> Objet: Re: [pve-devel] RFC: qemu-server : add cloudinit support
> 
> > > Do you think to keep config files in /etc/pve ? (to avoid need to rsync 
> > > them ?) 
> > 
> > I don't think this is necessary at all, because when the kvm process is 
> > started on the receiving end it goes through the same startup routines 
> > and should thus be creating its own cloud-init config files. So they can 
> > be kept in a /tmp folder. 
> 
> I guess this works well with all setting we store inside the VM config (if 
> we correctly use pending section). 
> 
> But what if we allow to reference external sources for cloudinit data? 
> 
> For example, I can imagine something like: 
> 
> cloudinit: template=my-cloud-init-data 
> 
> which simply includes files found in /etc/pve/cloud-init/my-cloud-init-data/ 
> 
> That data can change, so it would be safer to generate an iso, and use rsync 
> to copy that image when we migrate the VM? 
> 




More information about the pve-devel mailing list