Run script after vm created?

MACscr

Member
Mar 19, 2013
95
3
8
I need to automatically update /etc/inetd.conf when a VM is created so I can add their VNC entries (I hate the java console). Is there any type of hook or way to easily run a bash script or whatever after a VM is created or destroyed? I would even take being able to just do it after one is started or stopped.
 
I only use KVM. While I would love to be able to run a script within the vm too, I actually in this case need to do it on the host.

Sent from my SPH-L710 using Tapatalk
 
Do note that I'm not looking really for how to do the console, etc, but in how to run any script in general after a vm is started or shutdown, etc.

Sent from my SPH-L710 using Tapatalk