Rename and move a Solaris zone
July 21, 2008 10:46 am Solaris ZonesI created a test zone which is to function as my webserver. Lo and behold it went so well there was no need to destroy and start again. The only problem is i am not happy with the name of the zone, which is webzone. I also didn’t like the location it was on the filesystem. So first to move it from /work/webzone to /work/zones/constantine:
charlemagne:/ # zoneadm -z webzone move /work/zones/constantine
Now to rename the zone itself:
charlemagne:/ # zonecfg -z webzone
zonecfg:webzone> set zonename=constantine
zonecfg:constantine> commit
zonecfg:constantine> exit
charlemagne:/ # zoneadm list -vc
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- constantine installed /work/zones/constantine native shared
The zone cannot be running to perform either task.