[lxc-devel] [PATCH 1/1] ubuntu: use lxc_putold as the pivot_root put dir

Serge Hallyn serge.hallyn at canonical.com
Fri May 25 16:32:04 UTC 2012


By default we use mnt, but that means that lxc fstab entries do not work
when placed under the container's /mnt/.

Switching the default away from /mnt would work too, if noone
objects.  (I see no downside, but figured I'd play it safe for now)

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 templates/lxc-ubuntu-cloud.in |    1 +
 templates/lxc-ubuntu.in       |    1 +
 2 files changed, 2 insertions(+)

diff --git a/templates/lxc-ubuntu-cloud.in b/templates/lxc-ubuntu-cloud.in
index 267dbab..bcf669d 100644
--- a/templates/lxc-ubuntu-cloud.in
+++ b/templates/lxc-ubuntu-cloud.in
@@ -54,6 +54,7 @@ lxc.rootfs = $rootfs
 lxc.mount  = $path/fstab
 lxc.arch = $arch
 lxc.cap.drop = sys_module mac_admin
+lxc.pivotdir = lxc_putold
 
 lxc.cgroup.devices.deny = a
 # Allow any mknod (but not using the node)
diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 822554f..2445efd 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -284,6 +284,7 @@ lxc.rootfs = $rootfs
 lxc.mount  = $path/fstab
 lxc.arch = $arch
 lxc.cap.drop = sys_module mac_admin mac_override
+lxc.pivotdir = lxc_putold
 
 lxc.cgroup.devices.deny = a
 # Allow any mknod (but not using the node)
-- 
1.7.9.5





More information about the lxc-devel mailing list