This articles describes how to uninstall Solaris based Veritas VRTSperl and VRTSvlic packages from Solaris Local Zone which is in an "unavailable" state.
The following Solaris Local (non-global) Zones are visible to the Solaris Sparc system from the Solaris Global Zone:
# zoneadm list -civ
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zone1 unavailable /zones/zone1 solaris excl
- zone2 unavailable /zones/zone2 solaris excl
- zone3 unavailable /zones/zone3 solaris excl
- zone4 unavailable /zones/zone4 solaris excl
The rootpath for the Solaris Local Zone "zone4" is shown below:
# df -k | grep zone4 | grep ROOT
pool4/zone4/rpool/ROOT/BASE 25675776 943651 19827162 5% /zones/zone4/root
pool4/zone4/rpool/ROOT/BASE/var 25675776 173167 19827162 1% /zones/zone4/root/var
The Solaris Local Zone cannot be "booted" until it is attached, hence the following error:
# zoneadm -z zone4 boot
zoneadm: zone 'zone4': zone is unavailable; attach suggested. See zoneadm(8) for other options.
The Solaris Local Zone fails to "attach":
# zoneadm -z zone4 attach
Progress being logged to /var/log/zones/zoneadm.20220909T112404Z.zone4.attach
Zone BE root dataset: pool4/zone4/rpool/ROOT/BASE
Updating non-global zone: Linking to image /.
Updating non-global zone: Auditing packages.
Creating Plan (Solver setup): \
Error: Attach failed. This zone must be attached with the -u or -U option to update or -x attach-matched-zbe to use a ZBE associated with the global zone.
Log saved in non-global zone as /zones/zone4/root/var/log/zones/zoneadm.20220909T112404Z.zone4.attach
zoneadm: zone 'zone4': NOTICE: attach partially succeeded: zone transitioning to unavailable state
The log snippets shows a version mismatch between the Solaris Global and Local (non-global) Zone "zone4"
# cat /var/log/zones/zoneadm.20220909T112404Z.zone4.attach
.
.
pkg sync-linked: Package 'VRTSperl' must be uninstalled or upgraded if the requested operation is to be performed.
Reject: pkg://Veritas/VRTSperl@5.30.0.4
Reason: Global zone has an older version of package: pkg://Veritas/VRTSperl@5.30.0.0,5.11:20200401T122410Z
Package 'VRTSvlic' must be uninstalled or upgraded if the requested operation is to be performed.
Reject: pkg://Veritas/VRTSvlic@4.1.74.4
Reason: No version matching 'require' dependency VRTSperl can be installed
The Solaris Global Zone has the following product versions:
# pkg list VRTSvlic VRTSperl
NAME (PUBLISHER) VERSION IFO
VRTSperl (Veritas) 5.30.0.0 i--
VRTSvlic (Veritas) 4.1.74.4 i--
The Solaris Local Zone "zone4" has the following product versions:
# pkg -R /zones/zone4/root list | grep -i VRTS
VRTSperl 5.30.0.4 i--
VRTSvlic 4.1.74.4 i--
Due to product version mismatch for the VRTSperl package, the Solaris Local Zone cannot be "attached".
The user has two options:
1.] Upgrade the VRTSperl package to version "5.30.0.4" in the Solaris Global Zone to match the same product version installed inside the Solaris Local Zone.
or
2.] Uninstall the VRTSperl package in the Solaris Local Zone, i.e. "zone4" and reinstall as per the versions in the Solaris Global Zone to avoid conflicting versioning.
Option #2 is shown below:
# pkg -R /zones/zone4/root uninstall VRTSvlic
Packages to remove: 1
Services to change: 1
PHASE ITEMS
Removing old actions 122/122
Updating package state database Done
Updating package cache 1/1
Updating image state Done
Creating fast lookup database Done
Updating package cache 2/2
# pkg -R /zones/zone4/root list | grep -i VRTS
VRTSperl 5.30.0.4 i--
# pkg -R /zones/zone4/root uninstall VRTSperl
Packages to remove: 1
Services to change: 1
PHASE ITEMS
Removing old actions 3413/3413
Updating package state database Done
Updating package cache 1/1
Updating image state Done
Creating fast lookup database Done
Updating package cache 2/2
Now the conflicting VRTSperl package has been installed, the Solaris Local Zone can now be "attached".
# zoneadm -z zone4 attach
Progress being logged to /var/log/zones/zoneadm.20220909T131545Z.zone4.attach
Zone BE root dataset: pool4/zone4/rpool/ROOT/BASE
Updating non-global zone: Linking to image /.
Updating non-global zone: Auditing packages.
No updates necessary for this image. (zone:zone4)
Updating non-global zone: Zone updated.
Result: Attach Succeeded.
Log saved in non-global zone as /zones/zone4/root/var/log/zones/zoneadm.20220909T131545Z.zone4.attach
# zoneadm list -civ
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zone1 unavailable /zones/zone1 solaris excl
- zone2 unavailable /zones/zone2 solaris excl
- zone3 unavailable /zones/zone3 solaris excl
- zone4 installed /zones/zone4 solaris excl
Once "attached", the Solaris Local Zone can be "booted":
# zoneadm -z zone4 boot
Once "booted", the Solaris Local Zone will show a "running" state:
# zoneadm -z zone4 list -v
ID NAME STATUS PATH BRAND IP
1 zone4 running /zones/zone4 solaris excl
# zlogin zone4 "pkg list VRTS*"
pkg list: no packages matching the following patterns are installed:
VRTS*