Unfortunately your VM will have no idea that it was rolled back to a snapshot. You could build an app/script which uses vCenter API to look for a rollback event and then triggers the relevant scripts on target guest.
That's an entirely different question though as it could be implemented in many ways.
Starting a script on a CentOS VM every time the snapshot is brought up
-
04-07-2023 - |
Pergunta
I have a simple script on my CentOS VM. My goal is to have it run every time the snapshot is brought up. The only information I can find is regarding the running of it at boot, which I presume is not the same for bringing up a snapshot.
Does anyone know how I might be able to achieve this?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow