Commit 20d71939 authored by Vitaly Lipatov's avatar Vitaly Lipatov

createvps: fix template creating

parent a2199dae
......@@ -3,12 +3,11 @@
export VEID=$1
export NAME=$2
#VEIPE=$(($VEID-300))
export EXTIP=87.249.47.44
#export EXTIP=87.249.47.44
export VEIP=192.168.0.$VEID
vzctl create $VEID --ostemplate=altlinux-httpd-server
vzctl set $VEID --hostname $NAME --onboot yes --nameserver 87.249.47.43 --save
vzctl set $VEID --ipadd $VEIP --save
vzctl set $VEID --searchdomain etersoft.ru --save
vzctl set $VEID --shmpages 512000:512000 --tcprcvbuf 1024000:1024000 --kmemsize 5560000:5560000 --numproc 512 --save
iptables -t nat -A POSTROUTING -s $VEIP -o eth0 -j SNAT --to-source $EXTIP
iptables -t nat -A PREROUTING -d $EXTIP -i eth0 -p tcp -m tcp --dport "$VEID"22 -j DNAT --to-destination $VEIP:22
vzctl create $VEID --ostemplate=etersoft-p8
vzctl set $VEID --hostname $NAME --onboot yes --ipadd $VEIP --save
#vzctl set $VEID --searchdomain etersoft.ru --save
vzctl set $VEID --shmpages 300M --physpages 1G --privvmpages 2G --tcprcvbuf umlimited --kmemsize 40M:45M --numproc 512 --dcachesize unlimited --save
#iptables -t nat -A POSTROUTING -s $VEIP -o eth0 -j SNAT --to-source $EXTIP
#iptables -t nat -A PREROUTING -d $EXTIP -i eth0 -p tcp -m tcp --dport "$VEID"22 -j DNAT --to-destination $VEIP:22
......@@ -8,4 +8,5 @@ IF=breth0
vzctl create $VEID --ostemplate=etersoft-p8
vzctl set $VEID --hostname $NAME --onboot yes $NAMESERVERS --save
vzctl set $VEID --tcprcvbuf unlimited --kmemsize 40M:45M --numproc 512 --save
vzctl set $VEID --physpages 1G --swap 512M --privvmpages 1.5G --dcachesize unlimited --save
vzctl set $VEID --netif_add $IF,,,,$IF --save
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment