Changing from venet to veth

mlanner

Renowned Member
Apr 1, 2009
190
1
83
Berkeley, CA
Hi,

I recently created a new OpenVZ machine and selected "Virtual Network (venet)." It turns out that the application I'm installing, OpenVPN, needs a MAC address for the NIC, and thus I should have selected "Bridged Ethernet (veth)."

Is there a way of changing the interface on a guest?

Would it be as simple as editing the /etc/networking/interfaces and just changing venet to veth?

Thanks in advance.
 
Cool. That worked. :)

Now, when I open /etc/network/interfaces it says:

# Please edit template /etc/network/interfaces.template instead.

However, that file does not exist. Do I need to create it, or should it already exist?

And, what should my config look like? I assume it should look something like:

Code:
auto vmbr0
iface vmbr0 inet static
        address 192.168.10.2
        netmask 255.255.255.0
        network 192.168.10.0
        broadcast 192.168.10.255
        gateway 192.168.10.1
 
When you use bridged mode you can directly edit /etc/network/interfaces (the comment is left from the venet)

Code:
auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet static
...
 
When you use bridged mode you can directly edit /etc/network/interfaces (the comment is left from the venet)

Code:
auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet static
...

are these changes made within the guest or within the host?
 
  1. delete the IP from venet
  2. click save
  3. now, veth appears disabled
  4. enable it
  5. click save