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"
 

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!