[pve-devel] [PATCH container] allow disks on shared storages on replicated VMs

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jun 27 15:00:10 CEST 2017


---
 src/PVE/API2/LXC/Config.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/API2/LXC/Config.pm b/src/PVE/API2/LXC/Config.pm
index fc027d7..2b622b3 100644
--- a/src/PVE/API2/LXC/Config.pm
+++ b/src/PVE/API2/LXC/Config.pm
@@ -145,6 +145,8 @@ __PACKAGE__->register_method({
 			$format = (PVE::Storage::parse_volname($storage_cfg, $volid))[6];
 		    }
 		    return if PVE::Storage::storage_can_replicate($storage_cfg, $storeid, $format);
+		    my $scfg = PVE::Storage::storage_config($storage_cfg, $storeid);
+		    return if $scfg->{shared};
 		}
 		die "cannot add non-replicatable volume to a replicated VM\n";
 	    });
-- 
2.11.0





More information about the pve-devel mailing list