System Administration Guide: Virtualization Using the Solaris Operating System

ProcedureHow to Uninstall a Branded Zone


Caution – Caution –

This procedure removes all of the files in the zone's root file system. The action is irreversible.


The zone cannot be in the running state. The uninstall operation is invalid for running zones.

You must be the global administrator in the global zone to perform this procedure.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. List the zones on the system.


    global# zoneadm list -v
    

    You will see a display that is similar to the following:


    ID  NAME       STATUS        PATH                 BRAND      IP
    0  global     running       /                     native     shared
    -  lx-zone    installed     /export/home/lx-zone  lx         shared
  3. Use the zoneadm command with the -z uninstall option to remove the zone lx-zone.

    You can also use the -F option to force the action. If this option is not specified, the system will prompt for confirmation.


    global# zoneadm -z lx-zone uninstall -F
    

    Note that when you uninstall a zone that has its own ZFS file system for the zonepath, the ZFS file system is destroyed.

  4. List the zones on the system again, to verify that lx-zone is no longer listed.


    global# zoneadm list -v
    

    You will see a display that is similar to the following:


    ID  NAME     STATUS       PATH               BRAND      IP
    0  global   running      /                   native     shared
Troubleshooting

If a zone uninstall is interrupted, the zone is left in the incomplete state. Use the zoneadm uninstall command to reset the zone to the configured state.

Use the uninstall command with caution because the action is irreversible.