1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Proxmox VE 1.x: Installation and configuration' started by timucin, Jun 24, 2011.

  1. timucin

    timucin New Member

    Joined:
    Feb 20, 2011
    Messages:
    12
    Likes Received:
    0
    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?
     
  2. udo

    udo Active Member

    Joined:
    Apr 22, 2009
    Messages:
    4,540
    Likes Received:
    27
    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
     
  3. timucin

    timucin New Member

    Joined:
    Feb 20, 2011
    Messages:
    12
    Likes Received:
    0
    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.
     

Share This Page