Disable VMwareTools detection to avoid unreliable result caused by 
race-condition when VMwareTools is not ready in guest OS yet and the API is 
called. This is the corrected commit
(cherry picked from commit 16a2442c41d87206e9511b842a87475eba0419f6)

Signed-off-by: animesh <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8222eae2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8222eae2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8222eae2

Branch: refs/heads/4.2
Commit: 8222eae21f030c5f6af338a441f9f2fd26904be1
Parents: d6c4a84
Author: Kelven Yang <[email protected]>
Authored: Thu Sep 19 23:18:26 2013 -0700
Committer: animesh <[email protected]>
Committed: Fri Sep 20 11:08:04 2013 -0700

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/resource/VmwareResource.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8222eae2/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 0990b3a..26ebaa0 100755
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -1665,12 +1665,13 @@ public class VmwareResource implements 
StoragePoolResource, ServerResource, Vmwa
                 throw new Exception(msg);
             }
 
+/*
             if(!isVMWareToolsInstalled(vmMo)){
                 String errMsg = "vmware tools is not installed or not running, 
cannot add nic to vm " + vmName;
                 s_logger.debug(errMsg);
                 return new PlugNicAnswer(cmd, false, "Unable to execute 
PlugNicCommand due to " + errMsg);
             }
-
+*/
             // TODO need a way to specify the control of NIC device type
             VirtualEthernetCardType nicDeviceType = 
VirtualEthernetCardType.E1000;
 
@@ -1745,12 +1746,13 @@ public class VmwareResource implements 
StoragePoolResource, ServerResource, Vmwa
                 throw new Exception(msg);
             }
 
+/*
             if(!isVMWareToolsInstalled(vmMo)){
                 String errMsg = "vmware tools not installed or not running, 
cannot remove nic from vm " + vmName;
                 s_logger.debug(errMsg);
                 return new UnPlugNicAnswer(cmd, false, "Unable to execute 
unPlugNicCommand due to " + errMsg);
             }
-
+*/
             VirtualDevice nic = findVirtualNicDevice(vmMo, 
cmd.getNic().getMac());
             if ( nic == null ) {
                 return new UnPlugNicAnswer(cmd, true, "success");

Reply via email to