Solaris10 Troubleshooting Zones : verify the configuration and Troubleshoot zones that fail to boot
Instructions to Verify the Configuration of Non-global Zones:
1. The zonecfg utility creates and modifies the configuration of a zone. Its subcommand verify can be used to verify the current configuration for correctness:
- All resources have all of their required properties specified.
- A zonepath is specified
The syntax is zonecfg -z verify. For example, to verify the configuration of zone1, run zonecfg -z zone1 verify at the shell prompt.
2. The subcommand export of the zonecfg utility prints the zone configuration to standard out. The syntax is zonecfg -z export. For example, to print the configuration of zone1, run zonecfg -z zone1 export at the shell prompt.
- Ensure the specified zonepath is a valid path.
- Ensure the file system where the zonepath resides is mounted, and the nosuid option should not be used.
- Ensure that the specified resources are available.
- Ensure that lofs is not excluded in the global zone.
3. Troubleshooting : installed zone fails to boot – Below is one of the example to troubleshoot
Error: zoneadm error “failed to open /dev/zconsole”
[ root ] # zoneadm -z zone3 boot
zoneadm: zone ‘zone3′: failed to open /export/newzones/zone3/dev/zconsole: No such device or address
zoneadm: zone ‘zone3′: could not prep console slave
zoneadm: zone ‘zone3′: call to zoneadmd failed
Resolution
(R1) Resolution for zoneadm error “failed to open/dev/zconsole”
==========
ROOT CAUSE
==========
Solaris[TM] 10 zones must have device access to the zoneconsole when a zone is booted.
Failure to access the device “…/dev/zconsole” results failure of booting.The use of “nosuid” as a mount option will cause the filesystem to be mounted at zonepath
with two different flags, nosetuid and nodevices. The open system call will fail
on the zconsole due to the nodevices flag being set.
Therefore nosuid is not a valid mount options for the device tree of a zones.
EXAMPLE : nosuid option set via mount option.
In this example you can see that a zone will install and become ready but fail to
boot due to the nosuid option being set.
# zoneadm -z zone3 install
Preparing to install zone.
Creating list of files to copy from the global zone.
Copyingfiles to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initializepackages on the zone.
Initializedpackages on zone.
Zoneis initialized.
The filecontains a log of the zone installation
.
# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
1 zone2 running /export/zone2
2 zone0 running /export/zone0
- zone1 installed /export/zone1
- zone3 installed /export/newzones/zone3
# zoneadm -z zone3 ready
# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
1 zone2 running /export/zone2
2 zone0 running /export/zone0
3 zone3 ready /export/newzones/zone3
- zone1 installed /export/zone1
Once the zone is booted, errors are reported.
# zoneadm -z zone3 boot
zoneadm: zone ‘zone3′: failed to open /export/newzones/zone3/dev/zconsole: No such device or address
zoneadm: zone ‘zone3′: could not prep console slave
zoneadm: zone ‘zone3′: call to zoneadmd failed
A truss of the shows that the open failed.
# pgrep -fl zoneadm
456 zoneadmd -z zone2
810 zoneadmd -z zone0
4753 zoneadm -z zone3 boot
4755 zoneadmd -z zone3
# truss -p 4755
……
/2:stat(“/dev/zcons/zone3/zoneconsole”, 0xFECF83A8) = 0
/2:unlink(“/export/newzones/zone3/dev/zconsole”) = 0
/2:mknod(“/export/newzones/zone3/dev/zconsole”, 020600, 0x038C0005) = 0
/2:chown(“/export/newzones/zone3/dev/zconsole”, 0, 3) = 0
/2:open(“/export/newzones/zone3/dev/zconsole”, O_RDWR|O_NOCTTY) Err#6 ENXIO/2:
auditsys(BSM_AUDITCTL, 0×00000014) Err#22 EINVAL
……
==========
RESOLUTION
==========
Remove the mount option “nosuid” from the filesystem mounted at zonepath.Unmounting and remounting may be needed if rebooting is NOT done






