]> git.proxmox.com Git - pve-container.git/commitdiff
Use lxc.start.unshare and revert "unshare lxc-start ..."
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 19 Nov 2015 09:30:35 +0000 (10:30 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 20 Nov 2015 06:12:41 +0000 (07:12 +0100)
This reverts commit 4162edaea3452a3ffba85db95774c3615fb47cff.

This is now controlled by lxc's lxc.start.unshare
configuration option.

src/PVE/API2/LXC/Status.pm
src/PVE/LXC.pm

index dc05445a18098b593531bfbea72680148ae672c6..5e5e11678177ebe73ba8d436cebba9e476d47620 100644 (file)
@@ -163,8 +163,7 @@ __PACKAGE__->register_method({
 
                PVE::LXC::update_lxc_config($storage_cfg, $vmid, $conf);
 
-               my $cmd = ['unshare', '-m', '--',
-                          'sh', '-c', "mount --make-rslave / && exec lxc-start -n $vmid"];
+               my $cmd = ['lxc-start', '-n', $vmid];
 
                run_command($cmd);
 
index a326e748f46f7d3ffff091f1952ec446ccf78e23..a85213f31f0647d9619f3836d240a767b35f005e 100644 (file)
@@ -1069,6 +1069,8 @@ sub update_lxc_config {
        die "implement me";
     }
 
+    $raw .= "lxc.start.unshare = 1\n";
+
     # Should we read them from /etc/subuid?
     if ($unprivileged && !$custom_idmap) {
        $raw .= "lxc.id_map = u 0 100000 65536\n";