Run a script on VM start

dragon2611

Renowned Member
Jul 2, 2010
85
7
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?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!