OpenVZ Forum


Home » General » Support » 200 IPs in a single VE?
Re: 200 IPs in a single VE? [message #28553 is a reply to message #28549] Mon, 24 March 2008 08:01 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

I don't think it will work. Maybe it works with vzctl, but not with the shell scripts, some of which are sourcing container configs. If a shell script is sourcing the file, all the subsequent assignments will overwrite the previous one, so a shell script will think this container only have one IP (the last one from the config).

Your best shot is space-separated list, as documented in man vps.conf. Shell script written by curx above does just what you want (and the fact that it uses vzctl set --save means those IPs are saved into config file.

Alternatively, you can do something like:

IPR=65.49.42 ; START=70; STOP=254; echo -n 'IP_ADDRESS="'; for dip in `seq $START $STOP`; do echo -n $IPR.$dip "" ; done; echo '"'

if you want to modify the config file directly, add the output of the above shell code to /etc/vz/conf/CTID.conf (and make sure you have removed previous IP_ADDRESS declaration from it).


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png

[Updated on: Mon, 24 March 2008 08:02]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: numothersock question
Next Topic: Having trouble mounting in a VE
Goto Forum:
  


Current Time: Sun Aug 04 14:21:26 GMT 2024

Total time taken to generate the page: 0.03703 seconds