API Question on multiple interfaces

bline79

New Member
Oct 7, 2013
4
0
1
Hello,

I want to create containers with multiple network interfaces using the API. I'm currently interfacing with it through ruby net::SSH and the pvesh command to create the containers.

I can get a single interface created, but cannot figure out how to get a second interface. I've tried using:

pvesh create /nodes/pve24/openvz -vmid VEID -hostname host.name -searchdomain domain.name -storage lab -ostemplate /mnt/pve/install/template/cache/template.tar.gz -memory 8192 -swap 8192 -disk 4 -cpus 2 -nameserver gatewayip -netif ifname=eth0,bridge=vmbr0,ifname=eth1,bridge=vmbr1

But it only takes the second adapter listed.

Does anyone have any ideas on this aside from modifying the container file at /etc/vz/conf/VEID.conf after creation?
 
The -netif parameter allows you to pass more than one interface definition, simply seperate with ';':

-netif "ifname=eth0,bridge=vmbr0;ifname=eth1,bridge=vmbr1"