mirror of https://github.com/apache/cloudstack.git
use correct secondary storage when creating template from snapshot
This commit is contained in:
parent
549d2e29ed
commit
e186369c51
|
|
@ -1455,9 +1455,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
throw new CloudRuntimeException("Unable to find Snapshot for Id " + snapshotId);
|
||||
}
|
||||
zoneId = snapshot.getDataCenterId();
|
||||
secondaryStorageHost = _storageMgr.getSecondaryStorageHost(zoneId);
|
||||
secondaryStorageHost = _hostDao.findById(snapshot.getSecHostId());
|
||||
if (secondaryStorageHost == null) {
|
||||
throw new CloudRuntimeException("Can not find the secondary storage for zoneId " + zoneId);
|
||||
throw new CloudRuntimeException("Secondary storage " + snapshot.getSecHostId() + " doesn't exist");
|
||||
}
|
||||
String secondaryStorageURL = secondaryStorageHost.getStorageUrl();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue