top of page

VM Actions in VCF Operations

  • Writer: Brock Peterson
    Brock Peterson
  • Sep 3
  • 2 min read

We've discussed VM Actions available in VCF Operations a few times previously, but I recently discovered something I wanted to share. The previous posts can be found here:


As of VCF 9, we now get the Execute Custom Script (along with the others shown here) when the vCenter/VCF Adapter Instances are configured. It'll look like this.


ree

Once Service Discovery is enabled, you'll see Get Top Processes, like this.


ree

When I select Execute Custom Script I have the option to run a command and/or upload a script to the VM and run it. Trying to execute a simple command I get this.


ree

Clicking the Recent Tasks link shows this.


ree

When I try to upload/run a script I get the following.


ree

The Recent Tasks shows something similar.


ree

Let's try Get Top Processes.


ree

Recent Tasks shows something similar to before.


ree

So I went looking for documentation and found this:


ree

Root definitely has read/write privileges to /tmp on my VM, so I went asking around. Turns out we need script execution privileges in /tmp as well. I submitted feedback on the documentation page to get this added. On Linux VMs this means /tmp (or TEMP in Windows) needs to not be mounted with "noexec", which mine is!

root@vr8183-bpeterson [ /tmp ]# mount | grep -i /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,size=24662804k,nr_inodes=1048576)

I remounted /tmp without the noexec flag and it now looks like this.

root@vr8183-bpeterson [ /tmp ]# mount -o remount,exec /tmp
root@vr8183-bpeterson [ /tmp ]# mount | grep -i /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=24662804k,nr_inodes=1048576)

Retrying the VM ACTIONS, I now get the following!

Rohith Naik and Takeshi Yoshizawa thanks for your insight!

Comments


    bottom of page