Membuat zone di Solaris 11

Posted on


Ini adalah contoh cara membuat zone di Solaris 11 dimana pada proses pembuatannya dibutuhkan adanya repositori, pembuatan repositori sendiri sudah dibahas di tulisan sebelumnya.

Persiapkan satu mountpoint untuk lokasi dimana zone tersebut akan di-install, kemudian buat satu virtual nic yang nantinya akan di-assign kedalam zone tersebut.

# zfs create -o mountpoint=/zones rpool/zones
# zfs list rpool/zones
# dladm create-vnic -l net0 vnic1

Buat zone baru (zone1)

# zonecfg -z zone1
# zonecfg:zone1> create
# create: Using system default template 'SYSdefault'
# zonecfg:zone1> set zonepath=/zones/zone1
# zonecfg:zone1> add net
# zonecfg:zone1:net> set physical=vnic1
# zonecfg:zone1:net> end
# zonecfg:zone1> exit

Periksa status zone1 yang barusan dibuat, statusnya seharusnya masih “configured”

# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              solaris  shared
   - zone1            configured /zones/zone1                   solaris  excl

Buat system profile untuk zone1, kemudian install…. jangan lupa untuk mengarahkan ke profile yang sudah kita buat.

# sysconfig create-profile -o zone1.profile.xml
# zoneadm -z zone1 install -c /root/zone1.profile.xml
The following ZFS file system(s) have been created:
    rpool/zones/zone1
Progress being logged to /var/log/zones/zoneadm.20130719T022204Z.zone1.install
       Image: Preparing at /zones/zone1/root.

 AI Manifest: /tmp/manifest.xml.qQaqej
  SC Profile: /root/zone1.profile.xml
    Zonename: zone1
Installation: Starting ...

              Creating IPS image
Startup linked: 1/1 done
              Installing packages from:
                  solaris
                      origin:  http://10.87.17.250/
                      origin:  http://localhost:1008/solaris/bbb612b800c4a05fe489e22179376fa4cb0b1970/
                      origin:  http://localhost:1008/solaris/d360067de7dce7593b27cca30a0eef0cbb0f4039/
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            183/183   33556/33556  222.2/222.2  261k/s

PHASE                                          ITEMS
Installing new actions                   46825/46825
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done
Installation: Succeeded
        Note: Man pages can be obtained by installing pkg:/system/manual
 done.
        Done: Installation completed in 1403.715 seconds.
  Next Steps: Boot the zone, then log into the zone console (zlogin -C)
              to complete the configuration process.
Log saved in non-global zone as /zones/zone1/root/var/log/zones/zoneadm.20130719T022204Z.zone1.install

Nyalakan zone1 dan periksa kembali status zone1, seharusnya statusnya adalah “running”

# zoneadm -z zone1 boot
# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              solaris  shared
   1 zone1            running    /zones/zone1                   solaris  excl

Proses pembuatan zonenya sudah selesai🙂

One thought on “Membuat zone di Solaris 11

    Membuat Repositori Lokal Solaris 11 | Just Nobody said:
    July 19, 2013 at 11:24 am

    […] Lakukan test dengan meng-install salah satu paket menggunakan perintah “pkg install” atau dengan cara membuat zone. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s