Front cover z/VM and Linux on IBM System z The Virtualization Cookbook for Red Hat Enterprise Linux 6.0 Hands-on instructions for installing z/VM and Linux on the mainframe Updated information for z/VM V6.1 and Red Hat Enterprise Linux 6.0 New, more versatile file system layout Brad Hinson Michael MacIsaac ibm.
International Technical Support Organization z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
Note: Before using this information and the product it supports, read the information in “Notices” on page ix. First Edition (February 2011) This edition applies to z/VM Version 6.1 and Red Hat Enterprise Linux 6.0. © Copyright International Business Machines Corporation 2011. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .x Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Chapters and appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.1 Downloading and running RealVNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3 3270 emulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 iv Chapter 4. Installing and configuring z/VM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Installing z/VM from DVD or FTP server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.
5.1.5 Putting the service into production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 PTFs for the zEnterprise 196 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Ordering service for the zEnterprise 196 PTFs. . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Applying the non-SES PTF UV61111 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.3 Verifying that the zEnterprise 196 service is applied . . .
vi 8.1.1 Creating the RH6GOLD user ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 Adding RH6GOLD to AUTOLOG1 PROFILE EXEC. . . . . . . . . . . . . . . . . . . . . . 8.1.3 Preparing the RH6GOLD bootstrap files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.4 Installing RHEL 6 on the golden image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.5 Verifying the installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.3.2 Installing the necessary RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3.3 Configuring the Samba configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3.4 Adding a Samba user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3.5 Starting Samba at boot time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3.6 Testing your changes . . . . . . . . . . . . . . . . . . . .
14.2.6 Using the z/VM Performance Toolkit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.3 Monitoring Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.3.1 Monitoring Linux performance data from the kernel . . . . . . . . . . . . . . . . . . . . . 14.4 Viewing Linux data in the Performance Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 254 254 255 Appendix A. References . . . . . . . . . . . . . . .
Notices This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used.
Trademarks IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol (® or ™), indicating US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries.
Preface This IBM® Redbooks® publication describes how to create Linux® virtual servers in IBM z/VM® on IBM System z® hardware. This book adopts a cookbook format that provides a concise, repeatable set of procedures for installing and configuring z/VM in a logical partition (LPAR) and then installing and customizing Linux. You need an IBM System z LPAR with the associated resources, z/VM V6.1 media, and a Linux distribution.
Chapter 10, “Installing Linux with kickstart” on page 175 describes how to use the Red Hat kickstart tool to create Linux systems. This process is fundamentally different from cloning, as this tool is a script that is used for an automated installation. You may try kickstart and you may also try cloning. Understand that they try to accomplish the same goal of being able to quickly get Linux systems up and running, and that you do not need to use both.
Monospace and bold Commands entered by the user on the command line when inline. This only applies to lower-case commands. Values inside angle brackets are examples and are replaced with the values that are correct for your enterprise. monospace File, directories, statements, and commands set off in their own paragraph. The following command conventions are used in this book: z/VM commands are prefixed with ==>. z/VM XEDIT subcommands are prefixed with ====>.
Now you can become a published author, too! Here’s an opportunity to spotlight your skills, grow your career, and become a published author - all at the same time! Join an ITSO residency project and help write a book in your area of expertise, while honing your experience using leading-edge technologies. Your efforts will help to increase product acceptance and customer satisfaction, as you expand your network of technical contacts and relationships.
Explore new Redbooks publications, residencies, and workshops with the IBM Redbooks weekly newsletter: https://www.redbooks.ibm.com/Redbooks.nsf/subscribe?OpenForm Stay current on recent Redbooks publications with RSS Feeds: http://www.redbooks.ibm.com/rss.
xvi z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
Summary of changes This section describes the technical changes made in this edition of the book and in previous editions. This edition might also include minor corrections and editorial changes that are not identified. Summary of Changes for SG24-7932-00 for z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0 as created or updated on February 18, 2011.
xviii z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
1 Chapter 1. Introduction to z/VM and Linux Virtualization is an important topic in the IT industry. The IBM z/VM mainframe and its predecessors have been performing virtualization for four decades. Today, it is the most functionally rich virtualization platform available. When Linux was ported to IBM mainframes in 2000, it was a natural fit to run under z/VM. You can run many tens of Linux images on the same IBM System z logical partition (LPAR). Some customers are running hundreds in production mode.
Many functions have been added to z/VM since Version 5.2. The following sections give a brief summary of the functions added in the last three releases. z/VM V6.1 z/VM V6.1, available since October 2009, is intended to be the base for all future z/VM enhancements. This release implements a new Architecture Level Set (ALS) available only on the IBM System z10® Enterprise Class server and System z10 Business Class server and future generations of System z servers.
the z9 BC processors or later. Virtual Machine Resource Manager (VMRM) detects when memory is constrained and notifies the Linux guests, which can then adjust their memory consumption to help relieve the memory constraint. In the previous major release, z/VM V5.2, many memory contention issues were removed with the Control Program (CP) now using memory above 2 GB for a much broader set of operations.
Provisioning versus predefined user IDs: z/VM user IDs must be predefined to clone them. There is no attempt to provision them (define and bring Linux user IDs online automatically) as part of the cloning process. The target Linux user ID must exist with the appropriate minidisks defined. Shared read-only Linux /usr/ file system versus read-write: Some cloning solutions use an environment which shares the /usr/ file system.
Figure 1-1 shows a block diagram of a System z10 with multiple LPARs. z/VM V5.4 is installed in one of these LPARs. z/VM comes with many user IDs predefined. The most important six IDs are shown in the z/VM LPAR above the dashed line. Below the dashed line, you see the user IDs described in this book.
6 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
2 Chapter 2. Planning This chapter covers the planning that should be done before installing z/VM. It begins by discussing a bill of materials, that is, all the resources that you need. Then it describes conventions adopted for labeling 3390 volumes. Finally, resource worksheets are presented for: z/VM resources other than direct access storage device (DASD) DASD resources Linux resources Linux user IDs © Copyright IBM Corp. 2011. All rights reserved.
2.1 Bill of materials The resources needed for a Linux on IBM System z project can be divided into the following areas: Hardware Software Networking 2.1.1 Hardware resources The following hardware is needed: A System z logical partition (LPAR) and a System z10 or System z196 – Processors or CPUs: One IFL (or CP) minimum, two or more are recommended. – Memory: 3 GB central memory and 1 GB of expanded minimum, 6 GB and 2 GB or more recommended.
– A Linux SSH client, such as PuTTY (recommended) or TeraTerm – A VNC viewer These resources are described in more detail in the chapters that follow. 2.1.
The LPAR used in this book is identified by the character M. The following characters are used for the types of DASD in the second character of the label: M P S T V Minidisk space (PERM) Paging space (PAGE) Spool space (SPOL) Temporary disk space (TDISK) z/VM operating system volumes For example, Figure 2-1 shows the labeling convention for the DASD in LPAR M, of type minidisk at real address A700.
2.3 Disk planning There are different aspects to consider when planning how to choose and allocate disk storage.
Important: However you choose to layout the minidisks, it is important that the golden image and all target Linux user IDs have two minidisks of the same size at virtual addresses 100 and 101. These assumptions are coded into the clone.sh script. 2.4 Memory planning Planning memory may be the most difficult issue for z/VM and Linux on System z, yet the most important to ensure adequate performance.
You may want to define a finer granularity for passwords based on the following system administration roles: The main z/VM system administrator (MAINT) The z/VM network administrator (TCPMAINT) The z/VM Linux administrator (LNXMAINT, Linux cloner, and Linux virtual server user IDs) The Linux virtual server users (with or without access to 3270 sessions, with or without the root passwords) The sets of passwords that you define will depend on the roles that your organization will adopt. 2.
Name Value Port name (optional) Comment Not required by z/VM Router type None Usually “None” MTU size 1500 Check with network administrator Primary OSA device number for VSWITCH B440 Specify the first device number (must be even number) and the next two device numbers will also be used Secondary OSA device number for VSWITCH B424 Should be on a different CHPID/OSA card 2.6.2 z/VM DASD used in this book Table 2-3 lists the z/VM DASD resource values used in the examples in this book.
2.6.3 Linux resources used in this book Table 2-4 lists the Linux NFS server resources used for the first System z Linux installation. Table 2-4 Linux NFS server resources used in this book Name Value TCP/IP address 9.60.18.240 User/password root/lnx4vm NFS-exported install directory /nfs/rhel6/ Comment Directory with DVD 1 Table 2-5 lists the Linux resources used in the examples in this book.
2.7 Blank worksheets Blank copies of the same four worksheets are provided for your use. 2.7.1 z/VM resources worksheet Use the worksheet in Table 2-7 to document the z/VM resources that you will use.
2.7.2 z/VM DASD worksheet Use the worksheet in Table 2-8 to document the z/VM DASD that you will use. Table 2-8 z/VM DASD blank worksheet Device number Label Type Notes Chapter 2.
2.7.3 Linux resources worksheet Use the worksheet in Table 2-10 to document the resources associated with the NFS server that will be used as the installation source of the first System z Linux. Table 2-9 Linux NFS server resources blank worksheet Name Value Comment TCP/IP address User/password NFS-exported install directory Use the worksheet in Table 2-11 to document your System z Linux resources.
3 Chapter 3. Configuring a desktop machine Many people use Microsoft Windows as a desktop operating system. This chapter addresses the following tools that are recommended for accessing z/VM and Linux from a Windows desktop: An SSH client: PuTTY is recommended A VNC client: RealVNC is recommended A 3270 emulator: Many choices are available © Copyright IBM Corp. 2011. All rights reserved.
3.1 PuTTY: A no cost SSH client for Windows Throughout this book, SSH is used to log into Linux systems. It is easy to use and cryptographically secure. If you are using a Linux desktop system, an SSH client is built in. But if you are using a Windows desktop, you will need a good SSH client. PuTTY is probably the most commonly used. You can download PuTTY from the web at: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html To download from this page, click the putty.
3. Click Logging in the left pane as shown in Figure 3-2. – Select Printable output in the Session logging radio group. This allows you to go back and check the output of certain commands. – Set the Log file name to &H&M&D&T.log so that a time stamp will be in the file name. Figure 3-2 Setting logging 4. In the left pane, click SSH near the bottom as shown in Figure 3-3. 5. On the right side, under the Preferred SSH protocol version, select 2 only. Figure 3-3 Setting SSH Protocol 2 Chapter 3.
6. In the left Category pane, click Terminal as shown in Figure 3-4. 7. Select the Use background colour to erase screen check box, which results in a better job of painting the window for applications that use curses (block graphics). Figure 3-4 Customizing PuTTY SSH settings (Part 1 of 4) 8. Click Window in the left pane as shown in Figure 3-5. 9. You may choose a larger window size and more lines of scrollback. In this example, 50 rows, 100 columns and 1000 lines of scrollback are set.
10.Click Session in the left pane as shown in Figure 3-6. 11.Click Default Settings in the Saved Sessions pane, then click Save. This makes all future sessions that you define inherit the preferences you just set. Figure 3-6 Saving new default settings (Part 3 of 4) Saving sessions To save sessions, perform the following steps. In this example, a session for LINUX00, or the cloner, is saved. Figure 3-7 Customizing PuTTY window settings (Part 4 of 4) Chapter 3.
Now to save a session for each virtual server, perform the following steps: 1. In the Host Name (or IP address) field, enter the TCP/IP address (or DNS name). 2. In the Saved Sessions text area, choose a name that you will remember. In this example, the name LINUX00 (cloner) is used. 3. Again click Save and you should see the name added to the Saved Session list. Now, whenever you start PuTTY, you can simply double-click any saved session name, and an SSH session to the desired Linux system will be invoked.
3.3 3270 emulators To access a logon session with z/VM, it is common to use a 3270 emulator that runs on Windows. Many commercial products are available. Some of the more common ones are: Attachmate Extra! Hummingbird Host Explorer IBM Personal Communications Quick3270 It is beyond the scope of this book to explain the details of configuring all the various emulators.
26 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
4 Chapter 4. Installing and configuring z/VM z/VM can be installed first level from tape, from DVD, or from an FTP server. Installing from tape is not described in this book. However, installing from the physical media of DVDs, or without physical media, from an FTP server, are. To complete this chapter, you must complete the majority of Chapter 6, “Configuring an NFS/FTP server” on page 97. If you are installing z/VM from an FTP server, you should complete 4.
4.1 Installing z/VM from DVD or FTP server This section assumes a first level installation of z/VM from DVD onto 3390 DASD. If you have not already done so, complete the worksheet in 2.7.1, “z/VM resources worksheet” on page 16. For IBM System z9® hardware and older, you will need access to the Hardware Management Console (HMC) with a user ID that has authority to go into single object operations mode, though this is not pertinent for z/VM V6.1 because it installs onto System z10 or later.
12.It may take some time for the order to be prepared. In this example, the email stating that the order was ready for download was received after about four hours. When you receive the email, it will contain the URL for downloading your order. Use a browser to go to that URL. 13.From that address, there will be links to investigate as shown in Figure 4-1.
14.Clicking this link brought up the window shown in Figure 4-2. The first and third check boxes were selected as z/VM is being installed onto 3390 DASD. The 1.3 GB of data was downloaded relatively quickly due to multiple connections being opened through the use of IBM Download Director. Figure 4-2 Choosing two files to be downloaded 15.The z/VM install code should now be staged or ready for the FTP server to be set up.
4. On the Recovery or CPC Recovery menu, double-click the Integrated 3270 Console as shown at the bottom of Figure 4-3. A window entitled “Integrated 3270 Console for ” will open (on older HMC levels, the window may be entitled Personal Communications). Hint: It is convenient to use the Alt-Tab key sequence to move between the HMC window and 3270 console. Figure 4-3 Recovery menu 5. Place the z/VM Product Package Version 6 Release 1.0 DVD in the HMC DVD drive. Chapter 4.
Important: On z10 HMCs and later, it is no longer required to be in Single Object Operations mode to install z/VM. On a z9 HMC and older, get into Single Object Operations mode by performing the following steps: a. Double-click the Groups icon in the Views Area. b. Double-click Defined CPCs in the Groups Work Area. c. Select your CPC. d. If necessary, go around the racetrack (the buttons with circular arrows on the bottom right corner) to the CPC Recovery menu. e.
7. On the Load from Removable Media or Server window shown in Figure 4-4, the Hardware Management Console CD-ROM/DVD radio button should be selected. Figure 4-4 Load from Removable Media or Server window 8. In the same Load from Removable Media or Server window, fill in File Location with /cpdvd.This is the directory on the DVD with the z/VM V6.1 installation code. Click OK.
Setting up an FTP server so as to provide the z/VM product files for installation is described in 6.4, “Enabling the NFS server” on page 100. 9. Load the RAMDISK a. From the Load from Removable Media or Server window, the 610vm.ins file should be selected as shown in Figure 4-6. Click OK. If you are at the HMC installing from DVD, you should see the green light on the DVD drive light up. Figure 4-6 Selecting z/VM V6.1 RAMdisk system b. On the “Confirm the action” window, click Yes. c.
4.1.3 Copying a vanilla z/VM system to DASD This section describes the steps to copy z/VM to DASD. Perform the following steps: 1. You can now get out of Single Object Operations mode (if you are in it). To do so, log off the primary SE window by closing that window. 2. Move to the Integrated 3270 Console window (you can use the Alt-Tab sequence). The RAMdisk should IPL and you should see z/VM boot as shown in Figure 4-8.
3. Invoke the instplan command. This will allow you to choose associated z/VM products to install, the language to use, and the type of DASD on which to install (Figure 4-9): ==> instplan Figure 4-9 Installation planning panel 4. You may need to clear the window with the Esc key. You should then see the display as shown in Figure 4-9. It is recommended that you leave the Ms in the top section alone. 5.
Running INSTDVD The INSTDVD EXEC copies the z/VM system from DVD to disk. Perform the following steps: 1. Execute INSTDVD: ==> instdvd 2. If you are using 3390-3s, you see a panel asking for the five volumes, as shown in Figure 4-10 (if you are using 3390-9s, you will only see three lines). Figure 4-10 INSTDVD DASD address panel a. Enter the addresses of the five volumes (or three for 3390-9s) that z/VM will be installed on.
4.1.4 Performing an IPL of the vanilla z/VM from DASD Perform an IPL of your initial z/VM system now on DASD. Your 3270 Integrated Console session should still be running by performing the following steps: 1. In the HMC Workplace window, your LPAR should still be selected. If not, select your LPAR by clicking it. You may have to first double-click Groups. 2. You should see the Recovery menu. Double-click the Load icon in the menu at the right side. 3. The Load window opens, as shown in Figure 4-11.
6. Move back to the Integrated 3270 Console window. You should see the Standalone Program Loader panel as shown in Figure 4-12. Figure 4-12 Stand Alone Program Loader a. Press the Tab key to get to the IPL Parameters section and enter the value cons=sysg. This specifies to use the Integrated 3270 console. b. Press the F10 key to continue the IPL of your z/VM system. This should take around 1 - 3 minutes. 7. At the Start (Warm|Force|COLD|CLEAN) prompt, enter: ==> cold drain noautolog 8.
2. Run IPL CMS, then press Enter at the VM READ prompt in the lower right corner. You should see the Ready; prompt. ==> ipl cms ==> Press Enter at the VM READ prompt 3. Run the instvm dvd command: ==> instvm dvd ... HCPPLD8329I POSTLOAD EXEC ENDED SUCCESSFULLY ... HCPIVM8392I INSTVM ENDED SUCCESSFULLY This exec continues the installation process. This step should take about 4 - 8 minutes. The last message should be HCPIVM8392I INSTVM ENDED SUCCESSFULLY. 4. Load the recommended service.
Congratulations! You should now have a vanilla z/VM system installed. 4.2 Configuring TCP/IP It is recommended that you initially configure TCP/IP using the IPWIZARD command, which is generally used just once. After IPWIZARD creates the initial configuration files, they are typically maintained manually. From the HMC z/VM logon panel, logon to MAINT. The default password for all z/VM user IDs is the same as the user ID. So enter a password of maint, which will not be echoed on the window.
4. An Interface Name of eth0 (Figure 4-14) is arbitrary but recommended. The Device Number will be the starting address of the OSA triplet that the z/VM stack will use. The IP Address which must be routed to the OSA card will become the TCP/IP address of the z/VM system. The Interface Type will typically be QDIO (layer 3) with modern OSA devices. When completed, press F8. Figure 4-14 IPWIZARD panel 2 Note: To utilize QDIO (layer 2), certain prerequisites must be met. Consult with the system administrator.
6. Enter 1 to restart the TCP/IP stack (you may see other warnings): The TCP/IP stack (TCPIP) must be restarted as part of this procedure Would you like to restart and continue? Enter 0 (No), 1 (Yes) 1 USER DSC LOGOFF AS TCPIP USERS = 2 FORCED BY MAINT ... Successfully PINGed Interface (9.12.5.22) Successfully PINGed Gateway (9.12.4.1) Successfully PINGed DNS (9.12.6.
Search for the XEDIT User’s Guide and Command Reference. Also, there is an old manual available at: http://ukcc.uky.edu/ukccinfo/391/xeditref.html One default setting that can be dangerous, especially if you use F12 to retrieve commands, is that PF12 is set to the FILE subcommand. Sometimes you may not want to save your changes with the stroke of one key.
2. After it is released, you can access the MAINT CF1 disk read-write. Use the LINK command with the multi-read (MR) parameter and ACCESS command to get read-write access as your F disk. ==> link * cf1 cf1 mr ==> acc cf1 f 3. Make a backup copy of the vanilla SYSTEM CONFIG file using the COPYFILE command with the OLDDATE parameter so that the time stamp of the file is not modified. Note that because the target file name (system) and mode (f) are the same, the equal sign (=) can be used as a wildcard.
Modify the two starting addresses of the OSA triplets (B440 and B424 in this example) to those you specified in 2.7.1, “z/VM resources worksheet” on page 16. ====> bot ====> a3 /* define vswitch named vsw1 and set MAC address prefixes to 02-00-01 */ define vswitch vsw1 rdev B440 B424 vmlan macprefix 020001 8. Save your changes with the XEDIT FILE subcommand: ====> file 9.
There is no logmsg data FILES: NO RDR, NO PRT, NO PUN LOGON AT 09:29:16 EST FRIDAY 11/20/09 DMSIND2015W Unable to access the Y-disk. Filemode Y (19E) not accessed z/VM V6.1.0 2009-11-19 13:47 ==> acc (noprof 4. Copy the PROFILE XEDIT from the MAINT 191 disk so that XEDIT sessions will have a common interface among user IDs. a. Use the VMLINK command to both link to the disk read-only and to access it as the highest available file mode.
7. Save your changes with the FILE subcommand: ====> file 8. Log off of AUTOLOG1: ==> log When you perform an IPL of your z/VM system, the TCP/IP stack should now come up automatically (as long as you do not specify the notautolog parameter at IPL time). 4.5.1 Renaming the TCPIP configuration file We recommend that you change the name of the main TCPIP configuration file from PROFILE TCPIP to TCPIP, where is the name of your new z/VM system.
4.5.3 Configuring the FTP server Turn on the FTP server by editing the renamed configuration file: 1. Edit the file ==> x poksnd61 tcpip d 2. Add an AUTOLOG statement near the top of the file with FTPSERVE as the only entry. 3. In the PORT statement, remove the semicolons to uncomment the lines with FTPSERVE on them (ports 20 and 21). These changes will cause the FTP server to start when TCPIP is started.
This console is always accessible whether you are logged on to the HMC or not. z/VM messages during both the shutdown and IPL process will be written to the system console, but often you will be able to ignore them—you just want your system back in a few minutes over the network. To shut down and perform an IPL of the system, perform the following steps: 1.
It is recommended that you add at least three paging volumes, giving you a total of four (or one more 3390-9). Having adequate paging space will give you plenty of headroom to add more Linux virtual machines. A rule of thumb for the amount of paging space is to have twice as much as the total of all memory for all running Linux user IDs combined. 4.6.
... ftp> quit You should now have the CPFORMAT EXEC on the MAINT 191 disk. Using the CPFORMAT EXEC To use the CPFORMAT EXEC, perform the following steps: 1. Log back into MAINT. You should now have access to the CPFORMAT EXEC.
ARE YOU SURE you want to format the DASD y ... DASD status after: TargetID Tdev OwnerID Odev Dtype Vol-ID MAINT 6285 MAINT 6285 3390 UP6285 MAINT 6286 MAINT 6286 3390 UP6286 MAINT 6287 MAINT 6287 3390 UP6287 as PAGE space (y/n)? Rdev 6285 6286 6287 StartLoc 0 0 0 Size 3339 3339 3339 This formatting job should run for about 10-30 minutes, depending on many factors. 4.6.
DASD status after: TargetID Tdev OwnerID MAINT 6289 MAINT MAINT 6290 MAINT MAINT 6293 MAINT MAINT 6294 MAINT MAINT 63A2 MAINT MAINT 63A9 MAINT Odev 6289 6290 6293 6294 63A2 63A9 Dtype 3390 3390 3390 3390 3390 3390 Vol-ID UM6289 UM6290 UM6293 UM6294 UM63A2 UM63A9 Rdev 6289 6290 6293 6294 63A2 63A9 StartLoc 0 0 0 0 0 0 Size 3339 3339 3339 3339 10017 10017 You should now have newly formatted volumes that can be used for minidisks. 4.6.
CP_Owned CP_Owned Slot Slot 10 11 RESERVED RESERVED ... 5. Move down to the User_Volume_List section. User volumes (PERM) can be specified individually with the User_Volume_List statement, or with wild cards using the User_Volume_Include statement.
4.6.4 Testing the changes It is recommended that you again shut down and perform an IPL to test the changes. Before you shut down, note that you have only one page volume (UV6282 in this example) using the QUERY ALLOC PAGE command.
Perform the following steps: 1. Edit the USER DIRECT file and add the following user ID definition to the bottom of the file. A comment is added signifying the split between z/VM system user IDs and locally added user IDs (this can be helpful when moving to a new version of z/VM): ==> x user direct c ====> bottom ====> a 9 ...
Now search for all the gaps using the ALL subcommand.
9. Now that you are sure the minidisk layout is correct, the changes to the USER DIRECT file can be brought online using the DIRECTXA command: ==> directxa user z/VM USER DIRECTORY CREATION PROGRAM - VERSION 6 RELEASE 1.0 EOJ DIRECTORY UPDATED AND ON LINE HCPDIR494I User directory occupies 43 disk pages If the DIRECTXA command fails, correct the problem before proceeding. You have now defined your first z/VM user ID named LNXMAINT. 4.7.
4. You have now formatted the two minidisks and accessed them as file modes A and D. You can confirm this with the QUERY DISK command: ==> q disk LABEL VDEV LNX191 191 LXM192 192 MNT190 190 MNT19E 19E M STAT A R/W D R/W S R/O Y/S R/O CYL 20 300 100 250 TYPE 3390 3390 3390 3390 BLKSZ 4096 4096 4096 4096 FILES 0 0 694 1021 BLKS USED-(%) BLKS LEFT 7-00 3593 11-00 53989 15028-83 2972 28254-63 16746 BLK TOTAL 3600 54000 18000 45000 4.7.
2. You could test your changes by logging off and logging back on. However, typing the command PROFILE will do the same: ==> profile DMSACP723I E (592) R/O 3. By default CMS tries to access the 191 disk as A and the 192 disk as D. Also, you should have the TCPMAINT 592 disk accessed as E.
250 Working directory is LNXMAINT 192 ftp> prompt Interactive mode off ftp> mput * ... ftp> quit 4. Log on to LNXMAINT.
2. Make a copy of the working PROFILE EXEC: ==> copy profile exec a = execwrks = 3. Edit the file and add the emboldened text. A LOGOFF command is added at the end of the EXEC so that the virtual machine will be logged off when it is complete. This will save a small amount of memory on the system, but does add the requirement that you type acc (noprof at the VM READ prompt when you log on interactively.
... ==> q signal shutdown System default shutdown signal timeout: 300 seconds This output shows that your changes have taken effect. 4.9 Addressing z/VM security issues This section briefly discusses the following security issues. z/VM security products High-level z/VM security Linux user ID privilege classes z/VM user ID and minidisk passwords 4.9.1 VM security products You might want to use a z/VM security product such as IBM RACF® or CA VM:Secure.
4.9.5 Changing passwords in USER DIRECT Changing the passwords can be done manually in XEDIT. However, this is both tedious and error-prone. An XEDIT macro named CHPW610 XEDIT can be used. The source code for this can be found at: http://www.vm.ibm.com/devpages/mikemac/SG247932.tgz This macro changes all z/VM passwords to the same value, which may still not be adequate security given the different function of the various user IDs.
Note that this XEDIT macro will only work on a vanilla USER DIRECT file because it searches for the original user IDs next to passwords. If you want to change your password again, it should be much easier because you can use the XEDIT CHANGE subcommand.
To understand this possibility, refer to Figure 4-16. The z/VM system with the lower device addresses starting at E340 should perform an IPL fine (though you may see a warning at system startup time about duplicate volume labels). However, if the z/VM system starting at device address F000 performs an IPL, the 540RES volume will be used, but the remaining volumes in the system are searched for by volume label, not by device address.
2 3 4 5 6 ... 610SPL 610PAG 610W01 610W02 MPD855 D851 D852 D853 D854 D855 Own Own Own Own Own Online Online Online Online Online and and and and and attached attached attached attached attached 3. To modify the labels in the SYSTEM CONFIG file, begin by releasing the A CP-disk and access it read-write. Back up the SYSTEM CONFIG file: ==> cprel a CPRELEASE request for disk A scheduled. HCPZAC6730I CPRELEASE request for disk A completed.
7. Release and detach the F disk, CPACCESS the A disk, and verify with the QUERY CPDISK command: ==> rel f (det DASD 0CF1 DETACHED ==> cpacc * cf1 a CPACCESS request for mode A scheduled. Ready; T=0.01/0.01 09:19:57 HCPZAC6732I CPACCESS request for MAINT's 0CF1 in mode A completed.
For reference, here are the entries in the USER DIRECT file: ... USER $PAGE$ NOLOG MDISK A03 3390 000 END 610PAG R .. MDISK 122 3390 000 END 610SPL MR MDISK 123 3390 000 END 610RES MR MDISK 124 3390 000 END 610W01 MR MDISK 125 3390 000 END 610W02 MR ... Perform the following steps: 1. Use the CPFMTXA command to relabel the five system volumes (you will only need the first three if you installed onto 3390-9s). Be sure to watch for a return code of 0 on each command: ==> ... ==> ... ==> ==> ... ==> ... ==> ..
3. Use the circular arrow racetrack buttons to get to the CPC Recovery (or just Recovery) menu. 4. Double-click the Integrated 3270 Console menu item. A new window should appear. 5. Double-click the LOAD menu item. The Load Address (D850 in this example) and Load Parameter (SYSG) fields should be correct from the previous IPL. 6. Select Clear. The Load Address and Load Parameter fields should be correct from the previous IPL. Click OK. 7. Click Yes on the Load Task Confirmation window. 8.
4.12 Restoring your z/VM system from tape It is good to practice to restore a system. You do not want to be doing your first restore when the pressure is on. Restoring a z/VM system from tape that has the same set of volume labels as the system that is running is problematic. If there are two z/VM systems on the same LPAR with the same volume labels, both systems cannot be IPLed cleanly. If you have backed up your system in 4.
5 Chapter 5. Servicing z/VM This chapter describes how to apply the two main types of service: A Recommended Service Upgrade (RSU), which is analogous to a Service Pack. A Programming Temporary Fix (PTF), which is analogous to a bug fix. The processes to install these types of service are basically the same. Important: When applying service, there is always a chance that you may want to back it out. It is recommended that you have an up-to-date backup of your system before starting this section.
The body of the page should look similar to Figure 5-1. Figure 5-1 z/VM Service main web page You may want to consider viewing some of the links from this page. The following sections comprise this chapter: “Applying a Recommended Service Upgrade” on page 74 “PTFs for the zEnterprise 196” on page 82 “Determining the z/VM service level” on page 87 “Applying a PTF” on page 88 5.
First determine whether your system needs service. Use the QUERY CPLEVEL command: ==> q cplevel z/VM Version 6 Release 1.0, service level 0901 (64-bit) Generated at 09/11/09 16:51:48 EDT IPL at 08/31/10 08:44:19 EDT The service level (or RSU) is a 4-digit field composed of two segments, each consisting of two digits. The first two digits represent the last two digits of the year and the second two digits represent the sequential RSU level within that year. Some examples are 0903RSU and 1002RSU.
5.1.2 Downloading the service files In this example, the service files are staged on a desktop machine, then copied to z/VM with FTP. Perform the following steps: 1. Download the files to your desktop or another staging system. This example has two files: the SHIPTFSS file is for the PSP bucket and the SHIPRSU1 file is for the RSU. 2. FTP the file to the MAINT 500 disk. Here is an example of using FTP from a DOS session: C:\Downloads>ftp 9.60.18.249 User (9.60.18.249:(none)): maint Password: ftp> cd maint.
5.1.3 Creating a new MAINT minidisk Important: Normally, this step is not necessary. Some RSUs can be so large that they will not fit on the MAINT 500 minidisk. This is the case with the stacked RSU 5405 for z/VM V5.4. If you have adequate space to extract the files on the MAINT 500 disk, you can skip this section. If you received the error DMSERD107S Disk C(500) is full on the previous step, creating a new minidisk for MAINT will be necessary. If so, perform the following steps: 1.
3. Move the large RSU file from the MAINT 500 (C) to the 501 (F) disk and query the disks: ==> copy s8873950 shiprsu1 c = ==> erase S8873950 shiprsu1 c ==> q disk LABEL VDEV M STAT CYL TYPE TOTAL MNT191 191 A R/W 175 3390 31500 MNT5E5 5E5 B R/W 9 3390 1620 MNT500 500 C R/W 600 3390 108000 MNT51D 51D D R/W 26 3390 4680 MNT501 501 F R/W 400 3390 72000 ...
Then the same steps were needed for many other components. The process is much easier now with the SERVICE ALL command. On the other hand, the previous method is more granular and better enables the system administrator to know which pieces of service have been applied. Perform the following steps: 1. Apply the service with the SERVICE ALL command. The RSU must be applied first (S8873950 SERVLINK in this example). Then any PTFs that came after the RSU can be applied: ==> service all S9338766 ...
CK:VMFSUI2104I CK: CK:VMFSUI2104I CK: WN:VMFBDC2250W WN: WN:VMFBDC2250W PTF UM32501 contains user information. Review the :UMEMO section in file UM32501 $PTFPART PTF UM32654 contains user information.
5.1.5 Putting the service into production This section describes how to use the PUT2PROD command to put the service into production. Important: The PUT2PROD command will affect your production environment. We recommend that all users be logged off before running it. Placing service into production should be performed as part of a planned system outage because a SHUTDOWN REIPL is recommended after running it. Perform the following steps: 1. Use the PUT2PROD command to put the service into production.
5. To load the new CP load module, use the SHUTDOWN REIPL command. When your system comes back up, it should be at the new CP service level, in this example 0903: ==> shutdown reipl iplparms cons=sysc HCPSHU960I System shutdown may be delayed for up to 330 seconds Ready; T=0.01/0.01 11:12:32 6. After the system comes back up in a few minutes, start a new 3270 session and log on as MAINT. 7. Run the QUERY CPLEVEL command again: ==> q cplevel z/VM Version 6 Release 1.
APAR Component Description VM64774 CP Set/Query reorder command VM64747 HCM HCM support for zEnterprise 196 VM64799 CMS IOCP support for zEnterprise 196 VM64891 CP HIPER data corruption issue in VM64709, EAV support Because support for HCD and HCM was not necessary for the system used in the examples in this book, only the PTFs for the following APARs were ordered from ShopzSeries: VM64774, VM64798, VM64879, VM64881, VM64793, VM64820, VM64814, VM64807, VM64799, VM64818, and VM64891. 5.2.
5. In Step 3 of 5, enter the APAR numbers as shown in Figure 5-3. Figure 5-3 Specifying service order contents 6. In Step 4 of 5, specify your delivery options. In this example, Internet was chosen as the preferred media, and no alternate method was chosen. Click Continue. 7. In Step 5 of 5, review your order and click Submit when it is correct. 8. You can leave that web page up and click Refresh order status from time to time.
10.Download the two documentation envelopes and the two PTF envelopes to your workstation or other staging system. 11.Complete the steps in a similar fashion to those starting at 5.1.2, “Downloading the service files” on page 76. This completes the process of applying the SES PTFs (with file types ending in S). 12.Refer to the following section to apply the non-SES PTF (with file types ending in N).
7. This should create the file DISK MAP on your A disk.
'service cp status VM64814' 'service cms status VM64799' 'service cp status VM64818' ==> check910 VMFSRV2760I SERVICE processing started VMFSRV1226I CP (6VMCPR10%CP) APAR VM64774 (PTF UM33169) status: VMFSRV1226I RECEIVED 11/05/10 13:52:51 VMFSRV1226I APPLIED 11/05/10 13:52:52 VMFSRV1226I BUILT 11/05/10 13:53:57 VMFSRV1226I PUT2PROD 11/05/10 13:55:55 VMFSRV2760I SERVICE processing completed successfully ... Verify that all of the APARs are reported as received, applied, built, and put into production. 5.
This shows the controller is named DTCVSW1. 3. Use the NETSTAT command with the controller name to determine the maintenance of the TCPIP MODULE: ==> netstat tcp dtcvsw1 level VM TCP/IP Netstat Level 540 TCP/IP Server Name: DTCVSW1 IBM 2084; z/VM Version 5 Release 4.0, service level 0903 (64-bit), VM TCP/IP Lev el 540; RSU 0903 running TCPIP MODULE E2 dated 12/17/09 at 10:53 TCP/IP Module Load Address: 00C21000 4. This shows information about the TCPIP MODULE.
5.4.1 Getting service using ShopzSeries Service for z/VM is still available on the media of tape. However, getting service over the Internet is more convenient and becoming more common. Typically this is done with IBM ShopzSeries. Perform the following steps: 1. Click the link IBM ShopzSeries under the IBM Support Portals heading on the main Service page, as shown in Figure 5-1 on page 74. This should take you to the following address: https://www14.software.ibm.com/webapp/ShopzSeries/ShopzSeries.jsp 2.
Farther down the page, note the Fixed component name, which is important. In this example it is VM CP shown near the bottom of Figure 5-6. Figure 5-6 Web page for APAR VM64670 At the bottom of the page the “Applicable component levels” section shows that PTF UM32811 is available for z/VM V6.1. Before getting that PTF, you may want to be sure that it has not already been applied. 5.4.2 Determining whether a PTF has been applied Check to make sure that the PTF has not previously been applied.
5.4.3 Downloading the service to z/VM Perform the following steps: 1. From the previous APAR web page search, the link for UM32811 is clicked, which results in a web page that should be similar to the one shown in Figure 5-7. Figure 5-7 Getting fixes from ShopzSeries on IBMLink 2. In this example, the link ShopzSeries - Electronic or physical delivery is selected. Sign into ShopzSeries with your IBM ID and follow the five self-explanatory steps to order your PTF.
4. Point your browser to the link in the email. You should see a web page similar to the one shown in Figure 5-8. Figure 5-8 Web page created for downloading a PTF 5. Choose a method of downloading the VMSES PTF Envelope for your order to your desktop machine. You may also choose to download the VMSES Documentation Envelope. 6. There should be a SES envelope (the PTF or PTFs themselves) and a documentation envelope. Copy both to z/VM in binary with fixed 1024-byte records to the MAINT 500 disk.
8. Access the MAINT 500 disk as C: ==> acc 500 c DMSACC724I 500 replaces C (2CC) 9. The envelope files arrive in a compressed format to speed downloads. In order to use them they must first be renamed to have a file type of SERVLINK and uncompressed with the DETERSE command. Therefore, we recommend to leave the file name of the SES envelope unchanged, but to change the prefix letter of the documentation envelope to D.
$VMFP2P $VMFINS $MSGLOG $MSGLOG A1 V A1 V 80 80 805 163 15 11/19/09 13:52:09 3 11/19/09 13:47:25 4. Invoke the VMFVIEW SERVICE command to review the results of the previous SERVICE command. Press the F3 key to quit. Here is an example: ==> vmfview service ===> VMFVIEW - Message Log Browse of $VMFSRV $MSGLOG A1 <=== You are viewing ¬ST: messages from the LAST run.
5.4.6 Checking for APARMEMO files After you have applied the PTFs, you should check for files with a file type of APARMEMO on the MAINT 500 disk. These files may have additional instructions on work to do after the PTFs have been applied. Perform the following steps: 1. Access the MAINT 500 disk as C and list the files with file type APARMEMO: ==> acc 500 c ==> listfile * aparmemo c 6VMCMS10 APARMEMO C1 In this example, there is one APARMEMO file. 2.
96 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
6 Chapter 6. Configuring an NFS/FTP server A common method of installing Linux on z/VM on a server is over the network from another server using the Network File System (NFS). To accomplish this task, you should use a PC system that has Linux installed on it. This server supplies both the RHEL 6 distribution and the files associated with this book. The server must have at least 4 GB of free disk space.
6.1 Installing Linux on the PC If you do not have a Linux PC, then you must get access to a PC in the network and install Linux onto it. Describing that installation is outside the scope of this book. However, installing the same distribution onto a PC server on which you plan to install IBM System z is recommended.
You can also click the Contact Sales link at the left of the page or call 1-888-733-4281. 6.3.1 Copying from physical CDs or a DVD RHEL 6 is distributed on physical CDs or files that are ISO images of CDs. RHEL 6 is also distributed on a single physical DVD disc as a single ISO image. It is easier to work with a single DVD ISO image than to work with multiple CD ISO images, so this approach is recommended. In the event that you have a physical DVD, but not an ISO image, you should create an ISO image.
6.3.3 Copying the DVD contents Copy the contents of the ISO image to the file system. Temporarily mount it on a new tmp/ directory using a loopback device: # cd /nfs # mkdir tmp # mount -o loop rhel-server-6.0-s390x-dvd.iso tmp List the contents of the mounted ISO image: # ls tmp EULA eula.en_US generic.ins ... README-pa.html README-pt_BR.html README-ru.html RELEASE-NOTES-ml.html RELEASE-NOTES-mr.html RELEASE-NOTES-or.
The directories to export with NFS are in the /etc/exports configuration file. Export the /nfs/rhel6/ directory to make the installation tree available and /nfs/virt-cookbook-RH6/ to make the files associated with this book available. First, make a backup copy of the file. Then edit the original copy and add the two directories as follows: # cd /etc # cp exports exports.
6.5 Configuring an FTP server for z/VM installation This section assumes that you have access to the z/VM V6.1 installation code in electronic format. Ordering it through ShopzSeries is briefly described in 4.1.1, “Obtaining z/VM through electronic download” on page 28. If you have completed that section, you may have the two z/VM product install files staged on a intermediate workstation, or you may be ready to download them from the Internet. 6.5.
inflating: cpdvd/CKD50000 ... You should now have all the z/VM product installation files in place under the /ftp/zvm61/cpdvd/ directory. 6.5.2 Installing and configuring the FTP server An FTP server must be installed and configured. The vsftpd FTP server is recommended. This section shows how to configure it as an anonymous FTP server. To accomplish these tasks, perform the following steps: 1. Use the rpm -qa command to see if the RPM is installed: # rpm -qa | grep ftpd 2.
5. Set the vsftpd service to start at boot time by using the chkconfig command and, for this session, with the service command: # chkconfig vsftpd on # service vsftpd start Starting vsftpd for vsftpd: [ OK ] An anonymous FTP server should now be running with the z/VM V6.1 directory in /cpdvd (relative to the anonymous FTP root directory). 6.5.3 Testing the anonymous FTP server Test your setup by using FTP to log in as an anonymous user from another system.
7 Chapter 7. Installing RHEL 6 on the cloner By now, you must have created a new z/VM user ID named LNXMAINT. Now it is time to create the first Linux user ID, which is named RH6CLONE. This Linux ID is used for the cloner installation server, and serves as the administration point for future Linux IDs. This server is referred to as the cloner.
7.1 Installing the cloner In this section, you install the RHEL 6 cloner under the RH6CLONE user. This cloner is the guest server that will serve as the installation and file server for future Linux guests. 7.1.1 Creating the RH6CLONE user ID In this section, you define the RH6CLONE user ID in z/VM by performing the following steps: 1.
Important: In the past, only two virtual CPUs were recommended for the next step. With the new cpuplugd service (see 13.7, “Using the cpuplugd service” on page 224), this recommendation has changed to be the same number as the physical CPUs. This setting could have the side effect of allowing a single Linux virtual machine to consume a large amount of CPU resource. You may consider leaving this setting at two for now. 4.
OPTION LNKNOPAS APPLMON MDISK 100 3390 0001 3338 UM6290 MR LNX4VM LNX4VM LNX4VM MDISK 101 3390 0001 3338 UM6293 MR LNX4VM LNX4VM LNX4VM MDISK 102 3390 0001 3338 UM6294 MR LNX4VM LNX4VM LNX4VM * This Linux user ID will have the minidisks and virtual disks (VDISKs) shown in Table 7-1. Table 7-1 Minidisks to be defined Minidisk or VDISK Description 100 The root file system of the Linux cloner. This system serves as the administration point for all your Linux virtual servers.
7.1.2 Adding RH6CLONE to AUTOLOG1 PROFILE EXEC The new Linux ID you defined needs access to the VSWITCH. A SET VSWITCH command with the GRANT parameter can be added to AUTOLOG1 PROFILE EXEC to accomplish this task. Also, an XAUTOLOG statement can be added if the user ID is automatically logged on at z/VM IPL time. Other examples show how to log off of MAINT and log on to AUTOLOG1. You can also modify the file by linking to the AUTOLOG1 191 disk read/write. Perform the following steps: 1.
perform an IPL of the reader. A sample RHEL 6 parameter file, configuration file, and installation EXEC are supplied and should be on the LNXMAINT 192 disk (this task is described in 4.7.5, “Copying the files associated with this book to LNXMAINT” on page 61). Therefore, only the kernel and RAM disk need to be copied. Perform the following steps: 1. Start an SSH session as root on the NFS server. 2. Use the ftp command to copy the RHEL 6 kernel and initial RAM disk to the LNXMAINT D disk.
6. Verify that the RHEL6 EXEC file has the correct information.
9. Linux user IDs will obtain their PROFILE EXEC file from LNXMAINT 192. This file runs when you press Enter at the VM READ prompt. It creates two VDISKs with the SWAPGEN EXEC file, which will be used later to swap spaces. It also performs a few other functions, including performing an IPL of Linux automatically if the virtual machine is logged on disconnected.
DMSACP723I A (191) R/O DMSACP723I C (592) R/O DIAG swap disk defined at virtual address 300 (64989 4K pages of swap space) DIAG swap disk defined at virtual address 301 (129981 4K pages of swap space) Do you want to IPL Linux from minidisk 100? y/n n 4. To begin the installation program, run the RHEL6 EXEC command. You should see many panels of questions and answers scrolling by. If you use the default parameter file shipped with RHEL 6, you would have had to answer all the networking questions manually.
Important: If the DASD you are using has never been formatted for Linux, you may get many screens of warning messages similar to the following on your 3270 session: dasd(eckd): dasd(eckd): dasd(eckd): dasd(eckd): I/O status report for device 0.0.0100: in req: 000000000e027ee8 CS: 0x40 DS: 0x0E device 0.0.0100: Failing CCW: 000000000e027fd0 Sense(hex) 0- 7: 00 08 00 00 04 ff ff 00 This is not a problem, as you just have to clear the panel many times or the installation process will freeze.
7. From your workstation, use your SSH client (for example, PuTTY) to connect to the IP address and begin the installation. When prompted for a user name, enter install. A password will not be required. Figure 7-1 shows the initial panel of the installer. Use the Tab key to move between fields. Use the arrow keys to move among choices and Enter to select a choice. Figure 7-1 Initial panel of installer 8. The Choose a Language panel should appear.
waiting for hardware to initialize... Running anaconda 13.21.82, the Red Hat Enterprise Linux system installer please wait. 14:55:55 Starting VNC... 14:55:56 The VNC server is now running. 14:55:57 You chose to execute vnc with a password. 14:55:57 Please manually connect your vnc client to gpok223.endicott.ibm.com:1 (9.60.18.223) to begin the install. 14:55:57 Starting graphical installation. 12.
7.1.5 Stage 2 of the RHEL 6 installation After you have connected using VNC, perform the following steps: 1. A splash window appears, as shown in the top half of Figure 7-4. Click Next. 2. You will be asked what type of devices to use, as shown in the bottom half of Figure 7-4. Choose Basic Storage Devices and click Next. Figure 7-4 Splash window and device type window Chapter 7.
3. You might see the Unformatted DASD Devices Found window, as shown in Figure 7-5. If the disks you are installing onto have been previously formatted by dasdfmt, you will not see this window. Figure 7-5 An example of the Unformatted DASD Devices Found window 118 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
7.1.6 Working around a known issue Important: If the minidisks 100-102 (dasdb-dasdd) have not been formatted for Linux by dasdfmt before this installation, you should see the window shown in Figure 7-5 on page 118. However, there is a known issue in RHEL 6 where this window does not open and you do not have the ability to format the disks through the installer. If you proceed without formatting the disks with dasdfmt, the installation process will fail later.
7.1.7 Continuing the installation Continue your installation by performing the following steps: 1. Click the Reinitialize All button when prompted to initialize the VDISK as 300, as shown in Figure 7-6. Figure 7-6 Reinitializing disks 2. In the next window, you set the host name. This should be read from the configuration file. Click Next. 3. Select your time zone and click Next. 4. Set the root password and click Next.
5. The installer now searches for a previous installation. It is important to select the Create Custom Layout radio button, as shown in Figure 7-7, as other choices will use VDISKs as physical volumes for a large volume group. VDISK data is not persistent across reboots. Click Next. Figure 7-7 Creating custom disk layout Chapter 7.
6. The next window that opens requires you to move disks from data storage devices to installation target devices, as shown in Figure 7-8. Move all disks to the right by selecting and clicking the right arrow, or by simply double-clicking each disk. When you are finished, click Next. Figure 7-8 Moving disks to become installation targets 122 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
7. The Please Select A Device window allows you to set up minidisks and VDISKs. Click the Create button and the Create Storage window opens, as shown in the right side of Figure 7-9. Accept the default of Standard Partition and click Create. Figure 7-9 Disk setup before creating a volume group 8. In the Add Partition window, create a swap space on /dev/dasdb with a size of 512 MB by choosing the selections shown in the left half of Figure 7-10 and click OK.
10.Use the Create button to create a LVM physical volume from /dev/dasdc by performing the following steps: a. Select the LVM Physical Volume radio button on the Create Storage window and click Create. b. On the Add a Partition window, select the allowable drive (dasdc). c. On the Additional Size Options window, select the Fill to maximum allowable size radio button. d. Click OK. 11.Repeat the previous step and create an LVM physical volume from /dev/dasdd. 12.
13.The next step is to set up LVM. Perform the following steps: a. Click Create and the Create Storage window opens. b. Select the LVM Volume Group radio button and click Create. The Make LVM Volume Group window opens, as shown on the left side of Figure 7-12. c. Set the Volume Group Name to nfs_vg. d. Click Add under the Logical Volumes section. The Make Logical Volume window opens. e. Set the Mount Point to /nfs and the Logical Volume Name to nfs_lv, as shown on the right side of Figure 7-12. Click OK. f.
Important: If you see the window shown in Figure 7-13 on page 126, you have to start the installation over, this time using dasdfmt to format the minidisks. See 7.1.6, “Working around a known issue” on page 119. Figure 7-13 Symptom of a known issue 17.You will be prompted for the type of software to be installed. Accept the default of Basic Server and click Next. The installation process will start. This will run for 5 to 10 minutes 18.You will be prompted to reboot. Click Reboot. 7.1.
You system should continue to boot until a login prompt is presented. Start an SSH session to the master image as root. At this point, you can disconnect from the 3270 session by running the following command: ==> #cp disc 7.2 Configuring the cloner Now that your cloner is installed, it must be configured.
3. Unmount the RHEL 6 installation tree and repeat the process to copy the files associated with this book: # cd / # umount /mnt # mount 9.60.18.240:/nfs/virt-cookbook-RH6 /mnt # mkdir /nfs/virt-cookbook-RH6 # cd /mnt # rsync -av * /nfs/virt-cookbook-RH6 sending incremental file list README.txt clone.sh vm/ vm/chpw610.xedit vm/cpformat.exec vm/profile.exec vm/sample.conf-rh6 vm/sample.parm-rh6 vm/swapgen.exec sent 65178 bytes received 168 bytes total size is 64620 speedup is 0.99 130692.
Note: Red Hat signs each RPM with a private GPG key, which is compared to your public key every time a package is installed. This method ensures that the RPM is a genuine, unaltered package. When installing an RPM, if you ever see a message similar to Header V3 DSA signature: NOKEY, key ID 897da07a, then either the correct GPG key has not been imported, or the package itself has been altered. You are now ready to use yum to install or upgrade an RPM package.
rsyslog sshd sysstat udev-post xinetd 0:off 0:off 0:off 0:off 0:off 1:off 1:off 1:on 1:on 1:off 2:on 2:on 2:on 2:on 2:off 3:on 3:on 3:on 3:on 3:on 4:on 4:on 4:on 4:on 4:on 5:on 5:on 5:on 5:on 5:on 6:off 6:off 6:off 6:off 6:off 7.2.5 Configuring the VNC server Often, applications require a graphical environment. The Virtual Network Computing (VNC) server allows for a graphical environment to be set up easily by starting the vncserver service. Perform the following steps: 1.
... xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & mwm & 7. Restart the VNC server with the service command: # service vncserver restart Shutting down VNC server: 1:root [ OK ] Starting VNC server: 1:root New 'gpok223.endicott.ibm.com:1 (root)' desktop is gpok223.endicott.ibm.com:1 Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/gpok223.endicott.ibm.com:1.log [ OK ] 8.
# pressed. Usually used to shut down the machine. start on control-alt-delete exec /sbin/shutdown -h now "Control-Alt-Delete pressed" After that change, when the system receives a SIGNAL SHUTDOWN from z/VM, the following message will be displayed: The system is going down for halt NOW! 7.2.7 Turning on the NFS server The NFS server will be needed to export the RHEL 6 installation tree and the files associated with this book to the other virtual servers. Enable NFS by performing the following steps: 1.
7.2.8 Configuring SSH keys SSH sessions are typically authenticated with passwords entered on the keyboard. With SSH key-based authentication, sessions can be authenticated with public and private keys so that no password is needed. SSH key-based authentication can be set up from the cloner (client) to the virtual servers. If the master image has a copy of cloner’s public key in the /etc/ssh/authorized_keys file, then key-based authentication will work on the cloned virtual servers.
7.2.10 Changing the order of the swap disks It is likely that the order of swap space priority is not optimal. Perform the following commands: 1. View the order of the swap space with the swapon -s command: # swapon -s Filename Priority /dev/dasda2 /dev/dasdb1 /dev/dasdc1 Type Size Used partition partition partition 524296 262132 524276 0 0 0 -1 -2 -3 This shows that the minidisk swap space will be used before the VDISK.
7.2.12 Rebooting the system You should now reboot the system to test the changes: # reboot Broadcast message from root@gpok223.endicott.ibm.com (/dev/pts/0) at 7:27 ... The system is going down for reboot NOW! After your system comes back online in a couple of minutes, start a new SSH session to the cloner. 7.2.13 Verifying the changes You are now done customizing the Linux cloner. SSH back into the cloner and check a few settings.
136 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
8 Chapter 8. Installing and configuring the golden image In this chapter, you install the copy of Linux that will be cloned. This copy of Linux is called the golden image. This copy should be as basic as possible so that it can be used as a generic virtual server and fit comfortably on two 3390-3 DASD.
8.1 Installing the golden image In this section, you will install the RHEL 6 golden image under the RH6GOLD user ID. 8.1.1 Creating the RH6GOLD user ID In this section, you define the RH6GOLD user ID to z/VM. Perform the following steps: 1. Log on to MAINT and edit the USER DIRECT file: ==> x user direct c 2. Go to the bottom of the file and add the definition for a new user ID named RH6GOLD. This user ID is given class G privileges only.
4. Run DISKMAP to check for overlaps and gaps. You should only see the single 501 cylinder gap: ==> diskmap user ==> x user diskmap ====> pre off ====> all /gap/|/overlap/ --------------------------------------====> quit 0 500 501 line(s) not displayed -------------------0 0 1 391 line(s) not displayed -------------------- GAP 6 GAP 5. When the disk layout is correct, run DIRECTXA to bring the changes online: ==> directxa user z/VM USER DIRECTORY CREATION PROGRAM - VERSION 5 RELEASE 3.
2. These changes will not take effect until the next IPL, so you must grant this user ID access to the VSWITCH for this z/VM session: ==> set vswitch vsw1 grant rh6gold Command complete 8.1.3 Preparing the RH6GOLD bootstrap files Now that the RH6GOLD user is defined, you must create the PARM and CONF configuration files used by the RHEL 6 installer. To save time, you should copy the RH6CLONE PARM-RH6 and RH6CLONE CONF-RH6 files, then make the necessary changes. Perform the following steps: 1.
Perform the following steps: 1. Log on to RH6GOLD. The PROFILE EXEC file from the LNXMAINT 192 disk should prompt you to perform an IPL of the 100 minidisk. Because there is nothing installed yet, answer no. LOGON RH6GOLD NIC 0600 is created; devices 0600-0602 defined z/VM Version 6 Release 1.0, Service Level 1002 (64-bit), built on IBM Virtualization Technology There is no logmsg data FILES: 0003 RDR, NO PRT, NO PUN LOGON AT 07:41:38 EDT WEDNESDAY 09/29/10 z/VM V6.1.
5. There will be many, many panels of DASD I/O messages. Use the CP TERM MORE command to make the 3270 panel clear instantly: ==> #cp term more 0 0 You should see the following message: Initial configuration completed. Starting sshd to allow login over the network. Connect now to 9.60.18.222 and log in as user install to start the installation. E.g. using: ssh -x install@9.60.18.222 You may log in as the root user to start an interactive shell. 6.
11.A warning window opens, as shown in Figure 8-1. Click Re-initialize all. The mindisks are formatted before Linux is copied to them. Figure 8-1 Disk initialization window 12.In the window that sets the host name, the value read from the configuration file should be correct. Click Next. 13.Set the time zone and click Next. 14.Set the root password and click Next. 15.In the type of installation window, select Create Custom Layout and click Next.
19.In the Add Partition window, shown in Figure 8-2, set the Mount Point to the root file system (/), clear all drives except dasdb, and set the Size (MB) to 512. Click OK. Figure 8-2 Defining the root file system 20.In the Create Storage window, choose Standard Partition and click Create again and create a 512 MB swap space, which is also on dasdb. 21.
22.Create partitions with a File System Type of swap with dasdd (virtual disk 300) and dasde (virtual disk 301). When you return to the Please Select A Device window, you should see the window shown in Figure 8-3. Figure 8-3 Defining file systems for logical volumes and swap spaces 23.Click Create and in the resulting Create Storage window, choose the LVM Volume Group and click Create again. 24.In the Make LVM Volume Group window, set the Volume Group Name to system_vg and click Add.
This results in about 1 GB of free space remaining in the volume group, as shown in Figure 8-4. Figure 8-4 Defining a volume group and logical volumes 146 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
25.In the Please Select A Device window, click Next (Figure 8-5). You see a Format Warnings window. Click Format. Figure 8-5 Summary of file systems and swap spaces 26.In the Writing storage configuration to disk window, click Write changes to disk. 27.In the Software options window, accept the default of Basic Server and click Next. 28.The installer will take about 5 to 10 minutes to install Linux. When complete, click Reboot. The system should be restarted from disk. 29.
/dev/dasdc1 partition 524276 0 -3 # mount /dev/dasda1 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/mapper/system_vg-opt_lv on /opt type ext4 (rw) /dev/mapper/system_vg-tmp_lv on /tmp type ext4 (rw) /dev/mapper/system_vg-usr_lv on /usr type ext4 (rw) /dev/mapper/system_vg-var_lv on /var type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfm
To configure automount, perform the following steps: 1. Make a backup copy of the /etc/auto.master file and add the following line at the bottom: # cd /etc # cp auto.master auto.master.orig # vi auto.master // add one line at the bottom ... # +auto.master /nfs /etc/auto.cloner 2. The new line specifies that the file system mounted under the /nfs/ directory will be configured in the /etc/auto.cloner file. Now create the /etc/auto.
2. Enter the file to verify the contents: # cat rhel6.repo [RHEL6] name=Red Hat Enterprise Linux 6 baseurl=file:///nfs/rhel6/Server 3. Import the RPM GPG key so that the yum command knows you are installing official Red Hat packages. The Red Hat GPG key is located in the installation tree. Import the key by using the following command: # rpm --import /nfs/rhel6/RPM-GPG-KEY-redhat-release The yum command should now be configured. It will be tested in the next section. 8.2.
8.2.4 Configuring the VNC server Configure the VNC server the same way as you did on the cloner. Perform the same steps described in 7.2.5, “Configuring the VNC server” on page 130. 8.2.5 Setting system to halt on SIGNAL SHUTDOWN Again, RHEL 6 reboots when a Ctrl-Alt-Del key sequence is pressed. This key sequence is simulated by z/VM when a SIGNAL SHUTDOWN command is issued. Rather than rebooting, you want your system to halt (shutdown). Edit /etc/init/control-alt-delete.
8.2.7 Configuring SSH keys Recall that you generated SSH keys on the cloner in 7.2.8, “Configuring SSH keys” on page 133. Now it is time to copy these keys from the cloner to the golden image. Perform the following steps: 1. Create a new directory (if one does not already exist) on the golden image where the public key will be copied: # cd /root # mkdir .ssh 2. Set the permissions to 700 so that it can only be accessed by root: # chmod 700 .ssh 3.
/dev/disk/by-path/ccw-0.0.0100-part2 swap 0 0 ... swap defaults After a reboot, the minidisk swap space should come back with the lowest priority. 8.2.9 Other configuration changes You might consider other configuration changes. Of course, you can take an iterative approach: Start with this set of changes, clone some Linux images and test, then bring the golden image back up, make more changes, and re-clone.
4. Verify the shutdown settings with the lsshut command: # lsshut Trigger Action ======================== Halt vmcmd ("logoff") Panic stop Power off vmcmd ("logoff") Reboot reipl 5. You might choose to confirm other settings. Congratulations! You have now successfully installed the golden image. This image will normally be shut down or quiesced. You are now ready to clone the golden image to a new virtual server.
9 Chapter 9. Configuring RHEL 6 for cloning At this point, you have completed the installation of RH6CLONE, the Linux cloner, and RH6GOLD, the golden image. The cloner must be up and running.
9.1 Formatting DASD for minidisks In 4.6.2, “Formatting DASD for minidisks” on page 53, DASD was formatted to become minidisks for the cloner and the golden image. The CPFMTXA command can be used to format one DASD at a time, but the CPFORMAT EXEC is a wrapper around CPFMTXA that allows the formatting of multiple DASD. To have access to enough DASDs to define four more user IDs, LINUX01 - LINUX04, with two 3390-3 volumes each, eight 3390-3s will be needed.
9.2 Defining a new user ID for a virtual server In this section, you define a new user ID, LINUX01, in z/VM and clone the golden image to it. To do so, perform the following steps: 1. Logon to MAINT and edit the USER DIRECT file to add more Linux IDs: ==> x user direct c 2. Go to the bottom of the file and add the following five lines. In this example, the user ID is LINUX01 with a password of LNX4VM. It defaults to 256 MB of memory, but can be set up to 1 GB. It has only G (General user) privileges.
'cp 'CP 'CP 'cp 'cp 'cp 'cp 'cp xautolog tcpip' /* XAUTOLOG DTCVSW1' /* XAUTOLOG DTCVSW2' /* set pf12 ret' /* set mdc stor 0m 128m' /* set mdc xstore 0m 0m' /* set srm storbuf 300% 250% 200%' /* set signal shutdown 300' /* /* Grant access 'cp set vswitch 'cp set vswitch 'cp set vswitch to VSWITCH vsw1 grant vsw1 grant vsw1 grant start up TCPIP */ start VSWITCH controller 1 */ start VSWITCH controller 2 */ set the retrieve key */ Limit minidisk cache in CSTOR */ Disable minidisk cache in XSTOR */ Overcom
8. Detach the target disks. 9. Perform an IPL of the target system. 10.Modify the SSH keys on the target system. Linking the source and target disks Start an SSH session to the cloner as root.
Attention: If you do not have FLASHCOPY support, you can use the Linux dasdfmt and dd commands. You must first enable the 1100-1101 and 2100-2101 disks with the chccwdev -e command, then determine the newly created device nodes with the lsdasd command: # chccwdev -e 1100-1101,2100-2101 Setting device 0.0.1100 online Done ... # lsdasd ... 0.0.1100 active dasdf 94:20 0.0.1101 active dasdg 94:24 0.0.2100 active dasdh 94:28 0.0.
Mounting the newly copied root file system To mount the newly copied root file system, perform the following steps: 1. Use the lsdasd command to show the minidisks that are accessible. The target root file system is on the disk accessed as virtual device address 2100. # lsdasd Bus-ID Status Name Device Type BlkSz Size Blocks ============================================================================== 0.0.0100 active dasda 94:0 ECKD 4096 2347MB 600840 0.0.0300 active dasdb 94:4 FBA 512 256MB 524288 0.0.
2. Change the host name in the /etc/hosts file: # cd /mnt/linux01/etc/sysconfig # vi network NETWORKING=yes HOSTNAME=gpok224.endicott.ibm.com GATEWAY=9.60.18.129 3. Change the IP address in the /etc/sysconfig/network-scripts/ifcfg-eth0 file: # cd network-scripts # vi ifcfg-eth0 DEVICE="eth0" BOOTPROTO="static" DNS1="9.0.3.1" DOMAIN="endicott.ibm.com" GATEWAY="9.60.18.129" IPADDR="9.60.18.224" MTU="1500" NETMASK="255.255.255.
DMSACP723I A (191) R/O DMSACP723I C (592) R/O DIAG swap disk defined at virtual address 300 (64989 4K pages of swap space) DIAG swap disk defined at virtual address 301 (129981 4K pages of swap space) Do you want to IPL Linux from minidisk 100? y/n y zIPL v1.8.2-28.el6 interactive boot menu 0. default (linux) 1. linux Note: VM users please use '#cp vi vmsg ' Please choose (default will boot in 5 seconds): Booting default (linux)...
# PROMPT # # # PROMPT=y - This will set if the script should prompt the user for confirmation before cloning. If set to "y" the user will be prompted to continue. If set to "n" the script will run without confirmation. # CLONE_MNT_PT - This specifies the location on the filesystem # that the cloned root filesystem should be mounted # to. If the directory does not exist it will be # created the first run.
# Define networking information that will be used for the host. IPADDR=9.60.18.224 SUBCHANNELS=0.0.0600,0.0.0601,0.0.0602 HOSTNAME=gpok224.endicott.ibm.com NETTYPE=qeth NETMASK=255.255.255.128 NETWORK=9.60.18.128 SEARCHDNS=endicott.ibm.com BROADCAST=9.60.18.255 GATEWAY=9.60.18.129 DNS=9.0.2.11 MTU=1500 Note the following points for the numbers in black above: 1 This is the range of minidisks that will be copied.
The clone script can operate in two modes: where the DASD information is provided on the command line, and 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] sourceID targetID [rootMinidisk [minidisk1 minidisk2..
Invoking Invoking 100 disk Invoking Invoking Invoking Invoking Invoking Invoking Invoking 101 disk Invoking Invoking CP command: CP command: copied ... CP command: CP command: CP command: CP command: CP command: CP command: CP command: copied ...
A block diagram of this process is shown in Figure 9-1. Figure 9-1 Cloning block diagram The top of the figure shows the Linux cloner/installation server that is running on the RH6CLONE user ID. To use FLASHCOPY or dd, the RH6CLONE user ID requires a LINK to the source minidisks that RH6GOLD owns and the destination minidisks that LINUX01 owns. The figure shows that the LINK statement is issued as read-only (RR) for the source and read/write (W) for the target.
2. Edit the USER DIRECT file and create three new sections, that is, LINUX02, LINUX03, and LINUX04. You need to use the DASD volumes you just formatted, with two for each virtual server. You can repeat the definition of LINUX01 three times with the block copy ""3 prefix command. For example: ==> x ====> ...
5. Check for overlaps and the single gap. Run quit to leave the USER DISKMAP file: ==> diskmap user ==> x user diskmap ====> pre off ====> all /gap/|/overlap/ --------------------------------------====> quit 0 500 501 line(s) not displayed -------------------0 0 1 388 line(s) not displayed -------------------- GAP 6 GAP 6. Bring the changes online using the DIRECTXA USER command: ==> directxa user z/VM USER DIRECTORY CREATION PROGRAM - VERSION 6 RELEASE 1.
PORTNO=0 LAYER2=0 You should now have three new parameter files and three new configuration files. 9.5.3 Adding new virtual machines to the startup process Modify the PROFILE EXEC file on AUTOLOG1 191 to grant access to the VSWITCH for the three new user IDs and add XAUTOLOG commands so they boot when you perform an IPL of z/VM system. Perform the following steps: 1.
VLAN Unaware State: Ready IPTimeout: 5 QueueStorage: 8 Portname: UNASSIGNED RDEV: 3004 Controller: DTCVSW1 VDEV: 3004 Portname: UNASSIGNED RDEV: 3008 Controller: DTCVSW2 VDEV: 3008 BACKUP Authorized userids: LINUX01 LINUX02 LINUX03 LINUX04 RH6CLONE RH6GOLD SYSTEM ... 9.5.4 Testing logging on to a new user ID You should now be able to log on to a new user ID and verify the integrity of the definitions. Perform the following steps 1.
9.6 Reviewing system status You can step back now and view your system from a DASD point of view, as shown in Figure 9-2. If you have followed all the sections in this book so far, you should have used the equivalent of 23 3390-3 volumes: eight for the z/VM system, seven for the Linux cloner and golden image, and eight for the four virtual servers.
174 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
10 Chapter 10. Installing Linux with kickstart Kickstart is an automated way of installing RHEL 6. Using kickstart, you can create a single file that answers all of the questions usually asked during an interactive installation. In Chapter 9, “Configuring RHEL 6 for cloning” on page 155, you cloned to LINUX01 and created three new user IDs for virtual servers. In this chapter, you kickstart a RHEL 6 system to LINUX02. In comparison, cloning a server is faster, assuming the FLASHCOPY command is available.
10.1 Configuring the cloner for kickstart The installer generates a kickstart file at the end of every installation. It is based on the answers provided during the interactive installation. This kickstart file is named anaconda-ks.cfg and is located in the /root/ directory. This file on RH6CLONE will be used as a template for LINUX02. Perform the following steps: 1. Start an SSH session on the cloner (RH6CLONE) as root. 2. Start the golden image (RH6GOLD).
part pv.uB82Dq-ajP3-QEln-dcsJ-XHds-tCxx-BRjx0c --grow --size=200 part swap --grow --size=200 part swap --grow --size=200 volgroup system_vg --pesize=4096 pv.Al9FUC-feWq-uHGF-Jaui-RxZQ-Kq9t-pi5zlC pv.
/nfs/ks * /nfs/virt-cookbook-RH6 * /nfs/rhel6 * 10.2 Configuring the LINUX02 user for kickstart Earlier, you should have created the LINUX02 user ID. It is now time to configure it for kickstart. LINUX02 must have its own parameter and configuration files, which are again based on the RH6GOLD user ID. Perform the following steps: 1. Log off of MAINT and log on to LNXMAINT. Copy the parameter and configuration files from RH6GOLD to LINUX02 as follows: ==> copy rh6gold * d linux02 = = 2.
00: Storage cleared - system reset. ==> ipl cms ... Do you want to IPL Linux from minidisk 100? y/n n Verify that you have a 512 MB virtual machine: ==> q v stor 00: STORAGE = 512M This change is for the duration of the user ID session. When you log off and log back on this user ID, the storage will go back to 256 MB. 3. Run rhel6 exec to initiate the kickstart. You see some initial kernel messages, followed by the file system format and Red Hat Package Manager (RPM) package installation.
180 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
11 Chapter 11. Cloning open source virtual servers This chapter describes how to clone and customize the following Linux virtual servers: “Creating a virtual web server” on page 182 “Creating a virtual LDAP server” on page 185 “Creating a virtual file and print server” on page 191 “Creating a virtual application development server” on page 195 The sections that follow do not go into the theory or detail of the four types of servers.
11.1 Creating a virtual web server The example in this section uses the LINUX01 user ID to create a virtual web server. You should have a virtual server cloned to the LINUX01 user ID, as described in Chapter 9, “Configuring RHEL 6 for cloning” on page 155. 11.1.1 Installing Apache RPMs To accomplish this task, perform the following steps: 1. SSH into the IP address of the new LINUX01 server. Install the following Apache RPMs with the yum -y install command.
You should see the test page shown in Figure 11-1, which verifies that the web server is working. Figure 11-1 Apache test page If you get an error when starting Apache, look in the /var/log/httpd/error-log log file for clues. If Apache started successfully, but you cannot reach the test page from a browser, try accessing it using the IP address rather than the DNS name. 11.1.3 Turning on a firewall RHEL 6 comes with an IP tables firewall. In 8.2.
3. Go back to your browser and click Refresh. You should get an error that the server is not responding (or Unable to connect). This is because the packets for the http: and https: ports (80 and 443) are dropped by default. 4. To allow web traffic through, you can modify the /etc/sysconfig/iptables file. First, make a backup copy, add two rules (in bold) to allow these ports, and save your changes: # cd /etc/sysconfig # cp iptables iptables.
3. Verify that the RPM was added: # rpm -qa | grep mod_ssl mod_ssl-2.2.15-5.el6.s390x 4. Restart the web server: # service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] 5. Go back to your browser and click Restart again. This time you should get a warning about a self-signed certificate, which is acceptable for a test system. For a production website, you will probably want to obtain a certificate signed by a certificate authority. 11.1.
2. Start an SSH session to the IP address of the new virtual server running on LINUX02. Use the yum command to install the OpenLDAP client and server RPMs: # yum -y install openldap-clients openldap-servers ... Installed: openldap-clients.s390x 0:2.4.19-15.el6 openldap-servers.s390x 0:2.4.19-15.el6 Dependency Installed: libtool-ltdl.s390x 0:2.2.6-15.5.el6 Complete! OpenLDAP should now be installed on LINUX02. 11.2.
olcMonitoring: TRUE olcDbDirectory: /var/lib/ldap ... 4. Save the file. Your LDAP server should now be minimally configured. Start the LDAP service To start the LDAP server, perform the following steps: 1. Start LDAP at boot time by running the chkconfig command and, for this session, using the service command: # chkconfig slapd on # service slapd start Starting slapd: [ OK ] 2. Query the LDAP database with the ldapsearch command.
dn: cn=Manager,dc=my-domain,dc=com objectClass: organizationalRole cn: Manager dn: ou=People,dc=my-domain,dc=com ou: People objectClass: top objectClass: organizationalUnit dn: uid=mikemac,ou=People,dc=my-domain,dc=com uid: mikemac cn: mikemac objectClass: account objectClass: posixAccount objectClass: top objectClass: shadowAccount loginShell: /bin/bash uidNumber: 10000 gidNumber: 10000 homeDirectory: /home/mikemac dn: ou=Group,dc=my-domain,dc=com objectClass: top objectClass: organizationalUnit ou: Group
# # See ldap.conf(5) for details # This file should be world readable but not world writable. BASE dc=my-domain,dc=com ... 5. Search for the new user ID just added by using the ldapsearch command: # ldapsearch -x uid=mikemac ... # mikemac, People, my-domain.
2. Invoke the authconfig-tui command. Use the Tab key to move between fields, the space bar to change selections, and the Enter key to select. Set the Use LDAP under User Information, and Use LDAP Authentication under Authentication. Click Next.
11.3 Creating a virtual file and print server Samba allows Windows clients to map Linux file systems as shared drives. Samba can also act as a middleman between Windows clients and a Linux print server. The recommended Linux print server is the Common UNIX Printing System (CUPS). This section does not describe the configuration of CUPS, but it does describe how the necessary RPMs are installed.
2. Confirm that the RPMs were added: # rpm -qa | grep samba samba-common-3.0.28-0.el5.8 samba-client-3.0.28-0.el5.8 samba-3.0.28-0.el5.8 samba-common-3.0.28-0.el5.8 11.3.3 Configuring the Samba configuration file The one configuration file for Samba is /etc/samba/smb.conf. It is easy to add an SMB share that will be made available by the Samba server. A good test directory is /usr/share/doc,/ as it has good Linux documentation.
2. Add the sambauser1 user to the smbpasswd file by using the smbpasswd -a command: # smbpasswd -a sambauser1 New SMB password: lnx4vm Retype new SMB password: lnx4vm startsmbfilepwent_internal: file /etc/samba/smbpasswd did not exist. File successfully created. account_policy_get: tdb_fetch_uint32 failed for field 1 (min passwd length), returning 0 ... Added user sambauser1. This method of maintaining Samba users, groups, and passwords is good for a small number of users.
--------MYGROUP ------GPOK226 ... You can test getting a Samba share from a Windows desktop. Perform the following steps 1. Go to any Windows Explorer window (such as My Computer) and select Tools Map Network Drive. 2. Use the Universal Naming Convention (UNC) to specify the Samba server and share name, as shown in the upper left of Figure 11-2. In this example, the UNC is \\9.60.18.226\sharedoc. 3.
11.3.7 Configuring printing Configuring printing is beyond the scope of this book. For more details about printing, refer to Printing with Linux on zSeriesPrinting with Linux on zSeries Using CUPS and Samba, REDP-3864. 11.4 Creating a virtual application development server Most Linux distributions come with a basic set of application development tools, making Linux one of the most versatile development systems. These basic tools are ideal for projects of any size.
372M 86M 267M 25% /var In this example, they are 31% and 56% full. 6. You can use the yum -y groupinstall command to install the groups named development-tools and development-libs. This command adds about 45 packages, which requires a number of minutes to complete: # yum -y groupinstall "Development tools" "Development libs" Installed: autoconf.noarch 0:2.63-5.1.el6 automake.noarch 0:1.11.1-1.2.el6 bison.s390x 0:2.4.1-5.el6 byacc.s390x 0:1.9.20070509-6.1.el6 cscope.s390x 0:15.6-6.el6 ctags.s390x 0:5.
11.4.1 Additional resources The following websites provide additional information about application development topics: Scripting languages http://www.perl.com/ http://www.python.org/ http://www.freeos.com/guides/lsst/ C/C++ http://gcc.gnu.org/onlinedocs/gcc/ http://en.wikipedia.org/wiki/GNU_Compiler_Collection#External_links http://vertigo.hsrl.rutgers.edu/ug/make_help.htmll http://www.gnu.org/software/make/manual/html_chapter/make_toc.html Java http://www-130.ibm.
198 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
12 Chapter 12. Servicing Linux with Red Hat Network This chapter describes Red Hat Network (RHN) and its ability to manage the virtual servers. Using the yum command, the virtual servers can be updated when new packages are released. You can also use yum to install new packages with automatic dependency resolution. You can find RHN at the following address: http://rhn.redhat.
12.1 Registering your system with RHN This section assumes you have already obtained a valid entitlement for RHEL 6 on IBM System z, or have completed the steps to obtain an evaluation copy. To receive a no cost 90-day evaluation, go to the following address: http://www.redhat.com/z Select the Free Evaluation link under the Try section on the left and create an account if you do not already have one. After completing the form, you receive an email in a short while with the activation instructions. 12.
Remove 0 Package(s) Total download size: 2.6 M Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Updating : cpp Cleanup : cpp ######################### [1/2] ######################### [2/2] Updated: cpp.s390x 0:4.1.1-43.el5 Complete! Now query the cpp package and you should see that it has been updated. # rpm -q cpp cpp-4.1.1-43.
Next, click the link that is the system name. This opens a detailed overview, where you can see the system properties, as shown in Figure 12-2. Click the Packages tab to view all the packages installed on this system. From this tab, you can also update, remove, or install new packages onto the system. Figure 12-2 RHN system details For more information about managing your systems through RHN, including usage guides and frequently asked questions, go to the following address: http://rhn.redhat.
13 Chapter 13.
13.1 Adding DASD The process in this section describes how to add an additional DASD to a Linux guest. The overall steps are: “Adding minidisks to a virtual machine” on page 204 “Making new minidisks available to RHEL 6” on page 204 “Creating a logical volume and file system” on page 206 “Updating the file system table” on page 209 13.1.1 Adding minidisks to a virtual machine Here are the high level steps that you perform to add two new 3390-3-sized minidisks to LINUX02: 1.
Setting device 0.0.0103 online Done 3. View the available disks again with the lsdasd command: # lsdasd Bus-ID Status Name Device Type BlkSz Size Blocks ============================================================================== 0.0.0100 active dasda 94:0 ECKD 4096 2347MB 600840 0.0.0101 active dasdb 94:4 ECKD 4096 2347MB 600840 0.0.0300 active dasdc 94:8 FBA 512 256MB 524288 0.0.0301 active dasdd 94:12 FBA 512 512MB 1048576 0.0.0102 active dasde 94:16 ECKD 4096 1173MB 300420 0.0.
0.0.0101 use_diag=0 readonly=0 erplog=0 failfast=0 0.0.0100 use_diag=0 readonly=0 erplog=0 failfast=0 0.0.0102 0.0.0103 6. Verify the new minidisks are activated by using the lsdasd command: # lsdasd Bus-ID Status Name Device Type BlkSz Size Blocks ============================================================================== Bus-ID Status Name Device Type BlkSz Size Blocks ============================================================================== 0.0.0100 active dasda 94:0 ECKD 4096 2347MB 600840 0.0.
Figure 13-1 shows a block diagram of the logical volume manager for this example.
PV Size Allocatable PE Size Total PE Free PE Allocated PE PV UUID 1.15 GiB NO 0 0 0 0 3LciEw-cMM7-tiEM-QEQW-B7Fa-2aoW-thOZ0r Creating a single volume group The vgcreate command can be used to create a volume group named homevg from the two partitions.
LV Status # open LV Size Current LE Segments Allocation Read ahead sectors - currently set to Block device available 0 2.29 GiB 586 2 inherit auto 1024 253:4 Making a file system from the logical volume Now you have a logical volume. Create an ext4 file system out of it by using the mkfs.ext4 command: # mkfs.ext4 /dev/homevg/homelv mke2fs 1.41.
# Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/disk/by-path/ccw-0.0.0100-part1 / ext4 defaults 1 1 /dev/mapper/system_vg-opt_lv /opt ext4 defaults /dev/mapper/system_vg-tmp_lv /tmp ext4 defaults /dev/mapper/system_vg-usr_lv /usr ext4 defaults /dev/mapper/system_vg-var_lv /var ext4 defaults /dev/disk/by-path/ccw-0.0.0300-part1 swap swap defaults 0 0 /dev/disk/by-path/ccw-0.0.
13.3 Extending an existing logical volume This section describes the process of adding a new minidisk to an existing LVM. This is useful when your logical volume has run out of space. First, repeat the steps described in 13.1, “Adding DASD” on page 204 to add a new minidisk. In this example, a minidisk at virtual address 104 is added with a size of 3338 cylinders. Do not forget to log off and log back on to LINUX02 so the new directory entry is read.
Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 2.29 GiB PE Size 4.00 MiB Total PE 586 Alloc PE / Size 586 / 2.
Extending logical volume homelv to 4.58 GB Logical volume homelv successfully resized # resize2fs /dev/homevg/homelv resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/homevg/homelv is mounted on /home; on-line resizing required old desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/homevg/homelv to 1200128 (4k) blocks. The filesystem on /dev/homevg/homelv is now 1200128 blocks long. Use the df -h command to show that the file system is now 2.
The output shows that the LPAR has many FCP devices free, but none of them are in use. Associated with FCP devices are World Wide Port Numbers (WWPNs) and Logical Unit Numbers (LUNs). Often, this information may be available as part of the LPAR definition. However, you may not have this information handy. If you do not have this information, it can be queried on RHEL 6. In the following section, an FCP/SCSI disk is attached to LINUX02. Perform the following steps: 1. Start an SSH session as root to LINUX02.
10.List the contents of the directory again. You should see that many entries were added after the device was put online. The four entries in bold are the WWPNs available from this FCP device. # ls -F 0x5005076306138411/ 0x500507630613c411/ 0x500507630a10016c/ 0x500507630a13016c/ availability card_version cmb_enable cutype devtype driver@ failed hardware_version host0/ in_recovery lic_version modalias online peer_d_id peer_wwnn peer_wwpn port_remove port_rescan power/ status subsystem@ uevent 11.
16.Create a partition with the fdisk command: # fdisk /dev/sda WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').
availability driver card_version failed cmb_enable hardware_version cutype host2 # cd 0x500507630503c73d lic_version modalias online peer_d_id peer_wwpn port_remove port_rescan power subsystem uevent 3. Echo the same LUN into the unit_add file. This action enables the same LUN, but from a different WWPN. # cd /sys/bus/ccw/drivers/zfcp/0.0.
8. Add an entry to /etc/multipath.conf using the mpatha value (WWID): defaults { user_friendly_names yes } # create a friendly name - test_lun multipaths { multipath { wwid 36005076305ffc73d0000000000002008 alias test_lun no_path_retry 5 } } 9.
13.5 Rescuing a Linux system This section describes how to boot your Linux server into different modes for troubleshooting purposes. It covers booting Linux into single user mode, and also entering a rescue environment when you require more advanced troubleshooting. 13.5.1 Entering single user mode Single user mode is helpful when you need to recover the root password, or if you are having problems booting Linux into the default run level.
'PUNCH RHEL6 KERNEL * (NOHEADER' 'PUNCH' Userid() 'RESCUE * (NOHEADER' 'PUNCH RHEL6 INITRD * (NOHEADER' 'CP CHANGE RDR ALL KEEP' 'CP IPL 00C CLEAR' 3. Edit the LINUX02 RESCUE file, replacing any kickstart or VNC lines with the rescue command line option: ==> x linux02 rescue d root=/dev/ram0 ro ip=off ramdisk_size=40000 CMSDASD=191 CMSCONFFILE=LINUX02.CONF-RH6 rescue 4. Log off of LNXMAINT. 5. Log on to LINUX02 and answer n to the IPL from 100 question. 6.
Connect now to 9.60.18.225 and log in as user install to start the installation. E.g. using: ssh -x install@9.60.18.225 The installation process directs you to telnet or SSH to the IP address of your Linux server to begin the first stage of the installation. 9. Use SSH to connect to the IP address and log in as install. 10.Choose your language. 11.The rescue environment will prompt you for the location of the rescue image, which is located in the installation tree on the cloner.
13.6 Setting up Linux Memory Hotplugging Linux Memory Hotplug allows the amount of memory in a Linux system to be increased or decreased without a reboot. You must first have standby memory defined to the virtual machine in which Linux is running. You can issue the CP DEFINE STORAGE command to configure standby memory (storage). RHEL 6 Linux can then exploit the standby memory using the Service Call (SERVC) instruction.
y ... 7. Start an SSH session as root and view the memory in the /sys/ file system. Change the directory to /sys/devices/system/memory/ and list the files: # cd /sys/devices/system/memory # ls block_size_bytes memory0 memory1 memory2 memory3 8. Enter the block_size_bytes file by using the cat command: # cat block_size_bytes 10000000 This number is the number of bytes in hexadecimal. 10000000 in hex is 256 MB in decimal.
15.Verify that the memory has returned: # cat memory*/state online offline offline offline # free -m total Mem: 241 -/+ buffers/cache: Swap: 761 used 165 92 0 free 75 148 761 shared 0 buffers 18 cached 54 This section has shown how to configure virtual machines with standby memory and how to “hot-plug” the memory from Linux. Each of the four Linux virtual machines, LINUX01 through LINUX04, default to 256 MB of memory and can be moved up to 1 GB.
The output shows that cpuplugd starts by default in the current run level. 4.
Where the variables in the statements have the following meaning: loadavg onumcpus runable_proc idle The current average CPU load The number of CPUs that are online The current number of processes that can be run The current idle percentage These CPU hot plugging and unplugging values will be used in the next section. In the default setup, cpuplugd will only make changes to the virtual processor configuration.
/sys/devices/system/cpu/cpu5 1 /sys/devices/system/cpu/cpu6 0 /sys/devices/system/cpu/cpu7 0 /sys/devices/system/cpu/cpu8 0 /sys/devices/system/cpu/cpu9 0 After a few more minutes, all of the CPUs should be activated. 4.
To test copy a file with and without cryptographic acceleration, perform the following steps: 1. Start an SSH session to a Linux. 2. Create a 200 MB test file for copying in the /tmp/ directory: # cd /tmp # dd if=/dev/zero of=testdata.txt bs=1048576 count=200 200+0 records in 200+0 records out 209715200 bytes (210 MB) copied, 17.87 s, 11.7 MB/s # ls -lh testdata.txt -rw-r--r--. 1 root root 200M Oct 9 14:51 testdata.txt 3.
libselinux.s390 0:2.0.94-2.el6 openssl.s390 0:1.0.0-4.el6 nss-softokn-freebl.s390 0:3.12.7-1.1.el6 zlib.s390 0:1.2.3-25.el6 Complete! 6. Verify that the RPMs are now installed: # rpm -qa | egrep "libica|ibmca" libica-2.0.3-2.el6.s390x openssl-ibmca-1.1-3.el6.s390x openssl-ibmca-1.1-3.el6.s390 7.
/usr/lib64/libibmca.so: cannot open shared object file: No such file or directory 2199031767552:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244: 2199031767552:error:260B6084:engine routines:DYNAMIC_LOAD:dso not found:eng_dyn.c:450: 2199031767552:error:260BC066:engine routines:INT_ENGINE_CONFIGURE:engine configuration error:eng_cnf.c:204:section=ibmca_section, name=dynamic_path, value=/usr/lib64/libibmca.
13.9 The X Window System For many years, UNIX-like operating systems have been using the X Window System. This system was designed to provide a client/server, hardware-independent, and network-enabled graphical environment. The current version is X Window System 11, which is widely used on UNIX and Linux platforms.
13.9.2 X Window System Server on workstation If for some reason VNC is not acceptable, it is possible to use a standard X Window System server on a workstation. Because Linux users usually know the X Window System, an X Window System server running on Windows is described in this section. There are many commercial and free X Window System servers available for Windows. In the following examples, XliveCD is used, which provides a free X Window System server based on Cygwin.
This command failed, because XliveCD requires an explicit command to allow remote hosts to connect to it. When the command xhost + (plus means to add authorized hosts) is run, xclock can finally display on Windows, as shown in Figure 13-2. Remember the program itself runs on a remote Linux. Run the following command again. You should get a positive output this time.
Using PuTTY To use PuTTY for X Window System 11 forwarding, check Enable X11 forwarding, as shown in Figure 13-3. Figure 13-3 Enable X Window System 11 forwarding in PuTTY 234 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
As you can see in Figure 13-4, the DISPLAY environment variable contains the special value of localhost:10.0, which tells PuTTY to forward the X Window System 11 protocol over SSH to an SSH client address. In this case, there is no need to enter the xhost command, because the connection appears as a local one to the X Window System server. Figure 13-4 X Window System 11 forwarding with PuTTY Chapter 13.
Using embedded SSH It is also possible to achieve X Window System 11 forwarding with an embedded SSH client as shown in Figure 13-5. Again, no xhost command is needed. Figure 13-5 X Window System 11 forwarding with embedded SSH client There are many ways to achieve the same results. It is up to you to choose a solution that best suits your purposes. 13.
13.10.1 Recommendations for centralizing home directories In December of 2009, the topic of how to set up a common home directory came up on the linux-390 list server. The following post by Patrick Spinler is copied, with permission, as it may be helpful to you: “NFSv3 is not known for it's security. Consider the use of the NFS option root_squash, along with limiting the list of hosts who can connect to your home share.
We've found POSIX group membership management to be one of our more challenging issues overall. Some older systems (e.g. solaris <= 8 or 9) enforce the old POSIX limit of no more than 16 secondary groups. Further, the primary group concept is annoying conceptually, in any organization with modest member mobility, which primary group do they get? If one assumes that the primary group is meaningful, e.g. reflective of someone's function, role, or job, what about people who do two or more things (E.g.
14 Chapter 14. Monitoring and tuning z/VM and Linux This chapter briefly describes how to monitor z/VM and Linux. For another source on z/VM performance and monitoring, see Chapter 11, “Monitoring performance and capacity,” in the manual Getting Started With Linux, SC24-6096, on the web at: http://publibz.boulder.ibm.com/epubs/pdf/hcsx0b20.pdf There are a number of z/VM monitoring tools such as CA’s VM:Monitor, the IBM z/VM Performance Toolkit, the IBM Tivoli OMEGAMON® XE for z/VM and Linux.
14.1 Using INDICATE and other commands z/VM has many commands to monitor the state of the system. CP INDICATE is the most commonly used, and there are other commands that are addressed. For more information, see the z/VM Performance Resources web page at http://www.vm.ibm.com/perf/ 14.1.1 Using the INDICATE command z/VM has some basic commands such as INDICATE. There are many INDICATE parameters that can be included as command line options.
being measured in 100s rather than 1000s. The higher values seen tend to build up over time, and are sustained over periods of intense system activity. However, there are times when the MIGRATE value may spike for brief periods of time. Minidisk cache (MDC) statistics are given on the third line. The effectiveness of MDC can be judged by the combination of the READS rate and the HIT RATIO. If both are high, then a large number of physical I/Os are avoided due to the MDC feature.
EDLWRK9 EDLWRK5 EDLWRK14 EDLLIB19 EDLWRK19 EDLWRK15 EDLWRK1 Q3 Q3 Q3 Q3 Q3 Q3 Q3 AP IO AP IO AP AP AP 00002372/00002334 00002376/00002376 00002426/00002323 00001226/00001100 00002322/00002298 00002839/00002781 00002969/00002935 .... .... .... .... .... .... .... .1107 .1205 .1238 .1309 .1705 .2205 .
Determining storage or memory To see how much central and expanded storage (memory) is installed and allocated to a system, use the QUERY STORAGE and QUERY XSTOR commands. For example: ==> q stor STORAGE = 16G CONFIGURED = 16G INC = 256M STANDBY = 0 RESERVED = 0 ==> q xstor XSTORE= 2048M online= 2048M XSTORE= 2048M userid= SYSTEM usage= 0% retained= 0M pending= 0M XSTORE MDC min=0M, max=0M, usage=0% XSTORE= 2048M userid= (none) max.
Determining DASD, OSA, and virtual resources The QUERY DASD and QUERY DASD FREE commands show you what DASD is assigned to the system and what DASD is free to be assigned. Similarly, the QUERY OSA and QUERY OSA FREE commands report on the OSA resources. Finally, the QUERY VIRTUAL ALL command can be useful. The following list gives the short form of these commands without any of the associated output shown: ==> ==> ==> ==> ==> q q q q q da da free osa osa free v all 14.
VMFSUT2760I VMFSUFTB processing completed successfully VMFSRV2760I SERVICE processing completed successfully You should see a few screens of messages scroll by and finally the success messages shown above. This will enable the Performance Toolkit for the current z/VM session. At IPL time, the SYSTEM CONFIG file is modified by having a line appended to the end.
3. When the system comes back, log on to TCPMAINT and check whether everything was successful with the NETSTAT CLIENTS command. You want to see that the service PERFSVM is a client (listening). This should be shown after a few windows of output: ==> netstat clients ... Client: PERFSVM Notes Handled: none Last Touched: 0:01:22 Vmcf error count: 0 Authorization: {none} The entry for PERFSVM should be at the end of the output. 14.2.
The modified lines should be as follows. Save your changes with the FILE subcommand: * Following command activates VMCF data retrieval interface FC MONCOLL VMCF ON * Following command activates Internet interface FC MONCOLL WEBSERV ON TCPIP TCPIP 80 * Following command activates Internet interface with SSL *C MONCOLL WEBSERV ON SSL TCPIP TCPIP 81 IDTEST RACF ... ====> file 6.
'PERFKIT' /* Invoke the PERFKIT module @FC012BD*/ Exit ====> file 9. Set the PERFSVM virtual machine to be started at z/VM IPL time. Edit the PROFILE EXEC file on AUTOLOG1 so that PERFSVM is automatically started at IPL time. First, log on to AUTOLOG1. 10.Before pressing Enter at the VM READ prompt, type acc (noprof so that the PROFILE EXEC file is not run: LOGON AUTOLOG1 z/VM Version 6 Release 1.
Before starting the Performance Toolkit, you may want to increase the size of the DCSS named MONDCSS. The following steps quadruples the size of MONDCSS to 64 MB: 1. Delete the old MONDCSS with the PURGE NSS command: ==> purge nss name mondcss NO FILES PURGED 0001 FILE PENDING PURGE 2.
14.2.5 Starting the z/VM Performance Toolkit To start the Performance Toolkit, perform the following steps: 1. Log on to the PERFSVM user ID. 2.
You should see a splash window, then the Web Server Logon window, as shown in Figure 14-1. Figure 14-1 Performance Toolkit logon window 2. Enter any valid user ID and password and click Submit. In this example, MAINT is used. 3. The Central Monitoring System Load Overview appears with your system identifier (Node-ID) on the left side. Chapter 14.
4. Click your system identifier and the Initial Performance Data Selection Menu window appears, as shown in Figure 14-2. From this window, you can drill down into many different types of reports. Figure 14-2 Browser interface to the Performance Toolkit Using a 3270 interface You can also use a 3270 interface or a browser interface. To do so, perform the following steps: 1. Log on to PERFSVM. 252 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
2. If you had disconnected, pressing Enter should get you back to the Performance Toolkit command line. If the virtual machine was logged off, the PROFILE EXEC should run and get you to the command line; see Figure 14-3. Enter the command MONITOR: Command ==> monitor FCX124 Monitor Performance Screen Selection General System Data Time) 1. CPU load and trans. selection 2. Storage utilization files* 3. Reserved displays* 4. Priv. operations coeff. 5. System counters 6. CP IUCV services storage 7.
14.3 Monitoring Linux Measurements can show resource consumption of the Linux guest as measured and dispatched by the VM host. It is also possible to measure performance data from within the Linux guest itself. To monitor Linux performance data at this level, a data gatherer process must be running within each Linux guest you want to monitor. There are different ways of gathering this data. The data should be gathered in the kernel.
To turn on the built in kernel monitoring, use the echo command to send a non-zero value into four of the five monitoring variables in the /proc/ virtual file system: # # # # echo echo echo echo 1 1 1 1 > > > > /proc/sys/appldata/timer /proc/sys/appldata/mem /proc/sys/appldata/os /proc/sys/appldata/net_sum Built-in kernel monitoring should now be turned on.You may only want to leave the monitoring on for specific periods of time.
256 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
A Appendix A. References z/VM differs from Linux in regards to the location and number of configuration files. In Linux, there are many configuration files and most of them are in or under the /etc/ directory. On z/VM, there are relatively few configuration files. However, they are on many different minidisks. Table 14-1provides a summary and the location of important z/VM configuration files.
Cheat sheets This section contains quick references or “cheat sheets” for the XEDIT and vi editors. XEDIT cheat sheet XEDIT has line commands that are entered on the command line (===>) and prefix commands that are typed over the line numbers on the left side of the panel. Line commands a Adds a line. a Adds ‘n’ lines. c/// Searches for the ‘old’ string and replaces it with ‘new’ for ‘n’ lines below the current line and ‘m’ times on each line.
p i i m mm " " "" The line before which a copy (c) or a move (m) is to be inserted. Inserts a line. Inserts 'n' lines. Moves one line. Moves a block of lines. Replicates a line. Replicates a line 'n' times. Replicates a block of lines. A vi cheat sheet Here is a small subset of vi commands (the ones most commonly used). The vi editor has three modes: 1. Input mode: The Insert key, i, o (add a line below), O (add a line above) and other commands put you in this mode.
260 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
B Appendix B. Additional material This book refers to additional material that can be downloaded from the Internet as described in the following sections. Locating the web material The web material associated with this book is available in softcopy on the Internet from the IBM Redbooks web server. Point your web browser at: http://www.vm.ibm.com/devpages/mikemac/SG247932.tgz Using the web material The additional web material that accompanies this book includes the following files: File name README.
clone-1.0-10.s390x.rpm README.txt RPM with Linux cloning script and man page Tar file description file System requirements for downloading the web material The web material requires the following system configuration: Hard disk space: Operating System: 25 KB minimum Linux Downloading and extracting the web material Download the tar file to your NFS server and use it as described in 7.2.1, “Copying files to the cloner” on page 127.
Related publications The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this book. IBM Redbooks The following IBM Redbooks publications provide additional information about the topic in this document. Note that some publications referenced in this list might be available in softcopy only. Fibre Channel Protocol for Linux and z/VM on IBM System z, SG24-7266 IBM Lotus Domino 6.
The Program Directory for Performance Toolkit for VM, GI10-0785 Red Hat Installation Guide for the IBM S/390 and IBM System z Architectures, found at: http://www.redhat.com/docs/manuals/enterprise/ RHEL 6: IBM System z Architecture - Installation and Booting, found at: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_ Guide/pt-install-info-s390.html XEDIT User’s Guide and Command Reference, found at: http://ukcc.uky.edu/ukccinfo/391/xeditref.
The Linux for IBM eServer zSeries and S/390 portal: http://linuxvm.org/ Linux on IBM System z and S/390 developerWorks: http://awlinux1.alphaworks.ibm.com/developerworks/linux390/index.shtml SUSE LINUX Enterprise Server 9 evaluation: http://www.novell.com/products/linuxenterpriseserver/eval.html z/VM performance tips: http://www.vm.ibm.com/perf/tips/ z/VM publications: http://www.vm.ibm.com/pubs/ Help from IBM IBM Support and downloads ibm.com/support IBM Global Services ibm.
266 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
Index Symbols (REPLACE 93 $VMF* $MSGLOG 93 Numerics 3270 emulator software 25 63a2 63a9 53 A ACCESS (NOPROF 62 all /gap 58 Alloc PE 208 allow guests 5 min to shut down 63 APAR ShopzSeries 83 VM64670 88 VM64672 82 VM64747 83 VM64774 82 VM64793 82 VM64798 82 VM64799 83 VM64807 82, 85 VM64814 82 VM64820 82 VM64879 82 VM64881 82 VM64891 83 APARMEMO 95 APARS for z/VM V6.
define a VSWITCH 45 define z/VM user ID 56 device error 59 DIAG swap disc 141, 163, 220 direct access storage device (DASD) 7, 204 DIRECTXA 59 DIRECTXA command 59, 77, 157, 204 directxa user 59, 77, 157, 222 disable minidisk cache in XSTOR 63 disk layout 139, 204 disk page 59, 65, 77 diskmap user 57–58, 77, 139, 157 DMSACC724I 500 76 DMSACP723I C 141, 163, 220 DMSERD107S 77 DMSFOR603R Format 59, 77 DNS name 15, 24, 164 DNS server 1 13 2/3 13, 16 TCP/IP address 9 Domain Name System 140, 164 domain name and s
IPWIZARD 41 SET PF12 ? 44 shutdown reipl 40 SYSTEM CONFIG 44 XEDIT PROFILE 43 z/VM install code 30 ZVMV6R10 45 Integrated 3270 31 current session 40 IP address 9, 24, 42, 161, 177, 221 9.60.18.
3270 interface 252 browser interface 250 command line 253 Linux data 255 New function 82 Program Directory 244 service machine 246 session 246 web browser support 245 PERFSVM user ID 246 PERM volume 54 pf12 ret 63, 139, 158, 248 physical volume 144, 177, 206 volume group 211 Port Name 42 PORTNAME 140 practice to connect (PC) 231 Press F3 80 Preventative Service Planning (PSP) 82 PROFILE EXEC 39, 46, 60, 138, 157, 247, 257, 261 backup copy 47 PROFILE TCPIP 257 file 43, 48 to 48 PROFILE XEDIT 43–44, 60, 246 d
command 151, 222 value 63 SMP 141, 163, 220 SSH 20 SSH client 19–20, 231, 233 SSH key 147, 159 new set 147 SSH session 24, 61, 140, 159, 176, 204, 254 startup process 171 STEAL percentage 241 STORAGE command 141, 178, 222 submenu panel 253 left side 253 subnet mask 9, 257 swap disc 152 swap space 138, 163, 220 SYSTEM CONFIG file 44, 50, 67, 156, 245 SYSTEM CONFIG file 44–45, 50 System Console 49 system disc 53, 69 system status 173 System z 89 Linux 24 T Tab key 31 target Linux user ID 4 target system 158–
website 185 WRKS 54 X XAUTOLOG 62 XAUTOLOG command 47 XAUTOLOG statement 139, 157 XEDIT macro 64 XEDIT session 47 zEnterprise 196 82 EREP support 82 HCD support 82 HCM support 83 IOCP support 83 Y yum configuring 128 Z z/VM xi, 1, 7, 27, 73, 157, 276 downloading service 76 eligible list 241 service via Internet 89 STEAL percentage 241 z/VM CP Command 264 Message 264 Planning 264 z/VM DASD resource value 14 worksheet 17 z/VM installation 39, 97 FTP server 97 z/VM Performance Resources Web page 240 Toolki
z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat (0.5” spine) 0.475”<->0.
z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.
Back cover ® z/VM and Linux on IBM System z The Virtualization Cookbook for Red Hat Enterprise Linux 6.0 ® Hands-on instructions for installing z/VM and Linux on the mainframe Updated information for z/VM V6.1 and Red Hat Enterprise Linux 6.0 New, more versatile file system layout This IBM Redbooks publication describes how to create Linux virtual servers in z/VM on IBM System z hardware.