I searched the forums and wiki yesterday for information on this, but I'm not coming up with the proper terms to find what I need.
Basically, I'd like to have a pre-stop script run on each of my VMs. I'd like to store that script inside the machine's private space, so I can have different templates contain different stop scripts. Virtuozzo has scripts like this under the /scripts directory in each guest's private space.
I understand that with current Proxmox the way to do this is to put scripts VMID.stop in /etc/vz/conf, or something like this.
What I'm wondering, is where in the system would I hook into the VM creation process, such that I could have these scripts in /etc/vz/conf automatically created? I could then link them to a shared start/stop/mount/umount script.
There was some talk in some articles about wrapping vzctl in another script to do this. Would this be the most convenient way, or are there other hooks I could use for this kind of thing?
Basically, I'd like to have a pre-stop script run on each of my VMs. I'd like to store that script inside the machine's private space, so I can have different templates contain different stop scripts. Virtuozzo has scripts like this under the /scripts directory in each guest's private space.
I understand that with current Proxmox the way to do this is to put scripts VMID.stop in /etc/vz/conf, or something like this.
What I'm wondering, is where in the system would I hook into the VM creation process, such that I could have these scripts in /etc/vz/conf automatically created? I could then link them to a shared start/stop/mount/umount script.
There was some talk in some articles about wrapping vzctl in another script to do this. Would this be the most convenient way, or are there other hooks I could use for this kind of thing?