Hello,
Very new to the Nutanix CLI and I am doing a lot of PD testing to a DR Cluster and restoring them with the default prefix.
I was wandering if someone could help me with a script to shitdown all VM’s with the name starting ‘Nutanix-Clone-”.
I found this :
for vm_name in `acli vm.list power_state=on | grep -v ^'VM name' | awk '{print $1}'`; do acli vm.shutdown $vm_name; done
which is excellent but Im not sure how to further filter it by VM name?
Any help appreciated.
Note: Id also appreciate any help with a script that then deletes any VM and associated snapshot starting with ‘Nutanix-Clone-’ - doing 80 or so through the web console is hard work.
Thanks for you time,
Aaron