[pve-devel] [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init

Alexandre DERUMIER aderumier at odiso.com
Wed Oct 11 11:59:51 CEST 2017


>>Mainly I'd like the option to be able to see the vmid, eg. I like 
>>deriving ip addresses from the vmid, so if the guest could see that, I 
>>could clone and start a template without having to configure anything 
>>at all ;-)

But in this case, I think you need to have some kind of predefined map  vmid<->ipaddress
in your template ?

Note that it's already possible to do this with smbios uuid. 
But the space in smbios is limited to provide a lot of informations.


>>It could be encoded in the name though... or perhaps an option to pass 
>>along a file by path? But that would have to be limited to root... I 
>>think we already talked about this a little bit in the early cloudinit 
>>patche series...

I'm more the the file by path solution. (or maybe through an encoded string fw_cfg [name=]<item_name>,string=<string> )

For my personal usage, I only need something like:

qm clone or qm create ...
then
qm start ....   -init name=...,ip=....,gw....


don't known if we want to keep infos in vm config or not, but at least be able to send infos for first init could be great.






----- Mail original -----
De: "Wolfgang Bumiller" <w.bumiller at proxmox.com>
À: "aderumier" <aderumier at odiso.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mercredi 11 Octobre 2017 09:52:39
Objet: Re: [pve-devel] [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init

On Wed, Oct 11, 2017 at 08:08:01AM +0200, Alexandre DERUMIER wrote: 
> Any comment ? 

I've been meaning to look into qemu_fw_cfg more closely. I like the 
idea, but am wondering if it makes sense to do it this way. It 
definitely combines well with the cloudinit patch set, but I wonder if 
it might be useful to be able to pass along other data - either 
additionally or instead of the config. 
Mainly I'd like the option to be able to see the vmid, eg. I like 
deriving ip addresses from the vmid, so if the guest could see that, I 
could clone and start a template without having to configure anything 
at all ;-) 
It could be encoded in the name though... or perhaps an option to pass 
along a file by path? But that would have to be limited to root... I 
think we already talked about this a little bit in the early cloudinit 
patche series... 

> ----- Mail original ----- 
> De: "aderumier" <aderumier at odiso.com> 
> À: "pve-devel" <pve-devel at pve.proxmox.com> 
> Cc: "aderumier" <aderumier at odiso.com> 
> Envoyé: Vendredi 6 Octobre 2017 16:49:10 
> Objet: [PATCH qemu-server 0/4] qemu_fw_cfg support for vm init 
> 
> This patch series add support for qemu_fw_cfg, 
> which allow to send through a firmware the content the vmid.conf. 
> 
> It's add ipconfig,searchdomain,nameserver && sshkey like lxc. 
> 
> The main usage is to bootstrap a new vm, setup network configuration or other init configs. 
> 
> 
> 
> 
> Alexandre Derumier (4): 
> add qemu firmware cfg 
> add ipconfigX to vm config 
> add searchdomain, nameserver && sshkey option 
> add firstboot debian sample 
> 
> PVE/API2/Qemu.pm | 2 +- 
> PVE/QemuServer.pm | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 
> firstboot.debian | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++ 
> 3 files changed, 241 insertions(+), 4 deletions(-) 
> create mode 100755 firstboot.debian 




More information about the pve-devel mailing list