Quick Tip: VCD cell-management-tool without using credentials

by Jul 26, 2023VMware Cloud Director

Are you tired of constantly typing the password when executing cell-management-tool commands on VCD cells? Here is a quick tip on how to use the cell-management-tool without using credentials.

There is an option -i that allows you to execute commands using the pid (process id) instead of providing the system-administrator credentials.

How does it work?

  • first you retrieve the pid number
  • the -i option allows you to use the pid number to bypass the authentication (you were logged on with a user with administrative permissions anyway)

The following will display the activity (-t, or –status) on the VCD cell. If not using the pid method, one would use -u for the username, and then be prompted for the password.

You can find the cell-management-tool command line reference here (VCD 10.4).

Let’s take a look how it would normally work:

  • retrieve the pid number
cat /var/run/vmware-vcd-cell.pid
24663
ShellSession

Now we will use the pid number as a parameter to execute the command:

cd /opt/vmware/vcloud-director/bin
./cell-management-tool cell -i 24663 -t
ShellSession

Let’s do some small optimization now. We will combine the two command into a one-liner. This will retrieve the pid at execution time.

cd /opt/vmware/vcloud-director/bin
./cell-management-tool cell -i $(cat /var/run/vmware-vcd-cell.pid) -t
ShellSession

Happy to share this quick tip. Now you can also execute the cell-management-tool without using credentials, and maybe be a less frustrated, having to type that password over and over again 😀 !