WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

vCenter Server 6.0 Tidbits Part 4: Finding all deployed vCenter Servers

04.16.2015 by William Lam // 2 Comments

In vSphere 6.0, there are a list of recommended topologies which can viewed in VMware KB 2108548. In the event that you need to locate all available vCenter Servers in your environment, you have a couple of options depending on type of access you have and the state of your environment (e.g. vSphere Web Client is down). For locating all deployed Platform Service Controllers (PSC), please take a look at my previous article here. Before taking a look at the solutions, here is a diagram of my vSphere 6.0 lab environment and its configuration: 2 PSCs configured for replication with 2 VCs joined to PSC1 and another VC joined to PSC2.

locate-vcenter-servers-and-platform-service-controllers
Option 1:

The first option to find this information is using the new System Configuration UI which is available in the vSphere 6.0 Web Client. You can quickly view all Nodes and their type as seen in the screenshot below. This would be the quickest and most efficient method if access to the vSphere Web Client is available.

locate-all-psc-servers-0
Option 2:

We can also connect to a new service in vSphere 6.0 known as the Component Manager via its MOB (Managed Object Browser) interface. You will need to open a browser and connect to the following URL and substituting it with the Hostname/IP Address of one of your PSC:

https://psc-01.primp-industries.com/cm/mob/?moid=ServiceManager&method=Search

If you do not know the Hostname/IP Address of your PSC Server, you can always find it by going to the vCenter Server Advanced Settings and searching for pattern "sso.admin" and you will see the address of your PSC Server as seen in the screenshot below.

Screen Shot 2015-03-29 at 2.56.33 PM
Once you have authenticated in, you will need to add the following snippet into the text box:

<searchCriteria>
<serviceType>
<productId>com.vmware.cis</productId>
<typeId>vcenterserver</typeId>
</serviceType>
</searchCriteria>

locate-all-vcenter-servers-1
Note: For programmatic access, please refer to Option 3 for more details.

Next, click on Invoke Method to execute the query and if everything was successful, you should see entries under "serviceAttributes" for all your vCenter Servers as seen in the screenshot below.

locate-all-vcenter-servers-2
Option 3:

The final option is to of course retrieve this information programmatically using the new vCloud Suite SDK which is part of the vSphere 6.0 release. There are 6 new SDKs: .Net, Java, Perl, REST, Python & Ruby and you can find more information here. In this example, I will be using the vCloud Suite SDK for Python and using the sample located under the "lookupservice" directory called print_services.py You will need to download and extract the contents of the SDK onto a system that has a Python interpreter installed and below are the instructions for running this particular sample script.

First, you will need to edit a configuration file and provide some details to one of your PSC's

VMware-vCloud-Suite-SDK-Python-6.0.0/client/samples/src/sample.cfg

Here is an example of what the file should look like for my environment:

[connection]
lswsdlurl=file:///root/VMware-vCloud-Suite-SDK-Python-6.0.0/client/wsdl/lookupservice.wsdl
lssoapurl=https://psc-01.primp-industries.com/lookupservice/sdk
ssousername=*protected email*
ssopassword=VMware1!

Next, change into the following directory:

cd VMware-vCloud-Suite-SDK-Python-6.0.0/client/bin/

Finally, to run the sample script you will need to ensure run_sample.sh (wrapper script) is set to executable and then run the following:

./run_sample.sh ../samples/src/com/vmware/vcloud/suite/sample/lookupservice/print_services.py

If everything was configured successfully, you should see similar output as shown in the screenshot below:
finding-all-deployed-platform-service-controllers-and-vcenter-servers

  • vCenter Server 6.0 Tidbits Part 1: What install & deployment parameters did I use?
  • vCenter Server 6.0 Tidbits Part 2: What is my SSO Domain Name & Site Name?
  • vCenter Server 6.0 Tidbits Part 3: Finding all deployed Platform Services Controller
  • vCenter Server 6.0 Tidbits Part 4: Finding all deployed vCenter Servers
  • vCenter Server 6.0 Tidbits Part 5: New method of patching the VCSA
  • vCenter Server 6.0 Tidbits Part 6: Customizing VCSA’s DCUI
  • vCenter Server 6.0 Tidbits Part 7: Connecting to SSO/PSC using JExplorer
  • vCenter Server 6.0 Tidbits Part 8: Useful ldapsearch queries for vmdird
  • vCenter Server 6.0 Tidbits Part 9: Creating & managing SSO users using dir-cli
  • vCenter Server 6.0 Tidbits Part 10: Automating SSO Admin configurations
  • vCenter Server 6.0 Tidbits Part 11: Automate SSO Admin password change
  • vCenter Server 6.0 Tidbits Part 12: New methods of downloading Support Bundles for VCSA / PSC

Categories // VCSA, vSphere 6.0 Tags // component manager, lookupservice, mob, vCenter Server, vcenter server appliance, vcloud suite sdk, VCSA, vcva, vSphere 6.0

vCenter Server 6.0 Tidbits Part 3: Finding all deployed Platform Services Controller

04.08.2015 by William Lam // 9 Comments

In vSphere 6.0, there are a list of recommended topologies which can viewed in VMware KB 2108548. In the event that you need to locate all available Platform Services Controllers in your environment, you have a couple of options depending on type of access you have and the state of your environment (e.g. vSphere Web Client is down). Before taking a look at the solutions, here is a diagram of my vSphere 6.0 lab environment and its configuration: 2 PSCs configured for replication with 2 VCs joined to PSC1 and another VC joined to PSC2.

locate-vcenter-servers-and-platform-service-controllers
Option 1:

The first option to find this information is using the new System Configuration UI which is available in the vSphere 6.0 Web Client. You can quickly view all Nodes and their type as seen in the screenshot below. This would be the quickest and most efficient method if access to the vSphere Web Client is available.

locate-all-psc-servers-0
Option 2:

We can also connect to a new service in vSphere 6.0 known as the Component Manager via its MOB (Managed Object Browser) interface. You will need to open a browser and connect to the following URL and substituting it with the Hostname/IP Address of one of your PSC:

https://psc-01.primp-industries.com/cm/mob/?moid=ServiceManager&method=Search

If you do not know the Hostname/IP Address of your PSC Server, you can always find it by going to the vCenter Server Advanced Settings and searching for pattern "sso.admin" and you will see the address of your PSC Server as seen in the screenshot below.

Screen Shot 2015-03-29 at 2.56.33 PM
Once you have authenticated in, you will need to add the following snippet into the text box:

<searchCriteria>
<serviceType>
<productId>com.vmware.cis</productId>
<typeId>sso:admin</typeId>
</serviceType>
</searchCriteria>

locate-all-psc-servers-1
Note: For programmatic access, please refer to Option 3 for more details.

Next, click on Invoke Method to execute the query and if everything was successful, you should see entries under "serviceEndpoints" for all your PSCs as seen in the screenshot below.

locate-all-psc-servers-2
Option 3:

The final option is to of course retrieve this information programmatically using the new vCloud Suite SDK which is part of the vSphere 6.0 release. There are 6 new SDKs: .Net, Java, Perl, REST, Python & Ruby and you can find more information here. In this example, I will be using the vCloud Suite SDK for Python and using the sample located under the "lookupservice" directory called print_services.py You will need to download and extract the contents of the SDK onto a system that has a Python interpreter installed and below are the instructions for running this particular sample script.

First, you will need to edit a configuration file and provide some details to one of your PSC's

VMware-vCloud-Suite-SDK-Python-6.0.0/client/samples/src/sample.cfg

Here is an example of what the file should look like for my environment:

[connection]
lswsdlurl=file:///root/VMware-vCloud-Suite-SDK-Python-6.0.0/client/wsdl/lookupservice.wsdl
lssoapurl=https://psc-01.primp-industries.com/lookupservice/sdk
ssousername=*protected email*
ssopassword=VMware1!

Next, change into the following directory:

cd VMware-vCloud-Suite-SDK-Python-6.0.0/client/bin/

Finally, to run the sample script you will need to ensure run_sample.sh (wrapper script) is set to executable and then run the following:

./run_sample.sh ../samples/src/com/vmware/vcloud/suite/sample/lookupservice/print_services.py

If everything was configured successfully, you should see similar output as shown in the screenshot below:
finding-all-deployed-platform-service-controllers-and-vcenter-servers

  • vCenter Server 6.0 Tidbits Part 1: What install & deployment parameters did I use?
  • vCenter Server 6.0 Tidbits Part 2: What is my SSO Domain Name & Site Name?
  • vCenter Server 6.0 Tidbits Part 3: Finding all deployed Platform Services Controller
  • vCenter Server 6.0 Tidbits Part 4: Finding all deployed vCenter Servers
  • vCenter Server 6.0 Tidbits Part 5: New method of patching the VCSA
  • vCenter Server 6.0 Tidbits Part 6: Customizing VCSA’s DCUI
  • vCenter Server 6.0 Tidbits Part 7: Connecting to SSO/PSC using JExplorer
  • vCenter Server 6.0 Tidbits Part 8: Useful ldapsearch queries for vmdird
  • vCenter Server 6.0 Tidbits Part 9: Creating & managing SSO users using dir-cli
  • vCenter Server 6.0 Tidbits Part 10: Automating SSO Admin configurations
  • vCenter Server 6.0 Tidbits Part 11: Automate SSO Admin password change
  • vCenter Server 6.0 Tidbits Part 12: New methods of downloading Support Bundles for VCSA / PSC

Categories // VCSA, vSphere 6.0 Tags // component manager, lookupservice, mob, platform service controller, psc, vcloud suite sdk, VCSA

Quick Tip - vSphere MOB is disabled by default in ESXi 6.0

02.24.2015 by William Lam // 9 Comments

Yesterday, I noticed an interesting error when trying to connect directly to the vSphere MOB on an ESXi 6.0 host. The following error message was displayed on the browser:

503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http20NamedPipeServiceSpecE:0x4bf02038] _serverNamespace = /mob _isRedirect = false _pipeName =/var/run/vmware/proxy-mob)

vsphere-6.0-mob-disable-0
This was the first time I had noticed this as I normally use the vSphere MOB for debugging purposes or exploring the vSphere API. The vSphere MOB is also a quick an handy way to unregister vSphere Plugins when connecting to vCenter Server.

I did some further investigation and it turns out that in vSphere 6.0, the vSphere MOB will be disabled by default on an ESXi 6.0 host. The reason for this is to provide security hardening out of the box for ESXi versus having an administrator harden after the fact. If you are familiar with the vSphere Security Hardening Guides, you will recall one of the guidelines is to disable the vSphere MOB on an ESXi host and with vSphere 6.0, this is now done automatically for you. This information will also be documented as part of the vSphere 6.0 documentation when it GAs.

If you still need to access the vSphere MOB on an ESXi how, this of course can be re-enabled from the default. There is also a new ESXi Advanced Setting called Config.HostAgent.plugins.solo.enableMob which easily controls whether the vSphere MOB is enabled or disabled as seen in the screenshot below.

vsphere-6.0-mob-disable-1
You have the option of using either the vSphere C# Client as shown in the screenshot above or the vSphere Web Client to configure the ESXi Advanced Setting:

vsphere-6.0-mob-disable-3
You can also configure this property using the vim-cmd in the ESXi Shell.

Listing the ESXi Advanced Setting using vim-cmd:

vim-cmd hostsvc/advopt/view Config.HostAgent.plugins.solo.enableMob

vsphere-6.0-mob-disable-2
Configuring the ESXi Advanced Setting to true:

vim-cmd hostsvc/advopt/update Config.HostAgent.plugins.solo.enableMob bool true

If you prefer to automate this using PowerCLI or vSphere API, this can also be done. Below are two examples using the Get-VmHostAdvancedConfiguration and Set-VMHostAdvancedConfiguration PowerCLI cmdlets.

Listing the ESXi Advanced Setting using PowerCLI:

Get-VMHost 192.168.1.200 | Get-VmHostAdvancedConfiguration -Name Config.HostAgent.plugins.solo.enableMob | Format-List

vsphere-6.0-mob-disable-4.png
Configuring the ESXi Advanced Setting to true:

Get-VMHost 192.168.1.200 | Set-VMHostAdvancedConfiguration -Name Config.HostAgent.plugins.solo.enableMob  -Value True

If you rely on using the vSphere MOB on ESXi and would like this to be your default, I would recommend you update either your ESXi Kickstart or Host Profile to include this additional configuration so that you do not get like I did 🙂 If you only need to use the vSphere MOB on occasion or do not have a use for it at all, then leaving the default is sufficient.

Categories // Automation, ESXi, vSphere 6.0 Tags // ESXi, mob, vim-cmd, vSphere 6.0, vSphere API

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • …
  • 7
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...