mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Handle volume copy from secondary to primary in case of vSAN
This commit is contained in:
parent
d48cab75ab
commit
0a412ac6da
@ -3483,7 +3483,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
|
|||||||
throw new Exception("Unable to create container VM for volume creation");
|
throw new Exception("Unable to create container VM for volume creation");
|
||||||
}
|
}
|
||||||
|
|
||||||
clonedVm.moveAllVmDiskFiles(primaryDsMo, "", false);
|
clonedVm.moveAllVmDiskFiles(primaryDsMo, HypervisorHostHelper.VSPHERE_DATASTORE_BASE_FOLDER, false);
|
||||||
clonedVm.detachAllDisks();
|
clonedVm.detachAllDisks();
|
||||||
return _storage.getSize(srcOVFFileName);
|
return _storage.getSize(srcOVFFileName);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@ -260,8 +260,13 @@ public class DatastoreMO extends BaseMO {
|
|||||||
destFullPath = String.format("[%s] %s", destDsName, destFilePath);
|
destFullPath = String.format("[%s] %s", destDsName, destFilePath);
|
||||||
|
|
||||||
DatastoreMO srcDsMo = new DatastoreMO(_context, morDestDs);
|
DatastoreMO srcDsMo = new DatastoreMO(_context, morDestDs);
|
||||||
if (!srcDsMo.fileExists(srcFullPath)) {
|
try {
|
||||||
s_logger.error(String.format("Cannot move file to destination datastore due to file %s does not exists", srcFullPath));
|
if (!srcDsMo.fileExists(srcFullPath)) {
|
||||||
|
s_logger.error(String.format("Cannot move file to destination datastore due to file %s does not exists", srcFullPath));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
s_logger.error(String.format("Cannot move file to destination datastore due to file %s due to exeception %s", srcFullPath, e.getMessage()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user