Changes

Jump to: navigation, search

Demo scripts Virtuozzo

622 bytes added, 21:19, 2 August 2015
add useful links
# prlctl destroy $NAME
== Massive container Multiple containers creation ==
Create/start 50 or 100 10 containers in a shell loop. Shows fast deploymentand high density.
Here are the example commands needed:
<pre>
# time for ((CT=200100; CT<250110; CT++)); do \> time prlctl create $CT --ostemplate centos-6-x86_64 --vm-typevmtype=ct; \> prlctl start $CT; \> done
</pre>
<pre>
# for ((CT=200; CT<250; CT++)); do \
> vzctl prlctl set $CT --ipadd 10.1.1.$CT --save/24; \> done
</pre>
== Live migration ==
 
=== xscreensaver inside container ===
If you have two boxes, do <code>vzmigrate --online</code> from one box
FIXME: commands, setup, VNC template.
=== CRIU (Checkpoint and Restore In Userspace ) ===
* [http://criu.org/Simple_loop Simple loop]
* [https://github.com/tych0/presentations/blob/master/ods2014.md Migration of Doom inside container inside LXC container]
* [http://criu.org/Docker Checkpoint and Restore of Docker container]
* [https://github.com/jpetazzo/critmux CRIU + tmux]
* This is a tech demo of [http://criu.org/Simple_loop Simple loopCRIU]and Docker integration, featuring [https://tmux.github.io/ tmux]. <pre>docker run -t -i --privileged --name critmux jpetazzo/critmuxDo stuff in tmux. Don't know what to do? Just type a few characters.From another terminal, docker stop critmux. Container stops.docker start critmux ; docker attach critmux. MIND. BLOWN.Note: docker start -a doesn't quite work.</pre> See [https://asciinema.org/a/9889 screencast] recorded with Asciinema. 
* [http://criu.org/Asciinema CRIU screencasts]
 
=== P.Haul ===
 
* [https://github.com/xemul/p.haul/blob/master/test/mtouch/HOWTO P.Haul HOWTO]
* [https://github.com/xemul/p.haul/wiki/Live-migrating-OVZ-mainstream-container Live migrating OVZ mainstream container]
== Docker inside CT ==
== Docker inside CT ==[[Docker_inside_CT]]
== Resource management ==
<pre>
# while [ true ]; do \
> while [ true ]; do \> echo " " > /dev/null;> done &> done
</pre>
=== CPU scheduler ===
 
{{Warning|CPU weights only works in stable kernels.}}
Create 3 containers:
<pre>
# vzctl prlctl create 101# vzctl prlctl create 102# vzctl prlctl create 103
</pre>
Set container weights:
<pre>
# vzctl prlctl set 101 --cpuunits 1000 --save# vzctl prlctl set 102 --cpuunits 2000 --save# vzctl prlctl set 103 --cpuunits 3000 --save
</pre>
Start containers:
<pre>
# vzctl prlctl start 101# vzctl prlctl start 102# vzctl prlctl start 103
</pre>
Run busy loops in all containers:
<pre>
# vzctl prlctl enter 101
[ve101]# while [ true ]; do true; done
# vzctl prlctl enter 102
[ve102]# while [ true ]; do true; done
# vzctl prlctl enter 103
[ve103]# while [ true ]; do true; done
</pre>
=== Disk quota ===
<pre>
# vzctl prlctl set CTID --diskspace 1048576:1153434 --save# vzctl prlctl start CTID# vzctl prlctl enter CTID
[ve]# dd if=/dev/zero of=/tmp/tmp.file bs=1048576 count=1000
dd: writing `/tmp/tmp.file': Disk quota exceeded
</pre>
 
== See also ==
 
* [http://criu.org/Asciinema CRIU screencasts]
* [https://www.youtube.com/c/OpenVZorg OpenVZ demo on Youtube]
* [[Screencasts|Virtuozzo screencasts]]
[[Category:Events‏‎]]

Navigation menu