[pve-devel] Network configuration

Michael Rasmussen mir at datanom.net
Mon Jul 27 19:46:23 CEST 2015

On Wed, 22 Jul 2015 01:25:14 +0200
Michael Rasmussen <mir at datanom.net> wrote:

> Hi all,
> I have installed a proxmox 4.0 to test openvswitch and IMHO the current
> network GUI config is not suited for the task since every time you need
> to create or delete an OVSint Port a reboot of the node is required. I
> will therefore propose a change in the GUI which allows creating or
> deleting of OVSint Port without the need for a reboot of the node.
> Creating OVS Bonds and OVS Bridges IMHO should still require a reboot
> of the node since changes here is something rarely done after initial
> configuration and changing configuration of this will break basic
> networking on the node.
For the above I have decided on the following implementation:

eval {
    ovs-vsctl add-port $bridge vlan$port tag=$port -- set interface
    vlan$port type=internal
die "vlan$port: Could not add to bridge $bridge" if ($@);
eval {
    if ($ip and $mask) ? ifconfig vlan$port $ip netmask $mask up :
    ifconfig vlan$port $ip up;
if ($@) {
    ovs-vsctl del-port $bridge $port;
    die "vlan$port: Could not bring up interface";
eval {
    update /etc/network/interfaces
if ($@) {
    ifconfig vlan$port down;
    ovs-vsctl del-port $bridge $port;
    die "vlan$port: Could not update network config";

Something missing above?

Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
mir <at> datanom <dot> net
mir <at> miras <dot> org
/usr/games/fortune -es says:
He hath eaten me out of house and home.
		-- William Shakespeare, "Henry IV"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://pve.proxmox.com/pipermail/pve-devel/attachments/20150727/eae80546/attachment.sig>

More information about the pve-devel mailing list