restore keeps what is in the backup config, but allows switching to
unprivileged. switching from unprivileged to privileged requires VM.Allocate at
the moment.

the config schema default cannot easily be changed to unprivileged, as that
would break existing configs.

Signed-off-by: Fabian Grünbichler <[email protected]>
---
 src/PVE/API2/LXC.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index a56c441..a247b80 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -252,6 +252,8 @@ __PACKAGE__->register_method({
 
         if ($restore) {
             # fixme: limit allowed parameters
+        } else {
+            $unprivileged = 1 if !defined($unprivileged);
         }
 
         my $force = extract_param($param, 'force');
-- 
2.39.5



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to