Run if-up script when VM start

masterdaweb

Well-Known Member
Apr 17, 2017
87
4
48
32
Hi,

When a VM starts, an Interface is added, as we can see in ifconfig:

Code:
tap100i0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        ether 4a:69:1b:65:cf:41  txqueuelen 1000  (Ethernet)
        RX packets 23583  bytes 31600364 (30.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 62246  bytes 6497945 (6.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tap105i0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        ether f6:8a:9b:dc:47:60  txqueuelen 1000  (Ethernet)
        RX packets 96  bytes 5513 (5.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4942  bytes 379991 (371.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I like to run a script in "if-up.d" every time an Interface "tapxxx" comes up.

I already added a script into "/etc/network/if-up.d" but it is not running when VM is started
 
on a higher level, what would you like to achieve with such a script ?
 

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!