How to add second venet interface to openvz guest, or change.

timucin

New Member
Feb 20, 2011
12
0
1
Istanbul/Turkey
I've setup a proxmox server with one ethernet and created the guests.

After a while, I've installed a second nic into the computer and now my openvz guest (linux, ubuntu server edition 10.04) runs with the virtual ethernet (venet) running on the first nic. I want to change it to run on the second nic but I'm at a loss how to do that.

My network subnets are:
192.168.2.0/24 and 10.0.100.0/24
My guest linux server runs on the 192.168.2.0/24 subnet with ip 192.168.2.11 but I want it to be reached on the other subnet with ip 10.0.100.11.

and, another related question: is it possible to add second virtual venet nic to openvz guest so I can run the guest server on both subnets?
 
I've setup a proxmox server with one ethernet and created the guests.

After a while, I've installed a second nic into the computer and now my openvz guest (linux, ubuntu server edition 10.04) runs with the virtual ethernet (venet) running on the first nic. I want to change it to run on the second nic but I'm at a loss how to do that.

My network subnets are:
192.168.2.0/24 and 10.0.100.0/24
My guest linux server runs on the 192.168.2.0/24 subnet with ip 192.168.2.11 but I want it to be reached on the other subnet with ip 10.0.100.11.

and, another related question: is it possible to add second virtual venet nic to openvz guest so I can run the guest server on both subnets?
Hi,
of couse you can do that. Edit the config-file (in /etc/vz/conf) like this:
Code:
NETIF="ifname=eth0,bridge=vmbr0,mac=CA:E3:43:25:79:66,host_ifname=veth104.0,host_mac=00:18:51:C5:C9:22;ifname=eth1,bridge=vmbr10,mac=CA:E3:43:25:79:55,host_ifname=veth104.1,host_mac=00:18:51:C5:C9:11"

Udo
 
thanks udo,

But, the solution you have given works for veth interfaces, I'm using venet in my guest machine so I need solution for venet interface.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!