OpenVZ Forum


Home » General » Support » Host and VE's all have external IP addresses.
Re: Host and VE's all have external IP addresses. [message #39381 is a reply to message #39170] Tue, 13 April 2010 05:16 Go to previous messageGo to previous message
noahcampbell is currently offline  noahcampbell
Messages: 2
Registered: April 2010
Location: Bay Area, CA
Junior Member
I recently slogged through this experience on debian so maybe I can help with centos.

Firstly, I was able to do everything without setting any routes!

I created a vmbr0 interface and bound it to eth0. The interface uses dhcp to resolve it's ip, subnet, gateway etc. Make sure you remove eth0 from the configuration. This is configured (on debian) in /etc/network/interfaces so you'll need to translate.

Secondly, the best tool to diagnose your bridge is brctl. After you start a VE run brctl show. The output should look like the following:
vz-host-01:~# brctl show
bridge name	bridge id		STP enabled	interfaces
vmbr0		8000.000c299dd0f8	yes		eth0
							veth1000.0
							veth1001.0
							veth777.0


Note the interfaces that are attached to vmbr0. If you don't have this link, then you're not going to have any success within the VE.

After that, you enable DHCP inside your host template and you're set.

You'll need to also look at /etc/vz/vznet.conf (your config location may be different on centos). You'll want to auto add the veth$VMID.X to your bridge when you start the VE. Not sure how to remove it, but at least it comes up when the VE starts.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Resolved] Destroyed VE but still /proc/bc/$VEID
Next Topic: OpenVZ in ATOM with solusvm
Goto Forum:
  


Current Time: Sun Jul 27 05:26:17 GMT 2025

Total time taken to generate the page: 0.58567 seconds