[pve-devel] [PATCH 19/19] vm_start : targetstorage : create disks also for shared storage if !migratedfrom
Alexandre Derumier
aderumier at odiso.com
Wed Feb 22 14:33:43 CET 2017
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/QemuServer.pm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index e084981..d7f2540 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4498,9 +4498,10 @@ sub vm_start {
return if !$volid;
my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
-
- my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
- return if $scfg->{shared};
+ if($migratedfrom) {
+ my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
+ return if $scfg->{shared};
+ }
$local_volumes->{$ds} = [$volid, $storeid, $volname];
});
--
2.1.4
More information about the pve-devel
mailing list