User Tools

Site Tools


tech:openindiana:start

This is an old revision of the document!


Technical Information: OpenIndiana Topics

Zones

Basic

Here's a decent guide: building in a zone

Create ZFS pool for zones
  • List of disks: echo | format (look for disk and name)
  • zpool create poolname diskname
    eg. zpool create zonepool c2t1d0
  • Create ZFS filesystems for zone:
    zfs create -o compression=on -o mountpoint=/zones zonepool/zones
    zfs create -o sync=disabled -o atime=off zonepool/zones/oidev
  • Create zone configuration:
    (remember NIC name from disabling in nwam)
    zonecfg -z oibld
    create
    set autoboot=true
    set zonepath=/zones/oidev/oibld
    set ip-type=exclusive
    add net
    set physical=e1000g1
    end
    exit
  • Install the zone: zoneadm -z oibld install

Initialize the zone's basic local config

  • Make the zone “ready”: zoneadm -z oibld ready
  • Populate the zone's sysidcfg:
    cat <<EOF > /zones/oidev/oibld/root/etc/sysidcfg
    terminal=xterms
    network_interface=PRIMARY {dhcp protocol_ipv6=no}
    security_policy=none
    name_service=NONE
    nfs4_domain=dynamic
    timezone=UTC
    root_password=NP
    EOF
  • Boot the zone with: zoneadm -z oibld boot
  • Log into the zone with: zlogin -C oibld
  • Change the root password to blank (by hitting return twice for password)

Set up DNS

  • Populate /etc/resolv.conf and chown it to netadm:netadm
  • Change the hosts line in /etc/nsswitch.conf (add “dns” after “files”)

Other zone operations

Removing a zone

  • Shut down the zone my-zone using one of the following methods.
    The zoneadm shutdown method is preferred
    • Using zoneadm:
      global# zoneadm -z my-zone shutdown
      my-zone
    • Using zlogin:
      global# zlogin my-zone shutdown
      my-zone
  • Remove the root file system for my-zone.
    global# zoneadm -z my-zone uninstall -F
    the -F option to force the action generally isn't required
  • Delete the configuration for my-zone:
    global# zonecfg -z my-zone delete -F
    the -F option to force the action generally isn't required.
  • List the zones on the system, to verify that my-zone is no longer listed.
    global# zoneadm list -iv
  • You will see a display that is similar to the following:
    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              solaris    shared


Links: Tech InfoMantis Area

tech/openindiana/start.1432418635.txt.gz · Last modified: 2015/05/23 17:03 by rk4n3