[pve-devel] [RFC v2 manager] change permissions for non-network cloudinit settings

2020-06-25 Thread Mira Limbeck
With the introduction of VM.Config.Cloudinit we can set the user, password and an SSH key without VM.Config.Network permission. Keep the fallback for VM.Config.Network so custom roles don't break. Signed-off-by: Mira Limbeck --- v2: - fallback to 'VM.Config.Network' requires

[pve-devel] [RFC v2 qemu-server] close #2741: add VM.Config.Cloudinit permission

2020-06-25 Thread Mira Limbeck
This allows setting ciuser, cipassword and all other cloudinit settings that are not part of the network without VM.Config.Network permissions. Keep VM.Config.Network still as fallback so custom roles that add VM.Config.Network but not VM.Config.Cloudinit don't break. Signed-off-by: Mira Li

[pve-devel] [RFC v2 access-control] introduce VM.Config.Cloudinit permission

2020-06-25 Thread Mira Limbeck
It is added to PVEVMUser by default. Signed-off-by: Mira Limbeck --- v2: - unchanged PVE/AccessControl.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/AccessControl.pm b/PVE/AccessControl.pm index f50a510..ae8eaae 100644 --- a/PVE/AccessControl.pm +++ b/PVE/AccessControl.pm

Re: [pve-devel] [RFC qemu-server] close #2741: check for VM.Config.Cloudinit permission

2020-06-24 Thread Mira Limbeck
On 6/24/20 11:51 AM, Fabian Grünbichler wrote: On June 3, 2020 3:58 pm, Mira Limbeck wrote: This allows setting ciuser, cipassword and all other cloudinit settings that are not part of the network without VM.Config.Network permissions. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 5

[pve-devel] [PATCH common] fix #2374: bridge-ports is assumed to be defined

2020-06-10 Thread Mira Limbeck
In the second case we set it to an empty string when it is undefined. Signed-off-by: Mira Limbeck --- src/PVE/INotify.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index c507515..f524672 100644 --- a/src/PVE/INotify.pm +++

[pve-devel] [RFC qemu-server] close #2741: check for VM.Config.Cloudinit permission

2020-06-03 Thread Mira Limbeck
This allows setting ciuser, cipassword and all other cloudinit settings that are not part of the network without VM.Config.Network permissions. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2

[pve-devel] [RFC access-control] close #2741: introduce VM.Config.Cloudinit permission

2020-06-03 Thread Mira Limbeck
It is added to PVEVMUser by default. Signed-off-by: Mira Limbeck --- PVE/AccessControl.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/AccessControl.pm b/PVE/AccessControl.pm index f50a510..ae8eaae 100644 --- a/PVE/AccessControl.pm +++ b/PVE/AccessControl.pm @@ -741,6 +741,7 @@ my

[pve-devel] [RFC manager] change permissions for non-network cloudinit settings

2020-06-03 Thread Mira Limbeck
With the introduction of VM.Config.Cloudinit we can set the user, password and an SSH key without VM.Config.Network permission and instead use VM.Config.Cloudinit. Signed-off-by: Mira Limbeck --- www/manager6/qemu/CloudInit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[pve-devel] [PATCH v2 docs] add documentation for the new icmp-type parameter

2020-05-29 Thread Mira Limbeck
Signed-off-by: Mira Limbeck --- v2: - rebased on master pve-firewall-rules-opts.adoc | 4 1 file changed, 4 insertions(+) diff --git a/pve-firewall-rules-opts.adoc b/pve-firewall-rules-opts.adoc index 13ec8d8..5e8c01e 100644 --- a/pve-firewall-rules-opts.adoc +++ b/pve-firewall-rules

[pve-devel] [PATCH v2 firewall] introduce new icmp-type parameter

2020-05-29 Thread Mira Limbeck
limited to the names (icmp[v6]_type_names hash in the code, same as ip[6]tables provides). Type[/Code] values are not supported. Support for ipv6-icmp is added to icmp-type parameter handling. This makes it possible to specify icmpv6 types via the GUI. Signed-off-by: Mira Limbeck --- v2: - rebased o

[pve-devel] [PATCH manager v2] change icmp type selector to a combogrid

2020-05-29 Thread Mira Limbeck
ICMPTypeSelectors, one for IPv4, the other for IPv6, which are switched depending on the specified protocol. As disabled fields don't submit their value, we can keep the values for the dport and both icmp-type fields when switching protocols. Signed-off-by: Mira Limbeck --- v2: - rebas

[pve-devel] [PATCH qemu-server] fix #2748: make order of interfaces consistent

2020-05-28 Thread Mira Limbeck
As perl hashes have random order, sort them before iterating through. This makes the output of 'qm cloudinit dump network' consistent between calls if the config has not changed. Signed-off-by: Mira Limbeck --- PVE/QemuServer/Cloudinit.pm | 6 +++--- 1 file changed, 3 insert

Re: [pve-devel] [PATCH qemu-server] add is_replicated field to migration check result

2020-05-14 Thread Mira Limbeck
On 5/14/20 11:11 AM, Fabian Ebner wrote: On 5/12/20 3:45 PM, Mira Limbeck wrote: For better warnings regarding replicated disks and the ignored target storage, add the 'is_replicated' field to the migration check result. This contains the result of the replication checks. The first o

[pve-devel] [PATCH manager] add warning for replicated disks

2020-05-12 Thread Mira Limbeck
ot ignored. Signed-off-by: Mira Limbeck --- Migrating the VM to a node that is not a replication target keeps the replication active. This leads to strange behavior when simultaneously moving the disks to a storage that does not support replication (e.g. lvm-thin). Also if that's the case, and o

[pve-devel] [PATCH qemu-server] add is_replicated field to migration check result

2020-05-12 Thread Mira Limbeck
ted to the target node. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index fd51bf3..f88ea6d 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -3329,7 +3329,11 @@ _

[pve-devel] [PATCH docs] remove SLAAC reference from cloudinit docs

2020-05-04 Thread Mira Limbeck
As we don't currently support SLAAC in the nocloud network format code, remove the reference from the docs. Signed-off-by: Mira Limbeck --- We have removed SLAAC from the GUI a while ago because cloud-init did not support it back then but missed the reference in the docs. qm-cloud

[pve-devel] [PATCH v2 firewall] fix #2686: don't add arp-ip-src filter for dhcp

2020-04-30 Thread Mira Limbeck
When the IPFilter setting is enabled and the container has DHCP configured on an interface no 'arp-ip-src' filter should be added as we don't have an IP address. Previously '--arp-ip-src dhcp' was passed to ebtables which led to an error. Signed-off-by: Mira Limbeck ---

Re: [pve-devel] [PATCH firewall] fix #2686: don't add arp-ip-src filter for dhcp

2020-04-30 Thread Mira Limbeck
On 4/30/20 12:00 PM, Mira Limbeck wrote: When the IPFilter setting is enabled and the container has DHCP configured on an interface no 'arp-ip-src' filter should be added for this interface as we don't have an IP address. Previously '--arp-ip-src dhcp' was passed to

[pve-devel] [PATCH firewall] fix #2686: don't add arp-ip-src filter for dhcp

2020-04-30 Thread Mira Limbeck
When the IPFilter setting is enabled and the container has DHCP configured on an interface no 'arp-ip-src' filter should be added for this interface as we don't have an IP address. Previously '--arp-ip-src dhcp' was passed to ebtables which led to an error. Signed-off-b

Re: [pve-devel] applied: [PATCH qemu-server 1/2] migrate: only stop NBD if we got a NBD url from the target

2020-04-30 Thread Mira Limbeck
On 4/30/20 10:13 AM, Thomas Lamprecht wrote: On 4/30/20 10:04 AM, Mira Limbeck wrote: On 4/30/20 8:41 AM, Thomas Lamprecht wrote: On 4/30/20 8:35 AM, Fabian Grünbichler wrote: On April 29, 2020 4:24 pm, Thomas Lamprecht wrote: Signed-off-by: Thomas Lamprecht --- This was rather quickly

Re: [pve-devel] applied: [PATCH qemu-server 1/2] migrate: only stop NBD if we got a NBD url from the target

2020-04-30 Thread Mira Limbeck
On 4/30/20 8:41 AM, Thomas Lamprecht wrote: On 4/30/20 8:35 AM, Fabian Grünbichler wrote: On April 29, 2020 4:24 pm, Thomas Lamprecht wrote: Signed-off-by: Thomas Lamprecht --- This was rather quickly assembled to fix an obvious issue, some in depth look at this would be nice, @Fabi or @Fabia

[pve-devel] [PATCH firewall 3/3] introduce new icmp-type parameter

2020-04-29 Thread Mira Limbeck
range between 0/0 and 255/255. Support for ipv6-icmp is added to icmp-type parameter handling. This makes it possible to specify icmpv6 types via the GUI. Signed-off-by: Mira Limbeck --- src/PVE/API2/Firewall/Rules.pm | 4 +++ src/PVE/Firewall.pm| 63

[pve-devel] [PATCH manager 1/1] change icmp type selector to a combogrid

2020-04-29 Thread Mira Limbeck
p' so set 'icmp-type' again after all values have been set once. This makes sure the icmp type selector contains the right value when editing a rule. Signed-off-by: Mira Limbeck --- www/manager6/grid/FirewallRules.js | 173 - 1 file changed, 169 insertions(+

[pve-devel] [PATCH firewall 1/3] fix iptables-restore failing if icmp-type value > 255

2020-04-29 Thread Mira Limbeck
g is introduced. These error messages are not logged as warnings are ignored. To get these messages you have to run pve-firewall compile and look at the output. Signed-off-by: Mira Limbeck --- src/PVE/Firewall.pm | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/PVE/Firewall.pm b/sr

[pve-devel] [PATCH firewall 2/3] fix wrong icmpv6 types

2020-04-29 Thread Mira Limbeck
This removes icmpv6-type 'any' as it is not supported by ip6tables. Also introduced new icmpv6 types 'beyond-scope', 'failed-policy' and 'reject-route'. These values were taken from 'ip6tables -p icmpv6 -h'. Signed-off-by: Mira Limbeck --

[pve-devel] [PATCH docs 1/1] add documentation for the new icmp-type parameter

2020-04-29 Thread Mira Limbeck
Signed-off-by: Mira Limbeck --- pve-firewall-rules-opts.adoc | 4 1 file changed, 4 insertions(+) diff --git a/pve-firewall-rules-opts.adoc b/pve-firewall-rules-opts.adoc index 13ec8d8..5e8c01e 100644 --- a/pve-firewall-rules-opts.adoc +++ b/pve-firewall-rules-opts.adoc @@ -6,6 +6,10

[pve-devel] [PATCH firewall/docs/manager 0/5] fix #2645 and introduce new icmp-type parameter

2020-04-29 Thread Mira Limbeck
tch 3 introduces the new 'icmp-type' parameter. Patch 5 depends on Patch 3 as it uses the new 'icmp-type' parameter in the API calls. Mira Limbeck (3): fix iptables-restore failing if icmp-type value > 255 fix wrong icmpv6 types introduce new icmp-type parameter src/PVE

Re: [pve-devel] [PATCH qemu-server] migrate: cleanup forwarding code

2020-04-14 Thread Mira Limbeck
On 4/14/20 12:49 PM, Fabian Grünbichler wrote: On April 14, 2020 11:45 am, Mira Limbeck wrote: Looks good to me. Reviewed-By: Mira Limbeck Tested-By: Mira Limbeck  On 4/14/20 10:51 AM, Fabian Grünbichler wrote: fixing the following two issues: - the legacy code path was never converted to

Re: [pve-devel] [PATCH qemu-server] migrate: cleanup forwarding code

2020-04-14 Thread Mira Limbeck
Looks good to me. Reviewed-By: Mira Limbeck Tested-By: Mira Limbeck  On 4/14/20 10:51 AM, Fabian Grünbichler wrote: fixing the following two issues: - the legacy code path was never converted to the new fork_tunnel signature (which probably means that nothing triggers it in practice anymore

[pve-devel] [PATCH qemu-server] revert spice_ticket prefix change in 7827de4

2020-03-20 Thread Mira Limbeck
The change to the prefixed version broke migration from new to old qemu-server version. This reverts the change and adds a TODO comment for 7.0 to change it to the prefixed version then. Signed-off-by: Mira Limbeck --- Please test it as with my arch linux virt-viewer version it just segfaults or

Re: [pve-devel] [PATCH v2 qemu-server 4/4] add unix socket support for NBD storage migration

2020-03-18 Thread Mira Limbeck
> Thomas Lamprecht hat am 18. März 2020 10:32 > geschrieben: > > > On 3/18/20 10:11 AM, Fabian Grünbichler wrote: > >>> @@ -594,10 +597,16 @@ sub phase2 { > >>> } > >>> > >>> my $spice_port; > >>> +my $tunnel_addr = []; > >>> +my $sock_addr = []; > >>> +# version >

[pve-devel] [PATCH v2 qemu-server 1/4] add qemu_drive_mirror_monitor completion modes

2020-03-17 Thread Mira Limbeck
nce the block job is in 'ready' state. This completes the block job without swapping the disks. clone_disk always uses 'block-job-cancel' via the qemu_blockjobs_cancel sub. Signed-off-by: Mira Limbeck --- v2: - introduced this patch PVE/API2/Qemu.pm | 3 ++- PVE/QemuMig

[pve-devel] [PATCH v2 qemu-server 2/4] add NBD server unix socket support in vm_start

2020-03-17 Thread Mira Limbeck
s the form: 'nbd:unix::exportname='. Signed-off-by: Mira Limbeck --- v2: - added fallback to 0 if nbd_protocol_version is undefined - some cleanup regarding variables only used in one case PVE/QemuServer.pm | 34 -- 1 file changed, 24 insertions(+

[pve-devel] [PATCH v2 qemu-server 4/4] add unix socket support for NBD storage migration

2020-03-17 Thread Mira Limbeck
equire for forwarding and cleanup. Signed-off-by: Mira Limbeck --- v2: - added 'spice_ticket: (...)' to input if $spice_ticket is defined - added waiting for all sockets that are used in the tunnel PVE/QemuMigrate.pm | 52 +- 1 file chan

[pve-devel] [PATCH v2 qemu-server 3/4] parse nbd_protocol_version if available

2020-03-17 Thread Mira Limbeck
recognized as spice ticket. Signed-off-by: Mira Limbeck --- v2: - added 'spice_ticket: (...)' variant with fallback for older versions PVE/API2/Qemu.pm | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 21a0eae.

[pve-devel] [PATCH v2 qemu-server 0/4] fix secure live migration with local

2020-03-17 Thread Mira Limbeck
- changed the things @fabian suggested - introduced patch 1 for Qemu 4.2 support Mira Limbeck (4): add qemu_drive_mirror_monitor completion modes add NBD server unix socket support in vm_start parse nbd_protocol_version if available add unix socket support for NBD storage migration PV

[pve-devel] [PATCH qemu-server 3/4] move finish_tunnel to after the VM is stopped

2020-03-11 Thread Mira Limbeck
ll be terminated after 30 seconds. Signed-off-by: Mira Limbeck --- PVE/QemuMigrate.pm | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 44e4c57..e569a2c 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -10

[pve-devel] [PATCH qemu-server 1/4] parse nbd_protocol_version if available

2020-03-11 Thread Mira Limbeck
unix socket support. We use a fallback to 0 should there be no line containing that pattern which is the case if the source node has an older qemu-server version. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PVE/

[pve-devel] [PATCH qemu-server 2/4] add NBD server unix socket support in vm_start

2020-03-11 Thread Mira Limbeck
s the form: 'nbd:unix::exportname='. Signed-off-by: Mira Limbeck --- PVE/QemuServer.pm | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 24f2e16..7d2e0d4 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServe

[pve-devel] [PATCH qemu-server 0/4] add secure live migration with local disks

2020-03-11 Thread Mira Limbeck
tunnel to close by itself, otherwise it will be terminated after a timeout of 30 seconds. Mira Limbeck (4): parse nbd_protocol_version if available add NBD server unix socket support in vm_start move finish_tunnel to after the VM is stopped add unix socket support for NBD storage migration

[pve-devel] [PATCH qemu-server 4/4] add unix socket support for NBD storage migration

2020-03-11 Thread Mira Limbeck
, we get a different line containing all the information required to start the drive-mirror. This contains the unix socket path used on the target node which we require for forwarding and cleanup. Signed-off-by: Mira Limbeck --- PVE/QemuMigrate.pm | 32 +++- 1 file ch

Re: [pve-devel] applied: [PATCH qemu-server] fix #2473: use of unitialized value

2019-11-21 Thread Mira Limbeck
On 11/21/19 12:58 PM, Thomas Lamprecht wrote: On 11/21/19 11:04 AM, Mira Limbeck wrote: With the noerr flag set in parse_volume_id we have to check if $volname is defined before comparing it to 'cloudinit'. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 4 ++-- 1 file

[pve-devel] [PATCH qemu-server] fix #2473: use of unitialized value

2019-11-21 Thread Mira Limbeck
With the noerr flag set in parse_volume_id we have to check if $volname is defined before comparing it to 'cloudinit'. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm ind

[pve-devel] [PATCH v2 manager] fix #2364: allow offline migration with local cloudinit disk

2019-10-07 Thread Mira Limbeck
As the cloudinit disk itself does not get copied on an offline migration, just the config, there's no conflict. Ignore the local cloudinit disk on offline migration. Also adds a useful message when trying to live migrate with a local cloudinit disk. Signed-off-by: Mira Limbeck --- v2: - d

Re: [pve-devel] [PATCH qemu-server] fix #2364: allow migration with local cloudinit disk in GUI

2019-10-07 Thread Mira Limbeck
Don't apply this. If we do it like this there's no local cloudinit disk conflict on live migration as well which is not supported. Looks like we have to do the check in the GUI. On 10/4/19 4:10 PM, Mira Limbeck wrote: Ignore a local cloudinit disk in the check for local disks. The

[pve-devel] [PATCH qemu-server] fix #2364: allow migration with local cloudinit disk in GUI

2019-10-04 Thread Mira Limbeck
Ignore a local cloudinit disk in the check for local disks. The cloudinit disk does not get migrated, only the config does. The disk itself gets recreated on the new node when the VM is started. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [pve-devel] [PATCH manager] fix #2389: ceph wizard showing network of target node

2019-10-04 Thread Mira Limbeck
On 10/4/19 3:03 PM, Thomas Lamprecht wrote: On 10/4/19 11:29 AM, Mira Limbeck wrote: Before this patch the wizard shows the available networks for the node one is connected to, not the actual target node where ceph is configured. This patch changes this to access the network information of the

[pve-devel] [PATCH manager] fix #2389: ceph wizard showing network of target node

2019-10-04 Thread Mira Limbeck
part of the ceph cluster (and the same network) which makes this useful. Signed-off-by: Mira Limbeck --- www/manager6/ceph/CephInstallWizard.js | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph

[pve-devel] [PATCH v2 qemu-server] fix #2344: ignore cloudinit in replication check

2019-09-27 Thread Mira Limbeck
explicitly if the volname matches cloudinit and if so, return early. Additionally 2 small cleanups replacing cloudinit regexes with the same check for volname matches cloudinit. Signed-off-by: Mira Limbeck --- v2: - instead of adding additional regexes remove them completely PVE/API2/Qemu.pm

[pve-devel] [PATCH qemu-server] cloudinit: fix vm start hanging with disk on ZFS

2019-09-27 Thread Mira Limbeck
-off-by: Mira Limbeck --- PVE/QemuServer/Cloudinit.pm | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm index ab001f9..07d4d2d 100644 --- a/PVE/QemuServer/Cloudinit.pm +++ b/PVE/QemuServer/Cloudinit.pm

Re: [pve-devel] [PATCH] Implement support for Cloud-Init vendor data

2019-09-26 Thread Mira Limbeck
I tried applying your patch, but it failed. Looks like the formatting is wrong. Some things inline. On 9/1/19 8:22 PM, Marlin Cremers wrote: The current implementation of Cloud-Init uses user data to set the hostname, username, password and SSH keys of the virtual machine. This has affect that

[pve-devel] [PATCH qemu-server] fix #2217: don't copy cloudinit disk on clone

2019-09-25 Thread Mira Limbeck
This removes the cloudinit disk from the list of drives to clone. As the cloudinit disk is recreated on every VM start, it's not necessary to clone it. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 4 ++-- PVE/QemuServer.pm | 8 2 files changed, 2 insertions(+), 10 dele

[pve-devel] [PATCH qemu-server] fix #2344: allow ':cloudinit' in drive_is_cloudinit

2019-09-25 Thread Mira Limbeck
loudinit image or adding a new cloudinit disk and a replication job exists. Without the early return if its a cloudinit disk it dies in parse_volname. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 2 +- PVE/QemuServer.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git

[pve-devel] [PATCH v2 qemu-server] fix #2382: delete cloudinit disk before restoring

2019-09-25 Thread Mira Limbeck
The fix introduced in commit bf4a933 did not work as intended. We're iterating over the $oldconf, not over $virtdev_hash. This means $drive->{is_cloudinit} is always undefined. Instead use the $exclude_cloudinit parameter from drive_is_cdrom(). Signed-off-by: Mira Limbeck ---

[pve-devel] [PATCH qemu-server] fix #2382: delete cloudinit disk before restoring

2019-09-24 Thread Mira Limbeck
The fix introduced in commit bf4a933 did not work as intended. We're iterating over the $oldconf, not over $virtdev_hash. This means $drive->{is_cloudinit} is always undefined. Instead use the more costly call to drive_is_cloudinit. Signed-off-by: Mira Limbeck --- Tested on PVE 6 and

Re: [pve-devel] [PATCH] Implement support for Cloud-Init vendor data

2019-09-18 Thread Mira Limbeck
29 PM, Marlin Cremers wrote: Op wo 4 sep. 2019 om 15:59 schreef Mira Limbeck : Hi, Thank you for the patch, will take a closer look as soon as possible. Three things: 1) What's your use case that 'vendor-data' is required or preferred instead of 'user-data'? Vendor dat

Re: [pve-devel] [PATCH] Implement support for Cloud-Init vendor data

2019-09-04 Thread Mira Limbeck
Hi, Thank you for the patch, will take a closer look as soon as possible. Three things: 1) What's your use case that 'vendor-data' is required or preferred instead of 'user-data'? 2) Did you test it with configdrive2 (on Linux and Windows)? You change it not only for nocloud, but also for c

Re: [pve-devel] ifupdown2 pve package missing in buster/proxmox6 repo

2019-08-29 Thread Mira Limbeck
Allowing multiple bridges to be vlan-aware requires a change in the config. See https://github.com/CumulusNetworks/ifupdown2/issues/92#issuecomment-458135952 Without this change you get "error: ignoring interface . Only one object with attribute 'bridge-vlan-aware yes' allowed." for every add

[pve-devel] [PATCH firewall] fix use of uninitialized value

2019-08-26 Thread Mira Limbeck
$param->{rename} was not checked for definedness even though it is optional. This lead to a 'use of uninitialized value' when just updating the cidr. Signed-off-by: Mira Limbeck --- src/PVE/API2/Firewall/Aliases.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[pve-devel] [PATCH firewall] only add VM chains if VM firewall is enabled

2019-08-06 Thread Mira Limbeck
t reach each other because of the MAC filter. Now we check if the VM firewall is enabled and only add the MAC and IP filters then. Signed-off-by: Mira Limbeck --- src/PVE/Firewall.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PVE/Firewall.pm b/src/PVE/Firew

[pve-devel] [PATCH container] add support for debian bullseye/sid

2019-07-18 Thread Mira Limbeck
Add support for the newest DebianTesting aka bullseye. Signed-off-by: Mira Limbeck --- src/PVE/LXC/Setup/Debian.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC/Setup/Debian.pm b/src/PVE/LXC/Setup/Debian.pm index 5039889..1d14606 100644 --- a/src/PVE/LXC

[pve-devel] [PATCH qemu-server] close #2263: die on live migration with local cloudinit disk

2019-07-12 Thread Mira Limbeck
already disabled as it recognizes the cloudinit disk as a local resource. Signed-off-by: Mira Limbeck --- PVE/QemuMigrate.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index bc83816..661c96d 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm

[pve-devel] [PATCH qemu-server] cloudinit: set iso-level in genisoimage call

2019-06-27 Thread Mira Limbeck
This is required for Windows to recognize the ISO and as a result the cloudinit config. This is the minimum to get any config working at all for windows. Signed-off-by: Mira Limbeck --- PVE/QemuServer/Cloudinit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE

[pve-devel] [PATCH manager 1/2] pve5to6: add IP check to misc

2019-06-27 Thread Mira Limbeck
Adds the same check we run in pve-cluster before joining a node to make sure the hostname resolves to a configured IP. Signed-off-by: Mira Limbeck --- PVE/CLI/pve5to6.pm | 11 +++ 1 file changed, 11 insertions(+) diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm index cb27fd63

[pve-devel] [PATCH manager 2/2] move check_kvm_nested call to check_misc

2019-06-27 Thread Mira Limbeck
Signed-off-by: Mira Limbeck --- was asked by @Dominik to move it. PVE/CLI/pve5to6.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm index 65552a35..622833b7 100644 --- a/PVE/CLI/pve5to6.pm +++ b/PVE/CLI/pve5to6.pm @@ -120,7 +120,6

[pve-devel] [PATCH docs] add cloudinit dump and snippets documentation

2019-06-25 Thread Mira Limbeck
Adds documentation for the cloudinit snippets support and how 'qm cloudinit dump' can be used to get a base config file. Signed-off-by: Mira Limbeck --- qm-cloud-init.adoc | 36 1 file changed, 36 insertions(+) diff --git a/qm-cloud-init.adoc

[pve-devel] [PATCH qemu-server v2 3/3] add qm command for cloudinit config dump

2019-06-05 Thread Mira Limbeck
Adds the command 'qm cloudinit dump ' where type is either 'user', 'network' or 'meta' as specified in the API. Signed-off-by: Mira Limbeck --- PVE/CLI/qm.pm | 7 +++ 1 file changed, 7 insertions(+) diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm ind

[pve-devel] [PATCH qemu-server v2 2/3] add new API for dumping cloudinit config

2019-06-05 Thread Mira Limbeck
Adds the path '{vmid}/cloudinit/dump' and requires the parameter 'type' that's either 'user', 'network' or 'meta'. Returns the generated config as string. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 32 +

[pve-devel] [PATCH qemu-server v2 1/3] add function to dump cloudinit config

2019-06-05 Thread Mira Limbeck
ctions are each used twice now. Signed-off-by: Mira Limbeck --- v2: - removed all dump functions except for one and moved the logic there as suggested by @Thomas PVE/QemuServer/Cloudinit.pm | 49 + 1 file changed, 41 insertions(+), 8 deletions(-

[pve-devel] [PATCH qemu-server v2 0/3] add cloudinit config dump

2019-06-05 Thread Mira Limbeck
v2: - removed all dump functions except for one and moved the logic there as suggested by @Thomas Mira Limbeck (3): add function to dump cloudinit config add new API for dumping cloudinit config add qm command for cloudinit config dump PVE/API2/Qemu.pm| 32 +++

Re: [pve-devel] [PATCH qemu-server 0/3] add cloudinit config dump

2019-06-04 Thread Mira Limbeck
Forgot to mention, applied on both master and stable-5 (where I developed it) cleanly. On 6/4/19 11:31 AM, Mira Limbeck wrote: The ability to dump the generated cloudinit config that's written to the ISO if no snippet is specified in combination with snippets should be enough for almost

[pve-devel] [PATCH qemu-server 1/3] add function to dump cloudinit config

2019-06-04 Thread Mira Limbeck
s are each used twice. Signed-off-by: Mira Limbeck --- The 'get_meta_config' sub is only used once, could also be merged into 'dump_generated_meta_config'. PVE/QemuServer/Cloudinit.pm | 78 - 1 file changed, 70 insertions(+), 8 dele

[pve-devel] [PATCH qemu-server 0/3] add cloudinit config dump

2019-06-04 Thread Mira Limbeck
For windows support another small patch is required that adds 'iso-level 3' to the 'genisoimage' command, otherwise the ISO does not get recognized by Windows. But after that one even windows users should be able to get everything working with snippets and custom configs.

[pve-devel] [PATCH qemu-server 2/3] add new API for dumping cloudinit config

2019-06-04 Thread Mira Limbeck
Adds the path '{vmid}/cloudinit/dump' and requires the parameter 'type' that's either 'user', 'network' or 'meta'. Returns the generated config as string. Signed-off-by: Mira Limbeck --- PVE/API2/Qemu.pm | 32 +

[pve-devel] [PATCH qemu-server 3/3] add qm command for cloudinit config dump

2019-06-04 Thread Mira Limbeck
Adds the command 'qm cloudinit dump ' where type is either 'user', 'network' or 'meta' as specified in the API. Signed-off-by: Mira Limbeck --- Do we want the additional '\n' after the config? The config itself already contains a newline at th

[pve-devel] [PATCH qemu-server] fix clone_disk with formats other than raw/qcow2

2019-05-16 Thread Mira Limbeck
AT_RE we support 7 different formats. With this change we add any format other than 'raw' as '.' to the name and no longer die on any other format. Cloudinit disks with invalid format are not cloned as the drive is recognized as cdrom, not cloudinit. Signed-off-by: Mira Limbec

[pve-devel] [PATCH v3 qemu-server 2/2] map cloudinit disk to new vmid on restore

2019-05-16 Thread Mira Limbeck
s should fix #1807 completely. The restore error was already resolved with commit 7e8ab2a, but the vmid of the disk might not have matched the new one. Signed-off-by: Mira Limbeck --- v3: - ',' instead of ';' in hash $d v2: - hash $d creation cleanup - removed unnecessary &#

[pve-devel] [PATCH v3 qemu-server 1/2] introduce one global CLOUDINIT_DISK_SIZE constant

2019-05-16 Thread Mira Limbeck
The variable is used instead of the literal value so we have one single place to change the actual value of every use. Signed-off-by: Mira Limbeck --- v3: no changes v2: made CLOUDINIT_DISK_SIZE a constant instead of a variable PVE/API2/Qemu.pm| 4 ++-- PVE/QemuServer

[pve-devel] [PATCH v3 qemu-server 0/2] cleanup and fix vm restore with cloudinit

2019-05-16 Thread Mira Limbeck
ch. other solutions like find_free_diskname and get_next_vm_diskname would require additional logic to make it work with vm-$vmid-cloudinit as name. v3: ',' instead of ';', did not realize in diff that it was the old (not working) one I sent Mira Limbeck (2): introduce one global CLOUDIN

Re: [pve-devel] [PATCH v2 qemu-server 2/2] map cloudinit disk to new vmid on restore

2019-05-16 Thread Mira Limbeck
contains an error On 5/16/19 11:38 AM, Mira Limbeck wrote: Resolves the issue of restoring a VM that has a cloudinit drive configured to a new VMID. The VMID of the disk name gets now remapped correctly and in the process the cloudinit disk is created with the same size as in PVE/API2/Qemu.pm

[pve-devel] [PATCH v2 qemu-server 2/2] map cloudinit disk to new vmid on restore

2019-05-16 Thread Mira Limbeck
s should fix #1807 completely. The restore error was already resolved with commit 7e8ab2a, but the vmid of the disk might not have matched the new one. Signed-off-by: Mira Limbeck --- v2: - hash $d creation cleanup - removed unnecessary '// undef' PVE/QemuServer.pm | 30 +++

[pve-devel] [PATCH v2 qemu-server 1/2] introduce one global CLOUDINIT_DISK_SIZE constant

2019-05-16 Thread Mira Limbeck
The variable is used instead of the literal value so we have one single place to change the actual value of every use. Signed-off-by: Mira Limbeck --- v2: made CLOUDINIT_DISK_SIZE a constant instead of a variable PVE/API2/Qemu.pm| 4 ++-- PVE/QemuServer/Cloudinit.pm | 2 ++ 2

[pve-devel] [PATCH v2 qemu-server 0/2] cleanup and fix vm restore with cloudinit

2019-05-16 Thread Mira Limbeck
ch. other solutions like find_free_diskname and get_next_vm_diskname would require additional logic to make it work with vm-$vmid-cloudinit as name. Mira Limbeck (2): introduce one global CLOUDINIT_DISK_SIZE constant map cloudinit disk to new vmid on restore PVE/API2/Qemu.pm| 4 ++-- PVE/Qem

[pve-devel] [PATCH qemu-server] fix ceph volume with krbd not mapped for file_size_info

2019-05-15 Thread Mira Limbeck
olume. if the disk does not exist and is created with vdisk_alloc we still require an additional call to activate_volume for the new disk. Signed-off-by: Mira Limbeck --- tested with ceph, ceph + krbd, dir, lvm, lvm-thin, zfs PVE/QemuServer/Cloudinit.pm | 7 +-- 1 file changed, 5 insertions(

Re: [pve-devel] [PATCH qemu-server 2/2] map cloudinit disk to new vmid on restore

2019-05-14 Thread Mira Limbeck
On 5/14/19 9:08 AM, Thomas Lamprecht wrote: On 5/13/19 2:01 PM, Mira Limbeck wrote: since the restore is now working but does not map the disk to the new vmid, this patch solves that. it allocates the new disk with vdisk_alloc to get the new disk name. the regex to check if it could be a

Re: [pve-devel] [PATCH qemu-server 1/2] introduce one global cloudinit disk size variable

2019-05-14 Thread Mira Limbeck
On 5/14/19 9:01 AM, Thomas Lamprecht wrote: On 5/13/19 2:01 PM, Mira Limbeck wrote: this variable $CLOUDINIT_DISK_SIZE is to be used everywhere the size is currently specified (as 4 * 1024 * 1024) so we can change it once for all occurrences. additionally make the swap from literal value to

[pve-devel] [PATCH qemu-server 0/2] cleanup and fix vm restore with cloudinit

2019-05-13 Thread Mira Limbeck
le (parse_drive + drive_is_cloudinit). and the one regex still in use now matches on any line starting with 'ide', 'sata' or 'scsi' and takes whatever comes after it to pass to 'parse_drive' instead of a custom regex that matches on vm-\d+-cloudinit directly.

[pve-devel] [PATCH qemu-server 1/2] introduce one global cloudinit disk size variable

2019-05-13 Thread Mira Limbeck
this variable $CLOUDINIT_DISK_SIZE is to be used everywhere the size is currently specified (as 4 * 1024 * 1024) so we can change it once for all occurrences. additionally make the swap from literal value to variable everywhere it's used. Signed-off-by: Mira Limbeck --- PVE/API2/Qe

[pve-devel] [PATCH qemu-server 2/2] map cloudinit disk to new vmid on restore

2019-05-13 Thread Mira Limbeck
his should fix #1807 completely. the restore error was already resolved with commit 7e8ab2a, but the vmid of the disk might not have matched the new one. Signed-off-by: Mira Limbeck --- PVE/QemuServer.pm | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/PVE

Re: [pve-devel] applied: [PATCH v2 qemu-server] fix #2173: use file_size_info to check existence

2019-05-02 Thread Mira Limbeck
On 5/2/19 10:20 AM, Mira Limbeck wrote: On 4/30/19 3:14 PM, Thomas Lamprecht wrote: initially just wanted to review but to finaly move this forward: applied comments still inline, can you please answer the question about the second file info call? because I just threw a few followup on top, and

Re: [pve-devel] [PATCH v2 qemu-server] fix #2173: use file_size_info to check existence

2019-05-02 Thread Mira Limbeck
Limbeck wrote: use file_size_info to check for existence of cloudinit disk instead of '-e'. this should solve the problem with rbd where the path returned by PVE::Storage::path is not checkable with '-e'. Any size > 0 is interpreted as the image existing. Signed-off-b

Re: [pve-devel] applied: [PATCH v2 qemu-server] fix #2173: use file_size_info to check existence

2019-05-02 Thread Mira Limbeck
not missed anything ;-) Am 4/30/19 um 2:20 PM schrieb Mira Limbeck: use file_size_info to check for existence of cloudinit disk instead of '-e'. this should solve the problem with rbd where the path returned by PVE::Storage::path is not checkable with '-e'. Any size > 0 is i

[pve-devel] [PATCH v2 qemu-server] fix #2173: use file_size_info to check existence

2019-04-30 Thread Mira Limbeck
use file_size_info to check for existence of cloudinit disk instead of '-e'. this should solve the problem with rbd where the path returned by PVE::Storage::path is not checkable with '-e'. Any size > 0 is interpreted as the image existing. Signed-off-by: Mira Limbeck

[pve-devel] [PATCH v2 storage] map_volume: fall back to 'path'

2019-04-29 Thread Mira Limbeck
e 'map_volume'. Signed-off-by: Mira Limbeck --- v2: - added Thomas' suggestion to just return $path instead of the whole 'wantarray' thing PVE/Storage/Plugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Pl

Re: [pve-devel] [PATCH qemu-server] fix #2173: use list_images to check for cloudinit disk

2019-04-29 Thread Mira Limbeck
After talking to @Dominik he suggested to use 'qemu-img info' to check if the disk exists. Would this be a better solution than the 'map_volume' one for you as well? On 4/25/19 4:07 PM, Thomas Lamprecht wrote: Am 4/25/19 um 12:10 PM schrieb Mira Limbeck: On 4/24/19 3:58

Re: [pve-devel] [PATCH storage] map_volume: fallback to 'path'

2019-04-29 Thread Mira Limbeck
I'll rework the patch then. On 4/26/19 5:06 PM, Thomas Lamprecht wrote: Am 4/26/19 um 4:36 PM schrieb Mira Limbeck: On 4/26/19 4:30 PM, Thomas Lamprecht wrote: Am 4/26/19 um 3:00 PM schrieb Mira Limbeck: Adds a fallback to 'Plugin::path' in the default implementation of '

Re: [pve-devel] [PATCH storage] map_volume: fallback to 'path'

2019-04-26 Thread Mira Limbeck
On 4/26/19 4:30 PM, Thomas Lamprecht wrote: Am 4/26/19 um 3:00 PM schrieb Mira Limbeck: Adds a fallback to 'Plugin::path' in the default implementation of 'map_volume' to make the additional call to 'path' unnecessary if 'map_volume' is not implemented i

[pve-devel] [PATCH storage] map_volume: fallback to 'path'

2019-04-26 Thread Mira Limbeck
ion does not override 'map_volume'. Signed-off-by: Mira Limbeck --- This change was discussed with @Wolfgang off-list. It should simplify the use-case of calling 'map_volume' followed by 'path' if it is not defined as found for example in pve-container/src/API2/LXC.pm:

Re: [pve-devel] [PATCH qemu-server] fix #2173: use list_images to check for cloudinit disk

2019-04-25 Thread Mira Limbeck
On 4/24/19 3:58 PM, Thomas Lamprecht wrote: Am 4/15/19 um 1:50 PM schrieb Mira Limbeck: use list_images to check for existence of cloudinit disk instead of '-e'. this should solve the problem with rbd where the path returned by PVE::Storage::path is not checkable with '-e'.

[pve-devel] [PATCH v2 firewall] fix #2178: endless loop on ipv6 extension headers

2019-04-17 Thread Mira Limbeck
header. it moves on to the next extension or protocol now instead of looping on the same 'proto' while advancing the payload. Signed-off-by: Mira Limbeck --- src/pvefw-logger.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pvefw-logger.c b/src/

  1   2   >