CLOUDSTACK-4155 [VMWARE] Failed to deploy VM with NPE when vmware.nested.virtualization is enabled to true

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
Sateesh Chodapuneedi 2013-08-12 07:43:10 +05:30
parent 59f944d7c3
commit 14abe4cb2d
1 changed files with 2 additions and 1 deletions

View File

@ -2679,7 +2679,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
ManagedObjectReference environmentBrowser =
context.getVimClient().getMoRefProp(computeMor, "environmentBrowser");
HostCapability hostCapability = context.getService().queryTargetCapabilities(environmentBrowser, hostMor);
if (hostCapability.isNestedHVSupported()) {
Boolean nestedHvSupported = hostCapability.isNestedHVSupported();
if (nestedHvSupported != null && nestedHvSupported.booleanValue()) {
s_logger.debug("Hypervisor supports nested virtualization, enabling for VM " + vmSpec.getName());
vmConfigSpec.setNestedHVEnabled(true);
}