Skip to content

Commit f7b600b

Browse files
hongtu_zangMice Xia
authored andcommitted
CLOUDSTACK-1334 global config vmware.root.disk.controller doesn't work
1 parent 99653ea commit f7b600b

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
// Licensed to the Apache Software Foundation (ASF) under one
23
// or more contributor license agreements. See the NOTICE file
34
// distributed with this work for additional information
@@ -129,6 +130,17 @@ public <T extends VirtualMachine> VirtualMachineTO implement(VirtualMachineProfi
129130
}
130131
}
131132
}
133+
134+
String diskDeviceType = details.get(VmDetailConstants.ROOK_DISK_CONTROLLER);
135+
if (!(vm.getVirtualMachine() instanceof DomainRouterVO || vm.getVirtualMachine() instanceof ConsoleProxyVO
136+
|| vm.getVirtualMachine() instanceof SecondaryStorageVmVO)){
137+
// user vm
138+
if (diskDeviceType != null){
139+
details.remove(VmDetailConstants.ROOK_DISK_CONTROLLER);
140+
}
141+
details.put(VmDetailConstants.ROOK_DISK_CONTROLLER, _vmwareMgr.getRootDiskController());
142+
}
143+
132144
to.setDetails(details);
133145

134146
if(vm.getVirtualMachine() instanceof DomainRouterVO) {

‎plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,6 @@ List<ManagedObjectReference> addHostToPodCluster(VmwareContext serviceContext, l
6767
String getPublicVSwitchName(long dcId, HypervisorType hypervisorType);
6868

6969
String getGuestVSwitchName(long dcId, HypervisorType hypervisorType);
70+
71+
public String getRootDiskController();
7072
}

‎plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,4 +906,9 @@ public Map<String, String> getNexusVSMCredentialsByClusterId(Long clusterId) {
906906
}
907907
return nexusVSMCredentials;
908908
}
909+
910+
@Override
911+
public String getRootDiskController() {
912+
return _rootDiskController;
913+
}
909914
}

0 commit comments

Comments
 (0)