[PVE-User] Create a second interface in a VM

Timh B timh at shiwebs.net
Wed Mar 14 21:14:52 CET 2012


Hi,

SSH to the hardware host, find out the vmid of the node you want to add an
interface to, run;

vzctl set <vmid> --save --netif_add eth1,,,,vmbrX

Restart vm, done, see "man vzctl" for more information.

//T

On Wed, March 14, 2012 00:46, Gilberto Martins wrote:
> Hi Marco.
>
> I have already seen the video. It explain how to add a bridge to the
> host. This is not the question, for I need to add a second interface
> to the virtual machine. My ProxMox server has already 2 bridges, as
> shown below:
>
> v01:~# ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>     inet6 ::1/128 scope host
>        valid_lft forever preferred_lft forever
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
> 1000
>     link/ether d8:d3:85:6d:14:94 brd ff:ff:ff:ff:ff:ff
>     inet6 fe80::dad3:85ff:fe6d:1494/64 scope link
>        valid_lft forever preferred_lft forever
> 3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
> state DOWN qlen 1000
>     link/ether 00:04:75:8c:6a:ff brd ff:ff:ff:ff:ff:ff
> 4: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
> state UNKNOWN
>     link/ether d8:d3:85:6d:14:94 brd ff:ff:ff:ff:ff:ff
>     inet 172.21.43.99/25 brd 172.21.43.127 scope global vmbr0
>     inet6 fe80::dad3:85ff:fe6d:1494/64 scope link
>        valid_lft forever preferred_lft forever
> 5: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
> state UNKNOWN
>     link/ether 00:04:75:8c:6a:ff brd ff:ff:ff:ff:ff:ff
>     inet 172.21.43.20/25 brd 172.21.43.127 scope global vmbr1
>     inet6 fe80::204:75ff:fe8c:6aff/64 scope link
>        valid_lft forever preferred_lft forever
> 6: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc
> noqueue state UNKNOWN
>     link/void
>     inet6 fe80::1/128 scope link
>        valid_lft forever preferred_lft forever
>
> And here is my VM network configuration:
>
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>     inet6 ::1/128 scope host
>        valid_lft forever preferred_lft forever
> 2: venet0: <BROADCAST,POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN
>     link/void
> 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
> UNKNOWN
>     link/ether 1a:b5:26:1f:0c:45 brd ff:ff:ff:ff:ff:ff
>     inet 172.21.43.10/25 brd 172.21.43.127 scope global eth0
>     inet6 fe80::18b5:26ff:fe1f:c45/64 scope link
>        valid_lft forever preferred_lft forever
>
>
> My doubt is: since I have 2 bridged interfaces, how to add an extra
> interface in the virtual machine ?
>
>
> Thanks for the help.
>
> Gilberto Martins
>
>
>
> On Tue, Mar 13, 2012 at 8:29 PM, Marco Vaschetto
> <m.vaschetto at snservice.net> wrote:
>> Here is a nice video explane how-to add a bridge from PVE GUI
>>
>> http://pve.proxmox.com/wiki/Bridge_configuration_(Video)
>>
>> here have all the documantation aboute PVE
>>
>> http://pve.proxmox.com/wiki/Documentation
>>
>> Marco Vaschetto
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
>


-- Timh




More information about the pve-user mailing list