[pve-devel] [PATCH 3/8] activate all mountpoints at vmstart

Alexandre Derumier aderumier at odiso.com
Fri Aug 14 14:56:44 CEST 2015


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 src/PVE/API2/LXC.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 8acb0d4..10b981d 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1001,8 +1001,10 @@ __PACKAGE__->register_method({
 
 		my $storage_cfg = cfs_read_file("storage.cfg");
 
-		my $rootinfo = PVE::LXC::parse_ct_mountpoint($conf->{rootfs});
-		PVE::Storage::activate_volumes($storage_cfg, [$rootinfo->{volume}]);
+		PVE::LXC::foreach_mountpoint($conf, sub {
+		    my ($ms, $mountpoint) = @_;
+		    PVE::Storage::activate_volumes($storage_cfg, [$mountpoint->{volume}]);
+		});
 		
 		PVE::LXC::update_lxc_config($storage_cfg, $vmid, $conf);
 
-- 
2.1.4




More information about the pve-devel mailing list