mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 13570: vmware cant find vmroot disk because the uuid gets truncated and cloudstack cant reference
truncating template name to 32 chars so they work well with vSphere API
This commit is contained in:
parent
9a6e0abe8c
commit
6e2aee8320
@ -109,6 +109,8 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
|
||||
VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd);
|
||||
|
||||
String templateUuidName = UUID.nameUUIDFromBytes((templateName + "@" + cmd.getPoolUuid() + "-" + hyperHost.getMor().get_value()).getBytes()).toString();
|
||||
// truncate template name to 32 chars to ensure they work well with vSphere API's.
|
||||
templateUuidName = templateUuidName.replace("-", "");
|
||||
|
||||
DatacenterMO dcMo = new DatacenterMO(context, hyperHost.getHyperHostDatacenter());
|
||||
VirtualMachineMO templateMo = VmwareHelper.pickOneVmOnRunningHost(dcMo.findVmByNameAndLabel(templateUuidName), true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user