Run a script on VM start

dragon2611

Renowned Member
Jul 2, 2010
96
10
73
Is there anyway to get proxmox to run a script/set of commands on vmstart.

I want it to set up port mirroring on the Vswitches to an IDS sensor but until the VM starts the ports don't exist.

Currently I've written a rather crude Shell script that calls qm start then does the required actions on the openvswitch bridges but ideally I'd prefer to be able to use the GUI to start the VM in the normal way.
 
Last edited:
On start, the VM is connected to the bridge, so you can hook something in /var/lib/qemu-server/pve-bridge, yet this file could be updated, so it's not that persistent.

Maybe you can open a feature request for that?