Please find the "zoneadm" commands with an example as describe below.
➤ How to Verify a Solaris zone:
To verify the local solaris zone you need to run the below command with syntax.
!-[solaris]#zoneadm -z <zone> verify
Example: !-[solaris]#zoneadm -z sunz01 verify
In this example once you run the above command, if your zone is installed properly without any error then this is not showing you any output, that's means it is verified. After running the command if it is showing a message then you need to check the configuration of this zone.
➤ How to Installing a Solaris zone:
To install the local Solaris zone you need to run the below command with syntax.
!-[solaris]#zoneadm -z <zone> install
Example: !-[solaris]#zoneadm -z sunz01 install
In this example when you run the above command then your local zone has been started for installation. It is installed the local zone using the Solaris repostiory or flar images which you are kept at server location.
➤ How to Ready a Solaris zone:
To move the local zone in ready or maintainance state you need to run the below command.
!-[solaris]#zoneadm -z <zone> ready
Example: !-[solaris]#zoneadm -z sunz01 ready
In this example, when we run the above command then your local zone moved in to ready or maintianance state.
➤ How to Boot a Solaris zone:
To boot the solaris zone on global system, you need to run the below command with syantx.
!-[solaris]#zoneadm -z <zone> boot
Example: !-[solaris]#zoneadm -z sunz01 boot
After running the above command your local solaris zone has been boot successfully if it is not showing any error during boot time. If you see any message during the boot time then please check where is the issue.
➤ How to Reboot a Solaris zone:
To reboot or restart the solaris zone on Solaris server, you need to perform the below command on global zone.
!-[solaris]#zoneadm -z <zone> reboot
Example: !-[solaris]#zoneadm -z sunz01 reboot
Using this command the local zone "sunz01" has been restart again successfully. You need to run this command from global zone only.
➤ How to Shutdown/Halt a Solaris zone:
If you want to shutdown or halt your local zone without login it, then you need to run the below command from global zone.
!-[solaris]#zoneadm -z <zone> halt
Example: !-[solaris]#zoneadm -z sunz01 halt
After running this command local solaris zone state change from running to installed state that's means your server is shutdown now.
➤ How to Uninstall a Solaris zone:
If you want to uninstall any solaris zone then you need to run the below command for uninstall the zone.
!-[solaris]#zoneadm -z <zone> uninstall -F
Example: !-[solaris]#zoneadm -z sunz01 uninstall -F
"-F" syntax is used to uninstall the zone forcefully.
➤ How to Viewing a Solaris zone:
if you want to local zone current status and any other display information you need to run the below command.
!-[solaris]#zoneadm list -icv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
1 sunz01 running /zones/sunz01 solaris excl
2 sunz02 running /zones/sunz02 solaris excl
Using above command you can check the current status of all installed zones on Solaris server. It is show you the zone path and zone information. All the above command you need to run from Global zone with root privileges
To verify the local solaris zone you need to run the below command with syntax.
!-[solaris]#zoneadm -z <zone> verify
Example: !-[solaris]#zoneadm -z sunz01 verify
In this example once you run the above command, if your zone is installed properly without any error then this is not showing you any output, that's means it is verified. After running the command if it is showing a message then you need to check the configuration of this zone.
➤ How to Installing a Solaris zone:
To install the local Solaris zone you need to run the below command with syntax.
!-[solaris]#zoneadm -z <zone> install
Example: !-[solaris]#zoneadm -z sunz01 install
In this example when you run the above command then your local zone has been started for installation. It is installed the local zone using the Solaris repostiory or flar images which you are kept at server location.
➤ How to Ready a Solaris zone:
To move the local zone in ready or maintainance state you need to run the below command.
!-[solaris]#zoneadm -z <zone> ready
Example: !-[solaris]#zoneadm -z sunz01 ready
In this example, when we run the above command then your local zone moved in to ready or maintianance state.
➤ How to Boot a Solaris zone:
To boot the solaris zone on global system, you need to run the below command with syantx.
!-[solaris]#zoneadm -z <zone> boot
Example: !-[solaris]#zoneadm -z sunz01 boot
After running the above command your local solaris zone has been boot successfully if it is not showing any error during boot time. If you see any message during the boot time then please check where is the issue.
➤ How to Reboot a Solaris zone:
To reboot or restart the solaris zone on Solaris server, you need to perform the below command on global zone.
!-[solaris]#zoneadm -z <zone> reboot
Example: !-[solaris]#zoneadm -z sunz01 reboot
Using this command the local zone "sunz01" has been restart again successfully. You need to run this command from global zone only.
➤ How to Shutdown/Halt a Solaris zone:
If you want to shutdown or halt your local zone without login it, then you need to run the below command from global zone.
!-[solaris]#zoneadm -z <zone> halt
Example: !-[solaris]#zoneadm -z sunz01 halt
After running this command local solaris zone state change from running to installed state that's means your server is shutdown now.
➤ How to Uninstall a Solaris zone:
If you want to uninstall any solaris zone then you need to run the below command for uninstall the zone.
!-[solaris]#zoneadm -z <zone> uninstall -F
Example: !-[solaris]#zoneadm -z sunz01 uninstall -F
"-F" syntax is used to uninstall the zone forcefully.
➤ How to Viewing a Solaris zone:
if you want to local zone current status and any other display information you need to run the below command.
!-[solaris]#zoneadm list -icv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
1 sunz01 running /zones/sunz01 solaris excl
2 sunz02 running /zones/sunz02 solaris excl
Using above command you can check the current status of all installed zones on Solaris server. It is show you the zone path and zone information. All the above command you need to run from Global zone with root privileges