Proxmox GURUS: How can I assign VLAN IP to OpenVZ? THERE IS NO DOCUMENTATION

torontob

Active Member
Oct 18, 2010
40
0
26
Hi Everyone,

I have been banging my head against the wall for two days now and tried everything but I can't find proper documenation for assigning VLAN IP to my OpenVZ container (CentOS). I am using pfSense as router and it has VLAN ID 4000 set with network 10.10.10.0/24. Proxmox directly connects to pfSense and there is no switch.

I have vmbr0 on Proxmox and eth0 on OpenVZ.

What commands do I have to run on host node and what commands do I have to run on openvz to get one of the 10.10.10.0/24 IPs to my openvz?

Thanks,
 
It's in the GUI on 3.4 but is there some reason you spammed the shit out of the forums with this question?
 
Thanks but I am looking for 3.0. There is a page on it that doesn't make sense and is not complete. It seems to be possible to run commands and get VLAN working on OpenVZ and many people asked the question but there is no answer than upgrade to 3.4. Not everyone can upgrade. Please let me know if this is possible on 3.0 with command line as pointed here: http://wiki.openvz.org/VLAN

I tried these commands but it doesn't work so either the wiki should be updated or change to say a 3.4 upgrade is needed if that is a deal breaker:
host # vconfig add eth0 <vlan_id>
host # vzctl set <CTID> --netif_add eth0.<vlan_id> --save
 
Thanks but I am looking for 3.0. There is a page on it that doesn't make sense and is not complete. It seems to be possible to run commands and get VLAN working on OpenVZ and many people asked the question but there is no answer than upgrade to 3.4. Not everyone can upgrade. Please let me know if this is possible on 3.0 with command line as pointed here: http://wiki.openvz.org/VLAN

I tried these commands but it doesn't work so either the wiki should be updated or change to say a 3.4 upgrade is needed if that is a deal breaker:
host # vconfig add eth0 <vlan_id>
host # vzctl set <CTID> --netif_add eth0.<vlan_id> --save

The correct answer is to update to a modern version of Proxmox, where this is known to work.
 
There are old forum posts of getting vlans working in vz containers. Prior to it being added to the GUI, I had a custom interfaces file that presented a different vmbr# for each vlan. Then it was as simple as attaching the container to that vmbr.

It is recommended that you update for security fixes and system patches. Staying on an old version isn't secure or performant
 

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!