VMware Cloud Community
LordofVxRail
Enthusiast
Enthusiast
Jump to solution

Virtual machine is in an organization VDC which has auto discovery of the virtual machines disabled.

Hi all,

 

I'm struggling trying to get VM auto import working, its enabled in UI and here:

[root@vcdcell02 bin]# ./cell-management-tool manage-config -n managed-vapp.discovery.activated -v true
Updating property: Property "managed-vapp.discovery.activated" has value "true"

I have 2 other cells/clouds and is working just fine on those, but on this cell I get:

[root@vcdcell02 bin]# ./cell-management-tool debug-auto-import -vm esx_V010101rrr
VM with name:esx_V010101rrr, moref vm-37840 in VC lab-11 can be skipped for the following reasons:


1) Virtual machine is in an organization VDC which has auto discovery of the virtual machines disabled.

 

any suggestions? 

 

 

Labels (2)
Reply
0 Kudos
1 Solution
6 Replies
jnivoit
VMware Employee
VMware Employee
Jump to solution

Note that there are 3 settings that control whether auto-discovery is enabled:

- the global setting set via CMT

- the org-level setting set via the REST API

- the vdc-level setting set via the REST API

 

OOTB, none are set and therefore auto-discovery is enabled. Unset settings are ignored, but when set at any level, it is the logical AND of all 3 settings that must be true for the auto-discovery to be enabled. If setting at VDC-level is set to false, then auto-discovery in that VDC is disabled regardless of the other settings.

The global setting is present for the Provider to enable/disable globally at the cell level.

The Org-level setting is there for the OrgAdmin to enable/disable within the Org.

The Vdc-level setting is there for the OrgAdmin to enable/disable within the one VDC without affecting other VDCs in the same Org.

Reply
0 Kudos
GregSmid
Enthusiast
Enthusiast
Jump to solution

@jnivoit, do you have any documentation on these three settings? I'm having a hard time finding any.

I'm running into the same issue, it seems like auto-discovery is disabled for all my VDCs.

vcloud=# select name, vm_discovery_enabled from org_prov_vdc;
-[ RECORD 1 ]--------+-----------------------
name                 | VDC1
vm_discovery_enabled | f
-[ RECORD 2 ]--------+-----------------------
name                 | VDC2
vm_discovery_enabled | f
-[ RECORD 3 ]--------+-----------------------
name                 | VDC3
vm_discovery_enabled | f
-[ RECORD 4 ]--------+-----------------------
name                 | VDC4
vm_discovery_enabled | f
-[ RECORD 5 ]--------+-----------------------
name                 | VDC5
vm_discovery_enabled | f
-[ RECORD 6 ]--------+-----------------------
name                 | VDC6
vm_discovery_enabled | f
-[ RECORD 7 ]--------+-----------------------
name                 | VDC7
vm_discovery_enabled | f

vcloud=# 

 

I can go ahead and run the update command in the article that @LordofVxRail linked to, but a direct database edit isn't my favorite solution. I'd love to find out why it's set this way in the DB in the first place.

What is the CMT command for the global level, and what are the API calls for the Org and VDC levels?

Reply
0 Kudos
jnivoit
VMware Employee
VMware Employee
Jump to solution

the global setting can be set or unset using the manage-config CMT command.

the other settings are API only (I will file an internal bug to make them settable via the H5 UI as well).

At the org level you would use OrgGeneralSettingsType.VmDiscoveryEnabled (See https://code.vmware.com/apis/1159/vmware-cloud-director/doc/doc//types/OrgGeneralSettingsType.html).

At the vdc level you would use AdminVdcType.VmDiscoveryEnabled (See https://code.vmware.com/apis/1159/vmware-cloud-director/doc/doc/types/AdminVdcType.html).

Note that the higher-level settings have priority:

  - global vmDiscovery disabled means disabled no matter what the other lower-level settings are. This setting is set to true OOTB, and needs to be opted-out if one doesn't want any discovery to happen (i.e. the old VCD behaviour before we even had this notion of discovery).

   - org's VmDiscoveryEnabled set to false means that no VDC in this org will allow discovery, regardless of VDC-level settings.

   - vdc's VmDiscoveryEnabled set to false means that discovery isn't enabled for that VDC.

any of the 3 setting not set means factory default for that setting (i.e set to true).

Reply
0 Kudos
jnivoit
VMware Employee
VMware Employee
Jump to solution

note that the VMware Cloud Director™ Service Provider Admin Portal Guidehttps://docs.vmware.com/en/VMware-Cloud-Director/10.2/VMware-Cloud-Director-Service-Provider-Admin-P... ) contains some information on p25, but this needs to be expanded on.

Reply
0 Kudos
GregSmid
Enthusiast
Enthusiast
Jump to solution

Thank you for all of that! Glad to hear about an internal request to get it added to the H5 GUI, it's a setting that really should be exposed there. In the meantime, this should be enough for me to change the settings in my instance.

Appreciate it. 🙂

Reply
0 Kudos