Starting version 6.1, this method does not apply anymore.

This has been annoyed me for a while, whenever I add a new VLAN to my Proxmox server, I would have reboot the server for this new VLAN to become active. So when adding or making any network changes on the PVE node, these new changes do not take effect right away. I believe this was done to protect the system from user error. Therefore, when these new network changes have been done, a reboot is required. We can get around this by using the web UI shell or by SSH into our PVE node.

Proxmox VE is Debian Linux underneath. Therefore, the location of the Proxmox network configuration is exactly the same as the default Debian Linux system. The network configuration file is located /etc/network/interfaces. Whenever we make a new network config changes using the web UI, Proxmox would save these new changes to the /etc/network/interfaces.new. What needs to be done is to make this interfaces.new file to be the active config file.

note_rectangle

Keep in mind this post is only for single PVE node and not for cluster nodes.

I am going to continue using the Proxmox server we used from the previous Proxmox blog post. In this example, I added a new physical interface ens19, a new OVS Bridge vmbr1 and a couple of OVS IntPorts which are vlan72 and vlan73. See Figure 1 for reference.

Figure 1

Looking at Figure 1, the Active column for the new interfaces shows No. Meaning, these new interfaces are not active and cannot be used at this point unless, of course, rebooting the Proxmox server itself. We can get around this by using the web UI shell or SSH into the Proxmox server. We are going to use the web UI shell in this post because it is easier.

Navigate to Data center > Shell and enter the following commands:

note_rectangle

Keep in mind, I do not have any VM(s) or LXC on this server. If you have an existing VM(s) or LXC(s), DO NOT run the command ifdown -a;ifup -a. Otherwise, the network setting of these VM(s) and LCX(s) will get disconnected and you will have to poweroff then power on the guest nodes. See code box below Figure 2.

Figure 2
# Replace the current interfaces with the interfaces.new
mv /etc/network/interfaces.new /etc/network/interfaces

# Once the interfaces.new replaced the interfaces file, we would need to restart
# the interfaces. Ideally, we would do this by interface by interface, but I was 
# being lazy and used the -a option. 
# Do NOT use the -a option if you have existing VM(s) or LXC(s). See next 
# command below if you have some guest nodes.
ifdown -a;ifup -a

# If you have any VM(s) or LXC(s) running, be more specific with the ifdown and
# ifup commands.
ifdown ens19 \
ifdown vlan72 \
ifdown vlan73 \
ifup ens19 \
ifup vlan72 \
ifup vlan73 \
 

After executing the commands, navigate back to Datacenter > System > Network to check the Active column. Make sure that it shows Yes as shown in Figure 3.

0
Would love your thoughts, please comment.x
()
x
WordPress Appliance - Powered by TurnKey Linux