As a background, I am writing a small script for a raspberry pi to sit on the cluster switch and watch an Eaton UPS(via usb) my 3 node cluster is attached to. when certain triggers happen, the pi does stuff... like on battery with time left, it may send out signals to guest vms to start shutting down their applications. Then on very low battery left it starts a full graceful shutdown of the cluster. All this gets logged, emails sent out, etc...
Anyway, to avoid passwords in scripts, i use pub/private keypairs pushed to the CVM and AHV authorized_hosts file (just same as CVM-AHV does)....
my problem is, that when the CVM's are fully rebooted (domain shutdown on AHV virsh)... after the CVMs come back up, they rewrite the authorized_hosts file, and my pi entry is purged :(
I'd like to avoid having to redistribute key pairs everytime the cluster needs to be fully rebooted.
Any thoughts on how to make this persistent?
thanks for any thoughts, Brent
Best answer by perkinsa
Yes, it will persist from then on for all CVM's/Hosts.
If you run it from command line, you need to specific the full path /home/nutanix/...
From Prism you can cut/paste the key.