Renaming a Solaris zone


While reviewing the list of zones on one of my Solaris hosts, I noticed that I accidentally assigned the name “cone3” to a zone:

$ zoneadm list -vc

ID NAME STATUS PATH BRAND
0 global running / native
11 zone1 running /zones/zone1 native
- centos installed /zones/centos lx
- template installed /zones/template native
- cone3 configured /zones/zone3 native
- centostest configured /zones/centostest lx

While the name cone3 sounds interesting (for some reason cone3 reminds me of the coneheads movie), I originally intended for the zone to be called “zone3.” To assign the correct name to the zone, I fired up the zone configuration utility (zonecfg), and set the ‘zonename’ variable to the correct value:

$ zonecfg -z cone3

zonecfg:cone3> set zonename=zone3
zonecfg:zone3> commit
zonecfg:zone3> exit

$ zoneadm list -vc

ID NAME STATUS PATH BRAND
0 global running / native
11 zone1 running /zones/zone1 native
- centos installed /zones/centos lx
- template installed /zones/template native
- zone3 configured /zones/zone3 native
- centostest configured /zones/centostest lx

Much better!

This article was posted by Matty on 2006-10-08 18:30:00 -0400 -0400