Thursday, February 23, 2017

How to Remove a Non-Global Zone from Solaris Server

In this post, I will explain to you how to remove a Non-Global Zone from Solaris Server.

As you aware that Non-Global zone are hosted on Global zone on Solaris Operating system. You can check the Non-Global zone list using "zoneadm" command. It will show you are running and installed zones on Global zones.

Step by Step Method of removal a Non-Global Zone:

First of all you need to check the Non-Global Zone list to ensure which zone is running on the server.

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
 1    sun01       running         /zones/sun01                solaris    shared

In the above command output you can see the Non-Global Zone "sun01" is running, which we need to remove or delete from Solaris Server.

Now, we need to shutdown the required zone which we need to delete. We can shutdown the Non-Global zone using below commands.
--------------------------------------------
global#zoneadm -z sun01 halt
or
global#zoneadm -z sun01 shutdown
or
global#zlogin sun01 shutdown
-------------------------------------------
In next step when your Non-Global zone shutdown you need to uninstall the local zone. You can used the below method to uninstall the Non-Global Zone.

global#zoneadm -z sun01 uninstall

Using above command Non-Global zone "sun01" has been uninstall successfully.

In the last step you need to remove or delete all dataset and configuration files of Non-Global zone "sun01" from Global zone.

global#zonecfg -z sun01 delete

Using above command all the configuration files related to this Non-Global zone has been deleted successfully. Now you can remove the folder related to this zone.

So using above method we can remove or delete the Non-Global zone from global zone or Solaris Operating system. Please let me know if you are facing any issue during using this process.

No comments:

Post a Comment