Automating CLI commands

  • 31 October 2023
  • 1 reply

I’m looking into setting up an automated task to get the output of

acli snapshot.list

from each of our clusters, so we can track down forgotten snapshots & which VMs they’re on.

Ideally this would run from nutanix itself and spit out the results into some kind of shared storage space we can review, but according to this thread, non-default cron jobs are deleted when AOS gets upgraded. I also can’t see anything in PC/PE to automate this, or find this information without SSHing into the CVMs.

At this point, I’m looking into writing a script to host somewhere internally that SSHs into each set of CVMs and runs the command, but then I’ve got to handle password security and frankly it seems like too much of a bother for something I’d only have running monthly at most, that would take me 10 minutes to handle manually (if I remember)


Does anyone know of a way to achieve this, or shall I just throw some reminders on my calendar?

This topic has been closed for comments

1 reply

Userlevel 4
Badge +5


The best way is to use RESTAPI and run that from a VM take required actions.