A few days back i had a need to rename my Solaris zones from "orazone" to "oraprodzone". I followed the below steps to successfully rename my zone's name.
STEP 1: Shutdown the zone "orazone"
Issue the following commands from the globalzone to shutdown orazone.
globalzone# zoneadm list -iv
ID NAME STATUS PATH
0 global running /
2 orazone running /zones/orazone
globalzone# zoneadm -z orazone halt
globalzone# zoneadm list -iv
ID NAME STATUS PATH
0 global running /
- orazone installed /zones/orazone
globalzone#
STEP 2: Rename the Zone from "orazone" to "oraprodzone"
Enter zone configuration from the global zone using the below mentioned commands.
globalzone# zonecfg -z orazone
zonecfg:orazone> set zonename=oraprodzone
zonecfg:orazone> commit
zonecfg:orazone> exit
globalzone# zoneadm list -vc
ID NAME STATUS PATH BRAND
0 global running / native
- oraprodzone installed /zones/orazone native
STEP 3: Boot the zone
After you have made the above changes, boot the zone from the global zone using the below commands.
globalzone# zoneadm -z oraprodzone boot
globalzone# zoneadm list -iv
ID NAME STATUS PATH
0 global running /
2 orazone running /zones/orazone
Done!
There is another way to rename a zone (not supported, but it worked for me), but then that's not the right one though. However, i would mention that as well.
Renaming zone orazone to oraprodzone
Perform all of the below as root of global zone.
First shutdown your orazone zone
globalzone# zoneadm -z orazone halt
globalzone# vi /etc/zones/index
change orazone to oraprodzone
globalzone# cd /etc/zones
globalzone# mv orazone.xml oraprodzone.xml
globalzone# vi oraprodzone.xml
change orazone to oraprodzone
globalzone# cd /zones
-/zones is where I have stored all the zones
globalzone# mv orazone oraprodzone
-cd to your new zone (/zones/oraprodzone)and modify /etc/hosts, /etc/nodename, /etc/hostname.xxx
globalzone# cd /zones/oraprodzone/root/etc
-boot new renaming zone
globalzone# zoneadm -z oraprodzone boot
Feel free to leave a comment :)
Categories
- Basics (11)
- Storage (SAN) (2)
- Veritas Volume Manager (2)
- ZFS (8)
- Zones (6)
Monday, August 25, 2008
How to Rename a Solaris Zone?
Subscribe to:
Post Comments (Atom)
Browse Articles
-
►
2009
(6)
-
►
April
(6)
- How to create a RAIDZ2 pool with a hot spare
- Monitoring performance of ZFS file system using zf...
- Best Practises: Migrate your non-system data from ...
- Step by Step: Migrate root UFS file system to ZFS
- Playing around with ZFS File system using Virtual ...
- Playing around with ZFS File system using Virtual ...
-
►
April
(6)
-
▼
2008
(23)
-
►
May
(17)
- Solaris - Crontab
- NETSTAT Usage in Solaris
- State Database Replicas - Introduction
- Solaris Volume Management - Introduction
- Creating a Swap File/Partition in Solaris
- Implementing a Temporary File System (TEMPFS) in S...
- How to determine file system associated with devic...
- Steps to partition and create file systems on a So...
- NAS and SAN - A Comparison (for newbies)
- Tips on Veritas Volume Manager (VxVM)
- Veritas Volume Manager - Quick Start Command Refer...
- Mirroring Disk With Solaris Disksuite (formerly So...
- Gigabit Ethernet Configuration
- ZFS - Introduction
- Solaris Zones - Introduction
- ZFS - Training Video
- SAN Storage Configuration in Solaris
-
►
May
(17)
1 comments:
Hi Vishal,
In your first procedure of renaming a zone, I don't see the output as the correct one. Even after rename and a reboot of the zone,still th eoutput shows the old zone name ( orazone ).
Post a Comment