|
|
 |
|
|
 |
Cloning Linux Images in z/VM
Tung-Sing Chong
IBM Corporation
Endicott, NY 13760
E-Mail Chongts@us.ibm.com
Date: 5/15/2002
Preface
This document provides one example of the many ways to clone Linux
images using z/VM. A scaled down "LinuxWorld Linux Images Cloning Demo"
is used to illustrate the cloning process. The demo that I used at the
last LinuxWorld Conference clones Turbolinux 6.5.1, SuSE SLES-7.0 and RedHat
7.2 images. However this example demo clones only SuSE SLES-7.0 images.
Table of Content
1.0 Overview of the LinuxWorld Linux Image Cloning
Demo
2.0 Cloning Methology
2.1 Network Topology Inside z/VM
2.2 Some Important VM User IDs
3.0 LinuxWorld Linux Image Cloning Demo Install/Setup
Steps
3.0.1 Step 1 - Paging, spool and DASD
pool setup
3.0.2 Step 2 - Install/Enabled DirMaint
3.0.3 Step 3 - Update TCPMAINT user directory
3.0.4 Step 4 - Create the following user
profile and VM user IDs from MAINT
3.0.5 Step 5 - Setup VM user IDs and Linux
images
4.0 REXX execs used by LXOPR User ID
4.1 Files used by LXOPR User ID
5.0 REXX execs and CGI used by "LXADMIN"
User ID
5.1 Files used by LXADMIN User ID
5.2 HTMLs and JPGs used by LXADMIN User ID
6.0 Starting the DEMO to Create Images
7.0 Deleting the Cloned Images
8.0 In Conclusion
1.0 Overview of the LinuxWorld Linux Image Cloning Demo
This example has the following components:
-
Cloning Continuously - Defaults to create a maximum of 300 images (can be
changed to higher or lower number). A REXX exec, "MAKESUSE", is used
to clone images that use DASD for swap or "MKSUSEV" is used to clone images
that use VDISK for swap. When 300 images are created, "MAKESUSE or
MKSUSEV" will exit. The status of the cloning process is on the website.
The following is a copy of this website:
-
Cloning on Demand - SuSE images can be cloned one at a time on a website
while Cloning Continuously is running at the same time. A VM web server
(Webshare) is used on z/VM along with a REXX cgi and REXX exec (defaults
to create a maximum of 10 images, can be changed to higher or lower number).
The following is a copy of the "Linux Image Administration" website interface:
Linux Images Configuration:
-
Each Linux image created by Cloning Continuously has 64MB virtual
memory for demo purposes (recommended minimum memory for production is
128MB) , 150 cylinders R/W "/" and 100 cylinders swap or 64MB VFB-512 swap
disk. "/usr" and "/usr/src" are shared as R/O file systems. Each
Linux image starts the Apache Web Server.
-
Cloning on Demand can create the three types of SuSE images. Each image
has R/O "/usr" and 64MB virtual memory for demo purposes (recommended minimum
memory is 128MB in production). Each Linux image starts the Apache Web Server.
The three types of SuSE images are:
-
150 cylinders R/W "/", 400 cylinders R/W "/usr/src" and 100 cylinders
swap
-
150 cylinders R/W "/", R/O "/usr/src" and 100 cylinders swap
-
150 cylinders R/W "/", R/O "/usr/src" and 64M VFB-512 VDISK for
swap
-
The VM user IDs for these images have the format of "LXnnn" where
nnn
is a number from 1 to 500. This demo can create images from LX1 to LX500
shared between Cloning Continuously and Cloning on Demand. Example: When
Cloning SuSE Continuously is set to clone 300 (LX1 to LX300) images,
then Cloning on Demand can clone image LX301 to LX500 at the same time.
2.0 Cloning Methodology
There are many different ways to clone Linux images under z/VM. I chose
to implement the cloning process as simply as possible. Of course I also
like to use VM as much as possible. DirMaint, REXX execs, DDR, VM
TCP/IP stacks, GA/Golden level of Turbolinux/SuSE/RedHat distributions,
and IUCV as point-to-point connection are used for cloning images. No extra
packages are required other than what is shipped with GA distributions.
No modification of the GA level of distributions was required (no need
to rebuild the kernel). This cloning process DOES NOT take control of the z/VM
user directory. It uses DirMaint to manage the z/VM user directory.
Steps used for cloning Linux images:
-
Call DirMaint to create a VM user ID for Linux image.
-
Obtain an IP address from the IP address pool (A CMS file that maps VM
user ID to IP address).
-
Obtain the peer-to-peer IP address (A CMS file that maps VM user ID/hostname
to peer-to-peer IP address).
-
Update the network configuration files with the appropriate network information
(IP address, hostname, gateway, etc) on the master copy of Linux system.
-
Use DDR to copy the master copy of Linux system onto the new image's minidisks.
-
IPL the new image.
-
Ping the new image. Image cloning is complete when the new image replies
to the ping.
System levels and Software products used:
VM TCPIP stacks:
This demo uses IUCV and 3 VM TCPIP stacks. One stack for VM, one stack
for each class C network for Linux images. An OSA connection was used on the
VM stack to communicate to the outside world. This VM stack uses "192.168.46.140"
as the host IP address. 9.130.111.xxx and 9.130.112.xxx were used for Linux
images IP addresses. Only 250 IP addresses are being using on each class
C networks. 500 IP addresses are available for cloning when using
2 class C networks.
VM user ID and Linux images used for the cloning process:
-
3 VM user IDs (LXOPR, LXADMIN and LXCNTL)
-
3 Linux images (LXMSTR, LXDISP and LXMNT)
2.1 Network Topology Inside zVM
+---------------+ +------------------+
| 9.130.111.xxx | | 250 Linux images |
+--->| stack |------| (9.130.111.1
to |
|IUCV| VM user ID - | IUCV | 9.130.111.250) |
| | TCPIP111 |
| VM user ID - LX1 |
| +---------------+ |
to LX250 |
|
|
|
|
| 9.130.111.251 - |
|
| used by LXMSTR|
|
| 9.130.111.252 - |
|
| used by LXDISP|
|
| 9.130.111.253 |
|
| used by LXMNT |
|
| 9.130.111.254 - |
|
| peer-to-peer |
|
+------------------+
+--------------+ |
|192.168.46.140| |
<------->| stack
|<---+
OSA to |VM user ID - |
|
private | TCPIP
| |
network +--------------+
|
| +---------------+ +------------------+
| | 9.130.112.xxx | | 250
Linux images |
+--->| stack |------| (9.130.112.1
to |
IUCV| VM user ID - | IUCV | 9.130.112.250) |
| TCPIP112 |
| VM user ID -LX251|
+---------------+ | to
LX500 |
|
|
| 9.130.112.254 - |
| peer-to-peer |
+------------------+
2.2 Some Important VM User IDs
- minidisk 198 for tcpip , access as
L
- minidisk 298 for tcpip111, access as M
- minidisk 398 for tcpip112, access as N
-
TCPIP - VM TCP/IP stack (VM IP address is 192.168.46.140)
-
TCPIP111 - stack for 9.130.111.xxx
-
TCPIP112 - stack for 9.130.112.xxx
3.0 LinuxWorld Linux Image Cloning Demo Install/Setup Steps
3.0.1 Step 1 - Paging, spool and DASD pool setup
-
Add one 3390-3 for paging for every 43 Linux images (eight 3390-3 packs
should be good for 300 images). Ensure all the paging packs are added in
the "system config" file. "system config" file is on MAINT CF1 disk.
-
Add 250 cylinders (150 cylinders for R/W "/" and 100 cylinders for swap)
for each image with share R/O "/usr" and "/usr/src", and DASD for swap.
One 3390-3 pack can clone 13 images.
-
Add 150 cylinders (150 cylinders for R/W "/" ) for each image with share
R/O "/usr" and "/usr/src", and used VDISK for swap. One 3390-3 pack can
clone 22 images.
-
Add 550 cylinders (150 cylinders for R/W "/", 400 cylinder for R/W "/usr/src
and 100 cylinders for swap) for each image with share R/O "/usr" and R/W
"/usr/src". One 3390-3 pack can clone 4 images.
-
Add 300 cylinders for SPOOL space. The console of LXOPR, LXMSTR,
LXADMIN, and LXCNTL are spooled for debugging.
-
CP format (cpfmtxa) and allocate all added DASD volumes. Allocate "page"
for all paging packs and "perm" for all user packs.
3.0.2 Step 2 - Install/Enabled DirMaint (You must have DirMaint Licensed
to enable this feature!)
-
DirMaint is pre-installed on z/VM Version 4. You need to set DirMaint to
ENABLED state. Follow the Program Directory for IBM z/VM Directory Maintenance
Facility Feature to enable DirMaint and place DirMaint in production.
3.0.3 Step 3 - Update TCPMAINT user directory
-
Add 298 disk for TCPIP111 stack. TCPIP111 links to this disk as 198.
-
Add 398 disk for TCPIP112 stack. TCPIP112 links to this disk as 198. User
directory for TCPMAINT:
USER TCPMAINT TCPMAINT 16M 512M ABG
INCLUDE TCPCMSU
MDISK 0591 3390 3013 038 420RES MR RTCPMAIN
WTCPMAIN MTCPMAIN
MDISK 0592 3390 3051 067 420RES MR ALL
WTCPMAIN MTCPMAIN
MDISK 0191 3390 3127 007 420RES MR RTCPMAIN
WTCPMAIN MTCPMAIN
*198 - first level tcpip stack
MDISK 0198 3390 3118 009 420RES MR RTCPMAIN
WTCPMAIN MTCPMAIN
*298 - 9.130.111.xxx stack
MDISK 0298 3390 1571 009 LXSPTD MR RTCPMAIN
WTCPMAIN MTCPMAIN
*398 - 9.130.112.xxx stack
MDISK 0398 3390 1580 009 LXSPTD MR RTCPMAIN
WTCPMAIN MTCPMAIN
3.0.4 Step 4 - Create the following user profile and VM user IDs from
MAINT
-
LXDFLT - Directory profile for all Linux images:
PROFILE LXDFLT
IPL CMS PARM AUTOCR
IUCV ALLOW
MACHINE ESA
OPTION QUICKDSP
CONSOLE 0009 3215 T LXCNTL
SPOOL 000C 2540 READER *
SPOOL 000D 2540 PUNCH A
SPOOL 000E 1403 A
LINK MAINT 0190 0190 RR
LINK MAINT 019D 019D RR
LINK MAINT 019E 019E RR
LINK TCPMAINT 0592 0592 RR
-
LXOPR - VM user ID for Cloning Continuously; user directory for LXOPR:
USER LXOPR LXOPR 16M 128M ABCG
INCLUDE IBMDFLT
IPL CMS
IUCV ALLOW
MACHINE ESA
OPTION QUICKDSP
SHARE RELATIVE 1000
LINK MAINT 051D 051D MR
LINK MAINT 05E5 05E5 RR
MDISK 0191 3390 1501 10 LXSPTD MR ALL
MDISK 0192 3390 3091 02 LXADM MR ALL
*7191 for SuSE 191 with VDISK for swap
MDISK 7191 3390 3091 2 LXADM MR ALL
*8191 *8191 for SuSE 191 with DASD for swap
MDISK 8191 3390 2981 2 LXADM MR ALL
-
LXCNTL - VM user ID for second console for all Linux images; user directory
for LXCNTL:
USER LXCNTL LXCNTL 128M 128M ABG
INCLUDE LXDFLT
OPTION QUICKDSP
SHARE RELATIVE 1000
MDISK 0191 3390 3061 02 LXADM MR ALL
-
LXADMIN - VM user ID for Cloning on Demand; user directory for LXAMDIN:
USER LXADMIN LXADMIN 6M 128M ABCG
INCLUDE IBMDFLT
IPL CMS
IUCV ALLOW
MACHINE ESA
SHARE RELATIVE 1000
LINK MAINT 051D 051D MR
LINK MAINT 05E5 05E5 RR
MDISK 0191 3390 3093 10 LXADM MR ALL
-
LXMSTR - User directory for LXMSTR:
USER LXMSTR LXMSTR 128M 256M G
INCLUDE LXDFLT
****************************************
*Link to Linux master images R/W "/"s
*
****************************************
*1251 is the R/W "/" for SuSE images that have
R/O "/usr"
LINK LXMNT 0251 1251 MR
*5251 is the R/W "/" for SuSE images that have
R/W "/usr/src"
LINK LXMNT 5251 5251 MR
*
MDISK 0191 3390 2207 30 LXSPTD MR ALL
*************************************
*0151 is lxmstr's R/W "/"
*
*0153 is lxmstr's R/W "/usr"
*
*0154 is lxmstr's R/W "/usr/src"
*
*0155 is lxmstr's swap
*
*************************************
MDISK 0151 3390 0001 150 LXMSTR MR ALL
MDISK 0153 3390 0151 2500 LXMSTR MR ALL
MDISK 0154 3390 2651 400 LXMSTR MR ALL
MDISK 0155 3390 3051 200 LXMSTR MR ALL
-
LXDISP - User directory for LXDISP:
USER LXDISP LXDISP 128M 128M ABCG
INCLUDE LXDFLT
MDISK 0191 3390 3031 0030 LXADM MR READPASS
MDISK 0151 3390 0001 2600 LXADM MR READPASS
WRITPASS MULTPASS
MDISK 0155 3390 2601 0200 LXADM MR READPASS
WRITPASS MULTPASS
-
LXMNT - User directory for LXMNT:
USER LXMNT LXMNT 128M 128M G
INCLUDE LXDFLT
MDISK 0191 3390 3145 100 LXADM MR ALL
**********************************************
*Only SuSE master image is used
*
*0251 is "/" and it is for R/O "usr" and
*
* /usr/src
*
*0253 is "/usr"
*
*0254 is "/usr/src"
*
*0255 is swap
*
*5251 is "/" for RO "/usr" and R/W
*
*
"/usr/src"
*
**********************************************
MDISK 0251 3390 0001 150 LXSUSE MR ALL
MDISK 0253 3390 0151 2500 LXSUSE MR ALL
MDISK 0254 3390 2651 0400 LXSUSE MR ALL
MDISK 0255 3390 3051 0100 LXSUSE MR ALL
MDISK 5251 3390 3151 150 LXSUSE MR ALL
-
TCPIP - This user ID should already be created:
USER TCPIP TCPIP 32M 128M ABG
INCLUDE TCPCMSU
OPTION QUICKDSP SVMSTAT MAXCONN 1024 DIAG98
APPLMON
SHARE RELATIVE 3000
IUCV ALLOW
IUCV ANY PRIORITY
IUCV *CCS PRIORITY MSGLIMIT 255
LINK TCPMAINT 591 591 RR
LINK TCPMAINT 592 592 RR
LINK TCPMAINT 198 198 RR
MDISK 191 3390 3316 005 420RES MR
RTCPIP WTCPIP MTCPIP
-
TCPIP111 - VM TCP/IP Stack for 9.130.111.xxx. TCPIP111's
191 disk should be copied form TCPIP's 191 disk. User directory for TCPIP111:
USER TCPIP111 TCPIP111 128M 256M ABG
INCLUDE TCPCMSU
IUCV ALLOW
IUCV ANY PRIORITY
IUCV *CCS PRIORITY MSGLIMIT 255
OPTION QUICKDSP SVMSTAT MAXCONN 1024 DIAG98
APPLMON
SHARE RELATIVE 3000
LINK TCPMAINT 0591 0591 RR
LINK TCPMAINT 0592 0592 RR
LINK TCPMAINT 0298 0198 RR
MDISK 0191 3390 1551 005 LXSPTD MR RTCPIP
WTCPIP MTCPIP
-
TCPIP112 - VM TCP/IP stack for 9.130.112.xxx. TCPIP112's 191
disk should be copied from TCPIP's 191 disk. User directory for TCPIP112:
USER TCPIP112 TCPIP112 128M 256M ABG
INCLUDE TCPCMSU
IUCV ALLOW
IUCV ANY PRIORITY
IUCV *CCS PRIORITY MSGLIMIT 255
OPTION QUICKDSP SVMSTAT MAXCONN 1024 DIAG98
APPLMON
SHARE RELATIVE 3000
LINK TCPMAINT 0591 0591 RR
LINK TCPMAINT 0592 0592 RR
LINK TCPMAINT 0398 0198 RR
MDISK 0191 3390 1556 005 LXSPTD MR RTCPIP
WTCPIP MTCPIP
3.0.5 Step 5 - Set up VM user IDs and Linux images
-
Logon to LXCNTL
-
CMS format 191
-
Create the following profile exec on the A-disk
/* */
SET CMSTYPE HT
SYNONYM MY
TERM MODE VM
'CP SP CONS * START'
'link tcpmaint 592 592
rr'
'acc 592 n'
SET PF12 RETRIEVE
SET PF24 RETRIEVE
'SET FILEPOOL VMSYS:'
'TERM HOLD OFF'
'TERM MORE 0 0'
'set run on'
SET CMSTYPE RT
-
Unpack LXADMIN's 191:
-
Logon to LXADMIN
-
CMS format 191
-
Access 191 as A-disk
-
Copy "LXADM191 VMARC" from LXOPR's 191 disk to the A-DISK
-
Use VMARC to unpack LXADMIN VMARC (vmarc unpack LXAD191 VMARC a = = a)
-
Make a copy of DIRMSAPI EXEC on LXOPR's 191 minidisk (access as A-disk)
-
DIRMAPI EXEC is on DirMaint's 11F minidisk
-
Install and set up Webshare on LXADMIN's 191 disk:
-
FTP CMSHTTPD VMARC to A-disk (use locsite Fix 80)
-
Follow Webshare installation documentation to install Webshare(vmarc unpack
CMSHTTPD VMARC a = = a)
-
Change "CGIUSERS=" to "CGIUSERS=LXADMIN" in "HTTPD CONFIG" file
-
Add "LXADMIN HTML A" to "WEBSHARE FILELIST A"
-
Add "ALLIMG HTML A" to "WEBSHARE FILELIST A"
-
Add "LXADM *CGI A" to "HTBIN FILELIST A"
-
Add "TUX_SITT JPG A" to "HTLIB FILELIST A"
-
Add "TUX_DANC JPG A" to "HTLIB FILELIST A"
-
Copy "TCPIP DATA" from TCPMAINT 592 disk to Disk
-
Set up LXMSTR, install SuSE and access all master images disks (LXMNT must
be logged off):
-
Logoff LXMNT if LXMNT is logged on
-
Logon to LXMSTR.
-
CMS format 151, 153, 154 and 155
-
Install SuSE SLES-7.0
-
Use 9.130.111.251 as the Host IP address
-
Use 9.130.111.254 as the peer-to-peer IP address
-
Use 151 as R/W "/"
-
Use 153 as R/W "/usr"
-
Use 154 as R/W "/usr/src"
-
Use 155 as SWAP
-
Select "SuSE Deve" or "SuSE Network" from the load configuation menu
-
Set "root" password to "linux4vm"
-
IPL the new installed SuSE system (IPL 151 clear)
-
Telnet to LXMSTR (9.130.111.251)and sign on as root (password: linux4vm)
-
Add 1251 and 5251 disks to /etc/zipl.conf. Example:
[defaultboot]
default=ipl
[ipl]
target=/boot/zipl
image=/boot/kernel/image
#ramdisk=/boot/initrd
parameters="dasd=0155,0151,0153,0154,1251,5251
root=/dev/dasdb1 noinitrd"
[dumptape]
target=/boot
dumpto=/dev/rtibm0
-
Modify /etc/fstab to access 1251 and 5251 disks. Example:
/dev/dasda1
swap
swap
defaults 0 0
/dev/dasdb1
/
ext2
defaults 1 1
/dev/dasdc1
/usr
ext2
defaults 1 2
/dev/dasdd1
/usr/src
ext2
defaults 1 2
/dev/dasde1
/suser
ext2
defaults 1 2
/dev/dasdf1
/susew
ext2
defaults 1 2
proc
/proc
proc
defaults 0 0
# End of YaST-generated fstab lines
-
Execute "zipl" and reIPL the Linux system again
-
If you can cd /suser and /susew, then shutdown the Linux system
-
logoff from LXMSTR.
-
Set up LXDISP, install SuSE and unpack the website files:
-
Logon to LXDISP
-
CMS format 191, 151 and 155
-
Install SuSE SLES-7.0:
-
Use 9.130.111.252 as the Host IP address
-
Use 9.130.111.254 as the peer-to-peer IP address
-
Use 151 as R/W "/"
-
Use 155 as SWAP
-
Select SuSE Devel or SuSE Network from the load configuation menu
-
Set "root" password to "linux4vm"
-
IPL the newly installation SuSE system (IPL 151 clear)
-
Telnet to LXDISP (9.130.111.252) and sign on as root (password: Linux4vm)
-
FPT lxdisp.tar (in binary) to /usr/local/httpd/htdocs directory (lxdisp.tar is on LXOPR's 191 disk)
-
Customize the /etc/httpd/httpd.conf
-
untar lxdisp.tar to /usr/local/httpd/htdocs (tar -xvf lxdisp.tar)
-
For the blinking banner on the Cloning Continuously website, download the fader.js
from www.webreference.com/dhtml/column27/allCode1.html.
fader.js must be in the /usr/local/httpd/htdocs directory.
-
Set up LXMNT, install SuSE and master images (LXMSTR must be logged off):
-
Logoff LXMSTR if LXMSTR is logged on
-
Logon to LXMNT
-
CMS format 191, 251, 253, 254, 255, 5251
-
Install SuSE SLES-7.0:
-
Use 9.130.111.253 as the Host IP address
-
Use 9.130.111.254 as the peer-to-peer address
-
Use 251 as R/W "/"
-
Use 253 as R/W "/USR"
-
Use 254 as R/W "/usr/src"
-
Use 255 as swap
-
Select SuSE Devel or SuSE Network from the load configuation menu
-
Set "root" password to "linux4vm"
-
Shutdown the newly installed Linux system
-
IPL Linux from 251
-
Telnet to LXMNT (9.130.111.253)and sign on to root (password: linux4vm)
-
Modify the fstab for R/O "/usr" and "/usr/src":
/dev/dasda1
swap
swap
defaults 0 0
/dev/dasdb1
/
ext2
defaults 1 1
/dev/dasdc1
/usr
ext2
ro 1 2
/dev/dasdd1
/usr/src
ext2
ro 1 2
proc
/proc
proc
defaults 0 0
# End of YaST-generated fstab lines
-
Shutdown the Linux system
-
DDR copy 251 to 5251
-
IPL Linux from 5251
-
Telnet to LXMNT (9.130.111.253)
-
Modify the fstab for R/W "/usr/src":
/dev/dasda1
swap
swap
defaults 0 0
/dev/dasdb1
/
ext2
defaults 1 1
/dev/dasdc1
/usr
ext2
ro 1 2
/dev/dasdd1
/usr/src
ext2
defaults 1 2
proc
/proc
proc
defaults 0 0
# End of YaST-generated fstab lines
-
Shutdown the Linux system
-
Logoff of LXMNT
-
Set up DirMaint:
-
Add "LXSUSEI PROTODIR" file for cloning R/W "/", R/O "/usr", R/O "/usr/src"
and DASD swap images. A copy of LXSUSEI PROTODIR is on LXOPR's191 disk.
User prototype directory for LXSUSEI:
USER LXUSER LXUSER 64M 128M G
INCLUDE LXDFLT
LINK LXMSTR 0152 0152 RR
LINK LXMNT 0253 0253 RR
LINK LXMNT 0254 0254 RR
LINK LXOPR 8191 0191 RR
AMDISK 0251 XXXX AUTOG 150 GROUP1 MR PWS ALL LXWR
LXMU
AMDISK 0255 XXXX AUTOG 100 GROUP1 MR PWS ALL LXWR
LXMU
-
Add "LXSUSEIV PROTODIR" file for cloning R/W "/", R/O "/usr". R/O
"/usr/src" and VDISK swap images. A copy of LXSUSEIV PROTODIR is on LXOPR's191
disk. User prototype directory for LXSUSEIV:
USER LXUSER LXUSER 64M 128M G
INCLUDE LXDFLT
LINK LXMSTR 0152 0152 RR
LINK LXMNT 0253 0253 RR
LINK LXMNT 0254 0254 RR
LINK LXOPR 7191 0191 RR
AMDISK 0251 XXXX AUTOG 150 GROUP1 MR PWS ALL LXWR
LXMU
-
Add "LXSUSERW PROTODIR" file for cloning R/W "/", R/O "/usr" and R/W "/usr/src"
images. A copy of the following LXSUSERW PROTODIR is on lXADMIN's 191 disk.
User prototype directory for LXSUSERW:
USER LXUSER LXUSER 64M 128M G
INCLUDE LXDFLT
LINK LXMSTR 0152 0152 RR
LINK LXMNT 0253 0253 RR
LINK LXOPR 8191 0191 RR
AMDISK 0251 XXXX AUTOG 150 GROUP1 MR PWS ALL LXWR
LXMU
AMDISK 0254 XXXX AUTOG 400 GROUP1 MR PWS ALL LXWR
LXMU
AMDISK 0255 XXXX AUTOG 100 GROUP1 MR PWS ALL LXWR
LXMU
-
Update "AUTHFOR CONTROL" file to allow LXOPR and LXADMIN to create VM user
IDs. A copy of the following AUTHFOR CONTROL is on LXOPR's 191 disk. AUTHFOR
CONTROL file:
ALL MAINT *
150A ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
ALL MAINT *
140A ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
ALL LXOPR *
150A ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
ALL LXOPR *
140A ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
ALL LXADMIN *
150A ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
ALL LXADMIN *
140A ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
-
Add/update "EXTENT CONTROL" to contain all the user DASD for cloning. A
example of the EXTENT CONTROL file is on LXOPR's 191 disk
4.0 REXX execs used by LXOPR user ID
-
MAKESUSE EXEC A - Main exec to start the demo.
Defaults
to create 300 images with DASD swap space. First line of the exec is "max_image
= 300" and it sets the maximum number of images to be created. This demo
uses 2 class C networks and the maximum images can be created is 500.
For example: 490 for Cloning Continuously (LX1 to LX490) and 10 (LX491
to LX500) for Cloning on Demand.
-
MKSUSEV EXEC A - Main exec to start the demo.
Defaults
to create 300 images with VDISK swap space. First line of the exec is "max_image
= 300" and it sets the maximum number of images to be created. This demo
use 2 class C networks and maximum images can be created is 500. For example:
490 for Cloning Continuously (LX1 to LX490) and 10 (LX491 to LX500)
for Cloning on Demand.
-
CLEANUP EXEC A - Delete Linux images and reset the counter to 0. (example
"cleanup 5" to delete LX1 to LX5)
-
NEWSUSE EXEC A - Create a SuSE Linux image with R/W "/", R/O "/usr", R/O
"/usr/src" and DASD swap space. It is called by MAKESUSE EXEC
-
NEWSUSEV EXEC A - Create a SuSE Linux with R/W "/", R/O "/usr", R/O "/usr/src"
and
VDISK swap space image. It is called by MKSUSEV EXEC
-
RMLX EXEC A - Delete a linux image. It is called by CLEANUP EXEC.
-
PURGELX EXEC A - Force a image off and delete the image.
-
STLXTCP EXEC A - Start all TCPIP111 and TCPIP112 stacks.
-
STLXVM EXEC A - Start LXDISP and the LXMSTR Linux images.
-
LXCMD EXEC A - Send command to a Linux image.
-
SENDLX EXEC A - Send command to a Linux image.
-
SHUTLX EXEC A - Shutting down LXDISP and LXMSTR Linux images.
-
ATTDASD EXEC A - Attach all the user DASD for cloning to the system.
This exec must be modified to include the DASD in your system.
-
DIRMSAPI EXEC A - This exec can be found on DirMaint's 11F minidisk (access
as D-disk). Make a copy of this exec on LXOPR's 191 minidisk (access as
A-disk). This exec is used by both MAKESUSE EXEC and MKSUSEV EXEC
to call DirMaint to create VM user ID.
4.1 Files used by LXOPR user ID
-
IPADDRES FILEIUCV A - IP address and Linux images user ID mapping file
used by NEWSUSE EXEC and NEWSUSEV EXEC.
-
PT2PT FILEIUCV A1 - Peer-to-peer IP address for each Linux. In this case
the peer-to-peer IP address is 9.130.111.254 for image LX1 to image LX250,
and 9.130.1112.254 for image LX251 to LX500.
-
FILE TXT A - Images creation time and number status file
-
MODULES SUSEIUCV A - Input file used by NEWSUSE EXEC and NEWSUSEV EXEC
to create the "/etc/modules.conf" for SuSE image.
-
RCCONFIG SUSEIUCV A - Input file used by NEWSUSE EXEC and NEWSUSEV EXEC
to create the "/etc/rc.config" for SuSE image.
-
HOSTS SUSIUCV A - Input file used by NEWSUSE EXEC and NEWSUSEV EXEC to
create the "/etc/hosts" for SuSE image
-
HOSTNAME SUSEIUCV A - Input file used by NEWSUSE EXEC and NEWSUSEV EXEC
to create the "/etc/HOSTNAME" for SuSE image.
-
ROUTE SUSEIUCV A - Input file used by NEWSUSE EXEC and NEWSUSEV EXEC
to create the "/etc/route.conf" for SuSE image.
-
DDRCMDS FILE A - DDR command file for creating images that have R/W "/",
R/O "/usr, R/O "/usr/src" and DASD swap. Used by NEWSUSE EXEC.
-
DDRCMDV FILE A - DDR command file for creating images that have R/W "/",
R/O "/usr, R/O "/usr/src" and VDISK swap. Used by NEWSUSEV EXEC.
-
NETRC DATA A - FTP login file. It has only one line --> "login root
password linux4vm".
-
CLONING IMAGE A - Text file indicates the type of images being cloned.
LXADMIN will check this file before cloning any image. This file is used
to ensure Cloning Continuously and Cloning on demand do not write to the
same master of Linux image's "/" filesystem at the same time.
5.0 REXX exec's and CGI used by "LXADMIN" user ID
-
SUSELX EXEC A - Create a SuSE Linux image with R/W "/", R/O "/usr", R/W
"/usr/src" and DASD swap. It is called by lxadm cgi.
-
NEWSUSE EXEC A - Create a SuSE linux image with R/W "/", R/O "/usr", R/O
"/usr/src" and DASD swap space. It is called by lxadm cgi.
-
NEWSUSEV EXEC A - Create a SuSE linux with R/W "/", R/O "/usr", R/O "/usr/src"
and VDISK swap space image. It is called by lxadm cgi.
-
RMLX EXEC A - Delete a linux image. It is called by lxadm cgi.
-
PURGELX EXEC A - Force a image off and delete the image.
-
SENDLX EXEC A - Send command to a Linux image.
-
DIRMSAPI EXEC A - This exec can be found on DirMaint's 11F minidisk. Make
a copy of this exec on LXOPR's 191 minidisk (access as A-disk). This exec
is used by NEWSUSE EXEC , NEWSUSEV EXEC and SUSELX EXEC to call DirMaint
to create VM user ID.
-
LXADM CGI A - This is the main REXX CGI exec to create and delete Linux
images. It is called by LXADMIN HTML.
5.1 Files used by LXADMIN user ID
-
IPADDRES FILEIUCV A - IP address and Linux images user ID mapping file
used by NEWSUSE EXEC , NEWSUSEV EXEC and SUSELX EXEC.
-
PT2PT FILEIUCV A1 - Peer-to-peer IP address for each Linux. In this case
the peer-to-peer IP address is 9.130.111.254 for image LX1 to image LX250,
and 9.130.1112.254 for image LX251 to LX500.
-
MODULES SUSEIUCV A - Input file used by NEWSUSE EXEC , NEWSUSEV EXEC and
SUSELX EXEC to create the "/etc/modules.conf" for SuSE image.
-
RCCONFIG SUSEIUCV A - Input file used by NEWSUSE EXEC , NEWSUSEV EXEC and
SUSELX EXEC to create the "/etc/rc.config" for SuSE image.
-
HOSTS SUSIUCV A - Input file used by NEWSUSE EXEC , NEWSUSEV EXEC and SUSELX
EXEC to create the "/etc/hosts" for SuSE image.
-
HOSTNAME SUSEIUCV A - Input file used by NEWSUSE EXEC , NEWSUSEV EXEC and
SUSELX EXEC to create the "/etc/HOSTNAME" for SuSE image.
-
ROUTE SUSEIUCV A - Input file used by NEWSUSE EXEC , NEWSUSEV EXEC
and SUSELX EXEC to create the "/etc/route.conf" for SuSE image.
-
DDRCMDS FILE A - DDR command file for creating images that have R/W "/",
R/O "/usr, R/O "/usr/src" and DASD swap. Used by NEWSUSE EXEC.
-
DDRCMDV FILE A - DDR command file for creating images that have R/W "/",
R/O "/usr, R/O "/usr/src" and VDISK swap. Used by NEWSUSEV.
-
DDRCMDSW FILE A - DDR command file for creating images that have R/W "/",
R/O "/usr, R/W "/usr/src" and DASD swap. Used by SUSELX EXEC.
-
NETRC DATA A - FTP login file. It has only one line --> "login root
password linux4vm".
-
CUSTLIST TXT A - Text file that stores customer information. It is modified
by lxadm cgi.
-
ADMLIST TXT A - Text file that stores Administrative User ID and Password.
It only has one line:
lxadm linux4vm
5.2 HTMLs and JPGs used by LXADMIN User ID
-
LXADMIN HTML A - The main HTML for Cloning on Demand web interface.
-
ALLIMG HTML A - Contains the names of all the images that were created
already. It is modified by lxadmin cgi. The first three lines of this file
must be:
<html>
<font size=+2>
<h1> Images are: <p> </h1>
-
CIMAGE HTML A - Contains all the available images (images pool) that
Cloning on Demand can create. Set to 10 images (LX491 - LX500). It is modified
by LXADMIN CGI. The last line of this file must be:
**end**
-
TUX_DANC JPG A - JPG for a dancing TUX. Loaded by LXADMIN HTML.
-
TUX_SITT JPG A - JPF for a sitting TUX. Loaded by LXADMIN HTML.
6.0 Starting the DEMO to Create Images
Start TCP/IP network, LXOPR and LXMSTR
-
Logon to "LXCNTL".
-
Logon to "LXOPR".
-
Enter "STLXTCP" from LXOPR CMS command line to start all 2 TCP/IP stacks.
If STLXTCP completed successfully, the network is up and running. Do
not proceed if STLXTCP has not completed successfully!
-
Enter "STLXCM" from LXOPR CMS command line to IPL "LXDISP" (Apache webserver)
and "LXMSTR". If STLXCM completed successfully, the LXDISP and LXMSTR Linux
images are up and running.
Do not proceed if STLXVM has not completed
successfully!
Start Cloning Continuously
-
Start Netscape from your workstation and go to http://9.130.111.252/tscdemo.html
(For blinking banner: go to http:/9.130.111.252/speedometer.html. fader.js is required
for the blinking banner)
When the webpage comes up, reload it one more time by clicking the reload
button.
-
From the CMS command line of "LXOPR", enter "MAKESUSE or MKSUSEV" to start
the Cloning Continuosly demo. If the webpage did not get updated when the
new images were created, just reload the page one more time.
-
Leave "LXOPR" and "LXCNTL" logged on. You should be able to observe the
cloning process on "LXOPR" and all the Linux image console messages on
"LXCNTL"
Start cloning images via the Cloning on Demand web interface:
-
Logon to "LXADMIN"
-
From the CMS command line of "LXADMIN" enter "WEBSHARE" or "HTTPD" to start
the Cloning on Demand demo.
-
Start Netscape from your workstation and go to http://192.168.46.140/~lxadmin/lxadmin.html.
-
Fill in the Name, Title, Company, e-mail, Administrative User ID(lxadm)
and Password (linux4vm) boxes.
-
Select SuSE, SuSE Web Server-DASD SWAP or SuSE Web Serve-VDISK SWAP button.
-
Double click Submit to create a image
-
This web interface can only create one image at a time. When the the image
is created, a dancing TUX will display along with the image's name and
IP address.
-
You can click on the sitting TUX to see how many images were created.
7.0 Deleting the Cloned Images
Delete all cloned images that were created by Cloning Continuously
(LXOPR)
-
From LXOPR's CMS command line enter "cleanup nnnn", where nnnn
are
the number of images to be deleted. Ensure you delete all the cloned images
before you rerun the demo again. If you stopped the "MAKESUSE" or "MKSUSEV"
before it reached 300 (maximum number of images), you should add 1 to the
number of images that is showing on the speedometer web page as the total
number of images you are going to delete. Example: If the speedometer web
page shows 250 images, then execute "cleanup 251" to delete all the cloned
images.
-
You can also use "PURGELX EXEC" to delete one image at a time. Example:
execute "PURGELX LX4" to delete the LX4 image.
Delete all cloned Images that were created by Cloning on Demand (LXADMIN)
-
Fill in the Image Name, Administrative User ID and Password and then click
on the "Delete an Image" button on the "Linux Image Adminstration" website
to delete an image.
-
You can click on the sitting TUX to find out how many images were created.
8.0 In Conclusion
-
I am providing this documentation and the REXX execs as an example for
you to experiment with cloning on your system. I used this process for
creating my demo in the past 3 LinuxWorld conferences. It has also been
used by other IBM locations for demos and other applications. It has worked
very well for me. This is my first draft of this documentation. Please
feel free to send me your feedback on this documentation or the cloning
setup/exec/file/etc to me (chongts@us.ibm.com) . I am working on this demo
on the side and I will do my best to provide assistance and answer questions.
Please post your questions/problems encountered in the Marist College LINUX-390
Mailing list (LINUX-390@VM.MARIST.EDU). You can also send me an e-mail
if you feel uncomfortable posting your questions on the mailing list. Thank
your for experimenting with this demo.
|
|
|
|