Re: [pve-devel] rfc : qemu fw_cfg as alternative to cloudinit

2017-10-06 Thread Alexandre DERUMIER
Hi, I also notice that qemu guest agent now support guest-file-write guest-exec So, I think it's possible to manage ip address,hostname, password,... like we do it for lxc. so, fw_cfg could be use for vm init and when vm is running, use guest agent to change config live. - Mail orig

Re: [pve-devel] rfc : qemu fw_cfg as alternative to cloudinit

2017-10-06 Thread Thomas Lamprecht
Hi, On 10/06/2017 09:44 AM, Alexandre DERUMIER wrote: > Hi, > > I also notice that qemu guest agent now support > > guest-file-write > guest-exec > > > So, I think it's possible to manage ip address,hostname, password,... like we > do it for lxc. > Yes, could be - maybe a bit more difficult

Re: [pve-devel] rfc : qemu fw_cfg as alternative to cloudinit

2017-10-06 Thread Thomas Lamprecht
On 10/04/2017 10:31 AM, Alexandre DERUMIER wrote: >>> I saw this pop up on qemu-devel and edk2 (OVMF) devel here and there >>> but never looked really specific at that time. >>> It could be promising, IMO. To allow it to work we need more current >>> OVMF images, but those are already underway :

[pve-devel] [PATCH common 1/3] cli: prepare CLIHandler for handling sub-commands

2017-10-06 Thread Philip Abernethy
instead of 5 slightly different calls to RESTHandler::usage_str this introduces a wrapper function that handles all required cases and is capable of resolving sub-commands and aliases. Adds a subroutine to print the short help for a command in case no subcommand was given. Modifies handle_cmd to al

[pve-devel] [PATCH common 3/3] cli: whitespace cleanup

2017-10-06 Thread Philip Abernethy
--- src/PVE/CLIHandler.pm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index d480e70..2ccc15c 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -124,12 +124,12 @@ $generate_usage_str = sub { }; __

[pve-devel] [PATCH common 0/3] CLI: Sub-commands and aliases

2017-10-06 Thread Philip Abernethy
This patch (1/3 is the effective part) adds support for sub-commands in the form of `pveum user add `, as well as aliases, so the prior format can still be used. It correctly parses the current command format as well and, to my knowledge,generates identical help texts, man-pages and html-docs. It s

[pve-devel] [PATCH common 2/3] cli: code cleanup

2017-10-06 Thread Philip Abernethy
Removes obsolete subroutine and some unnecessary parameters for command handlers. --- src/PVE/CLIHandler.pm | 89 +-- 1 file changed, 30 insertions(+), 59 deletions(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 13bd168..d480e70

[pve-devel] [PATCH container] fixes #1227: include ns/ dir in read_cgroup_value

2017-10-06 Thread Philip Abernethy
this fixes the disk I/O graph and now also correctly sums the values. --- This fix is already somewhat obsoleted by cgroup v2, but targetting that will me much more effort. src/PVE/LXC.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm inde

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

2017-10-06 Thread Alexandre Derumier
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):

[pve-devel] [PATCH qemu-server 1/4] add qemu firmware cfg

2017-10-06 Thread Alexandre Derumier
This add support for qemu_fw_cfg feature, enable it by default for qemu 2.9 (fw_cfg already exist, it's just a new firmware, so it don't break live migration) the vmid.conf content will be passed to guest vm with -fw_cfg name=opt/Proxmox,file=/etc/pve/nodes//qemu-server/.conf qemu guest can rea

[pve-devel] [PATCH qemu-server 3/4] add searchdomain, nameserver && sshkey option

2017-10-06 Thread Alexandre Derumier
--- PVE/QemuServer.pm | 17 + 1 file changed, 17 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 6c41a57..19951d2 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -507,6 +507,23 @@ EODESCR description => "Select BIOS implementation.",

[pve-devel] [PATCH qemu-server 2/4] add ipconfigX to vm config

2017-10-06 Thread Alexandre Derumier
* Add ipconfigX for all netX configuration options and using ip=CIDR, gw=IP, ip6=CIDR, gw6=IP as option names like in LXC. --- PVE/API2/Qemu.pm | 2 +- PVE/QemuServer.pm | 89 ++- 2 files changed, 89 insertions(+), 2 deletions(-) diff -

[pve-devel] [PATCH qemu-server 4/4] add firstboot debian sample

2017-10-06 Thread Alexandre Derumier
simple example of firstboot script to generate network config --- firstboot.debian | 119 +++ 1 file changed, 119 insertions(+) create mode 100755 firstboot.debian diff --git a/firstboot.debian b/firstboot.debian new file mode 100755 index