Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C4F9D443 for ; Thu, 21 Feb 2013 03:30:23 +0000 (UTC) Received: (qmail 34986 invoked by uid 500); 21 Feb 2013 03:30:22 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 34793 invoked by uid 500); 21 Feb 2013 03:30:21 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 34745 invoked by uid 99); 21 Feb 2013 03:30:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 03:30:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AE17A82D9C1; Thu, 21 Feb 2013 03:30:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mice@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: refs/heads/master - CLOUDSTACK-1334 global config vmware.root.disk.controller doesn't work Message-Id: <20130221033018.AE17A82D9C1@tyr.zones.apache.org> Date: Thu, 21 Feb 2013 03:30:18 +0000 (UTC) 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 Authored: Wed Feb 20 09:52:25 2013 +0800 Committer: Mice Xia 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; + } }