OpenVZ static IP with subnet and route

P

pejman_view

Guest
Hi,

I'm newbie on virtualizing stuff. I installed Proxmox ve3.1 on a server.
I wonder how to create OpenVZ container with subnet and gateway.
They only option I saw it has , Static IP address. I could not to set gateway and subnet
 
the container will use the gateway and subnet of the host. you only need to supply the IP address.

if you want to put the container on a different subnet, you will need to attach a vmbr to it and configure the network/ip from within the container. that is the only way i have found that works for me. don't know if anyone has a better solution.
 
thank you for your reply.

I followed your instructions when I want to add vmbr, this error showed up

Parameter verification failed. (400)
gateway: Default gateway already exists on interface 'vmbr0'.

But my default gateway and what I entered is totally different.

For example:
vmbr0
IP Address: 198.xx.xx.210
Subnet: 255.255.255.252
Gateway: 198.xx.xx.209

vmbr1
IP Address: 192.xx.xx.95
Subnet: 255.255.255.240
Gateway: 192.xx.xx.80
 
thank you for your reply.

I followed your instructions when I want to add vmbr, this error showed up



But my default gateway and what I entered is totally different.

For example:
vmbr0
IP Address: 198.xx.xx.210
Subnet: 255.255.255.252
Gateway: 198.xx.xx.209

vmbr1
IP Address: 192.xx.xx.95
Subnet: 255.255.255.240
Gateway: 192.xx.xx.80


Your host can only have ONE gateway. You DO NOT configure a gateway/subnet on your second VMBR (you dont even need an ip address on it). I am not really sure what it is you are trying to accomplish with that config. Is your server in a datacenter with a public IP?

VMBR0 is tied to an ETH device, yes?
for your container, configure the network device as VMBR0, and once you BOOT the container, you configure the ETH device INSIDE the container....you dont do anything of the sort OUTSIDE of the container.
 
Your host can only have ONE gateway. You DO NOT configure a gateway/subnet on your second VMBR (you dont even need an ip address on it). I am not really sure what it is you are trying to accomplish with that config. Is your server in a datacenter with a public IP?
I have a range of subnets that i mentioned vmbr1, I would create automatic openvz with that subnets.

VMBR0 is tied to an ETH device, yes?
for your container, configure the network device as VMBR0, and once you BOOT the container, you configure the ETH device INSIDE the container....you dont do anything of the sort OUTSIDE of the container.
I really would like to create automatic gained IP address. I even modify contaner IP address after restarting nothing had changed! I'm a php developer and someone asked me to write an automation for proxmox. So I have to understand procedures with my low knowledge about network.

I do something like this as you already said with no success:
Add a new vmbr with a new subnets information:
sc1.jpg

and add a bridge to the container.
sc2.jpg
 
Remove the IP address config from the container settings. It's not needed.

Remove the vmbr1 ip configuration

The only thing you should do with vmbr1 is tie it to an eth device. Period

Attach vmbr1 to container

Start container

Go into container, using console

Configure the IP address you want your container to have from within the container. NOT from the container config page.
 
Remove the IP address config from the container settings. It's not needed.

Remove the vmbr1 ip configuration

The only thing you should do with vmbr1 is tie it to an eth device. Period

Attach vmbr1 to container

Start container

Go into container, using console

Configure the IP address you want your container to have from within the container. NOT from the container config page.
Hello,

Doesn't have anyway not to do that! because the automation doesn't work for user on this way. I want to openvz created then email details to user after 5minutes. On payment activation. Like solusVM
 
:facepalm:

It would help if you gave all that info in the first post....this thread is worthless now.

http://www.whmcs.com/

Configure your network properly for openvz containers. honestly, I don't think you have any business renting out VPS if you can't configure your network.
 
:facepalm:

It would help if you gave all that info in the first post....this thread is worthless now.

http://www.whmcs.com/

Configure your network properly for openvz containers. honestly, I don't think you have any business renting out VPS if you can't configure your network.

Hello again,

Thank you for your reply. I knew about whmcs, But my clients asked me that I don't use existed billing automation. As I already said I'm not network manager. I only a programmer that tries to find out how it is work to use API for creating system.
 

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!