You are not logged in.
I try to make VDE network for QEMU at boot.
make_vde_for_qemu.service:
[Unit]
Description=Configure VDE2 network for QEMU purpose
Before=network.target
Wants=network.target
[Service]
Type=idle
ExecStart=/usr/local/bin/make_vde_for_qemu
[Install]
WantedBy=multi-user.target
make_vde_for_qemu script:
#!/bin/bash
# Configure VDE2 network for QEMU purpose.
# Create tap interface for vde_switch, set ip up and assign IP address
ip tuntap add dev vde_tap0 mode tap user user1
ip link set vde_tap0 up
ip addr add 192.168.2.1/24 dev vde_tap0
# Create the virtual switch
vde_switch -tap vde_tap0 -daemon -mod 660 -group users
journalctl -b listing:
vde_switch[461]: VDE_SWITCH started
vde_switch[462]: Caught signal 15, cleaning up and exiting
I have to run "vde_switch -tap vde_tap0 -daemon -mod 660 -group users" manually every time after boot.
Last edited by Kirill Bugaev (2018-08-16 15:04:44)
Offline
I'd say that "-daemon" probably forks, the script terminates and system kills the child process… try "Type=forking"
Offline
I'd say that "-daemon" probably forks, the script terminates and system kills the child process… try "Type=forking"
It works. Thanks.
Offline
Great.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline