Fix.
vzctl set XXX --disabled no --save
vzctl start XXX
Fix.
vzctl set XXX --disabled no --save
vzctl start XXX
modprobe vzcpt
vzctl set 1010 –cpus 1 –save
Many articles says you hosting administrator should to do this:
vzctl set CTID –capability setuid:on –save
vzctl set CTID –capability net_admin:on –save
vzctl set CTID –capability net_raw:on –save
where CTID is your server ID number
but if you provider don’t want to do this, you can try this:
nohup /usr/sbin/dnsmasq &
vzctl chkpnt 101 –dumpfile /tmp/Dump.101
mv /etc/vz/conf/101.conf /etc/vz/conf/102.conf
mv /vz/private/101 /vz/private/102
mv /vz/root/101 /vz/root/102
vzctl restore 102 –dumpfile /tmp/Dump.101
yum install ploop
CTID=100
vzctl exec $CTID “mount -t devpts devpts /dev/pts”
vzctl enter $CTID
it works on Debian containers.
vzctl exec 101 /sbin/MAKEDEV tty
vzctl exec 101 /sbin/MAKEDEV pty
vzctl exec 101 mknod –mode=666 /dev/ptmx c 5 2
vzctl enter 101
On RH OS.
vzquota drop 100
vzctl start 100
vzctl set 100 --iolimit 1M --save
vzctl enter 100
cat /dev/urandom | pv -c - > /tmp/test_io
vzctl set VPS_ID –userpasswd root:newpassword
#!/bin/bash
SWAP=”${1:-512}”
NEW=”$[SWAP*1024]”; TEMP=”${NEW//?/ }”; OLD=”${TEMP:1}0″
umount /proc/meminfo 2> /dev/null
sed “/^Swap\(Total\|Free\):/s,$OLD,$NEW,” /proc/meminfo > /etc/fake_meminfo
mount –bind /etc/fake_meminfo /proc/meminfo
free -m
vi /etc/vz/vz.conf
IPTABLES=”ipt_REJECT ipt_recent ipt_owner ipt_REDIRECT ipt_tos ipt_TOS ipt_LOG ip_conntrack
ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp”
modprobe iptable_nat
modprobe ip_nat
service vz restart
DEV=venet0
tc filter add dev $DEV parent 1: protocol ip prio 20 u32 match u32 1 0x0000 police rate 2kbit buffer 10k drop flowid :1
DEV=venet0
tc qdisc del dev $DEV root
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
tc class add dev $DEV parent 1: classid 1:1 cbq rate 256kbit allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst X.X.X.X flowid 1:1
tc qdisc add dev $DEV parent 1:1 sfq perturb 10
DEV=eth0
tc qdisc del dev $DEV root
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
tc class add dev $DEV parent 1: classid 1:1 cbq rate 256kbit allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src X.X.X.X flowid 1:1
tc qdisc add dev $DEV parent 1:1 sfq perturb 10