Run if-up script when VM start

masterdaweb

Renowned Member
Apr 17, 2017
87
5
73
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 ?