Chapter 9. Configuring RHEL 5.2 for cloning 139
00: DASD 0100 3390 LXAE23 R/W 3338 CYL ON DASD AE23 SUBCHANNEL = 0000
00: DASD 0101 3390 LXAE24 R/W 3338 CYL ON DASD AE24 SUBCHANNEL = 0001
...
00: DASD 0300 9336 (VDSK) R/W 524288 BLK ON DASD VDSK SUBCHANNEL = 000E
00: DASD 0301 9336 (VDSK) R/W 1048576 BLK ON DASD VDSK SUBCHANNEL = 000F...
8. Log off LINUX01.
You are now ready to clone to this new user ID.
9.3.2 Using the clone script
Go back to your an SSH session to the controller. The clone script should be in your PATH in
the directory /usr/sbin/. You can verify this with the which command:
# which clone
/usr/sbin/clone
The clone script can operate in two modes:
Where the DASD information is provided on the command line
Where the DASD information is included in the new user ID’s configuration file
Running clone with no arguments prints a usage message as follows:
# clone
Usage: clone [-v] masterGuestID cloneGuestID [rootMinidisk [minidisk1 minidisk2..]]
Switches
-v Verbose output
Required
masterGuestID the z/VM user id you want to clone from
cloneGuestID the z/VM user id you want to clone to
Optional
rootMinidisk the minidisk address that contains the root filesystem
minidisk1..n additional minidisks that should be copied
The masterGuestID is the z/VM ID of the master Linux image (RHEL52), and the cloneGuestID
is the z/VM ID of the target (LINUX01). These values are
always required.
If no DASD arguments are specified on the command line, then you can collect the DASD
information from the user’s configuration file stored in /etc/clone/. The script uses the DASD
value to determine which minidisks to copy as a part of the clone process. In the following
examples, DASD is set to 100-101, which implies that minidisks located at virtual addresses
100 and 101 are copied. The 300 and 301 VDISKs are omitted because SWAPGEN
automatically creates them each time the user logs on. The DASD_ROOT value specifies which
one of these minidisks contains the Linux root filesystem (/).
The script exits if either the golden image or the clone image is logged in. The script first
attempts to copy the disks with FLASHCOPY using the vmcp module or command. If an error
is returned, the script falls back to using Linux dasdfmt and dd commands. Finally, the script
boots the new Linux image using the xautolog command. It takes less than a minute to clone
with FLASHCOPY support, and three to 20 minutes with dd. The following is an example of
cloning from RHEL52 to LINUX01 with FLASHCOPY support. The example uses the verbose switch
(-v) to clarify its actions.
# clone -v rhel52 linux01
Invoking CP command: QUERY rhel52
Invoking CP command: QUERY linux01
This will copy disks from rhel52 to linux01
Comentarios a estos manuales