My presentation on Solaris Containers at OOW

Today was my presentation at Oracle OpenWorld. About 80 people showed up and listened to me explaining the fundamentals of zones and zfs. I started off being a little bit nervous but that is why I put the introduction and portrix advertising parts first. I finished off with demos on cloning and poor-man’s flashback. There were quite a few questions both during and after the presentation and I received very good feedback from the people I talked to.

So like I promised, here is the code needed to create a zone in Solaris. I will add the demo-code later and also follow up on a question about cloning a running zone.

root@hermes:~# zonecfg -z ora11g
ora11g: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:ora11g> create
zonecfg:ora11g> set zonepath=/zp03/zones/ora11g
zonecfg:ora11g> set autoboot=true
zonecfg:ora11g> add capped-cpu
zonecfg:ora11g:capped-cpu> set ncpus=1
zonecfg:ora11g:capped-cpu> end
zonecfg:ora11g> add net
zonecfg:ora11g:net> set address=192.168.42.79
zonecfg:ora11g:net> set physical=e1000g0
zonecfg:ora11g:net> end
zonecfg:ora11g> info
zonename: ora11g
zonepath: /zp03/zones/ora11g
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address: 192.168.42.79
physical: e1000g0
defrouter not specified
capped-cpu:
[ncpus: 1.00]
rctl:
name: zone.cpu-cap
value: (priv=privileged,limit=100,action=deny)
zonecfg:ora11g> verify
zonecfg:ora11g> commit
zonecfg:ora11g> exit

The zone is now configured but the zonepath is empty (it actually does not even exist yet). The next step populates the zonepath with all the needed files.

root@hermes:~# zoneadm -z ora11g verify
WARNING: /zp03/zones/ora11g does not exist, so it could not be verified.
When 'zoneadm install' is run, 'install' will try to create
/zp03/zones/ora11g, and 'verify' will be tried again,
but the 'verify' may fail if:
the parent directory of /zp03/zones/ora11g is group- or other-writable
or /zp03/zones/ora11g overlaps with any other installed zones.

root@hermes:~# zoneadm -z ora11g install
A ZFS file system has been created for this zone.
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <147436> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1504> packages on the zone.
Initialized <1504> packages on zone.
Zone is initialized.
Installation of these packages generated errors:
Installation of <20> packages was skipped.
Installation of these packages generated warnings:
The file contains a log of the zone installation.

The zone is now installed and ready to be booted. After the first boot, you can log on to the zone with the zlogin command.

root@hermes:~# zoneadm -z ora11g boot
root@hermes:~# zlogin -C ora11g

Now, you get all the normal postinstall questions including languages, hostname, root password, timezone and so on. After this, your zone is ready to go and will in most ways behave like any other solaris installation.

One thought on “My presentation on Solaris Containers at OOW

  1. Pingback: zone cloning without shutdown | portrix systems

Leave a Reply

Your email address will not be published. Required fields are marked *