You are previewing The Virtualization Cookbook for IBM z/VM 6.3, RHEL 6.4, and SLES 11 SP3.
O'Reilly logo
The Virtualization Cookbook for IBM z/VM 6.3, RHEL 6.4, and SLES 11 SP3

Book Description

This IBM® Redbooks® publication describes how to roll your own Linux virtual servers on IBM System z® hardware under IBM z/VM®. It adopts a cookbook format that provides a concise, repeatable set of procedures for installing and configuring z/VM 6.3 into a single system image (SSI), then installing and customizing Linux.

You need at least two IBM System z logical partitions (LPARs) with associated resources, z/VM 6.3 media, and either the Red Hat Enterprise Linux (RHEL) version 6.4 or the SUSE Linux Enterprise Server (SLES) version 11 SP3 distribution (or both).

This book assumes that you have a general familiarity with System z technology and terminology. It does not assume an in-depth understanding of z/VM and Linux. It is written for those who want to get a quick start with z/VM and Linux on the mainframe, and to get some virtual servers up and running in a short amount of time (days, not weeks or months).

Table of Contents

  1. Front cover
  2. Notices
    1. Trademarks
  3. Preface
    1. Parts of this book
    2. Conventions
    3. Operating system releases used
    4. Authors
    5. Special thanks
    6. Now you can become a published author, too!
    7. Comments welcome
    8. Stay connected to IBM Redbooks
  4. Summary of changes
    1. Summary of changes in this book
  5. Part 1 Introduction and z/VM
  6. Chapter 1. Introduction to z/VM and Linux
    1. 1.1 What is virtualization?
    2. 1.2 A philosophy adopted in this book
    3. 1.3 Choices and decisions made in this book
    4. 1.4 Single system image design
    5. 1.5 Infrastructure design
    6. 1.6 Usability tests performed
  7. Chapter 2. Planning
    1. 2.1 Planning for an SSI and LGR
      1. 2.1.1 Hints and tips
      2. 2.1.2 Need for ECKD DASD
    2. 2.2 Bill of materials
      1. 2.2.1 Hardware resources
      2. 2.2.2 Software resources
      3. 2.2.3 Networking resources
    3. 2.3 z/VM conventions
      1. 2.3.1 Volume labeling convention
      2. 2.3.2 Backup file naming convention
      3. 2.3.3 The command retrieve convention
    4. 2.4 Disk planning
    5. 2.5 Memory planning
    6. 2.6 Password planning
    7. 2.7 CTC planning
      1. 2.7.1 z/VM resources used in this book
    8. 2.8 Planning worksheets
      1. 2.8.1 IBM Shopz worksheet
      2. 2.8.2 HMC worksheet
      3. 2.8.3 Worksheets for the INSTPLAN command
      4. 2.8.4 z/VM networking resources used in this book
      5. 2.8.5 z/VM DASD used in this book
      6. 2.8.6 Linux resources used in this book
      7. 2.8.7 Host names and IP addresses used in this book
    9. 2.9 Blank planning worksheets
      1. 2.9.1 Shopz worksheet
      2. 2.9.2 HMC worksheet
      3. 2.9.3 INSTPLAN worksheets
      4. 2.9.4 z/VM Networking resources
      5. 2.9.5 z/VM DASD worksheet
      6. 2.9.6 Linux resources worksheet
      7. 2.9.7 Host names and IP addresses worksheet
  8. Chapter 3. Configure a desktop machine
    1. 3.1 PuTTY: A free SSH client for MS Windows
    2. 3.2 Set up a VNC client
    3. 3.3 3270 emulators
    4. 3.4 Linux desktops
  9. Chapter 4. Configure an NFS/FTP server
    1. 4.1 Install Linux on a PC server
      1. 4.1.1 Obtain RHEL for a PC server
      2. 4.1.2 Obtain SLES for a PC server
    2. 4.2 Copy files to the Linux server
      1. 4.2.1 Download files associated with this book
      2. 4.2.2 Obtain RHEL 6.4 for System z
      3. 4.2.3 Obtain SLES 11 SP3 for System z
      4. 4.2.4 Obtain z/VM 6.3
    3. 4.3 Set up an NFS server
      1. 4.3.1 Mount the Linux distribution ISO image for RHEL 6.4
      2. 4.3.2 Install and configure the NFS server
      3. 4.3.3 Mount the Linux distribution ISO images for SLES 11 SP3
      4. 4.3.4 Configure the files to be exported
      5. 4.3.5 Turn on the NFS server
      6. 4.3.6 Test the NFS server
    4. 4.4 Set up an FTP server
      1. 4.4.1 Install and configure the FTP server on RHEL
      2. 4.4.2 Install and configure the FTP server on SLES
      3. 4.4.3 Test the anonymous FTP server
    5. 4.5 Set up an SLES 11 SP3 installation server
      1. 4.5.1 Install FTP server packages
      2. 4.5.2 Create the exports for the NFS directory
      3. 4.5.3 Update the system services configuration
      4. 4.5.4 Test the FTP and NFS servers
  10. Chapter 5. Install a z/VM SSI cluster
    1. 5.1 Obtain z/VM through electronic download
    2. 5.2 Configure an FTP server for z/VM installation
      1. 5.2.1 Prepare the z/VM product installation files
    3. 5.3 Install z/VM from DVD or FTP server
      1. 5.3.1 Start the z/VM installation
      2. 5.3.2 Copy a vanilla z/VM system to DASD
      3. 5.3.3 IPL the first SSI member
      4. 5.3.4 IPL remaining SSI members
      5. 5.3.5 Verify the installation
    4. 5.4 Configure TCP/IP
      1. 5.4.1 Use the IPWIZARD tool
    5. 5.5 Configure the XEDIT PROFILE
    6. 5.6 Customize the SYSTEM CONFIG file
    7. 5.7 Configure additional network resources
      1. 5.7.1 Turn on the z/VM FTP server
      2. 5.7.2 Shut down and re-IPL the SSI cluster
      3. 5.7.3 Test changes
    8. 5.8 Add page and perm volumes
      1. 5.8.1 Format volumes for page space
      2. 5.8.2 Copy the CPFORMAT EXEC to the members
      3. 5.8.3 Use the CPFORMAT EXEC
      4. 5.8.4 Format DASD for minidisks
      5. 5.8.5 Update the SYSTEM CONFIG file
      6. 5.8.6 Attach minidisk volumes to system
    9. 5.9 Configure AUTOLOG1’s PROFILE EXEC
      1. 5.9.1 Shut down and re-IPL the SSI cluster
    10. 5.10 Create LNXMAINT for common files
      1. 5.10.1 Define the user in the USER DIRECT file
      2. 5.10.2 Format the LNXMAINT minidisks
      3. 5.10.3 Create a PROFILE EXEC
      4. 5.10.4 Copy files associated with this book
    11. 5.11 Create identity LNXADMIN for Linux administration
      1. 5.11.1 Set LNXADMIN to start an IPL time
    12. 5.12 z/VM security issues
      1. 5.12.1 Change passwords in USER DIRECT
    13. 5.13 Back up and restore your z/VM system
  11. Chapter 6. Service z/VM
    1. 6.1 How to apply a recommended service upgrade
      1. 6.1.1 Get service from the Internet
      2. 6.1.2 Download the service files
      3. 6.1.3 Receive, apply, and build the service
      4. 6.1.4 Put the service into production
    2. 6.2 How to apply a program temporary fix
      1. 6.2.1 Get service using Shopz
      2. 6.2.2 Determine if a PTF has been applied
      3. 6.2.3 Download the service to z/VM
      4. 6.2.4 Receive, apply, and build service
      5. 6.2.5 Put the service into production
      6. 6.2.6 Check for APARMEMO files
    3. 6.3 How to determine the service level of TCP/IP
    4. 6.4 Moving on
  12. Chapter 7. Install a z/VM non-SSI LPAR
    1. 7.1 Install z/VM from DVD or FTP server
      1. 7.1.1 Copy a vanilla z/VM system to DASD
      2. 7.1.2 IPL the z/VM LPAR
      3. 7.1.3 Verify the installation
    2. 7.2 Configure TCP/IP
      1. 7.2.1 Use the IPWIZARD tool
    3. 7.3 Configure the XEDIT PROFILE
    4. 7.4 Customize the SYSTEM CONFIG file
    5. 7.5 Configure additional network resources
      1. 7.5.1 Turn on the z/VM FTP server
      2. 7.5.2 Shut down and re-IPL the LPAR
      3. 7.5.3 Test changes
    6. 7.6 Add page and perm volumes
      1. 7.6.1 Format volumes for page space
      2. 7.6.2 Copy the CPFORMAT EXEC to the LPAR
      3. 7.6.3 Use the CPFORMAT EXEC
      4. 7.6.4 Format DASD for minidisks
      5. 7.6.5 Update the SYSTEM CONFIG file
    7. 7.7 Configure the AUTOLOG1 PROFILE EXEC
      1. 7.7.1 Shut down and re-IPL the LPAR
    8. 7.8 Create LNXMAINT for common files
      1. 7.8.1 Define the user in the USER DIRECT file
      2. 7.8.2 Format the LNXMAINT minidisks
      3. 7.8.3 Create a PROFILE EXEC
      4. 7.8.4 Copy files associated with this book
    9. 7.9 Create user LNXADMIN for Linux administration
      1. 7.9.1 Set LNXADMIN to start an IPL time
  13. Part 2 Red Hat Enterprise Linux 6.4
  14. Chapter 8. Install Red Hat Enterprise Linux on LNXADMIN
    1. 8.1 Install the Linux administration system
      1. 8.1.1 Prepare RHEL 6.4 bootstrap files
      2. 8.1.2 Install RHEL 6.4
      3. 8.1.3 Stage 2 of the RHEL 6.4 installation
      4. 8.1.4 Boot your new Linux system from disk
    2. 8.2 Configure the Linux administration system
      1. 8.2.1 Copy RHEL 6.4 Installation tree to LNXADMIN
      2. 8.2.2 Copy files associated with this book
      3. 8.2.3 Configure yum
      4. 8.2.4 Turn off unneeded services
      5. 8.2.5 Configure the VNC server
      6. 8.2.6 Set system to halt on SIGNAL SHUTDOWN
      7. 8.2.7 Turn on the NFS server
      8. 8.2.8 Configure SSH keys
      9. 8.2.9 Insert the vmcp module and set system to log off
      10. 8.2.10 Reboot the system
      11. 8.2.11 Verify the changes
  15. Chapter 9. Installing and configuring the RHEL 6.4 golden image
    1. 9.1 Install the golden image
      1. 9.1.1 Create the RH64GOLD virtual machine
      2. 9.1.2 Prepare RH64GOLD parameter files
      3. 9.1.3 Install RHEL 6.4 on the golden image
      4. 9.1.4 Verify the installation
    2. 9.2 Configure the golden image
      1. 9.2.1 Configure automount of installation tree
      2. 9.2.2 Configure yum for online updates
      3. 9.2.3 Turn off unneeded services
      4. 9.2.4 Configure the VNC server
      5. 9.2.5 Set system to halt on SIGNAL SHUTDOWN
      6. 9.2.6 Configure settings at boot time
      7. 9.2.7 Configure SSH keys
      8. 9.2.8 Disable cgroup memory
      9. 9.2.9 Other configuration changes
      10. 9.2.10 Reboot the system
      11. 9.2.11 Verify the changes
  16. Chapter 10. Configure RHEL 6.4 for cloning
    1. 10.1 Define three new virtual machines
    2. 10.2 Clone a virtual server manually
      1. 10.2.1 Link the source and target disks
      2. 10.2.2 Copy the source to the target disks
      3. 10.2.3 Modify the new root file system
      4. 10.2.4 IPL the target system
    3. 10.3 Clone a virtual server automatically
      1. 10.3.1 Install the clone RPM
      2. 10.3.2 Create a configuration file for cloning
      3. 10.3.3 Use the clone script
  17. Chapter 11. Create RHEL 6.4 appliances
    1. 11.1 Create a web server appliance
      1. 11.1.1 Install Apache RPMs
      2. 11.1.2 Test Apache
      3. 11.1.3 Turn on a firewall
      4. 11.1.4 Configure SSL
      5. 11.1.5 Populate the website
    2. 11.2 Create an application development appliance
      1. 11.2.1 Configure subversion
      2. 11.2.2 Additional resources
    3. 11.3 Create an LDAP server appliance
      1. 11.3.1 Install the OpenLDAP server
      2. 11.3.2 Configure the OpenLDAP server
      3. 11.3.3 Start the LDAP service
      4. 11.3.4 Add an LDAP user
      5. 11.3.5 Configure an LDAP client
      6. 11.3.6 Setting up TLS/SSL on OpenLDAP
    4. 11.4 Create a file server appliance
      1. 11.4.1 Install necessary RPMs
      2. 11.4.2 Configure Samba configuration file
      3. 11.4.3 Adding a Samba user
      4. 11.4.4 Start Samba at boot time
      5. 11.4.5 Test your changes
      6. 11.4.6 Configure printing
  18. Chapter 12. Installing Red Hat Enterprise Linux with kickstart
    1. 12.1 Configure the Linux administration system for kickstart
    2. 12.2 Configure LINUX1 for kickstart
    3. 12.3 Kickstart the LINUX1 user
  19. Chapter 13. Service Linux with the Red Hat Network
    1. 13.1 Register your system with RHN
    2. 13.2 Register your system with Red Hat Network
    3. 13.3 Installing and updating packages using yum
    4. 13.4 Manage your systems through the RHN
  20. Chapter 14. Red Hat Network Satellite Server
    1. 14.1 Prepare to install the RHN Satellite
      1. 14.1.1 Add disks to LNXADMIN
      2. 14.1.2 Utilize the new disk space
      3. 14.1.3 Extend existing logical volumes
  21. Part 3 SUSE Linux Enterprise Server 11 SP3
  22. Chapter 15. Install SUSE Linux Enterprise Server 11 SP3 on LNXADMIN
    1. 15.1 Review the IDENTITY LNXADMIN
    2. 15.2 Prepare the SUSE Linux Enterprise Server 11 SP3 bootstrap files
    3. 15.3 Install SUSE Linux Enterprise Server 11 SP3 onto Linux administration system
      1. 15.3.1 Complete the Linux administration system installation
      2. 15.3.2 Verify the installation
    4. 15.4 Configure the SUSE Linux Enterprise Server 11 SP3 Linux administration system
      1. 15.4.1 Copy installation files to the Linux administration system
      2. 15.4.2 Automatically mount the two disk images
      3. 15.4.3 Copy the files associated with this book
      4. 15.4.4 Configure an FTP server
      5. 15.4.5 Configure an NFS server
      6. 15.4.6 Reset the installation source location
      7. 15.4.7 Turn off unneeded services
      8. 15.4.8 Apply service if necessary: Online update
      9. 15.4.9 Install the cmsfs package
      10. 15.4.10 Enable the vmcp modules
      11. 15.4.11 Set system to halt on SIGNAL SHUTDOWN
      12. 15.4.12 Reboot the system
      13. 15.4.13 Verify the changes
  23. Chapter 16. Install the SUSE Linux Enterprise Server 11 SP3 golden image
    1. 16.1 Create the S113GOLD virtual machine
    2. 16.2 Create the S113GOLD parameter file
    3. 16.3 Install the golden image
      1. 16.3.1 Begin the SUSE Linux Enterprise Server 11 SP3 installation
      2. 16.3.2 Begin YaST installation
    4. 16.4 Configure the golden image
      1. 16.4.1 Configure the VNC server
      2. 16.4.2 Prepare for Online Update
      3. 16.4.3 Turn off unneeded services
      4. 16.4.4 Add the CMS file system RPM
      5. 16.4.5 Apply service: Online Update
      6. 16.4.6 Configure /etc/inittab
      7. 16.4.7 Disable cgroup memory
      8. 16.4.8 Configure SSH keys
      9. 16.4.9 Copy set up the golden image for initial boot
      10. 16.4.10 Configure boot.local
      11. 16.4.11 Clean up temporary files
      12. 16.4.12 Reboot the system and verify changes
  24. Chapter 17. Clone SUSE Linux Enterprise Server 11 SP3
    1. 17.1 Define three new virtual machines
    2. 17.2 Clone a virtual server manually
    3. 17.3 Clone a virtual server automatically
    4. 17.4 System patching philosophies
  25. Chapter 18. Create SUSE Linux Enterprise Server 11 SP3 appliances
    1. 18.1 Deploying and setting up services on SUSE Linux Enterprise Server
    2. 18.2 Creating a virtual web server
      1. 18.2.1 Installing Apache RPMs
      2. 18.2.2 Testing Apache
      3. 18.2.3 Populating your website
      4. 18.2.4 Apache resources
    3. 18.3 Create a virtual LDAP server
      1. 18.3.1 Clone a Linux
      2. 18.3.2 Configure the LDAP server
      3. 18.3.3 Add an LDAP user
      4. 18.3.4 Set another virtual server to use the LDAP server
    4. 18.4 Create a virtual file server
      1. 18.4.1 Install Samba and CUPS
      2. 18.4.2 Configure Samba configuration file
      3. 18.4.3 Add a Samba user
      4. 18.4.4 Set Samba to start at boot time
      5. 18.4.5 Test the configuration
    5. 18.5 Create an application development appliance
      1. 18.5.1 Scripting languages
      2. 18.5.2 C/C++ development tools
      3. 18.5.3 Java development tools
    6. 18.6 Setting up subversion
    7. 18.7 Create an RPM
      1. 18.7.1 Additional resources
  26. Chapter 19. Installing Linux with AutoYaST2
    1. 19.1 Getting started with AutoYaST2
    2. 19.2 Prepare a directory on LNXADMIN
    3. 19.3 Setting up an AutoYaST2 profile for LINUX5
    4. 19.4 Running an automated installation
  27. Chapter 20. Creating appliances with KIWI
    1. 20.1 Set up KIWI on LNXADMIN
      1. 20.1.1 Add disks for KIWI
      2. 20.1.2 Install the required packages
      3. 20.1.3 Create a basic file system structure
    2. 20.2 Creating a minimal operating system
      1. 20.2.1 Create a directory structure for the new project
      2. 20.2.2 Select packages to install
      3. 20.2.3 Create the needed overlay files
      4. 20.2.4 Write a config.sh script
      5. 20.2.5 Create and clone the image
      6. 20.2.6 Start the image
    3. 20.3 Creating a basic WebSphere instance
    4. 20.4 More information
  28. Part 4 Other topics
  29. Chapter 21. z/VM live guest relocation
    1. 21.1 LGR considerations
      1. 21.1.1 General considerations before relocation
      2. 21.1.2 Mandatory memory checking performed during relocation
      3. 21.1.3 Optional memory checking performed during relocation
      4. 21.1.4 Minimizing link and resource contention
    2. 21.2 Relocate a Linux system
  30. Chapter 22. DirMaint, SMAPI, and RACF
    1. 22.1 Enable and configure DirMaint
      1. 22.1.1 Enable DirMaint
      2. 22.1.2 Configure DirMaint
      3. 22.1.3 Customize the EXTENT CONTROL file
      4. 22.1.4 Start DirMaint
      5. 22.1.5 Test DirMaint
      6. 22.1.6 Test DirMaint at IPL time
    2. 22.2 Configure SMAPI
      1. 22.2.1 Set up basic SMAPI configuration
      2. 22.2.2 Disable support for ensembles
      3. 22.2.3 Start SMAPI at IPL time
      4. 22.2.4 Test SMAPI from CMS
      5. 22.2.5 Test SMAPI from Linux using smaclient
    3. 22.3 Enable and configure RACF
      1. 22.3.1 Create the RACF command file
      2. 22.3.2 Customize SMF
      3. 22.3.3 Delete the ICHRCX02 exit
      4. 22.3.4 Copy the RACF databases
      5. 22.3.5 Set up the AUTOLOG1 and AUTOLOG2 virtual machines
      6. 22.3.6 Enable RACF
      7. 22.3.7 Put RACF into production on all members
      8. 22.3.8 Configure SMAPI to work with RACF
    4. 22.4 Verifying DirMaint and RACF to work together
    5. 22.5 Some common DirMaint tasks
      1. 22.5.1 Update a user directory entry
      2. 22.5.2 Edit the EXTENT CONTROL file
      3. 22.5.3 Get a copy of the user directory
      4. 22.5.4 Add an IDENTITY
      5. 22.5.5 Clean up work units
      6. 22.5.6 Configure LogonBy processing
      7. 22.5.7 Use the RACF SMF data unload utility
  31. Chapter 23. Monitor z/VM and Linux
    1. 23.1 Use basic z/VM commands
      1. 23.1.1 Use the INDICATE command
      2. 23.1.2 Use other basic commands
    2. 23.2 The z/VM Performance Toolkit
      1. 23.2.1 Configure the IBM Performance Toolkit for VM
      2. 23.2.2 Configure web browser support
      3. 23.2.3 Configure PERFSVM
      4. 23.2.4 Start the IBM Performance Toolkit for VM
      5. 23.2.5 Use the IBM Performance Toolkit for VM
    3. 23.3 Collect and use raw CP monitor data
      1. 23.3.1 Collect CP monitor data
      2. 23.3.2 Use CP monitor data
    4. 23.4 Monitor Linux performance for troubleshooting
      1. 23.4.1 Monitor Linux performance from z/VM
      2. 23.4.2 Monitor Linux performance from inside Linux
  32. Chapter 24. Working with disks
    1. 24.1 Add disk space to virtual machines
      1. 24.1.1 Add minidisks to a virtual machine
      2. 24.1.2 Make the new minidisks available
    2. 24.2 Add a logical volume
      1. 24.2.1 Create a logical volume and file system
      2. 24.2.2 Update the file system table
    3. 24.3 Extend an existing logical volume
    4. 24.4 Moving a physical volume
    5. 24.5 Add SCSI/FCP disks
      1. 24.5.1 Define FCP to Linux virtual machines
      2. 24.5.2 FCP/SCSI disks in RHEL
      3. 24.5.3 Using FCP with SLES
    6. 24.6 HyperPAV for Linux use
  33. Chapter 25. Working with networks
    1. 25.1 Attach the z/VM TCP/IP stack to the VSWITCH
    2. 25.2 Adding CTCs to an SSI cluster
      1. 25.2.1 Add the CTC devices dynamically
      2. 25.2.2 Add the CTC devices permanently
    3. 25.3 Setting up a private interconnect
    4. 25.4 Creating a HiperSockets device between Linux and z/OS
      1. 25.4.1 Verify HiperSockets hardware definitions
      2. 25.4.2 Create a TCP/IP stack on z/OS
      3. 25.4.3 Creating a TCP/IP stack on Linux
      4. 25.4.4 Verify connectivity
    5. 25.5 Configuring a port group with LACP
  34. Chapter 26. Miscellaneous recipes
    1. 26.1 Rescue a Linux system
      1. 26.1.1 Enter single user mode
      2. 26.1.2 Enter a rescue environment
    2. 26.2 Set up Memory Hotplugging
    3. 26.3 Utilize the cpuplugd service
      1. 26.3.1 Determine the virtual CPUs being used
      2. 26.3.2 Generating a workload to see cpuplugd work
      3. 26.3.3 Setting memory sizes with cpuplugd
    4. 26.4 Hardware cryptographic support for OpenSSH
    5. 26.5 The X Window System
      1. 26.5.1 VNC Server
      2. 26.5.2 X server on a workstation
    6. 26.6 Centralizing home directories for LDAP users
    7. 26.7 Setting up the Linux Terminal Server
      1. 26.7.1 z/VM configuration for Linux Terminal Server
      2. 26.7.2 Red Hat Enterprise Linux 6.4 configuration for Linux Terminal Server
      3. 26.7.3 SLES 11 SP3 configuration for Linux Terminal Server
    8. 26.8 Redefine command privilege classes
    9. 26.9 Use Crypto Express to seed /dev/random
  35. Part 5 Appendixes
  36. Appendix A. References and cheat sheets
    1. Related books
    2. Online resources
    3. Important z/VM files
    4. Cheat sheets
  37. Appendix B. Additional material
    1. Locating the web material
    2. Using the web material
    3. z/VM REXX EXECs and XEDIT macros
    4. Sample files
    5. Linux code
  38. Related publications
    1. IBM Redbooks
    2. Other publications
    3. Online resources
    4. Help from IBM
  39. Back cover