The procedure I've used to clone zones are as follows.
Procedure
1. Export the configuration of the zone you want to clone/copy
# zonecfg -z zone1 export > zone2.cfg
2. Change the details of the new zone that differ from the existing one (e.g. IP address, data set names, network interface etc.)
# vi zone2.cfg
3. Create a new (empty, unconfigured) zone in the usual manner based on this configuration file
# zonecfg -z zone2 -f zone2.cfg
NOTE: if you get capped-memory resource error-- ( move the Capped-memory to the top of rlctl entry)
# zonecfg -z zone2 -f zone2.cfg
On line 28 of zone2.cfg:
The capped-memory resource or a related resource control already exists.
On line 29 of zone2.cfg:
Cannot set a resource-specific property from the global scope.
The ordering error in the generated output makes this statement incorrect, or
at least inaccurate, depending on the meaning of 'suitable'.
Workaround
Edit the exported script and move the rctl entry
after the capped-memory entry
4. Ensure that the zone you intend to clone/copy is not running
# zoneadm -z zone1 halt
5. Clone the existing zone
# zoneadm -z zone2 clone zone1
Cloning zonepath /export/zones/zone1...
This took around 5 minutes to clone a 1GB zone (see notes below)
6. Verify both zones are correctly installed
# zoneadm list -vi
ID NAME STATUS PATH
0 global running /
- zone1 installed /export/zones/zone1
- zone2 installed /export/zones/zone2
7. Boot the zones again (and reverify correct status)
# zoneadm -z zone1 boot
# zoneadm -z zone2 boot
# zoneadm list -vi
ID NAME STATUS PATH
0 global running /
5 zone1 running /export/zones/zone1
6 zone2 running /export/zones/zone2
8. Configure the new zone via its console (very important)
# zlogin -C zone2
- UNIX Essential Skills
- UNIX Basic Commands
- Different RUN levels in Linux,Solaris and AIX
- Determine if your OS is 64-bit or 32-bit?
- How to find your MAC Add: Unix/Linux/Windows/Mac
- VI Editor Quick Reference
- dd command to create an ISO image
- TOP command - Useful switch
- Configure NTP server for time adjustment
- How to find larger file under Linux
- Adding a Swap File to an RHEL6 System
- How to find if its VM or Real host
- Find Files Based on Access/Modification/Change Time
- LINUX
- AIX
- SOLARIS
- Storage Area Network (SAN)
- NAS Netapp
- BACKUP Admin
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment