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
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
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
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
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
+++
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
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
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
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
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
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
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
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
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
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 @@ _
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
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
---
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
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
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
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
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
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(+
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
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
--
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
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
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
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
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
> 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 >
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
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(+
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
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.
- 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
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
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/
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
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
, 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
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
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
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
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
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
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
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
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
-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
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
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
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
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
---
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
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
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
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
$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 --
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
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
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
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
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
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
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
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
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 +
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(-
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 +++
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
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
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.
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 +
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
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
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
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
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
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
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 +++
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
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
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(
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
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
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.
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
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
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
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
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
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
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
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
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
'
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
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:
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'.
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 - 100 of 129 matches
Mail list logo