Posts

Showing posts with the label Zone

[Level 3] The script for demo creating mass zones on OpenSolaris

Days ago, my colleague will demo about the virtualization techniques on OpenSolari. So I share the script for him to demo fast creating zones on OpenSolaris. After test, my lap will create a zone per 3 seconds. That impress him, and he decided to demo on that session. The same script that I'd like to share to you, please refer the following script code. Any question, and suggestion, please feel free to let me know. #!/usr/bin/bash showUsage() {   cat< <EOF Usage:   $0 [c]reate  [original index] [start index] [end index]   $0 [d]estroy [start index]    [end index]   [always yes]   $0 [l]ist Ex.   $0 c 1 2 10   => create  zone2, zone3, ... ,zone10   $0 c 1 3 8    => create  zone3, zone4, ... ,zone8   $0 d 2 10 [F] => destroy zone2, zone3, ... ,zone10   $0 l PS.   for solaris 11 only   all indexes must greater then 1, less then 255 Zones: ...

[Level 2] How Fast to Clone a Zone in OpenSolaris?

How long do I need for clone a new testing zone from a production zone? 10 mins, 20 mins or more? Such kind of answer maybe you think is. Do not consider about the time that service down spends in your system (for some special AP, that maybe take a long time to stop), it just need few seconds to build a new testing environment. How could it be so fast? Because OpenSolaris cloning a zone just use the new feature of ZFS clone technology. When you create a zone and set the zonepath just under a zfs mount point, the command zoneadm will create a ZFS for your zone. Ex. # zfs list rpool/zones NAME            USED  AVAIL  REFER  MOUNTPOINT rpool/zones   278M  32.9G    27K  /export/zones zonecfg> set zonepath=/export/zones/zone1 zonecfg>... # zoneadm -z zone1 install A ZFS file system has been created for this zone. How do we clone a zone with zone1? The step as the fo...

[Level 3] Script for Solaris Zone FSS.

The following script that I found in the world wide web. It is a good utility that you can adjust cpu priority with FSS for your zone. with this helps, regards, Stanley Huang #!/usr/bin/ksh # # zonefss - zone FSS administration. Solaris 10. # FSS : Fair Share Scheduler # # 05-Apr-2005, ver 0.50 (first release) # # USAGE: zonefss -l | -z zone shares # eg, # zonefss -l # list FSS share values for all zones # zonefss -z global 10 # set the global zone shares to 10 # # Standard Disclaimer: This is freeware, use at your own risk. # # 05-Apr-2005 Brendan Gregg Created this. # ### Process Arguments PATH=/usr/bin:/usr/sbin list=0 set=0 if [[ "$1" == "-l" ]]; then shift; list=1 fi if [[ "$1" == "-z" ]]; then shift; set=1 zone=$1; shift shares=$1; shift fi ### List FSS shares if (( list )); then printf "%4s %-16s %s\n" "ID" "NAME" "SHA...