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
1 2 |
cat /var/run/vmware-vcd-cell.pid 24663 |
Now we will use the pid number as a parameter to execute the command:
1 2 |
cd /opt/vmware/vcloud-director/bin ./cell-management-tool cell -i 24663 -t |
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.
1 2 |
cd /opt/vmware/vcloud-director/bin ./cell-management-tool cell -i $(cat /var/run/vmware-vcd-cell.pid) -t |
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 😀 !