Solaris tip of the week: Zone cloning

In an earlier Solaris tip of the week, I published a zone creation script that could be ussed to automate the installation of a set of zones, defined as a list of hostname:ipaddress pairs. I've updated this script to leverage the 'zoneadm clone' option, and I'm happy to say that this significantly shortens the install time on both ufs and zfs root filesystems. The modifcation to this script now creates a zone template named 'master'. The master zone is installed once, then used to create all subsequent zones. On a ufs filesystem, a new zone can be created in approximately two minutes. On a zfs filesystem, a new zone can be created in approximately 10 seconds.

I've tested this script on both nevada/sol10 hosts as well as on opensolaris/ipkg installations. On OpenSolaris, a host must be internet-connected in order to install the master zone, but once the master zone is installed, additional zones can be created as clones of the master zone without being connected to the internet.  Hope this is useful, let me know if you have problems or questions regarding this script.

Download zone installation script here.


Comments:

Hello,

this is very interesting, where do we define the list of hostname and ipaddress pairs? does it go as an input to this script or does it need to be hard coded into the script.

I also saw some code related to the domain name and subnet etc. Will all that be taken care of or do I have to modify this script to use it in my domain name and the subnet I am using.

Thanks in advance

Devesh

Posted by Deepee on January 09, 2009 at 07:59 AM EST #

hello,
i'm using your script in os2008.11, but it seems that there is problem with your sysidcfg, because, when i boot the zone with:
zoneadm -z newz reboot;zlogin -C newz
it asks me for the terminal, and there is this message:
Configuring network interface addresses: e1000g0.
root_password=\*\*\*\*\*\*\*\*\*\*\*\*\*
syntax error line 2 position 15

are you sure this script is working in os2008.11?
thanks for help,

Posted by gerard henry on January 15, 2009 at 08:00 PM EST #

how to put IP address , subnet, defrouter , dir and zone path to new zone

Posted by kishor on March 21, 2011 at 07:48 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jay Danielsen

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today