Updated Branches: refs/heads/master 99653ea32 -> f7b600b43
CLOUDSTACK-1334 global config vmware.root.disk.controller doesn't work Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/f7b600b4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/f7b600b4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/f7b600b4 Branch: refs/heads/master Commit: f7b600b43921ee2324e049432c9cf18906fc6772 Parents: 99653ea Author: hongtu_zang <[email protected]> Authored: Wed Feb 20 09:52:25 2013 +0800 Committer: Mice Xia <[email protected]> Committed: Thu Feb 21 11:29:08 2013 +0800 ---------------------------------------------------------------------- .../src/com/cloud/hypervisor/guru/VMwareGuru.java | 12 ++++++++++++ .../hypervisor/vmware/manager/VmwareManager.java | 2 ++ .../vmware/manager/VmwareManagerImpl.java | 5 +++++ 3 files changed, 19 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f7b600b4/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java index 819d399..bb7c297 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java @@ -1,3 +1,4 @@ + // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -129,6 +130,17 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru { } } } + + String diskDeviceType = details.get(VmDetailConstants.ROOK_DISK_CONTROLLER); + if (!(vm.getVirtualMachine() instanceof DomainRouterVO || vm.getVirtualMachine() instanceof ConsoleProxyVO + || vm.getVirtualMachine() instanceof SecondaryStorageVmVO)){ + // user vm + if (diskDeviceType != null){ + details.remove(VmDetailConstants.ROOK_DISK_CONTROLLER); + } + details.put(VmDetailConstants.ROOK_DISK_CONTROLLER, _vmwareMgr.getRootDiskController()); + } + to.setDetails(details); if(vm.getVirtualMachine() instanceof DomainRouterVO) { http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f7b600b4/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java index e219c1c..445b2f0 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java @@ -67,4 +67,6 @@ public interface VmwareManager { String getPublicVSwitchName(long dcId, HypervisorType hypervisorType); String getGuestVSwitchName(long dcId, HypervisorType hypervisorType); + + public String getRootDiskController(); } http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f7b600b4/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java index e6d5742..70f98cc 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java @@ -906,4 +906,9 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw } return nexusVSMCredentials; } + + @Override + public String getRootDiskController() { + return _rootDiskController; + } }
