Difference between revisions of "Open VZ Basic"

From MS Computech
Jump to: navigation, search
Line 7: Line 7:
 
</pre><pre>#vzctl set 100 --ipadd 10.0.0.111 --save
 
</pre><pre>#vzctl set 100 --ipadd 10.0.0.111 --save
 
</pre><pre>#vzctl set 100 --userpasswd root:password --save
 
</pre><pre>#vzctl set 100 --userpasswd root:password --save
</pre><pre>#vzctl set 100 --nameserver 10.0.0.1 --save
+
</pre><pre>#vzctl set 100 --nameserver 10.0.0.1 --nameserver 213.191.92.86 --save
</pre>  
+
</pre> <pre>vzctl set 101 --numothersock 120 --save
 +
</pre><pre>vzctl exec 101 cat /proc/user_beancounters
 +
</pre><pre>vzctl exec 101 cat /proc/user_beancounters
 +
</pre>
 
Memory Adjust<br>  
 
Memory Adjust<br>  
  
Line 24: Line 27:
 
PRIVVMPAGES="384000:393212" // 1,5GB Burst
 
PRIVVMPAGES="384000:393212" // 1,5GB Burst
 
</pre>  
 
</pre>  
Or this command sample for 1gb Ram <br>
+
Or this command sample for 1gb Ram <br>  
 
<pre>[root@ex ~]# vzctl set 1001 --privvmpages=256000:262140 --save
 
<pre>[root@ex ~]# vzctl set 1001 --privvmpages=256000:262140 --save
 
UB limits were set successefully
 
UB limits were set successefully
Line 30: Line 33:
 
[root@ex ~]# vzctl set 1001 --vmguarpages=131072:2147483647 --save
 
[root@ex ~]# vzctl set 1001 --vmguarpages=131072:2147483647 --save
  
</pre>
+
</pre>  
<br>
+
<br>  
  
 
Openvz Reboot Activation  
 
Openvz Reboot Activation  
 
<pre>#/etc/crontab
 
<pre>#/etc/crontab
 
5 * * * * /usr/share/vzctl/scripts/vpsreboot</pre>
 
5 * * * * /usr/share/vzctl/scripts/vpsreboot</pre>

Revision as of 12:15, 8 June 2009

After Installation Openvz

Put Template inside

  1. /vz/template/cache
#vzctl create 100 --ostemplate name_of_template
#vzctl set 100 --ipadd 10.0.0.111 --save
#vzctl set 100 --userpasswd root:password --save
#vzctl set 100 --nameserver 10.0.0.1 --nameserver 213.191.92.86 --save
vzctl set 101 --numothersock 120 --save
vzctl exec 101 cat /proc/user_beancounters
vzctl exec 101 cat /proc/user_beancounters

Memory Adjust

/etc/vz/conf/xxx.conf

VMGUARPAGES="32768:2147483647" // 128MB Guaranteed
PRIVVMPAGES="64000:65536" // 256MB Burst

VMGUARPAGES="65536:2147483647" // 256MB Guaranteed
PRIVVMPAGES="128000:131072" // 512MB Burst

VMGUARPAGES="131072:2147483647" // 512MB Guaranteed
PRIVVMPAGES="256000:262140" // 1024MB Burst

VMGUARPAGES="262144:2147483647" // 1GB Guaranteed
PRIVVMPAGES="384000:393212" // 1,5GB Burst

Or this command sample for 1gb Ram

[root@ex ~]# vzctl set 1001 --privvmpages=256000:262140 --save
UB limits were set successefully
Saved parameters for VE 1001
[root@ex ~]# vzctl set 1001 --vmguarpages=131072:2147483647 --save


Openvz Reboot Activation

#/etc/crontab
5 * * * * /usr/share/vzctl/scripts/vpsreboot