116 IBM z/VM and Linux on IBM System z: Virtualization Cookbook for Red Hat Enterprise Linux 4
9.1.3 Adding LINUX01 to AUTOLOG1’s PROFILE EXEC
The new Linux ID you defined requires access to the z/VM Virtual Switch (VSWITCH). To do
this, you can add a set vswitch command with the GRANT parameter to AUTOLOG1’s
PROFILE EXEC. Also, you can add an XAUTOLOG statement if the user ID is to be
automatically logged on at z/VM initial program load (IPL) time.
Link and access the AUTOLOG1 191 disk read/write and edit the file PROFILE EXEC. Add
LINUX01 to the section that grants access to the VSWITCH and that XAUTOLOG the Linux
user IDs, as Example 9-7 shows.
Example 9-7 Linking and accessing AUTOLOG1 191
==> link autolog1 191 1191 mr
==> acc 1191 f
==> x profile exec f
...
/* Grant access to VSWITCH for each Linux user */
'cp set vswitch vsw1 grant lnxinst'
'cp set vswitch vsw1 grant rh4u3x'
'cp set vswitch vsw1 grant linux01'
/* XAUTOLOG each Linux user that should be started */
'cp xautolog lnxinst'
'cp xautolog linux01'
'cp logoff' /* logoff when done */
====> file
These changes do not take effect until the next IPL. Therefore, you must grant this user ID
access to the VSWITCH for this z/VM session. This is done as follows:
==> set vswitch vsw1 grant linux01
Command complete
9.1.4 Creating a configuration file for the new LINUX ID
For each Linux guest you want to clone, you require to create a configuration file that you can
use to customize the image after cloning. Perform the following steps on the LNXINST
installation server:
1. Logon as root.
2. Install the clone script Red Hat Package Manager (RPM):
# rpm -ivh /install/virt-cookbook/clone/clone-1.0-1.noarch.rpm
Preparing... ########################################### [100%]
1:clone ########################################### [100%]
3. Copy and then edit the supplied sample configuration file to reflect the values of the new
Linux system:
# cp /etc/clone/rh4u3x.conf.sample /etc/clone/linux01.conf
# vi /etc/clone/linux01.conf
4. Edit the new configuration file with the appropriate values for your system. This file is
based off the RH4U3X CONF file that you used earlier when building the RH4U3X master
image. See 7.2, “Preparing Red Hat Enterprise Linux 4 bootstrap files” on page 87. If the
new Linux image is going to be on the same network as the master image, you are likely to
Chapter 9. Cloning Linux 117
only have to change two variables: the Internet Protocol (IP) address (IPADDR) and the
Domain Name System (DNS) name (HOSTNAME). In Example 9-8, the IP address is set
to 10.1.40.91 and the DNS name to linux01.example.com.
Example 9-8 Editing the new configuration file
HOSTNAME=linux01.example.com
IPADDR=10.1.40.91
DASD=100,102
DASD_ROOT=100
NETTYPE=qeth
SUBCHANNELS=0.0.0600,0.0.0601,0.0.0602
NETWORK=10.1.40.0
NETMASK=255.255.255.0
SEARCHDNS=example.com
BROADCAST=10.1.40.255
GATEWAY=10.1.40.1
DNS=10.1.40.7
MTU=1492
PORTNAME=BOGUS
5. Save the file and log off root.
This is your first time cloning, therefore it is important to verify some initial settings of the
new user ID. These steps confirm that the LINUX01 user ID has the configurations
required for a successful clone and IPL.
6. Log in to LINUX01.
7. Answer n to the question Do you want to IPL Linux from DASD 100? y/n. Verify that the
new Linux user ID has a network interface card (NIC) at addresses 600-602 as shows.
Example 9-9 Verifying that the Linux user ID has a NIC
LOGON LINUX01
00: NIC 0600 is created; devices 0600-0602 defined
00: z/VM Version 5 Release 2.0, Service Level 0501 (64-bit),
00: built on IBM Virtualization Technology
...
8. Verify that the minidisks at addresses 100 and 102 and the virtual disk (VDISK) at address
101 are read/write, as Example 9-10 shows.
Example 9-10 Verifying that the minidisks are read/write
==> q da
00: DASD 0100 3390 VMCD38 R/W 3038 CYL ON DASD E34B SUBCHANNEL = 0000
00: DASD 0101 9336 (VDSK) R/W 524288 BLK ON DASD VDSK SUBCHANNEL = 000E
00: DASD 0102 3390 VMCD38 R/W 300 CYL ON DASD E34B SUBCHANNEL = 0001
00: DASD 0190 3390 520RES R/O 107 CYL ON DASD A770 SUBCHANNEL = 0009
00: DASD 0191 3390 VMA77C R/O 300 CYL ON DASD A77C SUBCHANNEL = 000C
...
9. Log off LINUX01.
You must now be ready to clone to this new user ID.

Get IBM z/VM and Linux on IBM System z: Virtualization Cookbook for Red Hat Enterprise Linux 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.