[pve-devel] [PATCH container 2/5] add ignore_ro flag to mount_all

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon May 30 11:45:54 CEST 2016


---
 src/PVE/LXC.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 759ab6d..7b4afa2 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -918,7 +918,7 @@ sub umount_all {
 }
 
 sub mount_all {
-    my ($vmid, $storage_cfg, $conf) = @_;
+    my ($vmid, $storage_cfg, $conf, $ignore_ro) = @_;
 
     my $rootdir = "/var/lib/lxc/$vmid/rootfs";
     File::Path::make_path($rootdir);
@@ -930,6 +930,8 @@ sub mount_all {
 	PVE::LXC::Config->foreach_mountpoint($conf, sub {
 	    my ($ms, $mountpoint) = @_;
 
+	    $mountpoint->{ro} = 0 if $ignore_ro;
+
 	    mountpoint_mount($mountpoint, $rootdir, $storage_cfg);
         });
     };
-- 
2.1.4





More information about the pve-devel mailing list