27.12.2012 Views

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

eturned, the script falls back to using Linux dasdfmt and dd commands. Finally, the script<br />

boots the new Linux image via the xautolog command.<br />

It takes less than a minute to clone with FLASHCOPY support and 3-20 minutes with dd. <strong>The</strong><br />

following is an example of cloning from RHEL52 to LINUX01 with FLASHCOPY support. <strong>The</strong><br />

example uses the verbose switch (-v) to clarify its actions.<br />

# clone -v rh6gold linux01<br />

Invoking CP command: QUERY rh6gold<br />

Invoking CP command: QUERY linux01<br />

This will copy disks from rh6gold to linux01<br />

Host name will be: gpok224.endicott.ibm.com<br />

IP address will be: 9.60.18.224<br />

Do you want to continue? (y/n): y<br />

<strong>The</strong> script makes sure the golden image (source) user ID and the target user ID exist and are<br />

logged off. <strong>The</strong>n, it confirms the order of the cloning and displays in<strong>for</strong>mation collected from<br />

the /etc/clone/linux01.conf file. Following this, it asks if you are sure you want to overwrite<br />

the disks on the target user ID.<br />

Next, the script links to the master clone minidisk and the target minidisk. <strong>The</strong> master<br />

minidisks are linked to RH6CLONE at virtual address FFFE, and the target minidisks are linked as<br />

FFFF. <strong>The</strong> FFFE links are read-only and the FFFF links are read-write. With the links in place,<br />

the script issues a FLASHCOPY command to copy the source <strong>10</strong>0 and <strong>10</strong>1 minidisks to the target<br />

<strong>10</strong>0 and <strong>10</strong>1 minidisks. <strong>The</strong> script then detaches the links. If FLASHCOPY fails, the script falls<br />

back to the Linux dasdfmt and dd commands.<br />

Cloning rh6gold to linux01 ...<br />

Copying minidisks...<br />

Invoking CP command: QUERY VIRTUAL fffe<br />

Invoking CP command: LINK rh6gold <strong>10</strong>0 fffe RR<br />

Invoking CP command: QUERY VIRTUAL ffff<br />

Invoking CP command: LINK linux01 <strong>10</strong>0 ffff W<br />

Invoking CP command: FLASHCOPY fffe 0 END ffff 0 END<br />

<strong>10</strong>0 disk copied ...<br />

Invoking CP command: DETACH fffe<br />

Invoking CP command: DETACH ffff<br />

Invoking CP command: QUERY VIRTUAL fffe<br />

Invoking CP command: LINK rh6gold <strong>10</strong>1 fffe RR<br />

Invoking CP command: QUERY VIRTUAL ffff<br />

Invoking CP command: LINK linux01 <strong>10</strong>1 ffff W<br />

Invoking CP command: FLASHCOPY fffe 0 END ffff 0 END<br />

<strong>10</strong>1 disk copied ...<br />

Invoking CP command: DETACH fffe<br />

Invoking CP command: DETACH ffff<br />

<strong>The</strong>n, the root file system is mounted to /mnt/clone, and the networking in<strong>for</strong>mation is<br />

modified in /mnt/clone/etc/sysconfig/network/ifcfg-eth0,<br />

/mnt/clone/etc/sysconfig/network, and /mnt/clone/etc/hosts:<br />

Updating cloned image ...<br />

Invoking CP command: QUERY VIRTUAL ffff<br />

Invoking CP command: LINK linux01 <strong>10</strong>0 ffff W<br />

Modifying networking info under /mnt/clone...<br />

Regenerating SSH keys in /mnt/clone/etc/ssh/ ...<br />

Invoking CP command: DETACH ffff<br />

Invoking CP command: XAUTOLOG linux01<br />

Booting linux01<br />

Successfully cloned rh6gold to linux01<br />

Chapter 9. Configuring RHEL 6 <strong>for</strong> cloning 155

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!