All 3 entries tagged Zone

View all 5 entries tagged Zone on Warwick Blogs | View entries tagged Zone at Technorati | There are no images tagged Zone on this blog

March 31, 2015

–UPDATE – Building a zone quickly using the templates installed in global – UPDATE

Follow-up to Building a zone quickly using the templates installed in global from Maria's blog

I've scripted some of the work to make things a bit quicker.

Script is called setup-zone.sh

It will do the tedious copying and changing of the templates for you.

It creates a default manifest which you can change later if you like.

The script tells you what to do next.

To call it it's:

NEW: setup-zone.sh zonename initial-vid poolref

Follow the on screen questions

NEW: If you know you want the default manifest, it will create the zone for you too

Make sure you ensure the zone backup script is called in cron for your new zone!


February 23, 2015

Building a zone quickly using the templates installed in global

The templates mentiond are in /opt/site installed at server build pkg is zone-stuff

1. Get SAN disk ref

2. copy template zonecfg & edit, change the storage ref and the vlan id:

create -b
set brand=solaris
add rootzpool
add storage dev:dsk/xxxx
end
set zonepath=/zones/%{zonename}
set autoboot=true
add fs
set dir=/etc/globalname
set special=/etc/globalname
set type=lofs
add options ro
end
set ip-type=exclusive
add anet
set configure-allowed-address=true
set linkname=net0
set lower-link=aggr0
set vlan-id=xxx
end

*Note can't enable compression or dedup on the zfs here, do it in the manifest.

3.Copy the template sc profile and edit

Default password is the usual temporary initial password.

Check that the network settings are correct

The name of the profile should be zonename-sc-profile.xml so that the backup script finds it.

4. Copy the template manifest and edit

Add /remove packages as needed, the default is the minimum.

Checkout the repo on ports 8082 and 81, if it's a webdev box tomcat/apache & build user stuff will be required:

These should always be there:

<name>pkg://firstboot/after-install-scripts</name>
<name>pkg://firstboot/zone-first-boot-script</name>
<name>pkg://firstboot/teamunix-stuff</name>

Other examples:

<name>pkg://firstboot/build-stuff</name>
<name>pkg://sw/web-app-depend</name>
<name>pkg://sw/tomcat8</name>
<name>pkg://sw/tomcat7</name>
<name>pkg://sw/apache-64bit-event-dependancies-no-ssl</name>

The name of the manifest should be zonename-manifest.xml so that the backup script finds it.

5. zonecfg -z zonename -f zonename.cfg

6. zoneadm -z zonename install -m zonename-manifest.xml -c zonename-sc_profile.xml

zoneadm -z zonename boot

zlogin -C zonename

svcadm enable ipfilter

change the passwords

7. Check everything is OK with the zone.

8. Double check globalzone mounts a directory from the thumpers and start backing up the zone using cron:

Examples:

45 21 * * * /opt/site/backup-zone.sh rpool/zones turk-log z
45 22 * * * /opt/site/backup-zone.sh rpool/zones aiserver z
45 23 * * * /opt/site/backup-zone.sh datapool/zones/aiserver/datapool aiserver p

Backup script takes a snapshot of the zone and copies the profile, the cfg and the snapshot to the thumper. For a pool it just backs up the pool.


May 21, 2014

solaris 11.1 copying zones between machines

I have zone all built up the way I like and I want more zones like it both on the same server and others.

The built zone is ZONENAME on the server SERVER, and it's in the installed state.

1st I did some local copies, using a sc_profile.xml file for each zone, the file must be called sc_profile.xml, and you must use a full pathname to it. Below is without a zone cfg, notes also do a with zone cfg, even better, don't forget to change IP, (maybe gateway) (maybe link name) & hostname in new sc_profile.xml

cp sc_profile.xml-NEW-LOCAL-ZONE sc_profile.xml
zonecfg -z NEW-LOCAL-ZONE "create -t ZONENAME"
zonecfg -z NEW-LOCAL-ZONE "set zonepath=/zones/NEW-LOCAL-ZONE "
zonecfg -z NEW-LOCAL-ZONE "select net physical=net2; set physical=net8;end"
zonecfg -z NEW-LOCAL-ZONE "select net physical=net3; set physical=net9;end"
zoneadm -z NEW-LOCAL-ZONE clone -c /opt/site/sc_profile.xml ZONENAME
zoneadm -z NEW-LOCAL-ZONE boot
zlogin -C NEW-LOCAL-ZONE

Then sort out networking and check services.


Next use the same zone to build zones on other machines:

zfs snapshot -r rpool/zones/ZONENAME@archive
zfs send -rc rpool/zones/ZONENAME@archive |bzip2 >/var/tmp/ZONENAME.zfs.bz2
scp /var/tmp/ZONENAME.zfs.bz2 MYLOGIN@NEW-MACHINE:/var/tmp
scp ZONENAME.cfg MYLOGIN@NEW-MACHINE:/var/tmp
scp sc_profile.xml MYLOGIN@NEW-MACHINE:/var/tmp

On new machine NEW-MACHINE:
copy & edit sc_profile.xml and zone cfg file, zoneadm also wants the full pathname to the archive

zonecfg -z NEW-ZONE -f NEW-ZONE.cfg
zoneadm -z NEW-ZONE install -a /var/tmp/ZONENAME.zfs.bz2 -u -c /var/tmp/sc_profile.xml
zoneadm -z NEW-ZONE boot
zlogin -C NEW-ZONE

Then sort out networking and check services.


October 2019

Mo Tu We Th Fr Sa Su
Sep |  Today  |
   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 31         

Search this blog

Tags

Galleries

Most recent comments

  • hello. i am from poland. i uwielbiam was! by on this entry
  • Hello, It was more for internal consumption, I will check it over and send you a version, can you em… by Maria MacCallum on this entry
  • Hello Maria, i don't see the script setup–zone.sh, can you post it ? I'am looking too for an example… by FRANCISCO on this entry
  • Solaris 11.2 returns the value of SI_MEMSIZE in Mb's now by Maria MacCallum on this entry

Blog archive

Loading…
RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXIX