Feature #1945

Better VMWare support for non-clusters setup

Added by Brian Gupta almost 5 years ago. Updated 5 months ago.

Status:New
Priority:Normal
Assigned To:-
Category:Compute resources - VMware
Target version:-
Difficulty: Bugzilla link:1142878
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

Issues:

- when trying to provision a VM in a vsphere environment that doesn't have clusters, and only hosts, the dropdown for clusters is empty and creating it indicates that "cluster is required for this operation"
- It allows you to select a local data store on a different host than you are creating the VM on.


Related issues

Related to Foreman - Feature #1946: Addition VMWare options required for VM creation Resolved 11/15/2012
Related to Foreman - Bug #2666: Unable to create new host Rejected 06/13/2013
Duplicated by Foreman - Bug #8528: Provisioning on a non-clustered ESXi Duplicate 11/27/2014
Blocked by Foreman - Refactor #8357: Update fog version to 1.25.x Closed 11/12/2014

History

#1 Updated by Brian Gupta almost 5 years ago

  • Target version set to 1.1

#2 Updated by Ohad Levy almost 5 years ago

while a hack, this patch can solve the issue in the meantime:

diff --git a/lib/fog/vsphere/requests/compute/list_clusters.rb b/lib/fog/vsphere/requests/compute/list_clusters.rb
index 2092213..55980c7 100644
--- a/lib/fog/vsphere/requests/compute/list_clusters.rb
+++ b/lib/fog/vsphere/requests/compute/list_clusters.rb
@@ -11,7 +11,7 @@ module Fog
         end

         def raw_clusters(datacenter)
-          find_raw_datacenter(datacenter).hostFolder.childEntity.grep(RbVmomi::VIM::ClusterComputeResource)
+          find_raw_datacenter(datacenter).hostFolder.childEntity.grep(RbVmomi::VIM::ComputeResource)
         end

#3 Updated by Ohad Levy almost 5 years ago

  • Target version deleted (1.1)

#4 Updated by Mikael Fridh over 4 years ago

Ohad Levy wrote:

while a hack, this patch can solve the issue in the meantime:

[...]

Patch works wonders! Thanks Ohad.

#5 Updated by Dominic Cleal over 4 years ago

  • Target version set to 1.3.0

#6 Updated by Oliver Weinmann over 4 years ago

Hi,

this no longer seems to work in Foreman 1.2.

I have a Vsphere 5.0 cluster that works fine but the standalone ESXi 5.1 throws an error:

Failed to save: Failed to destroy a compute esxi51 (VMWare) instance centos.a.space.corp: unexpected path class NilClass, mac value is blank!, Failed to destroy a compute esxi51 (VMWare) instance centos.a.space.corp: unexpected path class NilClass

#7 Updated by Lukas Zapletal about 4 years ago

  • Target version changed from 1.3.0 to 1.4.0

#8 Updated by Greg Sutcliffe about 4 years ago

  • Target version deleted (1.4.0)

#9 Updated by Michael Moll almost 4 years ago

According to a discussion on IRC, this is still present at least in 1.3.1.

#10 Updated by Ben Fairless over 3 years ago

I can confirm this issue, and also Ohad's workaround, is still present in 1.4.0

#11 Updated by Benjamin Papillon over 3 years ago

  • Related to Bug #2666: Unable to create new host added

#12 Updated by Marco De Vitis over 3 years ago

I confirm this bug is still present in Foreman 1.5.1, and Ohad's patch works.

#13 Updated by Derek Tamsen about 3 years ago

I can also confirm this issue still exists in Foreman 1.5.1. However, the patch only works if their are no organizational folders in vsphere for the cluster group. If a cluster is organized into folder(s) under a datacenter, foreman fails to see any clusters. This seems like an underlying issue with either fog or rbvmomi though.

Working Example with Patch:
vcenterserver -> datacenter chosen in dropdown menu -> cluster(s)

Non working example with patch or without patch:
vcenterserver -> datacenter chosen in dropdown menu -> folder1 -> folder2 -> cluster(s)

#14 Updated by Dominic Cleal about 3 years ago

  • Bugzilla link set to 1142878

#15 Updated by Dominic Cleal about 3 years ago

  • Category changed from VM management to Compute resources - VMware

Derek, re comment 14, I've logged that cluster-in-a-folder issue as #7518 leaving this ticket specifically for non-cluster setups.

#16 Updated by Alexander Korolev about 3 years ago

Just tested with vSphere 5.5. over vCenter on a single host (former cluster) - works fine without any issues.
Structure is as Follows:
vCenter |- Cluster (no HA/DRS active) |- Single host |- test vm

#17 Updated by Slava Bendersky almost 3 years ago

Hello Everyone,
Is there availble work arrounds ? In my case it is blocker I can't deploy any new vms.

My case

Vcenter --- DataCenter01
_ Host01 | |_________ Host02 | |______ DataCenter02

#18 Updated by Slava Bendersky almost 3 years ago

My case

Vcenter --- DataCenter01
  |                 |_ Host01
  |                 |__Host02
  |
  |______ DataCenter02
                 |_ Host01
                 |__Host02
and so on

#19 Updated by Shlomi Zadok almost 3 years ago

  • Assigned To set to Shlomi Zadok

#20 Updated by Shlomi Zadok almost 3 years ago

#21 Updated by Slava Bendersky almost 3 years ago

I tried today on 1.7RC1 and patch not working any more. Cluster field is empty.

#22 Updated by Slava Bendersky almost 3 years ago

ok after reboot patch fog 1.24 and it working.

#23 Updated by Slava Bendersky almost 3 years ago

Slava Bendersky wrote:
ok after reboot patch for fog 1.24 working as expected.

#24 Updated by Dominic Cleal almost 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Release set to 1.7.1

#25 Updated by Dominic Cleal almost 3 years ago

  • Related to Bug #8528: Provisioning on a non-clustered ESXi added

#26 Updated by Dominic Cleal almost 3 years ago

  • Release changed from 1.7.1 to 1.8.0

#27 Updated by Dominic Cleal over 2 years ago

  • Related to deleted (Bug #8528: Provisioning on a non-clustered ESXi)

#28 Updated by Dominic Cleal over 2 years ago

  • Blocked by Bug #8528: Provisioning on a non-clustered ESXi added

#29 Updated by Dominic Cleal over 2 years ago

  • Status changed from Closed to New
  • Assigned To deleted (Shlomi Zadok)
  • Release deleted (1.8.0)

Removing from the 1.8.0 release target, as based on the discussion surrounding #8528, I remain unconvinced that this is supported. The patch in Fog only appears to be part of the solution, a more fundamental problem about MAC address allocations and Foreman's compute orchestration remains.

#30 Updated by Shlomi Zadok over 2 years ago

So it is a regression? (it is working on 1.7.x)

#31 Updated by Dominic Cleal over 2 years ago

Shlomi Zadok wrote:

So it is a regression? (it is working on 1.7.x)

1.7 doesn't even have the Fog patch. I don't see how this is a regression, it's never functioned.

#32 Updated by Michael Moll 5 months ago

  • Blocked by deleted (Bug #8528: Provisioning on a non-clustered ESXi)

#33 Updated by Michael Moll 5 months ago

  • Duplicated by Bug #8528: Provisioning on a non-clustered ESXi added

#34 Updated by Michael Moll 5 months ago

Before there's no fog update which is bringing this feature, there's no possibility on the Foreman side to fix this.

Also available in: Atom PDF