Before using this information and the product it supports, read the information under “Notices” on page 143.
This edition applies to version 6, release 1, modification 0 of IBM z/VM, (product number 5741-A07) and to all
subsequent releases and modifications until otherwise indicated in new editions.
Overview of defining virtual machines for Linux . . 71
Steps for defining a master virtual machine for
Linux ................71
Steps for setting up LINMSTR’s disks.....75
Installing Linux in a virtual machine ......77
Overview of installing Linux in a virtual machine 77
Example of using FTP to get the Linux boot files 79
Example of punching Linux boot files to the
virtual machine reader..........80
Example of booting (IPL) the Linux boot files
from the virtual machine reader......81
(Optional) Steps for loading Linux automatically at
logon ................82
Steps for taking a snapshot of system performance 120
Using the CP Monitor and Performance Toolkit for
VM.................123
Overview of the CP Monitor and Performance
Toolkit for VM ............123
Configuring Performance Toolkit for VM . . . 124
Using monitoring to analyze performance and
capacity ..............133
Steps for using CP commands to improve
performance..............135
Chapter 12. Servicing z/VM.....137
z/VM service concepts ..........137
Chapter 8. Cloning Linux virtual
servers..............83
Steps for cloning a Linux virtual server .....83
Chapter 9. Setting up basic system
automation .............85
Starting and stopping virtual machines
automatically ..............85
Steps for automatically starting Linux virtual
servers and other virtual machines.....85
Steps for enabling Linux virtual servers to shut
down automatically..........87
Setting up the programmable operator .....88
Overview of the programmable operator. . . 88
Steps for setting up the routing table .....89
Steps for setting up the programmable operator92
Steps for automating Linux virtual consoles. . 93
Steps for testing your automation ......95
Chapter 10. Performing run-time tasks97
Overview of console types .........97
Real operation tasks...........98
Step for monitoring the logical operator console98
Step for restarting z/VM........100
Step for managing real devices......100
Step for managing users.........105
Virtual machine operation tasks .......107
Steps for using CP commands at the Linux
virtual console ............108
Archiving and backing up critical data .....112
Overview of archiving z/VM system data . . . 112
Archiving virtual server disks .......113
Chapter 11. Monitoring performance
and capacity ............117
Overview of performance monitoring .....117
Monitoring Linux virtual servers with
Performance Toolkit for VM.......118
Overview of the z/VM scheduler......118
Appendix. Example of using FTP to
install Linux from the hardware
management console ........139
Linking the HMC removable media to your z/VM
logical partition............139
FTPing to the HMC removable media .....140
Notices ..............143
Trademarks ..............145
Glossary .............147
Bibliography............149
Where to Get z/VM Information .......149
z/VM Base Library ...........149
Overview..............149
Installation, Migration, and Service .....149
Planning and Administration .......149
Customization and Tuning ........149
Operation and Use..........149
Application Programming ........149
Diagnosis..............150
z/VM Facilities and Features ........150
Data Facility Storage Management Subsystem
forVM..............150
Directory Maintenance Facility for z/VM . . . 150
Open Systems Adapter/Support Facility . . . 150
Performance Toolkit for VM.......151
RACF Security Server for z/VM ......151
Remote Spooling Communications Subsystem
Networking for z/VM .........151
Prerequisite Products ...........151
Device Support Facilities........151
Environmental Record Editing and Printing
Program ..............151
Additional Publications ..........151
Index ...............153
iv
z/VM: Getting Started with Linux on System z
About this document
This document describes how to configure and use z/VM®functions and facilities
for Linux®servers running on the IBM®System z®platform (hereafter referred to
as the mainframe). The document provides requirements and guidelines to
implement during z/VM installation, but primarily assumes you have installed
z/VM and are ready to deploy Linux in virtual machines.
Early sections acquaint you with z/VM and take you from the point after z/VM
installation to the point where you are ready to install your first Linux server. At
that point you must turn to the installation documentation provided by your Linux
distributor. Following the deployment of your first Linux server, you can replicate
or clone additional servers.
When you finish the early sections, you will have two or more Linux servers
running on z/VM with TCP/IP connections to the network. Subsequently, you can
turn to vendor-supplied documentation to install applications on Linux. Later
sections cover operations, administration, performance, and other day-to-day bare
essentials.
Intended audience
This document is designed to help anyone who does system programming,
administration, or operation, but has limited knowledge of z/VM and wants to get
started deploying Linux servers on z/VM. Before you begin, you must:
v Understand mainframe hardware concepts, such as logical partitions (LPARs)
and I/O
v Know and have used the Linux operating system
v Know and have used TCP/IP.
The environment for your z/VM system environment is assumed to include:
v A mainframe with an OSA-Express device
v z/VM version 6 release 1
v Directory Maintenance Facility
v Performance Toolkit for VM
v If you do not have an external file server for the Linux code, you might need an
NFS or FTP server.
Conventions and terminology used in this document
This document is primarily a cookbook; that is, it provides instructions about how
to accomplish a task or goal. When required, background concepts are provided to
help you understand a key z/VM function or facility. Instructions and background
concepts are separated but linked together through cross-references, providing an
efficient path through the instructional material. At the beginning of each set of
instructions, you will see a Before you begin section, which explains what you
need to know or to do before you perform the task. Cross-references in the Beforeyou begin section take you to the necessary background concepts. Thus, if you
already know the necessary concepts, you do not need to read those background
topics and can simply follow the instructions.
Though the topics in this document are self-sufficient, you might want to explore a
function or facility in detail. Some topics end with a list of documents that you can
use to understand a function or facility in detail.
In general, new terms (in italics) are defined in the context they are introduced.
Sometimes the manual focuses on the virtual machine functions (the virtual
hardware) and other times the complete Linux server system (the virtual machine
and the Linux operating system as a whole). When focusing on the virtual machine
functions only, the term virtual machine or virtual machine for Linux is used. The
term Linux virtual server refers to the complete Linux system (virtual machine
hardware and the Linux operating system as a whole) running on z/VM.
Commands and statements that you must type are in bold while system responses
are in normal font.
Example: In the example, you would type “query processors”. The rest of the
example is the system response:
query processors
PROCESSOR 00 MASTER
PROCESSOR 01 ALTERNATIVE
Ready;
Variable information appears in bold italics, which means you must substitute
your own values for the variable.
Example: For the command, you would need to supply your own password for
the variable new_password.
dirm add linmstr like linux pw new_password
A vertical ellipsis
.
.
.
indicates system responses that have been removed for clarity.
Where to find more information
For z/VM terms used in this document, see z/VM: Glossary or use the z/VM HELP
Facility (for more information about glossary terms and the z/VM HELP Facility,
see “Glossary” on page 147).
For more information about related publications, see “Bibliography” on page 149.
Additional Publications
For white papers, IBM Redbooks®publications, and other useful information about
Linux on the mainframe, visit the z/VM resources for Linux on IBM System z Web
site at:
http://www.vm.ibm.com/linux/
Publications you might be interested in are:
viz/VM: Getting Started with Linux on System z
v z/VM and Linux on IBM System z: The Virtualization Cookbook for SLES9, SG24-6695
v Security on z/VM, SG24-7471
Links to Other Online Documents
If you are viewing the Adobe®Portable Document Format (PDF) version of
this document, it might contain links to other documents. A link to another
document is based on the name of the requested PDF file. The name of the
PDF file for an IBM document is unique and identifies the edition. The links
provided in this document are for the editions (PDF names) that were current
when the PDF file for this document was generated. However, newer editions
of some documents (with different PDF names) might exist. A link from this
document to another document works only when both documents reside in
the same directory.
About this documentvii
viiiz/VM: Getting Started with Linux on System z
How to send your comments to IBM
We appreciate your input on this publication. Feel free to comment on the clarity,
accuracy, and completeness of the information or give us any other feedback that
you might have.
Use one of the following methods to send us your comments:
1. Send an e-mail to mhvrcfs@us.ibm.com
2. Visit the z/VM reader's comments Web page at www.ibm.com/systems/z/os/
zvm/zvmforms/webqs.html
3. Mail the comments to the following address:
IBM Corporation
Attention: MHVRCFS Reader Comments
Department H6MA, Mail Station P181
2455 South Road
Poughkeepsie, NY 12601-5400
U.S.A.
4. Fax the comments to us as follows:
From the United States and Canada: 1+845+432-9405
From all other countries: Your international access code +1+845+432-9405
Include the following information:
v Your name and address
v Your e-mail address
v Your telephone or fax number
v The publication title and order number:
z/VM V6R1 Getting Started with Linux on System z
SC24-6194-00
v The topic and page number related to your comment
v The text of your comment
When you send comments to IBM, you grant IBM a nonexclusive right to use or
distribute your comments in any way it believes appropriate without incurring any
obligation to you.
IBM or any other organizations will only use the personal information that you
supply to contact you about the issues that you submit to IBM.
If you have a technical problem
Do not use the feedback methods listed above. Instead, do one of the following:
v Contact your IBM service representative.
v Contact IBM technical support.
v Visit the z/VM support Web page at www.vm.ibm.com/service/
v Visit the IBM mainframes support Web page at www.ibm.com/systems/
This document contains terminology, maintenance, and editorial changes. Technical
changes or additions to the text and illustrations are indicated by a vertical line to
the left of the changes. Some program updates might be provided through z/VM
service by program temporary fixes (PTFs) for authorized program analysis reports
(APARs), which also might be available for some prior releases.
SC24-6194-00, z/VM Version 6 Release 1
This edition supports the general availability of z/VM V6.1. Changes made are:
v A step was added to “Steps for copying the current USER DIRECT file” on page
This topic is a z/VM primer and covers general VM concepts, such as editing and
finding files, required to complete z/VM system tasks.
When you log onto z/VM, you have the functional equivalent of a real computer
and its associated devices at your fingertips. This functional equivalent of a
computing system is called a virtual machine. Virtual machines are not real, but do
work like real systems. Everyone in your entire organization can use z/VM to
share the resources of a single computer, while at the same time accessing the
system as if each is the only user.
Figure 1 shows a stylized representation of a real mainframe computing system.
Each real computing system has one or more central processing units (CPUs),
storage (memory), peripheral devices for input and output, such as disks, tapes,
printers, and displays, and the operator console. The operating system manages all
these resources to do work.
CPU
0
CPU
1
CPU
2
.
.
.
CPU
n
central storage
operator
console
operating system
channels
control
units
disk
tapeprinter
user
displays
Figure 1. Representation of a mainframe computing system
z/VM virtualizes real computing resources so that each user appears to have a
complete mainframe computing system, as shown in Figure 2 on page 2. This
means each virtual machine can run its own operating system to manage its virtual
resources. It also means you can perform virtual machine tasks as if they were real
machine tasks: you can boot (perform an initial program load of) an operating
system, attach and detach devices, and manage the work of your virtual machine
operating system.
A virtual machine is directly associated with a z/VM user ID or logon identifier.
When you log onto z/VM, you have a virtual machine at your disposal and
control the virtual machine the way a system operator controls the real hardware.
Some user IDs (virtual machines) are given special privileges to control z/VM and
the real machine. For example, the OPERATOR has special privileges allowing
control of real machine resources. Another user, usually called MAINT, has special
privileges to change z/VM code, apply z/VM maintenance, and add new users.
Whether or not users have special privileges, they all perform their tasks through a
virtual machine. So, as shown in Figure 2, some virtual machines run Linux, while
others run other operating systems, such as the Conversational Monitor System
(CMS) (more about CMS in a moment).
The Control Program (CP) is the component of z/VM that manages the resources
of a single computer so that multiple computing systems (virtual machines) appear
to exist. Think of CP as a supervisor (or hypervisor) program running in a layer
between the hardware and virtual machines. When you are working in the CP
environment, you are provided with CPU (central processing unit) functions, input
and output devices, and storage. Through CP, each virtual machine can run its
own operating system, such as Linux, z/OS
tape
®
, or z/VM itself.
Operating systems running in virtual machines are often called guests. Other terms
and phrases you might encounter are:
2z/VM: Getting Started with Linux on System z
v Running first level: running directly on the hardware, which is what z/VM does.
v Running second level or running under VM or running on (top of) VM: running as a
guest.
During its time slice, a guest actually runs on the real machine. The hardware
microcode handles most guest program instructions and CP takes control only
when necessary, which maintains good performance.
The Conversational Monitor System (CMS) is the interactive component of z/VM.
CMS is a single-user operating system that runs in a virtual machine. Typically,
each directory entry (user definition) has a statement that loads the CMS operating
system at logon time (see “The user directory” on page 8). CMS is not only an
end-user interactive component, but a home for running system utilities and tasks,
such as TCP/IP and system management functions. At the z/VM level, systems
personnel use CMS to manage z/VM itself and guests. At the guest level, you can
use CMS to define resources for your virtual machine, so loading CMS is useful
even if you plan subsequently to load Linux into the same virtual machine.
Overview of the Control Program (CP)
CP acts as a hypervisor layer between the hardware and virtual machines. Each
virtual machine appears to have its own CPU, storage (memory), and devices. In
reality, these items can be
v Real. For example, you can dedicate a real network interface to a virtual
machine for its exclusive use.
v Shared. For example, the CPU is shared through time sharing and real storage is
shared as virtual storage. What appears as real storage to a guest is actually
virtual storage to CP.
v Simulated. For example, a virtual switch is a simulated LAN networking switch.
CP transparently maps virtual devices and resources to their real counterparts.
Topics in this section explain how CP manages computer resources for virtual
machines.
Central processing units (CPUs)
A virtual machine can have up to 64 virtual CPUs. If capable of running in
multiprocessor mode, your virtual machine operating system dispatches work on
its virtual CPUs as if it were running on real hardware. CP handles the dispatching
of work on your virtual CPUs to real CPUs.
Guideline: Never give a virtual machine more virtual CPUs than there are real
CPUs.
Usually virtual machines share all CPUs, but a real CPU can be dedicated to a
virtual machine, which means that the CPU is reserved for that virtual machine’s
exclusive use. This obviously has an impact on the performance of other virtual
machines in the system.
Storage
Mainframe storage is analogous to memory in a personal computer. CP commands
refer to memory as storage, so do not confuse the term “storage” with disk or tape
storage.
Chapter 1. About z/VM3
Each virtual machine has its own virtual storage. CP manages the residency of
virtual machine’s pages in real storage through paging. Pages that have not been
referenced can be moved out of real storage into either expanded storage or onto a
paging device. When a virtual machine requires a page no longer in real storage, a
page fault occurs and CP brings the missing page back into real storage.
CP has facilities that allow portions of real storage to be shared by many virtual
machines. Such portions are called shared segments. This sharing economizes on real
storage and requires less paging, thereby improving performance. For example, the
CMS nucleus is shared in real storage by all virtual machines that loaded CMS by
name; that is, every CMS virtual machine mapsa1MBsegment of virtual storage
to the same 1 MB of real storage.
DASD and minidisks
DASD, the mainframe term for disk drives, stands for “direct access storage
device” and is analogous to a hard disk drive on a personal computer. A single
real DASD is called a volume or real volume. Each volume has a label or volume serialnumber (volser) that identifies the volume to z/VM.
Of special importance is the way z/VM shares DASD. CP can logically partition
real DASD volumes into minidisks, which is analogous to dividing a personal
computer hard disk into multiple partitions. A minidisk has its own label, which is
distinct from the real DASD label. Each virtual machine can have one or more
minidisks and those minidisks are under control of the guest operating system. To
the guest, a minidisk appears as an entire DASD volume (though smaller) and the
guest runs channel programs as normal to do I/O. Behind the scenes, CP reorients
the channel programs: the guest perceives all minidisks as starting at cylinder 0,
but the real DASD volume has only one cylinder 0, so CP must modify the
cylinder offsets in the channel program to address DASD cylinders owned by the
guest.
Temporary minidisks
You can create a temporary minidisk from a special pool of real disks. The disk
lasts as long as the virtual machine is logged on. At logoff, the temporary minidisk
is deleted and the space returned to the available temporary disk pool.
Virtual disks in storage
Virtual disks in storage are similar to temporary minidisks, except the disks are
mapped to storage rather than the cylinders of real disks. Using virtual disks in
storage avoids the need for disk I/O. CP manages the virtual disk pages as part of
its real memory management.
Virtual readers, punches, and printers
These devices are not associated with real devices, but are implemented through
the spool file system. For more information, see “Overview of the CP spool file
system” on page 7.
The virtual machine console
The virtual machine console or virtual console is the primary interface to the virtual
machine. When you log on to a virtual machine from a local terminal or a remote
workstation, the virtual console is associated with the terminal session. From the
4z/VM: Getting Started with Linux on System z
console, you can enter CP commands, such as loading (IPL) an operating system.
The virtual console is the device an operating system views as its system or
hardware console.
Note: The key assignments for your keyboard might differ from standard key
assignments. Some 3270 emulators allow you to remap the key assignments;
for example, the Clear function might be assigned to the ESC key on some
keyboards and the Pause/Break key on others. Consult your display
documentation for key mappings.
As you do work on your console, the lower right corner of the screen displays
various status notices. The notices tell you what is happening in the system at the
present time. If you forget what these notices mean, you can come back to this
section for reference.
CP READ
This notice means that the Control Program (CP) is waiting for you to
enter a command.
VM READ
This notice means that a virtual machine operating system, such as CMS, is
waiting for you to enter a command.
RUNNING
This notice means the virtual machine is working on something. For CMS,
this means CMS is ready for you to enter a command.
MORE ...
This notice means that there is more information than can fit on the
current screen. After a pause (which depends on the terminal settings for
your virtual machine), the next screen of information is displayed. To view
the next screen right away, press the Clear key. To hold this information on
the screen, press the Enter key, which changes MORE... to HOLDING.
HOLDING
This notice means the system is waiting for you to clear the screen before
showing you more information. The notice appears when the screen
displays MORE... and you press the Enter key. The notice can also appear
when another user sends you a message. To cancel the hold, press the
Clear key.
NOT ACCEPTED
This notice means that the system is working on something and is too
busy to accept another command. Wait several seconds and issue your
command again.
Related information
For more information about virtual consoles, see “Using a Virtual Machine
Operator’s Console” in z/VM: Virtual Machine Operation.
CP commands
CP provides you with commands that allow you to view and manipulate your
virtual hardware (virtual CPUs, virtual storage, minidisks, and other devices). To
issue some CP commands, you need to be in a special privilege class assigned to
you in the user directory. Privilege classes are denoted by the letters A through Z,
the numbers 1 through 6, or the word ″Any.″ For the tasks explained in this
document, the user IDs you use have all the required privilege classes (like
superusers in Linux).
Chapter 1. About z/VM5
Related information
For more information about privilege classes, see “Privilege Classes” in z/VM: CP
Commands and Utilities Reference.
Examples of using the CP commands: QUERY displays information about your
virtual machine.
1. To display virtual CPUs, class G users can issue the QUERY VIRTUAL CPUS
command:
query virtual cpus
CPU 00 ID FF05152120640000 (BASE)
Ready;
The response tells you the virtual machine has one base virtual CPU whose
address is 00.
2. To display available storage (memory), class G users can issue the QUERY
STORAGE command:
query virtual storage
STORAGE = 512M
Ready;
The response tells you the virtual machine has 512 megabytes of storage.
3. To display information about minidisks, class G users can issue the QUERY
5. To display the size of real storage, class B and E users can issue the QUERY
STORAGE command:
query storage
STORAGE = 512M
Note: QUERY VIRTUAL option displays information about the virtual machine.
The keyword “VIRTUAL” is optional for the class G user. For privileged
6z/VM: Getting Started with Linux on System z
users (those with privilege classes other than G), using QUERY without the
keyword “VIRTUAL” displays information about the real machine. For
instance, QUERY VIRTUAL STORAGE displays the virtual storage size of
the virtual machine while QUERY STORAGE (class B and E) displays the
real machine storage size.
Related information
z/VM: CP Commands and Utilities Reference, SC24-6175
Overview of the CP spool file system
In the early days of computing, input to the computer came from punched cards
loaded into a card reader. You used a key punch to record your program on
punched cards, then loaded the cards into a card reader, which interpreted your
cards and loaded your program into the computer. Output from the program was
written to a printer. z/VM preserves this bit of computing history through virtual
reader, punch, and printer devices, also called unit record devices. Unit record
devices provide a handy way to send files from one virtual device to another, to
other virtual machines, or to real devices (such as real printers). For instance, you
can think of a file being sent from one virtual machine to another as the virtual
equivalent of taking a card stack from one computer and loading the stack onto
another computer’s card reader.
Behind the manipulation of these files is a CP file system called the spool filesystem. CP manages spool files on one or more DASD volumes that act as
temporary storage areas. A spool file is a collection of data along with device
control instructions for processing on a unit record device. Spooling is the
processing of files created by or intended for virtual readers, punches, and printers.
Through CP and CMS commands, you can send spool files from one virtual device
to another, from your virtual machine to another, and to real devices.
By convention, each virtual machine has a virtual reader at virtual device number
00C, a virtual punch at virtual device number 00D, and a virtual printer at virtual
device number 00E. Your virtual reader is like the in-box of an e-mail system,
except more than just e-mail can be placed there. Through your virtual punch, you
can place a copy of an entire operating system into the system spool, then use the
CP IPL command to load and run that operating system in your virtual machine.
“Installing Linux in a virtual machine” on page 77 shows you how to use this
z/VM facility.
Some important commands that operate on spool files are:
v SPOOL. Use the CP SPOOL command to set control options for one or more of
your virtual spool devices. A handy way to keep a log of your system activity is
to spool your console (SPOOL CONSOLE *, meaning send the console log to
yourself), which keeps all your console activity in a spool file. When you close
your console (SPOOL CONSOLE STOP CLOSE), your console log is sent to you.
v QUERY READER ALL. This CP command lets you view information about spool
files in your virtual reader.
v RDRLIST. This CMS command displays information about your reader files in a
full-screen interactive display.
v RECEIVE. This CMS command moves a file from your reader onto a minidisk.
v PUNCH. This CMS command punches (copies) a CMS file to your virtual
punch.
Chapter 1. About z/VM7
Related information
For information about managing spool files for the entire z/VM system, start with
the summary topics on controlling spool files in z/VM: System Operation, SC24-6233:
v Control Spool Files in the Print Queue
v Control Spool Files in the Reader Queue
v Control Spool Files in the Punch Queue
For information about managing spool files for your virtual machine, see “Using
Spooled Devices to Print, Punch, and Read Information,” in z/VM: Virtual MachineOperation, SC24-6241.
For command help, see z/VM: CP Commands and Utilities Reference, SC24-6175, and
z/VM: CMS Commands and Utilities Reference, SC24-6166.
For online help, type help on the CMS command line, then press the Enter key.
The user directory
The z/VM user directory (or user registry) describes the configuration and operating
characteristics of each virtual machine that can be created by CP. A z/VM user
directory exists in two forms: a source form that consists of one or more CMS files,
and an object form, compiled from the source, on a CP-formatted disk.
Each virtual machine has a directory entry. Here is a sample directory entry. The
callouts in reverse type next to each statement correspond to explanations that
follow the sample.
Note: In this document the user directory is modified by using the IBM Directory
Maintenance program, DirMaint
™
, which handles both source and object
forms of the user directory. Information about the directory entries is shown
for educational purposes only. Unless explicitly instructed to do so, do not
attempt to update the user directory source files manually.
1 USER LINUXC MYPASS 256M 1G G
2 IPL CMS
3 MACHINE ESA 4
4 CONSOLE 0009 3215
5 NICDEF BC0 TYPE QDIO LAN SYSTEM VSWITCH1
6 SPOOL 000C 3505 A
1. The USER statement begins a directory entry. The user ID for this virtual
machine is LINUXC. “MYPASS” is the user’s logon password. The virtual
machine has a default storage of 256 megabytes (“256M”), but you can redefine
storage up to a maximum of 1 gigabyte (“1G”). The second “G” means the
virtual machine user is a general class user and can control functions for this
virtual machine only.
2. The IPL statement indicates which operating system to load when you log on
to the virtual machine. The example shows that CMS will be loaded. Loading
CMS is handy because it allows you to make changes to the normal
8z/VM: Getting Started with Linux on System z
environment as well as run some REXX™EXECs (script-like executable files) to
set up Linux. After changing the environment, you can load Linux into the
virtual machine.
3. The MACHINE statement describes the processor architecture of the virtual
machine. The maximum number of virtual CPUs that can be defined for this
virtual machine is four. The default is one.
4. The CONSOLE statement defines the operating console (virtual console) for the
virtual machine. CMS requires console type 3215. If supported by the operating
system, you can specify 3270 or issue the CP command TERMINAL CONSOLE
3270 in the PROFILE EXEC prior to loading the operating system.
5. The NICDEF statement defines this virtual machine’s attachment to a z/VM
virtual switch.
6. SPOOL statements define the unit record devices. By convention, device
number 000C is for the virtual reader (type 3505), device number 000D is for
the virtual punch (type 3525), and device number 000E is for the virtual printer
(type 1403).
7. LINK statements provide access to another virtual machine’s minidisks.
8. MDISK statements define minidisks owned by the virtual machine. The format
of the statement is:
MDISK devno type start_cyl extent vol_label access_mode
where
devno
Is the virtual device number of the minidisk.
type
Is the disk type of the real disk; typically 3390.
start_cyl
Is the real disk starting location of the first cylinder of the minidisk.
extent
Is the minidisk size in cylinders.
vol_label
Is the volume label of the real disk.
access_mode
Is the access mode. MR means the virtual machine has read/write access.
Related information
“Creating and Updating a User Directory,” in z/VM: CP Planning and
Administration, SC24-6178
Overview of the Conversational Monitor System (CMS)
Just as you can interact with Linux or UNIX®through a bash or Korn shell, you
can interact with z/VM through CMS. Like a shell, you can use CMS to edit files,
run EXECs (script-like executable files) or programs, modify the virtual machine
environment, or modify z/VM itself. CMS is to z/VM as a shell is to Linux or
UNIX.
Minidisks and the CMS access mode
CMS, like other operating systems running in a virtual machine, can access
minidisks to store and retrieve files. For CMS, each minidisk has an access mode
Chapter 1. About z/VM9
represented by an alphabetic letter that determines how CMS searches for files. In
Linux, path variables defining directories determine the search order for files. CMS
searches for files among minidisks based on the alphabetical order of the access
mode. First, CMS looks on the A minidisk, then the B minidisk, and so forth.
The 191 minidisk holds a special place in CMS. A 191 minidisk to a CMS user is
like the home file directory for a Linux user. CMS always tries to access a user’s
191 minidisk as access mode A. The CMS 191 minidisk is often called the “A-disk.”
To see your CMS minidisks and their access modes, use the QUERY ACCESSED
command. QUERY ACCESSED is similar to the df command in Linux. To access
minidisks that are not already in the CMS access order, use the ACCESS command.
Example of viewing and accessing CMS minidisks
1. To view your accessed CMS minidisks, type the QUERY ACCESSED command
The column under “Mode” shows the access mode for each minidisk. In the
example, there are three minidisks accessed as A, E, and S.
Notice that while in CMS all commands end with a “Ready;” prompt,
indicating that CMS is ready to do more work.
2. To assign an access mode, use the ACCESS command. Example: To access the
minidisk at virtual address 491 as B, type this command and press the Enter
key:
Ready;
access 491 b
DMSACP723I B (491) R/O
Ready;
The response tells you minidisk 491 is accessed read only (R/O) as B.
3. If you assign a mode currently assigned to another minidisk, the new minidisk
replaces the current minidisk:
Ready;
access 19d d
DMSACC724I 19D replaces D (200)
DMSACP723I D (19D) R/O
Ready;
4. To remove a minidisk from an access mode, use the RELEASE command:
Ready;
release b
Ready;
10z/VM: Getting Started with Linux on System z
CMS files
CMS files have a file name, file type, and file mode. File names and file types can be
up to 8 characters long. The file mode corresponds to the access mode of the
minidisk.
Examples:
PROFILE EXEC A1
MYDOC LISTING A1
DNFPFS LISTPS B1
By convention, some file types have special meanings. For example, EXEC is the
file type for a file that contains executable statements, LISTING is the file type for
text files, and LISTPS is the file type for PostScript
To view and manipulate files, use the FILELIST command. FILELIST is similar to
the dir command in Linux.
Examples of using FILELIST
1. To view all the files on your A-disk, type this command and press the Enter
key:
filelist
Result: You see something like this:
®
files.
CHASTING FILELIST A0 V 169 Trunc=169 Size=253 Line=1 Col=1 Alt=0
CmdFilename Filetype Fm Format LreclRecordsBlocksDateTime
3. Use “/” and “=” to avoid extra typing when you enter a command in
FILELIST. The “/” means “this file” and “=” can be used to repeat a file name,
file type, or file mode.
Example: To copy a file called REXEC HELPTCPI from minidisk A to minidisk
D, type this command and press the Enter key (typing over the other columns
is OK):
Chapter 1. About z/VM11
CHASTING FILELIST A0 V 169 Trunc=169 Size=253 Line=1 Col=1 Alt=0
CmdFilename Filetype Fm Format LreclRecordsBlocksDateTime
The PROFILE EXEC is a special executable file analogous to the .profile (or
.bash_profile) in Linux and UNIX. Every time a CMS user logs on, CMS runs the
PROFILE EXEC residing on the 191 minidisk, file mode A. You can use the
PROFILE EXEC to set up your virtual machine environment; for instance, access
disks, set up special PF keys, or even load another operating system in your
virtual machine. In Chapter 7, “Creating your first Linux virtual machine and
installing Linux,” on page 71, you learn how to set up a PROFILE EXEC for your
Linux virtual servers.
There can be times when you do not want the PROFILE EXEC to execute when
you log on. For example, assume your PROFILE EXEC automatically loads Linux.
If you have just shut down Linux and want to start CMS, but prevent Linux from
being loaded again, you can prevent CMS from executing the PROFILE EXEC by
issuing access (noprof. When you IPL (load) CMS, you see an identifier line
displayed and CMS pauses with VM READ in the lower right corner of the
display. At that point you can issue access (noprof:
12z/VM: Getting Started with Linux on System z
IPL CMS
z/VM V6.1.02004-09-30 16:24
access (noprof
The Help system
z/VM provides online help through the CMS Help system. The HELP command is
like the man command in Linux. You can find full descriptions of z/VM commands
by using the HELP command. By issuing help, you can access the main help menu
for z/VM:
HELP TASKSTask Help Informationline 1 of 39
(c) Copyright IBM Corporation 1990, 2003
z/VM Help, main panel
This panel lists other Help panels that provide information about
various z/VM functions, topics, and tasks.
To view a Help panel, move the cursor to any character of the name
and press the ENTER key or the PF1 key.
HELPINFO - HELP Facility topics
MENUS- z/VM Help menus
TASKS- Basic z/VM tasks - good choice for beginners
COMMANDS - z/VM commands available to general users
CMS- CMS commands
CP- CP commands
QUERYSET - QUERY and SET commands and subcommands
TCPIP- TCP/IP commands
PF1= Help2= Top3= Quit4= Return5= Clocate6= ?
PF7= Backward 8= Forward 9= PFkeys 10=11=12= Cursor
VM READGDLVME
====>
Macro-read 1 File
To get quicker access to command information, you can issue the HELP command
with one of the keywords you see in the main menu. Example: For quick access to
the information about the CP IPL command, issue:
help cp ipl
Chapter 1. About z/VM
13
Examples of using the HELP command
1. To get help for all the CP commands, type this command and press the Enter
key:
help cp menu
Result: You see a screen like this:
CP MENUMenu Help Informationline 1 of 32
(c) Copyright IBM Corporation 1990, 2003
Help for CP commands
To display a Help panel, move the cursor to any character
of the name and press the ENTER key or the PF1 key.
An asterisk (*) preceding the name indicates a MENU panel.
A colon (:) preceding the name indicates a TASK panel.
v For more advanced information, see z/VM: CMS User’s Guide, SC24-6173.
v For online help, type help on the CMS command line, then press the Enter key.
The CMS file editor XEDIT
CMS provides a file editor called XEDIT, which is a not only a full-screen editor,
but a powerful programming tool. XEDIT has functions similar to vi in Linux. This
topic introduces you to basic editing functions.
To enter an editing session, use the XEDIT command. Example: To create a new
file called MY FILE A, type this command and press the Enter key:
xedit my file a
Without any modifications, an editing screen looks like this.
MYFILEA1 F 80 Trunc=80 Size=0 Line=0 Col=1 Alt=0 1
Numbers in the figure explanations match the reverse type call-outs in the figure:
1. File identification line. The first line displays the file name, file type, file mode
and other file characteristics. “F 80” means the length of a line is fixed at 80
characters. “Trunc=80” means any characters beyond the 80-character length are
truncated. “Size=0” means there are no lines in this file. “Line=0” means the
current line is 0 (more about the current line in point 5 on page 16). “Col=1” is
the position of the column pointer (more about the column pointer in point 6
on page 16). “Alt=0” means the file has had no alterations.
2. Message line. XEDIT communicates with you by displaying messages on the
second and third lines.
3. File area. This part of the screen is available to display the file. You can make
changes to the file by moving the cursor under any line and typing over the
characters, or by using special keys to insert or delete characters. You can make
as many changes as you want on the displayed lines before pressing the Enter
key. When you press the Enter key, the changes are made to the copy of the file
that is kept in virtual storage. The SAVE or FILE subcommand permanently
records those changes on the copy of the file that resides on disk.
Chapter 1. About z/VM15
Because a file can be too long to fit on one screen, various subcommands scroll
the screen so you can move forward and backward in a file. Scrolling the
screen is like turning the pages of a book.
4. Prefix area. The prefix area is the five left-most columns on the screen, and it
displays five equal signs (=====). Each line in the file has a prefix area. You
can perform various editing tasks such as deleting a line by entering short
commands, called prefix subcommands, in the prefix area of a line.
5. Current line. The current line is the file line in the middle of the screen (above
the scale). It is highlighted, appearing brighter than the other file lines.
The current line is important because most subcommands perform their
functions starting with the current line. Naturally, the line that is current
changes during an editing session as you scroll the screen, move up and down,
and so forth. When the current line changes, the line pointer (not visible on the
screen) moves. Many XEDIT subcommands perform their functions starting
with the current line and move the line pointer when they are finished.
6. Scale. The scale appears under the current line to help you edit. It is like the
margin scale on a typewriter.
The vertical bar (|) in column one on the scale is the column pointer. Various
subcommands perform their functions within a line starting at the column
pointer, which you can move to different positions on the scale by using XEDIT
subcommands. The current column is the column under which the column
pointer is positioned.
7. Command line. The large arrow (====>) at the bottom of the screen points to
the command input area. One way you communicate with the editor is to enter
XEDIT subcommands on this line. You can type subcommands in uppercase or
lowercase or a combination of both, and many can be abbreviated. For
example, BOTTOM, Bottom, and b are all valid ways to type the BOTTOM
subcommand (which scrolls the file to the bottom).
8. Status area. The lower right corner displays the current status of your editing
session, for example, edit mode or input mode, and the number of files you are
editing. The status area in the figure shows you are editing one file.
Tip: If you want to explore XEDIT and its capabilities, type “help” at the XEDIT
command line, which opens the XEDIT help menu.
16z/VM: Getting Started with Linux on System z
Input mode
By issuing the subcommand INPUT at the command line (you can abbreviate the
subcommand as “i”), you enter input mode.
XEDIT places the cursor 1 at the beginning of the input zone 2. The input
zone is an area in which you can place data. You can start typing at the cursor
and, when you reach the end of a line, press the new line (Enter) key to return the
cursor to the beginning of the next line. If you press the new line key on a line
without data, XEDIT returns the file to editing mode.
XEDIT blocks the command line 3 because you cannot enter subcommands
while in input mode.
Example of using input mode
1. Issue this command:
xedit my file a
2. On the command line, type input and press the Enter key.
3. Type this phrase, then press the Enter key:
CP is the z/VM hypervisor
4. Type this phrase, then press the Enter key:
CMS is the interactive component of z/VM
5. Type this phrase, then press the Enter key:
XEDIT is the CMS editor
Chapter 1. About z/VM
17
6. Press the Enter key.
Result: Your XEDIT screen looks like this:
MYFILEA1 F 80 Trunc=80 Size=3 Line=3 Col=1 Alt=3
DMSXMD587I XEDIT:
=====***TopofFile***
===== CP IS THE Z/VM HYPERVISOR
===== CMS IS THE INTERACTIVE COMPONENT OF Z/VM
===== XEDIT IS THE CMS EDITOR
Tip: XEDIT changed all lowercase letters to uppercase. To prevent this, issue the
subcommand set case mixed before you add text.
Overview of changing files
The simplest way to change a file is to type over text on a line. However, there are
times when you want to add or delete data in a file. Special keyboard keys and
XEDIT subcommands help you do that:
v Insert key. When you press the insert key, the XEDIT cursor changes shape. By
placing the cursor on a line, you can insert text between existing letters.
v Delete key. By placing the cursor on a line and pressing the delete key, the
character to the right of the cursor is deleted and the line closes up.
v ADD and INPUT prefix commands. By moving the cursor to the prefix area,
typing “a” and pressing the Enter key, you create a new line in the file. If you
want to add five lines, type “a5” in the prefix area.
The INPUT prefix command behaves similarly.
v DELETE prefix command. By moving the cursor to the prefix area, typing “d”
and pressing the Enter key, you delete a line. If you want to delete five lines,
type “d5” in the prefix area.
v LOCATE subcommand. You can find strings in the file by using the LOCATE
subcommand. XEDIT scrolls the file to the line in which the string occurs. The
invocation is l/string or simply /string. Example: To find an occurrence of
the word “interactive” in a file, issue this command from the XEDIT command
line:
XEDIT 1File
====> l /interactive
or simply:
====> /interactive
18z/VM: Getting Started with Linux on System z
Example of changing files
Assume you are still editing the file in “Example of using input mode” on page 17.
1. From the XEDIT command line, type this command and press the Enter key:
====> top
2. To prevent XEDIT from turning lowercase letters to uppercase, type this
command on the command line, then press the Enter key:
====> set case mixed ignore
3. Move the cursor to the first prefix area, type “a”, then press the Enter key.
4. On the new line, type this phrase:
z/VM has many components
5. Type over the next line so the letters are in their proper case:
CP is the z/VM hypervisor
6. Create two blank lines between the first and second lines by typing “i2” in the
second prefix area and pressing the Enter key.
7. Delete one of the blank lines by typing “d” in the prefix area, then pressing the
Enter key.
8. From the XEDIT command line, locate the word “EDITOR”:
====> /editor
Result: You should see a screen like this:
MYFILEA1 F 80 Trunc=80 Size=5 Line=5 Col=1 Alt=0
=====***TopofFile***
===== z/VM has many components
=====
===== CP is the z/VM hypervisor
===== CMS IS THE INTERACTIVE COMPONENT OF Z/VM
===== XEDIT IS THE CMS EDITOR
SAVE, FILE, QUIT, and QQUIT are XEDIT subcommands:
v Use SAVE when you want to save changes to a file permanently but continue
editing the file.
Chapter 1. About z/VM19
v Use FILE when you want to save changes to a file permanently and quit editing
the file.
v Use QUIT to quit editing a file you have not changed. If you have made any
changes, XEDIT issues a message:
DMSXSU577E File has been changed; type QQUIT to quit anyway
v Use QQUIT to quit a file and not save any changes you have made since the last
save. The subcommand is handy if you decide you do not want any of the
changes you have been currently making or if you want to be sure you have not
changed a critical file.
Related information
v z/VM: CMS Primer, SC24-6172
v For more advanced information, see z/VM: XEDIT User’s Guide, SC24-6245.
Summary of Linux and z/VM similarities
Though Linux and z/VM differ in many ways, they have similar functions and
commands. Table 1 summarizes the similarities:
Table 1. Linux and z/VM similarities
Linuxz/VM (CP and CMS)
bootIPL (initial program load)
df commandQUERY ACCESSED command
dir commandFILELIST command
file directorydisk access mode
kernelControl Program (CP)
man commandHELP command
memorystorage
.profilePROFILE EXEC
scriptEXEC
shellConversational Monitor System (CMS)
user registryuser directory
viXEDIT
20z/VM: Getting Started with Linux on System z
Chapter 2. Planning for Linux virtual servers
This topic covers system requirements and recommendations you need to follow
before you install z/VM.
Figure 3 is an example of a mainframe configured for z/VM, Linux guests, and
other operating systems.
Linux virtual
machines for
development,
Linux virtual
machines for
production
LPAR running
z/OS
test, and
production
replication
LPAR running
z/VM
LPAR running
z/VM
Mainframe
Figure 3. Example mainframe configuration
One logical partition (LPAR) is devoted to Linux production under z/VM. Another
LPAR is devoted to Linux application development and test under z/VM; you
might also run a replica of your production guests for testing purposes within this
LPAR. Finally, another LPAR runs another operating system, such as z/OS.
The number of Linux guests you need to run depends on many factors. This topic
discusses:
An important element of z/VM capacity planning is knowing what z/VM is good
at: the value of z/VM is its ability to consolidate distributed Linux workloads that
under-utilize CPUs or do not require peak processing at the same time. z/VM
improves the cost and performance efficiencies because it shares CPU cycles
among virtual servers that, if distributed on separate servers, would be idle. There
are three key characteristics that you should look for when deciding whether a
Linux server could be consolidated on z/VM. Look for Linux workloads that:
v Under-utilize CPUs
v Do not require peak processing at the same time as others
v Have idle times, so that z/VM can share processing cycles with other Linux
virtual servers.
Distributed servers running applications being considered for consolidation that
run at high utilization throughout the day and peak with other candidate
applications are poor candidates for consolidation. In general, the lower the
utilization of a candidate application, or the more solitary its peaks are compared
to other candidates under consideration, the more likely it can be consolidated.
Likewise, consider a benchmarking strategy that recognizes the real-world
characteristics of your Linux workloads. A typical (inappropriate) approach is to
conduct atomic measurements that compare throughput of a single instance of an
application at a CPU utilization of 100%. This type of benchmarking practice, while
simple and easy to conduct, yields inappropriate and misleading expectations of
capacity because the practice does not incorporate any of the real-world
operational characteristics or highlight any of the elements and advantages of
consolidation. While such benchmark comparisons may be appropriate in a
distributed paradigm for assessing capacity and performance of standalone servers
running a single instance of an application, these comparisons are flawed when
evaluating z/VM and the mainframe. The flaw is that such comparisons inflate the
true operational utilization and throughput of the standalone distributed servers
and do not account for the ability of z/VM to share idle cycles among virtual
servers, which is not possible on under-utilized standalone distributed servers.
Conducting a benchmark in such a fashion simply answers the question that, if
you had one server running one instance of an application at an assumed
utilization of 100%, how much throughput can you expect. In a consolidation case,
that is not the question to ask. The question when designing a methodology for
assessing capacity for consolidation is how many distributed workloads can you fit
on z/VM using the true operational utilization and throughput of those workloads
you are considering.
Once you have selected the right set of applications and their servers for
consolidation, establish a base set of measurements that capture the real
operational throughput of the servers. Figure 4 on page 23 shows a simplified
consolidation example, in which there were many application instances running on
separate standalone servers. Each of these application servers were 10% busy
producing 74 transactions per second.
22z/VM: Getting Started with Linux on System z
Applications on
distributed servers
10% average CPU
Same applications running in virtual servers on z/VM
App
1
74 tps
App
1
74
tps
App
40
74 tps
Figure 4. Server consolidation example
When you have established the baseline of 74 transactions per second for the
distributed servers, define an equal number of z/VM virtual servers in which to
run the applications.
To assess the system capacity required to support the same volume of work, tune
the workload driver so that each instance of the application running in a virtual
server produces the same transaction rate as its distributed counterpart.
App
2
74
tps
App
3
74
tps
App
4
74
tps
App
5
74
tps
z/VM
LPAR
App
36
74
tps
App
37
74
tps
App
38
74
tps
App
39
74
tps
App
40
74
tps
The previous example showed an even distribution of work activity. However, the
vast majority of real-world workloads skew the distribution of work. At any given
moment, some applications are active while others are less active or idle. Unless
your workload is evenly distributed, consider skewing the workload distribution
as part of your capacity assessment.
Chapter 2. Planning for Linux virtual servers23
40
V
.
.
i
.
r
30
.
t
.
u
.
20
a
.
l
.
.
10
S
9
8
e
7
r
6
5
v
4
e
3
2
r
1
A
Increasing throughput
Figure 5. Workload distribution patterns (Part 1 of 3)
40
V
.
.
i
.
r
30
.
t
.
u
.
20
a
.
l
.
.
10
S
9
8
e
7
r
6
5
v
4
e
3
2
r
1
B
Increasing throughput
Figure 5. Workload distribution patterns (Part 2 of 3)
40
V
.
.
i
.
r
30
.
t
.
u
.
20
a
.
l
.
.
10
S
9
8
e
7
r
6
5
v
4
e
3
2
r
1
Figure 5. Workload distribution patterns (Part 3 of 3)
Figure 5 shows three workload distribution patterns. Workload distribution pattern
A represents the prior example of an even distribution of work activity among the
24z/VM: Getting Started with Linux on System z
C
Increasing throughput
applications. This pattern shows the worst-case, in which all workloads demand
resources at the same time, rather than the characteristics of most production
environments. Workload distribution patterns B and C show truer operational
characteristics: at any given moment, some applications are busy while others are
idle or less busy; and at different times, different applications are busy.
Figure 6 shows the relative throughput capacity of each of patterns A, B, and C.
A
B
C
Increasing throughput
Figure 6. Relative throughput for patterns A, B, and C
Such distributions reflect the real world and place far less stress on the system
because they are more cache-friendly and can result in sharply higher capacity
results. Likewise, if your workload has characteristics of a skewed distribution,
incorporate this aspect into your benchmarking methodology.
Estimating memory and CPU requirements
In most cases, initial system sizings are done with the assistance of IBM, your
business partner, or consultant. This section gives you an appreciation for the
things considered during an initial sizing and the things you should consider as
you add work to your system.
To get you started, this topic gives you some basic knowledge about estimating the
memory and CPU requirements for your Linux virtual servers. Such estimating is
not an exact science and your experience may vary, but following the guidelines in
this topic should help you get started, after which you need to measure the
performance and fine tune your system. Topics in Chapter 11, “Monitoring
performance and capacity,” on page 117 help you fine-tune your initial
configuration.
Overview of estimating memory and CPU requirements
Memory for the LPAR
A key factor in determining memory resources is the memory required for your
applications. If the applications are new, you must estimate or start at some initial
size; you can determine existing application memory requirements if the
applications are currently running on other platforms. For example, you may not
know how much memory a new WebSphere
®
application requires, so you can start
Chapter 2. Planning for Linux virtual servers25
with 200 MB for the size of the Java™Virtual Machine. Additionally, WebSphere
Application Server requires 60 MB of memory.1So the total for your new
application would be 260 MB. If you have an existing WebSphere application you
know requires 250 MB of memory, the total with WebSphere Application Server
would be 310 MB.
The total memory requirement for your applications, plus memory required for
each Linux operating system and z/VM itself, give you an estimate of the memory
required for a given LPAR. Do not pad the total memory figure.
Many customers prefer to isolate their applications by running each one in a
separate virtual machine. Another strategy is to combine more than one application
in a virtual machine, keeping the number of Linux guests to a minimum rather
than creating one Linux guest for each application. The reason is that each Linux
guest brings with it some overhead: each Linux operating system itself requires
additional memory, and even an idle Linux guest uses some CPU resources. Also,
applications sometimes can share middleware, which conserves memory. If it
conforms to your installation’s policy, you might be able to combine more than one
application in a virtual machine, thereby saving memory. For example, several
WebSphere applications can share the same WebSphere Application Server and the
JVM in one virtual machine rather than each application having its own
WebSphere Application Server and JVM in its own virtual machine, which would
multiply the number of virtual machines and require more total memory.
Of the total memory requirement, start by allocating 75% to central storage and
25% to expanded storage. (Though z/OS no longer supports expanded storage,
z/VM and the hardware do.) There are performance advantages to allocating
expanded storage. Because z/VM is a 64-bit system, it seems as though allocating
all memory to central storage makes sense. However, z/VM manages a paging
hierarchy that uses expanded storage first, then slower DASD. Pages move to the
slower paging DASD when not referenced within a given time limit. But, if pages
are referenced again within the time limit, they can be brought back into central
storage rapidly. This paging design gives a more consistent response to users.
During system operations, measure actual memory usage to test the initial memory
allocation, which assumes all your guests need the estimated amount of memory
all the time. Just as CPU demand has peaks and valleys, so does memory usage.
Memory for the virtual machines
For the general case of server consolidation, keep the virtual machine size small.
How small you can define the virtual machine depends on the applications and
workloads running in those virtual machines. Various Linux distributions might
have minimum requirements as low as 64 MB. Some applications run fine in those
minimum configurations. Other applications and workloads might require larger
virtual machines. Avoid defining a virtual machine larger than it needs to be,
because Linux uses excess memory for file and buffer caches. On a standalone
system, these buffers can be very helpful for certain workloads to avoid I/O.
However, in a virtual environment, the extra memory consumed adds to overall
system memory contention. Such cases could cause a negative impact greater than
the positive impact of I/O avoidance, which is especially true in configurations in
which data is shared heavily between guests and is mostly read. In those
configurations, z/VM minidisk caching can help avoid I/O. As a general guideline,
define the virtual machine memory size to keep Linux on the verge of swapping.
1. Current requirements. For more information about Java and WebSphere memory requirements, consult Java and WebSphere
documentation.
26z/VM: Getting Started with Linux on System z
Lower the memory size until you see Linux begin to swap, then increase the
virtual machine memory to the next bigger size.
Another way to reduce the memory requirements is through discontiguous savedsegments (DCSS). A DCSS is an area of virtual storage outside the address range of
a virtual machine. The area can contain read-only data or reentrant code. A DCSS
connects discontiguous segments to a virtual machine’s address space so programs
can be fetched. DCSSs can be shared by many virtual machines, so total virtual
memory required might be reduced. This reduced requirement for virtual memory
can:
v Reduce CP paging requirements.
v Allow a given z/VM instance to support more Linux virtual machines.
v Reduce the amount of Linux disk I/O by having file systems, block devices, and
shared objects in DCSSs.
A Linux guest machine uses DCSSs through the DCSS block device driver.
Related information
v This manual shows you how to set up a swap disk on a z/VM minidisk. Other
options are available, such as using a virtual disk in storage. For more
information on swap disk options, see “Linux Performance when running under
VM” (http://www.vm.ibm.com/perf/tips/linuxper.html).
v For more information about DCSS block device drivers, see Linux on System z:
Device Drivers, Features, and Commands on the IBM developerWorks
System z Web site entitled “Documentation for Development stream” at:
The real CPU requirement is not simply a function of a single server: rather, the
requirement is a function of all your virtual servers combined (see “Overview of
z/VM capacity planning” on page 22). You must consider what each of your
applications require and then estimate the overall CPU requirement. Your IBM
representative, business partner, or consultant offer services to help you perform
this task.
When defining z/VM LPARs, it is recommended that you assign a minimum of
two logical processors. You have the option of dedicating the processors to the
LPAR or sharing them with other LPARs. It is also possible to set different
processing weights to LPARs, which gives more processor resources to one over
another. For instance, you might give your production LPAR 60% weight and your
test LPAR 40%.
Virtual CPU requirements
In general, follow this guideline: define as many virtual CPUs as needed
(maximum CPU resources required), but do not exceed the number of real
processors assigned to this LPAR. Extra virtual CPUs just add to the overhead and
potentially increase the software multiprocessing factors.
Steps for estimating memory and CPU requirements
Before you begin: Read “Overview of estimating memory and CPU requirements”
on page 25 to understand background topics.
Perform these steps to estimate memory and CPU requirements:
Chapter 2. Planning for Linux virtual servers27
1. Determine a set of applications that will run in a Linux virtual server. The set
might include one or more applications that process a given workload. For
example, if you use a WebSphere application, you need to include the
WebSphere application server and the JVM.
2. Determine the total memory requirement for the application set.
3. Add the memory requirement for the Linux operating system to the
application set memory requirement. Enter the result in the left column in
Table 2.
4. If you plan to run the same application set in more than one Linux virtual
server (for instance, you want to have replicated virtual servers to distribute
the workload), multiply the result from step 3 times the number of replicated
servers. Enter the result in the right column in Table 2.
5. Repeat steps 1 through 4 for each application set.
6. Add up all the figures in the right column of Table 2, including the memory
requirement for z/VM, to get a total.
7. Calculate the central and expanded storage sizes.
8. Record the number of real CPUs available, which helps you determine how
many virtual CPUs each virtual machine has.
Table 2. Memory requirements worksheet
Application set plus Linux
1
2
3
4
5
x Number of virtual
servers
x Memory estimate
(MB)
z/VM:40
Total:
Central storage estimate (Total x .75):
Expanded storage estimate (Total x .25):
Number of real CPUs:
You are done estimating. Later, you will measure your system’s performance and
fine tune the configuration.
Guidelines for estimating the amount of DASD you need
Here are some guidelines on estimating the amount of DASD you need.
For z/VM paging
v Provide sufficient paging DASD for the paging subsystem. As shipped, z/VM
has one full paging volume, which might be sufficient for your system. A rule of
thumb is to provide twice as much DASD space as your total virtual storage
28z/VM: Getting Started with Linux on System z
requirement. This value can be decreased by a fraction of the real memory
available. See “Paging Space” in z/VM: CP Planning and Administration.
v Add paging space on a volume basis: do not use the paging volume for other
purposes.
“Steps for adding a paging, spooling, or user volume” on page 35 tells you how
to add a paging volume.
Related information
For information about how z/VM uses DASD space and DASD space calculations,
see “Direct Access Storage Requirements” in z/VM: CP Planning and Administration,
SC24-6178.
For the Linux file system
v For disks for each Linux virtual server, the simplest guideline is to provide one
3390-3 at a minimum. A one-volume configuration supports many of the default
packages installed by each Linux distribution. The need for additional DASD
space depends on which additional products you install, the levels of those
products, the size of user applications associated with those products, and
end-user data.
Linux views disk space in bytes while z/VM views disk space according to the
device geometry (for example, number of cylinders). Regardless of the 3390
model, each cylinder holds approximately 670 KB when formatted. A 3390-3 has
3338 usable cylinders, which means it can hold about 2.2 GB when formatted.
The difference between 3390 models is the number of cylinders the model has. A
3390-9 has three times the capacity of a 3390-3, so it holds approximately 6.6 GB.
Consult product documentation for additional DASD space requirements. Your
Linux distributor will tell you how much disk space to use for minimum and
full installations.
v Eliminating certain Linux packages can help reduce your DASD requirements.
Consider a minimal Linux installation to save disk space.
v Another strategy to save DASD is to divide up the Linux file system into
read-only and read/write minidisks, then share the read-only minidisks among
the virtual machines running Linux.
v Do not dedicate DASD to Linux (that is, do not allocate an entire DASD to
Linux for its exclusive use). Instead, use minidisks for Linux volumes, especially
those whose I/O operations are primarily read operations, to take advantage of
minidisk caching. The z/VM Control Program by default maintains a minidisk
cache for better performance. However, if there are many write operations to the
minidisk, the extra Control Program overhead used to maintain the cache
outweighs the benefits of caching. If the I/O operations include many write
operations, turn off minidisk caching for the minidisk by using the CP command
SET MDCACHE MDISK or the MINIOPT statement in the user directory.
v The Parallel Access Volume facility allows a controller to offer multiple device
numbers that resolve to the same DASD, which allows I/O to the same DASD
to happen concurrently. If you do not have the Parallel Access Volume facility,
each DASD can do only one I/O at a time. To have your Linux file system
perform well without the Parallel Access Volume facility, you can spread the file
system across separate volumes and use the Linux logical volume manager,
which maximizes the opportunity for the I/Os to the volumes to happen
concurrently. For example, you could set up two stripes so Linux can do two
I/Os at a time. Note that the volumes should be on separate controllers to avoid
contention.
Chapter 2. Planning for Linux virtual servers29
Planning your network
To use Linux, you need to connect to your TCP/IP network.
You need to determine:
v The device addresses of your network interface.
v The host name and domain name of your Linux virtual servers
v The IP address and the subnet mask
v Depending on the connectivity type, the broadcast name server and network
addresses.
v Whether you plan to have your Linux virtual servers use the cryptographic
facility for SSL acceleration.
TCP/IP networking options for Linux
z/VM provides two broad categories for TCP/IP connectivity for Linux guests:
v Real network interfaces with connections to the LAN. A real network connection
may be through any device supported by Linux, including IBM Open Systems
Adapters and channel-attached devices. The real device (as defined in the
Input/Output Configuration Data Set) must be dedicated to the virtual machine
running Linux. You can do this by providing DEDICATE entries in the CP
directory entry for the virtual machine or by using the CP ATTACH command.
v Virtual network interfaces, which allow the real connections to be shared,
– Guest LAN. Through a guest LAN, z/VM simulates OSA-Express or
HiperSockets
communication adapters. Such connections enable guests to communicate
through a LAN rather than through point-to-point connections. If the guests
require external connectivity, that connection requires a virtual machine acting
as a router between the guest LAN and the external connection.
– Virtual switch. A virtual switch is a special kind of guest LAN. In addition to
providing a network of virtual adapters, the switch can be connected directly
to an OSA-Express QDIO adapter. This capability allows you to gain
connectivity to external LAN segments without requiring a router, reducing
CPU utilization and latency associated with providing external connectivity
through a router.
™
microcode to allow you to connect guest systems to
The virtual switch is the preferred way to connect your Linux machines to the
network, but there are other legacy connection types. For more information, see
“Networking Options in z/VM” in z/VM: Connectivity, SC24-6174.
Figure 7 on page 31 is a diagram of a virtual switch called VSWITCH1. Coupled to
the virtual switch through NICDEF directory statements are Linux virtual servers.
The DTCVSW1 service virtual machine
2
, running a subset of the TCP/IP stack, is
the virtual switch controller. The full TCP/IP stack runs in the TCPIP service
virtual machine, the z/VM production TCP/IP. The two service virtual machines
are kept separate so you can operate them independently.
Due to the advantages of virtual switches, this document shows you how to set up
a virtual switch configuration only. IBM created the TCP/IP and user directory
2. A service virtual machine or service machine is virtual machine that provides a system service, such as accounting, error recording,
or monitoring.
30z/VM: Getting Started with Linux on System z
changes for the default virtual switch controllers DTCVSW1 and DTCVSW23, but
there are other tasks you must do. These tasks are intermingled with other
configuration tasks in Chapter 3, “Changing the system configuration,” Chapter 5,
“Configuring TCP/IP,” and Chapter 7, “Creating your first Linux virtual machine
and installing Linux.” To place the tasks in context, Table 3 summarizes how to
configure TCP/IP and a virtual switch.
Table 3. Task roadmap for configuring TCP/IP and a virtual switch
SubtaskAssociated instructions (see...)
Define a virtual switch for z/VM“Steps for defining a virtual switch” on page 44
Configuring the production TCP/IP“Setting up the production TCP/IP” on page 63
Configuring TCP/IP to be logged on
automatically
Connecting your virtual machine to the
virtual switch
Configuring Linux to use the virtual
switch
“Steps for automatically starting TCP/IP” on
page 63
“Overview of defining virtual machines for
Linux” on page 71
Your Linux installation documentation. For
Linux, the connection is defined as an
OSA-Express device.
LINUX0
VSWITCH
CONTROLLER
ON
nicdef 600...
vswitch1
OSA-Express
Figure 7. Example of a virtual switch
Related information
“Networking Options in z/VM” in z/VM: Connectivity, SC24-6174
LINUX2LINUX1LINUX4LINUX3LINUX5LINUX6TCPIPDTCVSW1
nicdef 600...
vswitch1
nicdef 600...
vswitch1
z/VM virtual switch VSWITCH1
CP
switch
Physical LAN
nicdef 600...
vswitch1
nicdef 600...
vswitch1
nicdef 600...
vswitch1
nicdef 600...
vswitch1
Giving Linux virtual servers access to cryptographic hardware
for SSL acceleration
To run Linux as a guest under z/VM with access to cryptographic hardware for
SSL acceleration, you must
3. A second virtual switch controller is available for failover: CP automatically chooses another virtual switch controller should the
first one fail.
Chapter 2. Planning for Linux virtual servers31
1. Define the cryptographic facility for the LPAR in which z/VM runs through the
Hardware Configuration Definition.
2. Define the cryptographic capability for each Linux virtual machine in the user
directory.
3. Have the z90crypt device driver integrated into the Linux operating system.
Some distributions have the device driver integrated, while other distributions
require you to install it.
The user directory statement CRYPTO APVIRT provides access to the cryptographic
hardware and allows the z90crypt device driver to use cryptographic instructions.
z/VM manages a pool of hardware cryptographic queues that are shared among
all the guests using the cryptographic facility. You can create more guests that
share the cryptographic facility than the actual number of hardware queues
available. Even though the hardware queues are shared, the data remains isolated
and is not vulnerable or exposed to other Linux images.
“Steps for defining a master virtual machine for Linux” on page 71 shows you
how to add the CRYPTO APVIRT user directory statement to the master Linux virtual
machine, which means all replicas of this master have access to the cryptographic
facility. If you prefer, you can leave this statement out of the master Linux virtual
machine and add the user directory statement to individual Linux virtual machines
only.
z/VM provides CP commands to manage the cryptographic facility. See “Step for
managing real devices” on page 100, and “Virtual machine operation tasks” on
page 107.
Related information
v For more information about defining the cryptographic facility for the LPAR in
which z/VM runs, consult your hardware and Hardware Configuration
Definition documentation.
v For more information about z/VM's support for the cryptographic facility, see
“Using a Cryptographic Coprocessor Facility” in z/VM: CP Planning andAdministration.
v For information about setting up secure SSL communications, see “Configuring
the SSL Server” in z/VM: TCP/IP Planning and Customization.
v For information about the z90crypt device driver, see Linux on System z: Device
Drivers, Features, and Commands on the IBM developerWorks Linux on System z
Web site entitled “Documentation for Development stream” at:
To add a new user to z/VM, you must create a directory entry for a new virtual
machine. Through native facilities, you can update a file called USER DIRECT,
then run the DIRECTXA utility to compile the source file and place the new user
directory online. The USER DIRECT file is simply a CMS file containing various
directory statements. A virtual machine definition is a grouping of directory
statements beginning with a USER statement and ending with either the next
USER statement or the end of the file.
You can administer the user directory by editing the USER DIRECT file, then
placing the user directory online through the DIRECTXA command. However, such
a method of user management is cumbersome and error prone. Because the user
32z/VM: Getting Started with Linux on System z
directory is so important for z/VM, a corrupt or invalid online user directory can
be disastrous. For example, if you inadvertently overlap minidisk definitions, it
could cause serious data loss. If your z/VM system has more than a handful of
virtual machines, it makes little sense to manage users manually. You need an
automated facility.
The Directory Maintenance Facility for z/VM (often called DirMaint) is just such
an automated facility. DirMaint is a CMS application that helps you manage your
z/VM user directory through a simplified command interface and automated
facilities. DirMaint commands, which are like their corresponding directory
statements, initiate user directory transactions. DirMaint error checking ensures
that only valid changes are made to the user directory, and that only authorized
personnel are able to make the requested changes. Any transaction requiring the
allocation or deallocation of minidisk extents can be handled automatically. You
can control all user-initiated transactions through passwords and record
transactions for auditing purposes.
When you activate DirMaint, you give control over the user directory to the
DIRMAINT service virtual machine. The source USER DIRECT file on the MAINT
virtual machine’s 2CC disk is no longer valid and you must not use the
DIRECTXA command. DirMaint maintains and updates the online user directory.
You interact with the DIRMAINT service machine through commands to make
changes to the user directory.
A handy DirMaint function for virtual machines is the capability to define template
(or prototype) directory entries. With this function, you can clone a virtual machine
with a few commands by instructing DirMaint to create a new virtual machine like
the prototype entry and to replicate the prototype’s disks. For more information
about using templates for cloning virtual machines, see Chapter 8, “Cloning Linux
virtual servers,” on page 83.
DirMaint also has a service virtual machine called DATAMOVE. The service
machine moves the contents of CMS-formatted minidisks from one disk to another,
then erases the contents of the CMS minidisks being deleted. Because these
functions are time consuming, the functions are offloaded from the DIRMAINT
service machine to the DATAMOVE service machine, making DIRMAINT available
to process commands.
Directory Maintenance Facility is preinstalled on your system in a disabled state.
To use DirMaint, you must first pay a license fee, then enable the feature and
configure it. Table 4 gives you an overview of the tasks involved for enabling and
configuring DirMaint.
Table 4. Task roadmap for enabling and configuring DirMaint
SubtaskAssociated instructions (see...)
Enabling the Directory Maintenance
Facility
“Steps for enabling DirMaint” on page 51
Chapter 2. Planning for Linux virtual servers33
Table 4. Task roadmap for enabling and configuring DirMaint (continued)
SubtaskAssociated instructions (see...)
Configuring the Directory Maintenance
Facility
v “Steps for changing the passwords for
DirMaint service machines” on page 52
v “Steps for configuring DirMaint” on page 53
v “Steps for authorizing users to perform
DirMaint tasks” on page 54
v “Steps for controlling where DirMaint creates
minidisks” on page 55
v “Steps for copying the current USER DIRECT
file” on page 57
v “Steps for putting the configuration into
production and starting DirMaint” on page 58
v “Steps for automatically starting DIRMAINT”
on page 59
Testing and using the Directory
Maintenance Facility
v “Steps for testing DirMaint” on page 60
v “Step for modifying the OPERATOR’s directory
entry” on page 60
Related information
v Program Directory for IBM z/VM Directory Maintenance Facility Feature at:
http://www.ibm.com/eserver/zseries/zvm/library/
v z/VM: Directory Maintenance Facility Tailoring and Administration Guide, SC24-6190
Steps for obtaining documentation and media
You must obtain your Linux distribution documentation and installation media.
Before you begin: You need to decide which Linux distribution you will use.
Perform these steps to obtain documentation and media:
1. Obtain Linux documentation according to your distribution:
v SUSE Linux documentation at http://www.suse.com
v Red Hat, Inc., documentation at http://www.redhat.com
2. Access the installation media provided with your distribution. You need access
to:
v The Linux system files (kernel, parm file, and initial RAM file)
v A UNIX-based FTP or NFS server attached to your network.
You are finished when you have obtained the documentation and access to
installation media.
34z/VM: Getting Started with Linux on System z
Chapter 3. Changing the system configuration
This topic tells you how to change the z/VM system by updating the SYSTEM
CONFIG file.
Overview of the SYSTEM CONFIG file
The SYSTEM CONFIG file contains the primary system definitions used when CP
is booted (IPLed). All of the information needed to configure CP statically comes
from this file. As a system programmer, you should become familiar with this file.
The SYSTEM CONFIG file resides in the same location as the bootable CP kernel.
Both objects, along with other files and modules, reside on a special
CMS-formatted minidisk. Minidisks containing such objects are called parm disks
because when allocated those disks are given a special record category type called
“PARM”. There can be more than one parm disk allocated in a z/VM system for
backup and recovery. However, for any specific IPL, only one parm disk is used to
load code and configuration files.
Related information
“Using Configuration Files” in z/VM: CP Planning and Administration, SC24-6178.
Steps for adding a paging, spooling, or user volume
z/VM classifies DASD volumes according to their use. In this topic, you format
and allocate paging, spooling, and user volumes. A paging volume is a volume
owned by CP that is used by the paging subsystem; a spooling volume is a volume
owned by CP that is used by the spooling subsystem for spool files; and a uservolume is a DASD volume that CP uses for minidisks.
Before you can attach a paging, spooling, or user volume, you must format and
label the volume. Later, you will update the CP-owned volume list in SYSTEM
CONFIG to include new paging and spooling volumes, and the user volume list in
SYSTEM CONFIG to include user volumes, so you need to format the new
volumes now. Use the CPFMTXA utility program. Then use CPFMTXA to allocate
the volumes as paging, spooling, or user volumes.
Before you begin: You need to know how many paging, spooling, and user
volumes you need. See “Guidelines for estimating the amount of DASD you need”
on page 28.
You need to log on as MAINT. You need to have one or more real DASD volumes
connected to your computer.
Perform these steps to format a paging, spooling, or user volume:
1. Attach the volume to MAINT.
Example: If the volume is at real address 202, type this command and press
the Enter key:
DASD 0202 ATTACHED TO MAINT 0202 WITH DEVCTL
Ready;
2. Start CPFMTXA:
cpfmtxa 202
3. Type in these responses and press the Enter key in response to each prompt:
ENTER FORMAT, ALLOCATE, LABEL, OR QUIT:
format
ENTER THE CYLINDER RANGE TO BE FORMATTED ON DISK 0202 OR QUIT:
000 end
ENTER THE VOLUME LABEL FOR DISK 0202:
label
FORMAT WILL ERASE CYLINDERS 00000-00544 ON DISK 0202
DO YOU WANT TO CONTINUE? (YES|NO)
yes
.
.
.
ENTER INPUT COMMAND:
end
ICK00002I ICKDSF PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0
ENTER ALLOCATION DATA
.
.
.
where label is a volume label (for instance, PAG002 for a paging volume,
SPL002 for a spooling volume, or USR002 for a user volume).
4. In response to the “ENTER ALLOCATION DATA” prompt, type one of these
responses and press the Enter key:
v If you are creating a paging volume:
page 0 end
end
v If you are creating a spooling volume:
spol 0 end
end
v If you are creating a user volume:
perm 0 end
end
Result: You see more messages from the program. Finally, you see this:
ICK00002I ICKDSF PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0
5. Detach the volume.
detach 202
DASD 0202 DETACHED
Ready;
6. Repeat these steps for other paging, spooling, and user volumes you need.
36z/VM: Getting Started with Linux on System z
7. Record the volume label and allocation type for each volume you have
defined. You will use this information later when updating the CP-owned
volume list.
You are done for now. Later, you will make these volumes available to CP for its
use.
Steps for releasing the primary parm disk
Before you begin updating the SYSTEM CONFIG file, you must end CP’s access to
the primary parm disk.
Before you begin: You need to log on as MAINT.
Perform these steps to release the primary parm disk:
1. Instruct CP to end its access to the primary parm disk. Type this command
and press the Enter key:
cprelease a
CPRELEASE request for disk A scheduled.
HCPZAC6730I CPRELEASE request for disk A completed.
Ready;
2. Access the primary parm disk (MAINT’s CF1). Type these commands and
press the Enter key after each command:
link * cf1 cf1 mr
Ready;
access cf1 z
Ready;
You know you are done when you have access to the CF1 disk.
Steps for updating the CP-owned volume list
The CP-owned volume list is the place where you specify the labels of paging and
spooling volumes that CP should automatically attach to the system during IPL.
These volumes contain the system data for your z/VM system. All other volumes
on the system are considered user volumes.
Before you begin: You need to format and allocate your paging and spooling
volumes. See “Steps for adding a paging, spooling, or user volume” on page 35.
You need to end CP’s access to the primary parm disk. See “Steps for releasing the
primary parm disk.”
Perform these steps to update the CP-owned volume list:
1. Edit the SYSTEM CONFIG file. Type this command and press the Enter key:
xedit system config z
Chapter 3. Changing the system configuration
37
Result: You see a file like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=277 Line=4 Col=1 Alt=0
***TopofFile***
/**********************************************************************/
/*SAMPLE SYSTEM CONFIG FILE*/
/**********************************************************************/
/**/
/* Rules of the config file:*/
/**/
/*1) REXX style comments are permitted*/
/**/
/*2) Configuration commands can be continued to next line via a*/
/*trailing comma on the previous line*/
/**/
/*3) IMBED statements can be used to imbed other files that*/
/*reside on the PARMDISK into the configuration file*/
/**/
/*4) The IMBED record is of the format:IMBED fn ft*/
/**/
/*5) Tolerance record can be used to signal whether CP should*/
/*tolerate errors in some sections of the CONFIG file or not; */
/*default is to have tolerance on (that is to tolerate errors) */
/**/
====>
2. Find the section titled “CP_Owned Volume Statements.” At the XEDIT
command line, type this command and press the Enter key:
====> /cp_owned volume statements
3. Move the cursor to a CP-owned slot marked “Reserved.”
4. Type over the word “Reserved” with the volume label of a paging or spooling
volume that you allocated in “Steps for adding a paging, spooling, or user
volume” on page 35.
Example: If you are adding a spooling volume called “SPL001,” type in that
volume label and use the space bar to remove the rest of the characters in the
word “Reserved.”
5. Move the cursor to the next line and repeat step 4 for the other paging and
spooling volumes you have allocated.
6. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
38z/VM: Getting Started with Linux on System z
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=277 Line=74 Col=1 Alt=0
The default system identifier appears on printed output separator pages and the
status area of 3270 display screens. z/VM assigns the identifier ZVMV6R10 to all
z/VM version 6 release 1 systems. If you have many z/VM systems, it is difficult
to determine which z/VM system you are logged onto unless you make the
system identifier unique for each system.
Before you begin: You need to end CP’s access to the primary parm disk. See
“Steps for releasing the primary parm disk” on page 37.
Perform these steps to update the default system identifier:
1. Edit the SYSTEM CONFIG Z file. Type this command and press the Enter key:
xedit system config z
2. Find the line “System_Identifier_Default.” At the XEDIT command line, type
this command and press the Enter key:
====> /system_identifier_default
3. Replace the default system identifier with your own:
System_Identifier_Default mysystem
where mysystem is your system identifier, such as VM610A.
4. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
Chapter 3. Changing the system configuration
39
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=277 Line=114 Col=1 Alt=0
Just as there is a list of DASD volumes that CP should automatically attach to the
system during IPL for access to CP system areas, there is a list of DASD volumes
that CP should automatically attach to the system for user minidisk definitions.
Because all minidisks are managed by CP, all volumes that house minidisks must
be attached to the z/VM system. CP must control the volumes so it can reorient
channel programs initiated by a guest operating system. The guest perceives its
disks as starting at cylinder 0, but the true location of the guest’s minidisk starts at
an offset of real cylinder 0.
If no user volumes are attached to the system at IPL time, the real devices housing
minidisks need to be attached manually (see “Step for managing real devices” on
page 100). Otherwise, virtual machines will have no disks. To avoid manual
attachment, you can tell CP to look for DASD volume labels and attach those
devices at IPL time.
The USER_VOLUME_LIST statement directs CP to attach specific user DASD
volumes at z/VM load (IPL) time. The USER_VOLUME_INCLUDE statement
allows you to create a general volume identifier and to include all volumes that
match the general identifier. For example, if all your Linux user volumes have a
volume identifier starting with V2LX, you can add this statement:
User_Volume_Include V2LX*
Tip: If a volume is normally attached to the system using a
USER_VOLUME_INCLUDE statement, CP does not notify the operator if the
volume is not mounted. If a user volume is necessary for normal system operation,
specify it with a USER_VOLUME_LIST statement so that the operator is notified
during system initialization if the volume is not mounted.
Before you begin: You need to format and allocate the user volumes you need. See
“Steps for adding a paging, spooling, or user volume” on page 35.
You need to end CP’s access to the primary parm disk. See “Steps for releasing the
primary parm disk” on page 37.
Perform these steps to update the user volume list:
1. Edit the SYSTEM CONFIG Z file. Type this command and press the Enter key:
xedit system config z
2. Find the section titled “User_Volume_List.” At the XEDIT command line, type
this command and press the Enter key:
====> /user_volume_list
40z/VM: Getting Started with Linux on System z
3. Move the cursor to the “User_Volume_List” statements.
4. Blank out the comments (“/*” and “*/”) on either side of the
“User_Volume_List” statement and add the DASD label for the user volume.
Example:
User_Volume_List LINUSR
5. Move the cursor after the User_Volume_List statements. In the prefix area,
8. When you finish the User_Volume_Include statements, press the Enter key.
9. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=253 Line=101 Col=1 Alt=3
/**********************************************************************/
/*User_Volume_List*/
/* These statements are not active at the present time. They are*/
/* examples, and can be activated by removing the comment delimeters. */
/* Multiple labels can be stacked on one statement.*/
/**********************************************************************/
Steps for setting up warm start, clearing tdisk space, and other
features
The FEATURES statement in SYSTEM CONFIG allows you to modify attributes
associated with the running system at IPL time. In this procedure, you will modify
some of the features:
v The Auto_Warm_IPL feature causes CP to bypass prompting for start options,
provided the previous system shutdown was successful. The feature allows for a
fully automated startup of z/VM.
Chapter 3. Changing the system configuration41
v The Clear_TDisk feature causes CP to erase temporary disks fully (that is,
overwrite the entire temporary disk with zeros) after those disks are detached.
The feature prevents another user who may define an identically sized
temporary disk from accessing data written by the previous user.
v The Retrieve defines the default and maximum number of retrieve buffers
allowed per user on your system. Retrieve buffers create a command history,
from which users can retrieve commands previously issued. Command retrieval
is usually assigned to a program function key such as PF12 (F12). The
assignment is through the CP SET command, SET PF12 RETRIEVE. By pressing
PF12, a command is retrieved and written back into the command area on the
terminal screen. You probably do not need to change these settings.
v The Passwords_on_Cmds feature tells CP whether to prompt users for
passwords when using the CP AUTOLOG, LINK, or LOGON commands.
v The Disconnect_timeout feature controls whether and when a virtual machine is
logged off after it has been forced to disconnect. You will turn this feature off, so
that any virtual machine that has been forced to disconnect will not be logged
off.
v The ShutdownTime and Signal ShutdownTime features enable a virtual machine
to register with CP to receive a shutdown signal when z/VM is shutting down
(see “Steps for enabling Linux virtual servers to shut down automatically” on
page 87). CP waits to shut itself down until the time interval (in seconds) is
exceeded, or all of the virtual machines enabled for the signal shutdown have
reported a successful shutdown. Some Linux distributions support this function,
which allows Linux to shut down cleanly before z/VM shuts down.
Before you begin: You need to end CP’s access to the primary parm disk. See
“Steps for releasing the primary parm disk” on page 37.
Perform these steps to update the FEATURES statement:
1. Edit the SYSTEM CONFIG Z file. Type this command and press the Enter key:
xedit system config z
2. Find the line containing the text “Set_Privclass” in the section titled “Features
Statement.” At the XEDIT command line, type this command and press the
Enter key:
====> /set_privclass
3. At the command line, type this command and press the Enter key:
====> i
4. Type this line (indent three spaces), then press the Enter key twice:
Enable ,
You might also change the comments for “Auto_Warm_IPL” and
“Clear_TDisk”.
5. Under “Passwords_on_Cmds ,”:
a. Change the three instances of “yes” to “no”. You might also want to
change the comments for these lines to reflect your change.
42z/VM: Getting Started with Linux on System z
b. Move the cursor to the line containing the text “Logon no”. After the word
“no” place a space and a comma.
6. Move the cursor to the prefix area on the line “Vdisk Userlim 144000 blocks ,”,
type “i4” followed by a space, then press the Enter key.
7. Type these features (indent as shown) on the new lines:
Disconnect_timeout off
Set ,
ShutdownTime 30 ,
Signal ShutdownTime 500
8. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=258 Line=148 Col=1 Alt=4
Features ,
Disable ,/* Disable the following features */
Set_Privclass ,/* Disallow SET PRIVCLASS command */
Enable ,
Auto_Warm_IPL ,/* Bypass prompting at IPL*/
Clear_TDisk,/* Clear TDisks when detached*/
Retrieve ,/* Retrieve options*/
Default 20 ,/* Default.... default is 20*/
Maximum 255 ,/* Maximum.... default is 255*/
MaxUsers noLimit ,/* No limit on number of users*/
Passwords_on_Cmds ,/* What commands allow passwords? */
Autolog no ,/* ... AUTOLOG does not*/
Linkno ,/* ... LINK does not*/
Logonno ,/* ... and LOGON does not, too*/
Vdisk Userlim 144000 blocks ,/* Maximum vdisk allowed per user */
Disconnect_timeout off
Set,
ShutdownTime 30 ,
Signal ShutdownTime 500
Steps for controlling access to devices at startup
Sometimes your z/VM system may have access to devices that you do not want to
be varied online during IPL. For instance, the devices may duplicate labels of
devices used by your production system, or may be in use by other LPARs or
systems. You can specify ranges of devices that z/VM should not vary online
during IPL.
Before you begin: You need to end CP’s access to the primary parm disk. See
“Steps for releasing the primary parm disk” on page 37.
Perform these steps to control access to devices at startup:
1. Edit the SYSTEM CONFIG Z file. Type this command and press the Enter key:
xedit system config z
2. Find the section titled “Status of Devices.” At the XEDIT command line, type
this command and press the Enter key:
Chapter 3. Changing the system configuration43
====> /status of devices
3. Find the line containing the text “Online_at_IPL.” At the XEDIT command
line, type this command and press the Enter key:
====> /online_at_ipl
4. At the command line, type this command and press the Enter key:
====> i
5. Type this line, then press the Enter key twice:
Offline_at_IPL rdevs,
where rdevs is a list of real device numbers.
Example:
Offline_at_IPL 0291–0592,
6. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=284 Line=210 Col=1 Alt=0
/**********************************************************************/
/*Status of Devices*/
/**********************************************************************/
Devices ,
Online_at_IPL0000-FFFF,
Offline_at_IPL 0291-0592,
Sensed0000-FFFF
Steps for defining a virtual switch
The recommended facility to use when virtual machines need to have network
connectivity with each other is a z/VM virtual switch. You can define a virtual
switch dynamically using the CP DEFINE VSWITCH command, but attempts by
guests to use the virtual switch fail if you do not do this before guests try to use it.
Such a situation is disruptive to the Linux boot process. To be sure the virtual
switch is always available for your Linux guests, define a virtual switch in the
SYSTEM CONFIG file.
For an overview on configuring TCP/IP for Linux, see “TCP/IP networking
options for Linux” on page 30.
This procedure defines the virtual switch for z/VM. Subsequent topics explain
how to set up TCP/IP and your virtual machines to use the virtual switch.
44z/VM: Getting Started with Linux on System z
Before you begin: You need to end CP’s access to the primary parm disk. See
“Steps for releasing the primary parm disk” on page 37.
Perform these steps to define a virtual switch:
1. Edit the SYSTEM CONFIG Z file. Type this command and press the Enter key:
xedit system config z
2. Find the section titled “Status of Devices.” At the XEDIT command line, type
this command and press the Enter key:
====> /status of devices
3. Find the line containing the text “Sensed.” At the XEDIT command line, type
this command and press the Enter key:
====> /sensed
4. At the command line, type this command and press the Enter key:
====> i
5. Type these lines, then press the Enter key twice.
DEFINE VSWITCH switch_name RDEV rdev [PRIROUTER]
MODIFY VSWITCH switch_name GRANT userid
where:
switch_name
is a name you give the virtual switch
rdev
is the real device address of your QDIO OSA-Express device
userid
is the user ID of a virtual machine for which you are granting access to the
virtual switch.
Note that the PRIROUTER (primary router) option is in brackets, indicating it
is optional. The PRIROUTER option is required if any of your Linux virtual
servers will act as a router to other networks. If you specify the PRIROUTER
option, do not use the brackets.
Example: If the switch name is VSWITCH1, the real device address of your
OSA-Express device is BC0, and your virtual machine is LINUX0, add these
lines:
DEFINE VSWITCH VSWITCH1 RDEV BC0
MODIFY VSWITCH VSWITCH1 GRANT LINUX0
6. Repeat the MODIFY VSWITCH command with the GRANT option for each
user ID you wish to use the virtual switch.
Chapter 3. Changing the system configuration45
7. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=286 Line=210 Col=1 Alt=0
/**********************************************************************/
/*Status of Devices*/
/**********************************************************************/
During the first IPL of your z/VM system, you needed to specify a load parameter
so you could communicate with the Stand-Alone Program Loader (SAPL). The
reason is the new z/VM system did not know which device address to use to
display messages and prompts. The installation system includes default device
addresses for use as the system operator console and emergency messages console,
but these addresses rarely correspond to your production hardware configuration.
So you will not need to use the SAPL each time you IPL z/VM, you need to
supply the address of your IPL console and your emergency messages console on
the Operator_Consoles statement.
During IPL, CP tries each device on the Operator_Consoles statement (from left to
right) until it finds an active device. If no devices on the list are active, CP loads a
disabled wait state and terminates.
The emergency message console is used as an additional console during failures.
Define the emergency console with the Emergency_Message_Console statement.
Before you begin: You need to end CP’s access to the primary parm disk. See
“Steps for releasing the primary parm disk” on page 37. You need to know the real
device addresses for the operator console and the emergency message console.
Perform these steps to set up addresses for consoles:
1. Edit the SYSTEM CONFIG Z file. Type this command and press the Enter key:
xedit system config z
2. Find the Operator_Consoles statement. At the XEDIT command line, type this
command and press the Enter key:
====> /operator_consoles
3. Replace all device addresses on the Operator_Consoles statement with the real
device addresses for your operator consoles.
46z/VM: Getting Started with Linux on System z
Notes:
a. You can have one or more console addresses.
b. If you are not using 3270 devices on your system and are using 3270
integrated consoles instead, the keyword “System_3270” designates a
full-screen integrated 3270 console (also known as SYSG) and the keyword
“System_Console” designates an integrated line mode 3270 console (also
known as SYSC).
4. Use the same addresses for the Emergency_Message_Console statement as you
did for the Operator_Consoles statement.
5. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=286 Line=222 Col=1 Alt=0
Steps for updating special escape character defaults
z/VM provides special escape characters that, when included in terminal input
streams, tell CP to perform an action before evaluating subsequent characters in
the stream. An important escape character is the line end character; this character,
followed by “cp” indicates that what follows is a CP command and should not be
given to Linux. The default line end character is “#”.
Example: Issuing:
#cp query time
sends the QUERY TIME command to CP rather than Linux.
Unfortunately, the default line end character is “#”, which is also a special
character for Linux. For example, the prolog to a shell script usually has a
character string known as the “shebang” consisting of the characters “#!” followed
by the path to the shell program used to evaluate the shell script. If you enter
those characters on a virtual machine console (for example, while using the line
mode editor ed), CP strips off the # symbol and attempts to evaluate the characters
as command input.
You can change the default special escape characters for each virtual machine
individually, or set a system-wide default. If the primary purpose of your z/VM
system is for Linux virtual servers, it makes sense to change the default
system-wide. Chapter 10, “Performing run-time tasks,” on page 97 shows you how
to change the special escape characters for an individual virtual machine.
Chapter 3. Changing the system configuration47
Before you begin: You need to end CP’s access to the primary parm disk. See
“Steps for releasing the primary parm disk” on page 37.
Perform these steps to update system-wide special escape character defaults:
1. Edit the SYSTEM CONFIG Z file. Type this command and press the Enter key:
xedit system config z
2. Find the section entitled “Special characters for system set here.” At the XEDIT
command line, type this command and press the Enter key:
====> /special characters for system set here
3. Move the cursor to the line with the text “Escape”, then move it to the first
quote mark.
4. Type “OFF”.
Char_DeleteOFF,/* System default ... @*/
EscapeOFF,/* System default ... "*/
Line_DeleteOFF,/* Default is cent sign*/
5. Move the cursor to “Line_End”, and replace “#” with “%”.
Line_End'%',/* System default ... #*/
6. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> save
You should now see something like this:
SYSTEMCONFIGZ1 F 80 Trunc=80 Size=286 Line=233 Col=1 Alt=0
/**********************************************************************/
/*Special characters for system set here*/
/**********************************************************************/
Character_Defaults ,
Char_Delete OFF,/* System default ... @*/
EscapeOFF,/* System default ... "*/
Line_Delete OFF,/* Default is cent sign*/
Line_End'%',/* System default ... #*/
TabOFF/* System default ... "*/
Steps for checking the syntax of the SYSTEM CONFIG file
Be sure the SYSTEM CONFIG file has the correct syntax by using the CPSYNTAX
command.
Before you begin: You need to end CP’s access to the primary parm disk. See
“Steps for releasing the primary parm disk” on page 37.
Perform these steps to check the syntax of the SYSTEM CONFIG file:
1. Access the 193 disk as X. From the command line, type this command and
press the Enter key:
48z/VM: Getting Started with Linux on System z
access 193 x
2. If you are still editing SYSTEM CONFIG, exit the XEDIT session. From the
XEDIT command line, type this command and press the Enter key:
====> file
3. Run the CPSYNTAX command. From the command line, type this command
and press the Enter key:
cpsyntax system config
Configuration file processing complete -- no errors encountered.
Ready;
4. Check for a zero return code. If you do not get a zero return code, modify the
SYSTEM CONFIG file.
You are done when you get a zero return code from CPSYNTAX.
Steps for restoring CP’s access to the primary parm disk
You need to configure DirMaint and TCP/IP, so do not shut down z/VM at this
point. Because you are not shutting down, you need to restore CP’s access to the
parm disk.
Before you begin: You need to log on as MAINT.
Perform these steps to restore the primary parm disk:
1. Release MAINT’s access to the parm disk.
release z
Ready;
2. Change MAINT’s read/write access to read-only.
link * cf1 cf1 rr
Ready;
3. Restore CP’s access to the parm disk.
cpaccess maint cf1 a sr
You should see responses like:
cpaccess maint cf1 a sr
CPACCESS request for mode A scheduled.
Ready;
CPACCESS request for MAINT's 0cf1 in mode A completed.
Chapter 3. Changing the system configuration
49
50z/VM: Getting Started with Linux on System z
Chapter 4. Configuring the Directory Maintenance Facility
This topic describes how to configure the Directory Maintenance Facility
(DirMaint). For an overview of DirMaint and user management, see “Planning for
user management” on page 32.
If you need to repeat these tasks, be sure to shut DirMaint down.
Steps for enabling DirMaint
Before you begin: You need to have a license for the DirMaint product. For
ordering information, see the announcement letter for z/VM or contact your IBM
representative.
Perform these steps to enable DirMaint:
1. Log onto MAINT.
2. Check that MAINT has write access to minidisk 51D.
a. From the command line, type this command and press the Enter key:
Steps for changing the passwords for DirMaint service machines
As shipped with z/VM, the DIRMAINT, DATAMOVE, and 6VMDIR10 virtual
machines have directory entries, but with “NOLOG” instead of passwords, which
prevents the virtual machine from being logged on. You must change the directory
entries to include passwords.
Before you begin: You must log onto MAINT.
Perform these steps to update DIRMAINT’s password:
1. Edit the USER DIRECT file.
xedit user direct c
2. Find the directory entry for DIRMAINT. On the XEDIT command line, type
this command and press the Enter key:
====> /USER DIRMAINT
3. Type your password over the word “NOLOG”. If you need to insert
characters, press the Insert key. Example:
USER DIRMAINT MYPASSWD 32M 64M BDG
.
.
.
4. Repeat steps 2 and 3 for the DATAMOVE user.
5. Similarly, change the default password for the 6VMDIR10 user.
6. Check 6VMDIR10 for this statement:
.
.
.
LINK MAINT 2CC 2CC RR
.
.
.
If the statement does not exist, add it to the LINK statements for this user.
7. Save the file. From the XEDIT command line, type this command and press
the Enter key:
====> file
8. Place the new user directory online. From CMS, type this command and press
the Enter key:
directxa user direct c
z/VM USER DIRECTORY CREATION PROGRAM - VERSION 5 RELEASE 1.0
EOJ DIRECTORY UPDATED AND ON LINE
Ready; T=0.13/0.15 14:33:34
9. Disconnect from MAINT.
Tip: Before you disconnect from a virtual machine like MAINT, issue the CP
command SET RUN ON. This command causes any programs running in the
virtual machine to continue running even if the virtual machine enters a CP
52z/VM: Getting Started with Linux on System z
READ state. You can place CP SET RUN ON in MAINT’s PROFILE EXEC to
avoid having to execute the command every time you disconnect from
MAINT.
set run on
disc
Continue to the next steps.
Steps for configuring DirMaint
6VMDIR10 is the user ID that does service and maintenance for DirMaint. In
keeping with the practice for products maintained by the VMSES/E component of
z/VM, the virtual machine user ID is the same as the product identifier. In this
procedure, you use 6VMDIR10 to configure DirMaint.
Before you begin: Make sure the DIRMAINT virtual machine is logged off. You
need to log onto the 6VMDIR10 virtual machine.
Perform these steps to perform an initial configuration:
1. Access the 492 minidisk:
acc 492 u
2. Issue this command:
dir2prod samp 6vmdir10 dirm
.
.
.
DIR2PROD: Copy of 2C2 samples to 1DF disk has completed.
DIR2PROD: Normal Termination.
Ready; T=0.13/0.19 07:47:30
3. Issue this command:
dir2prod access_new 6vmdir10 dirm
.
.
.
DMSACP726I 492 u releases
DIR2PROD: Normal Termination
Ready;
4. Access the 11F disk a z. From the command line, type this command and
press the Enter key:
access 11f z
Ready;
5. Create a file called CONFIGAA DATADVH Z. From the command line, type
this command and press the Enter key:
xedit configaa datadvh z
Tip: Files with the naming convention CONFIGnn DATADVH (nn can be
alphabetic or numeric) provide DirMaint override instructions. If there are
multiple CONFIG* DATADVH files, all are processed in reverse EBCDIC
Chapter 4. Configuring the Directory Maintenance Facility53
order (CONFIG99 before CONFIG0 before CONFIGZ9 before CONFIGA,
before CONFIG). For now, keep it simple by creating only one, CONFIGAA
DATADVH.
6. At the XEDIT command line, type this command and press the Enter key:
====> input
7. Add these statements to the file:
CONFIGAA DATADVH Z2 V 80 Trunc=80 Size=5 Line=1 Col=1 Alt=0
where vmnetid is the VM network identifier. The network identifier is the
same as the system identifier you defined in “Steps for updating the default
system identifier” on page 39.
8. To exit input mode, press the Enter key twice.
9. Save the file. From the command line, type this command and press the
Enter key:
====> file
10. Release the 11F disk. From the command line, type this command and press
the Enter key:
rel z
Ready;
Continue with the next steps.
Steps for authorizing users to perform DirMaint tasks
The AUTHFOR CONTROL file specifies user IDs allowed to perform authorized
DirMaint tasks. It would be convenient to specify certain user IDs to do these
tasks; otherwise, you need to log on the DIRMAINT virtual machine each time you
want to do them. In this procedure, you authorize MAINT to perform DirMaint
tasks.
Before you begin: You need to log onto the 6VMDIR10 virtual machine.
Perform these steps to create the authorization file:
1. Create and edit the AUTHFOR CONTROL file on the J-disk.
xedit authfor control j
54z/VM: Getting Started with Linux on System z
2. On the XEDIT command line, type this command and press the Enter key to
enter input mode:
====> input
3. Type these lines in the input area:
.
.
.
ALL MAINT * 140A ADGHOPS
ALL MAINT * 150A ADGHOPS
4. Press the Enter key twice to return to editing mode.
5. From the XEDIT command line, type this command and press the Enter key:
====> file
Continue to the next steps.
Steps for controlling where DirMaint creates minidisks
The EXTENT CONTROL file tells DirMaint where to allocate minidisks. The file is
divided into sections. The first section identifies DASD extents on individual
devices that can be used for minidisk allocation. The next section allows you to
group devices by name and refer to them by a single name. For example, you can
create a group called SYSTEM for minidisks related to system user IDs, or a group
called LINUX for minidisks related to virtual machines for Linux. Grouping allows
you to separate user minidisks from system-related minidisks.
Before you begin: Make sure the DIRMAINT virtual machine is logged off. You
need to log onto the 6VMDIR10 virtual machine.
Perform these steps to control where DirMaint creates minidisks:
1. Edit the EXTENT CONTROL file on the J-disk.
xedit extent control j
2. Find the section labelled “:REGIONS”. From the XEDIT command line, type
this command and press the Enter key:
====> /:regions
3. Move the cursor to the prefix area for the line containing “*RegionID”. Type
4. Move the cursor to the body of the blank line and type a statement with this
pattern:
RegionId VolSer RegStart RegEnd Type
Chapter 4. Configuring the Directory Maintenance Facility55
where
RegionId
Is the name of the region. Region names must be unique. If a region
entry shares the same name with another region entry, the first record is
used, the second entry is ignored. Region names may consist of the
characters A-Z, 0-9, #, @, and $. DirMaint requires that this field be eight
characters or less.
VolSer
Is the volume label of the real DASD. This value represents the value
placed into volser field on any minidisks generated from this region.
Volume IDs supported by DirMaint consist of a maximum of six
characters A-Z, 0-9, #, @, and $. VolSer must be unique.
RegStart
Is the starting cylinder for this region.
RegEnd
Is the ending cylinder for this region.
Type
Is the device type of the DASD.
Example: This statement labels an entire 3390-03 with a volume label 430LIN
as LINUX01:
LINUX01 430LIN 001 END 3390-03
(END is a special keyword specifying the last cylinder.)
5. Repeat step 4 on page 55 for all the volumes you need for your Linux virtual
servers.
Note: The region names must be unique.
6. Immediately after the volume statements for Linux virtual servers, add this
statement for creating minidisks for other virtual machines.
610W02 610W02 1 END devtype
where devtype is the device type of volume 610W02.
7. Move the cursor to the prefix area for the line containing “*GroupName”.
Type “i2” in the prefix area and press the Enter key:
00121 :GROUPS.
i2*GroupName RegionList
8. Type these two lines:
GRPLNX (ALLOCATE ROTATING)
GRPLNX LINUX01
If you have additional regions, add those region IDs to the second line.
Example:
GRPLNX LINUX01 LINUX02 LINUX03
56z/VM: Getting Started with Linux on System z
9. Move the cursor to the prefix area for the line with “* USERID ADDRESS”,
type “i2” in the prefix area, then press the Enter key:
00139 :EXCLUDE.
i2* USERID ADDRESS
00141 :END.
10. Type these two lines:
MAINT 012*
SYSDUMP1 012*
11. Save the file. From the XEDIT command line, type this command and press
the Enter key:
====> file
Your file should look similar to this:
EXTENTCONTROL J2 V 254 Trunc=254 Size=89 Line=35 Col=1 Alt=0
Before DirMaint is activated, the current USER DIRECT source file on MAINT’s
2CC matches the online user directory. By copying the current USER DIRECT
source file from MAINT’s 2CC to the 6VMDIR10’s J-disk, you create a starting
point for DirMaint. From the USER DIRECT file, DirMaint processes the statements
to create its own internal working structure for the user directory.
Important: After performing these steps, do not use the USER DIRECT file on
MAINT’s 2CC. To remind you that you must not use the file, you could rename it
to USER NO-USE or USERDRCT UPBYDIRM.
Before you begin: You need to log onto 6VMDIR10.
Chapter 4. Configuring the Directory Maintenance Facility57
Perform these steps to copy the current USER DIRECT file:
|
|
|
|
1. Link to MAINT’s 2CC minidisk:
link maint 2cc 2cc mr multiple
2. Access the 2CC minidisk (MAINT’s 2CC, which is linked to 6VMDIR10):
access 2cc z
3. Copy MAINT’s USER DIRECT file to 6VMDIR10’s J-disk as USER INPUT:
copy user direct z user input j
4. Release the linked minidisk:
release z (detach
Continue with the next steps.
Steps for putting the configuration into production and starting
DirMaint
In these steps, you place the DirMaint configuration into production and start
DirMaint.
Before you begin: You need to log onto 6VMDIR10. Later, when you log onto
DIRMAINT, you need to know the log-on password you defined in “Steps for
changing the passwords for DirMaint service machines” on page 52.
Perform these steps to put the configuration into production and start DirMaint:
1. From the CMS command line, type this command and press the Enter key:
dir2prod prod 6vmdir10 dirm
2. Log off 6VMDIR10. Type this command and press the Enter key:
logoff
3. Log onto DIRMAINT.
4. Start the DirMaint program:
dvhbegin
.
.
.
DVHWAI2140I Waiting for work on 04/02/09 at 18:47:38.
5. Disconnect DIRMAINT. Type this command and press the Enter key:
cp disc
Continue to the next steps.
58z/VM: Getting Started with Linux on System z
Steps for automatically starting DIRMAINT
In this procedure, you update AUTOLOG1’s PROFILE EXEC to automatically log
on (autolog) DIRMAINT when z/VM starts.
Before you begin: You need to log onto MAINT.
Perform these steps to have DIRMAINT automatically logged on:
1. Link to the AUTOLOG1 191 minidisk. Type this command and press the Enter
key:
link autolog1 191 091 mr
Ready;
2. Access the 091 minidisk as Z. Type this command and press the Enter key:
access 091 z
Ready;
3. Edit AUTOLOG1’s PROFILE EXEC. Type this command and press the Enter
key:
xedit profile exec z
4. Go to the bottom of the file. From the XEDIT command line, type this
command and press the Enter key:
====> bot
5. Add the new XAUTOLOG statements. From the XEDIT command line, type
“input”, press the Enter key, then type these lines. Press the Enter key after
you type each line:
Chapter 4. Configuring the Directory Maintenance Facility
59
7. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> file
8. Detach the 091 minidisk (AUTOLOG1’s 191). Type this command and press
the Enter key:
release z (det
Ready;
You are done.
Steps for testing DirMaint
This procedure tests DirMaint. The command you use allows MAINT to issue
DirMaint commands without a password.
Before you begin: You need to know the password for MAINT.
Perform these steps to test DirMaint:
1. Log onto MAINT.
2. From the CMS command line, type this command and press the Enter key:
dirm needpass no
3. When prompted, type MAINT’s password and press the Enter key.
You see these messages:
dirm needpass no
DVHXMT1181R Enter the current logon password of MAINT at DVHTEST6 for
DVHXMT1181R authentication. It will not be displayed on the
DVHXMT1181R terminal. To exit without processing the command, just
DVHXMT1181R press ENTER.
DVHXMT1191I Your NEEDPASS request has been sent for processing.
MAINT AT DVHTEST6; T=0.05/0.06 18:53:02
DVHREQ2288I Your USEROPTN request for MAINT at * has been accepted.
DVHBIU3450I The source for directory entry MAINT has been updated.
DVHBIU3456I Object directory update is not required for this source
DVHBIU3456I update.
DVHREQ2289I Your USEROPTN request for MAINT at * has completed;
DVHREQ2289I with RC = 0.
You are done.
Step for modifying the OPERATOR’s directory entry
In Chapter 9, “Setting up basic system automation,” on page 85, you set up the
programmable operator facility, which requires that the OPERATOR virtual
machine automatically load (IPL) CMS when it is logged on. This procedure uses
DirMaint to modify the OPERATOR’s directory entry to include a statement that
loads CMS.
Before you begin: You need to be logged onto MAINT.
60z/VM: Getting Started with Linux on System z
Perform this step to modify the OPERATOR’s directory entry:
v From the command line, type this command and press the Enter key:
dirm for operator ipl cms
DVHXMT1191I Your IPL request has been sent for processing.
Ready;
DVHREQ2288I Your IPL request for OPERATOR at * has been accepted.
DVHBIU3450I The source for directory entry OPERATOR has been updated.
DVHBIU3423I The next ONLINE will take place via Diagnose 84.
DVHBIU3428I Changes made to directory entry OPERATOR have been placed
DVHBIU3428I online.
DVHBIU3427I Changes made to directory entry OPERATOR by MAINT at
DVHBIU3427I ZVMLINUX have been placed online.
DVHREQ2289I Your IPL request for OPERATOR at * has completed; with RC
DVHREQ2289I = 0.
You know you are done when you see a zero return code from DirMaint.
Chapter 4. Configuring the Directory Maintenance Facility61
62z/VM: Getting Started with Linux on System z
Chapter 5. Configuring TCP/IP
In this topic, you configure TCP/IP, if you have not already done so, and configure
TCP/IP to start automatically whenever z/VM is initialized.
For an overview on configuring TCP/IP for Linux, see “TCP/IP networking
options for Linux” on page 30.
Setting up the production TCP/IP
During z/VM installation, you had the option to set up a static connection to the
TCP/IP network through the IPWIZARD. Such a configuration is suitable for
installations that employ only static (as opposed to dynamic) network routes. If
you want a more comprehensive TCP/IP network, you need to follow the
instructions in z/VM: TCP/IP Planning and Customization, SC24-6238.
Table 5 outlines the tasks you must do:
Table 5. Task roadmap for the production TCP/IP
SubtaskAssociated instructions (see...)
Setting up your production TCP/IPIf you set up a static connection during z/VM
Setting up TCP/IP to be automatically
started
installation and are satisfied with this
configuration, this task is optional.
If you want a more comprehensive TCP/IP
network, you need to follow the instructions in
z/VM: TCP/IP Planning and Customization,
SC24-6238.
“Steps for automatically starting TCP/IP”
Steps for automatically starting TCP/IP
This procedure ensures the TCPIP virtual machine is always started when you IPL
z/VM. Except for a few system user IDs, the AUTOLOG1 virtual machine
automatically starts virtual machines at IPL time through its PROFILE EXEC. By
placing an additional XAUTOLOG command for TCPIP in AUTOLOG1’s PROFILE
EXEC, that virtual machine is automatically logged on when you IPL z/VM.
Before you begin: You need to log on as MAINT.
Perform these steps to ensure TCP/IP is started at IPL time:
1. Link to the AUTOLOG1 191 minidisk. Type this command and press the Enter
6. Save the file. At the XEDIT command line, type this command and press the
Enter key:
====> file
64z/VM: Getting Started with Linux on System z
7. Detach the 091 minidisk (AUTOLOG1’s 191). Type this command and press
the Enter key:
release z (det
Ready;
You are done.
Chapter 5. Configuring TCP/IP65
66z/VM: Getting Started with Linux on System z
Chapter 6. Restarting z/VM and checking the system
After making changes to the system, configuring DirMaint, and setting up the
network configuration, restart z/VM and check that the changes you want were
made. This topic explains how to do that.
Steps for restarting z/VM
In this procedure, you restart (IPL) z/VM and log onto MAINT, from which you
can check that all your configuration changes are in effect.
Before you begin: You need to be logged on as MAINT. Be sure you have checked
the syntax of the SYSTEM CONFIG file (see “Steps for checking the syntax of the
SYSTEM CONFIG file” on page 48). Be sure other important z/VM processing is
complete.
Perform these steps to restart z/VM:
1. Type this command and press the Enter key:
shutdown reipl
Result: When the system shuts down and re-IPLs, you see a number of IPL
messages. z/VM restores the system to the same state as it was prior to
shutdown (for instance, with OPERATOR disconnected).
2. To get a z/VM logo, press the Enter key.
3. Log onto MAINT.
You are done. Go on to the next procedure.
Steps for checking paging and spooling space
Before you begin: You need to be logged on as MAINT.
Perform these steps to check that paging and spooling space matches your
intended definitions:
1. Type this command and press the Enter key. Check the response for paging
You defined the interface name (name), IP address (ip_address), mask (mask),
virtual device address (vdev), and real device address (rdev) for your
production TCP/IP through the IPWIZARD (see “Setting up the production
TCP/IP” on page 63).
2. To check the network interface, ping the gateway. In the command, ip_address
is the IP address of your gateway.
ping ip_address
Ping Level level 610: Pinging host ip_address.
PING: Ping #1 response took 0.008 seconds. Successes so far 1.
Ready;
Enter 'HX' followed by 'BEGIN' to interrupt.
3. To check the network interface, ping an address outside your subnetwork. In
the command, ip_address is an address outside your subnetwork.
ping ip_address
Ping Level level 610: Pinging host ip_address.
PING: Ping #1 response took 0.008 seconds. Successes so far 1.
Ready;
You are done checking the system configuration.
Enter 'HX' followed by 'BEGIN' to interrupt.
70z/VM: Getting Started with Linux on System z
Chapter 7. Creating your first Linux virtual machine and
installing Linux
This topic covers configuring your first Linux virtual machine and installing your
first Linux operating system.
Overview of defining virtual machines for Linux
Previous sections have shown you how to configure z/VM functions and facilities
in order to create the system infrastructure for your virtual machines: configuring
z/VM, enabling and configuring DirMaint, and configuring TCP/IP. This section
and the next, Chapter 8, “Cloning Linux virtual servers,” on page 83, show you
how to install your first Linux operating system and then use a replication or
cloning process to create additional Linux virtual servers quickly. The cloning
process allows you to create a new Linux virtual server without the need to install
the Linux operating system from scratch.
Before you begin defining Linux servers, read Chapter 2, “Planning for Linux
virtual servers,” on page 21.
The basic subtasks are:
Table 6. Task roadmap for setting up Linux virtual servers
SubtaskAssociated instructions (see...)
Define a prototype and create your first
virtual machine from the prototype
Install the Linux operating system in the
virtual machine.
Replicate, or clone, additional Linux virtual
servers through DirMaint prototype and
CLONEDISK functions.
“Steps for defining a master virtual machine
for Linux”
Follow the instructions for your Linux
distribution. To get started, see “Installing
Linux in a virtual machine” on page 77.
“Steps for cloning a Linux virtual server” on
page 83
Steps for defining a master virtual machine for Linux
These steps tell you how to define a master virtual machine that uses the default
2.2G on a 3390-3 DASD.
In this procedure, you modify two sample files, LINDFLT DIRECT and LINUX
PROTODIR. LINDFLT DIRECT is a shared profile for all Linux systems and
defines common definitions for all your Linux virtual servers. LINUX PROTODIR
is designed to define unique characteristics of a virtual machine, such as the DASD
definitions.
Perform these steps to define the master virtual machine:
1. Get the LINDFLT and LINUX samples from DirMaint.
a. From the command line, type these commands and press the Enter key:
dirm send lindflt direct
dirm send linux protodir
Result: DirMaint sends the sample files to MAINT’S reader.
b. If you have other files in your reader, queue the two files you get from
DirMaint with the ORDER command.
Example: DirMaint sent you LINDFLT DIRECT and LINUX PROTODIR
with spool identifiers 0004 and 0005, and you already have spool files 0001,
0002, and 0003 in your reader. Issue this command to queue the two files
from DirMaint:
order rdr 4 5
0000002 FILES ORDERED
Ready;
c. Receive the sample files. From the command line, type these commands
and press the Enter key:
receive
File LINDFLT DIRECT A1 created from LINDFLT DATADVH A1 received from DIRMAINT at system
receive
File LINUX PROTODIR A1 created from LINUX DATADVH A1 received from DIRMAINT at system
2. Edit LINDFLT DIRECT. From the command line, type this command and press
the Enter key:
xedit lindflt direct a
Result: Your LINDFLT DIRECT looks like:
PROFILE LINDFLT
CLASS G
IPL CMS
MACHINE ESA
MAXSTORAGE 2047M
OPTION QUICKDSP
STORAGE 128M
CONSOLE 0009 3215 T
NICDEF 600 TYPE QDIO LAN SYSTEM VSWITCH1
SPOOL 000C 2540 READER *
SPOOL 000D 2540 PUNCH A
SPOOL 000E 1403 A
LINK MAINT 0190 0190 RR
LINK MAINT 019D 019D RR
LINK MAINT 019E 019E RR
LINK TCPMAINT 0592 0592 RR
Notes:
a. If you log onto virtual machines cloned from LINDFLT DIRECT, the
command IPL CMS places the virtual machine in VM READ state. You
must press the Enter key to finish loading CMS.
b. The name of the virtual switch must match the name you used when you
defined the virtual switch for the system. See “Steps for defining a virtual
switch” on page 44.
72z/VM: Getting Started with Linux on System z
c. For all virtual machines that you clone using LINDFLT DIRECT, you
cannot define other devices at virtual addresses 600, 601, and 602. All those
virtual machines will have the same virtual device addresses for the virtual
switch.
3. If you want to give all your cloned Linux virtual machines access to the
cryptographic facility:
a. Add a line before the OPTION statement:
00000***TopofFile***
00001 PROFILE LINDFLT
00002 CLASS G
00003 IPL CMS
00004 IUCV ALLOW
00005 MACHINE ESA
aMAXSTORAGE 2047M
00007 OPTION QUICKDSP
00008 STORAGE 128M
b. On the new line, type:
CRYPTO APVIRT
For more information about the cryptographic facility, see “Giving Linux
virtual servers access to cryptographic hardware for SSL acceleration” on page
31.
4. If you make any changes to LINDFLT DIRECT, save the file with the XEDIT
FILE command. From the XEDIT command line, type this command and press
the Enter key:
====> file
5. Edit LINUX PROTODIR.
a. From the XEDIT command line, type this command and press the Enter
key:
xedit linux protodir
Result: Your LINUX PROTODIR looks like:
USER LINUX NOLOG
INCLUDE LINDFLT
MDISK 191 3390 AUTOG 0050 LINGROUP MR
MDISK 150 3390 AUTOG 3088 LINGROUP MR
MDISK 151 3390 AUTOG 0200 LINGROUP MR
b. Change the minidisk size for MDISK 191 to 0005:
MDISK 191 3390 AUTOG 0005 LINGROUP MR
c. Change each occurrence of “LINGROUP” to “GRPLNX”:
Chapter 7. Creating your first Linux virtual machine and installing Linux
73
Notes:
a. For the swap disk 151, you could use a virtual disk, but be aware of the
impact a virtual disk has on your system. See “Linux Performance when
running under VM” (http://www.vm.ibm.com/perf/tips/linuxper.html).
b. “GRPLNX” matches the region name you created in “Steps for controlling
where DirMaint creates minidisks” on page 55.
6. If you make any changes to LINUX PROTODIR, save the file with the XEDIT
FILE command. Otherwise, quit the file: from the XEDIT command line, type
this command and press the Enter key:
====> quit
7. Install the LINDFLT DIRECT and LINUX PROTODIR files.
a. Start by testing for the existence of a user called LINDFLT. Issue:
dirm for lindflt get lock
v If the GET LOCK command succeeded, issue:
dirm for lindflt replace
v If the GET LOCK command did not succeed, issue:
dirm add lindflt
b. Install LINUX PROTODIR. Issue:
dirm file linux protodir
8. Use DirMaint to define the master virtual machine (LINMSTR). Type this
command and press the Enter key:
dirm add linmstr like linux pw new_password
where new_password is the password for logging on LINMSTR. new_password
must be 8 characters long and must contain both numbers and letters.
9. If you decide you want to delete a virtual machine you cloned, type this
command and press the Enter key:
dirm for userid purge
where userid is the user ID of the virtual machine you want to delete.
Guidelines:
v You might want to create additional prototypes (fn PROTODIR) for meeting
differing processing requirements of your Linux virtual servers. You can use
naming conventions that indicate the processing requirements satisfied by each
prototype. For instance, you might want to create a small memory prototype
(128 MB virtual machine called LINUX128), a medium memory prototype (256
MB virtual machine called LINUX256), and a large memory prototype (512 MB
virtual machine called LINUX512), then create small, medium, and large master
virtual machines, into which you can install the Linux operating system and
appropriate application packages or middleware (the large master could have
74z/VM: Getting Started with Linux on System z
WebSphere, for instance). Then, during the cloning process, you can select the
master prototype that meets the needs of your clone.
v The LINUX PROTODIR consumes an entire 3390-3 volume. To help slow the
consumption of 3390-3 volumes, you can split the Linux file system into
read-only and read/write portions and share the read-only portion. You should
be familiar with Linux file system usage practices before attempting to set up
read-only portions of the file system. To do this, you need to create a master
Linux virtual server that can update the minidisk to which other Linux virtual
servers are linked in read-only mode through the LINK command or LINK
directory statement.
Note: There are important maintenance issues here: running Linux virtual
servers do not get updates to the read-only disk until those servers are
recycled. Also, a running Linux system linked to read-only disks might
crash if those disks are updated while it is running. So, you need to
develop a maintenance plan to determine how to update the read-only
disk and when to recycle Linux virtual servers.
v If you want to see the entire user directory entry for a user, issue the following
commands:
dirm for user_id get nolock
...
RDR FILE nnn SENT FROM DIRMAINT PUN WAS 8116 RECS 0027 CPY 001 A NOHOLD NOKEEP
...
peek nnn (for *
where user_id is the user ID you want to see and nnn is the reader spool file
identifier.
You know you are done when DirMaint tells you LINMSTR is created.
Steps for setting up LINMSTR’s disks
In this procedure, you format LINMSTR’s 191 disk and create a PROFILE EXEC.
Each clone you create gets a replica of this 191 disk.
Because the 191 disk has only five cylinders, it is too small to hold the Linux boot
files for installing the Linux operating system. It would also be a waste of disk
space to increase the size of the 191 disk to accommodate the Linux boot files,
since each clone would get the same sized disk and the clones do not need a larger
disk. Instead, this procedure has you create a 192 disk for LINMSTR only. The
larger 192 disk can hold the Linux boot files and this disk will not be replicated in
the clones.
Before you begin: You need to log on to MAINT. Later in this procedure, you
need to log onto LINMSTR.
Chapter 7. Creating your first Linux virtual machine and installing Linux75
Perform these steps to set up LINMSTR’s disks:
1. Log onto MAINT and from the command line, type this command and press
the Enter key:
dirm for linmstr amdisk 192 devtype autov 50 610W02
DVHXMT1191I Your AMDISK request has been sent for processing.
Ready;
DVHREQ2288I Your AMDISK request for LINMSTR at * has been accepted.
DVHSCU3541I Work unit 18124944 has been built and queued for processing.
DVHSHN3541I Processing work unit 18124944 as MAINT from ZVMLINUX,
DVHSHN3541I notifying MAINT at ZVMLINUX, request 62 for LINMSTR sysaffin
DVHSHN3541I *; to: AMDISK 0192 devtype AUTOV 50 610W02
DVHBIU3450I The source for directory entry LINMSTR has been updated.
DVHDRC3428I Changes made to directory entry LINMSTR have just been
DVHDRC3428I placed online.
DVHSHN3430I AMDISK operation for LINMSTR address 0192 has finished (WUCF
DVHSHN3430I 18124944).
DVHREQ2289I Your AMDISK request for LINMSTR at * has completed; with
DVHREQ2289I RC = 0.
where devtype is the disk device type of volume 610W02 (for instance, 3390).
2. Log onto LINMSTR.
Note: After the logon messages, you receive a message because the 191 disk is
not formatted. Disregard this message:
DMSACP112S A(191) device error
3. Format the 191 disk with the CMS FORMAT command. From the command
line, type these commands and press the Enter key:
format 191 a
DMSFOR603R FORMAT will erase all files on disk A(191). Do you wish to continue?
Enter 1 (YES) or 0 (NO).
1
DMSFOR605R Enter disk label:
lin191
DMSFOR733I Formatting disk A
DMSFOR732I 5 cylinders formatted on Z(191)
Ready;
4. Create a PROFILE EXEC on the 191 disk.
a. Issue this command:
xedit profile exec a
b. On the XEDIT command line, type this command and press the Enter key:
====> input
c. Type in these statements, then press the Enter key twice.
Rule: The first line of any PROFILE EXEC must be a comment. Comments
are bounded by “/*” and “*/”.
/* Sample PROFILE EXEC for Linux servers */
"CP TERM LINEND %"/* Use %CP to talk to CP*/
"CP SET PF12 RETRIEVE" /* Recall previous commands */
"CP TERM MORE 1 0"/* Clear screen after 1 sec */
"CP SET RUN ON"/* CP READ won't stop server*/
"CP TERM HOLD OFF"/* (Look in book)*/
"ACCESS 592 Z"/* Get to TCP/IP functions */
76z/VM: Getting Started with Linux on System z
Note: Add ’CP TERM LINEND %’ in case the system default line end
character is changed.
Guideline: In Chapter 9, “Setting up basic system automation,” on page 85,
you automate the Linux virtual console, which requires a modification of
the PROFILE EXEC for each Linux virtual server you want to automate. If
you prefer to have this function part of every Linux clone, you can add the
required statement now. See “Steps for automating Linux virtual consoles”
on page 93.
d. Save the file. On the XEDIT command line, type this command and press
the Enter key:
====> file
5. Format the 192 disk with the CMS FORMAT command. From the command
line, type these commands and press the Enter key:
format 192 a
DMSFOR603R FORMAT will erase all files on disk A(192). Do you wish to continue?
Enter 1 (YES) or 0 (NO).
1
DMSFOR605R Enter disk label:
lin192
DMSFOR733I Formatting disk A
DMSFOR732I 50 cylinders formatted on A(192)
Ready;
You are done when you finish formatting the 192 disk.
Installing Linux in a virtual machine
Though you need to follow the instructions from your Linux distribution to install
and configure Linux, and those instructions differ from distribution to distribution,
virtual machine facilities and tasks common to all distributions are covered in this
section.
Overview of installing Linux in a virtual machine
You must follow your distribution documentation to install the Linux operating
system in your new LINMSTR virtual machine, which you created in “Steps for
defining a master virtual machine for Linux” on page 71. For information about
obtaining your Linux distribution, see “Steps for obtaining documentation and
media” on page 34. This topic includes information about your virtual machine
configuration that you should know for your Linux distribution.
To get the installation and configuration process started, Linux distributions follow
this pattern:
Chapter 7. Creating your first Linux virtual machine and installing Linux77
StageDescription
1Use FTP to move the Linux boot files to a target virtual machine. As of this
writing, popular Linux distributions require you to ftp the files to your virtual
machine.
Examples: SUSE Linux uses these boot files:
v VMRDR IKR. The Linux kernel built for use with a ram disk.
v INITRD. The initial ram disk image.
v PARM FILE. The generic parm file for use with the ram disk system.
Red Hat, Inc., Linux uses these boot files:
v KERNEL IMG. The Linux kernel.
v INITRD IMG. The initial ram disk image.
v REDHAT PARM. The generic parm file for use with the ram disk system.
Notes:
1. You must ftp the Linux kernel and ram disk image files to the virtual
machine by specifying them as binary files with a VM record format of fixed
length 80. It is recommended that you use the z/VM FTP command to
transfer the files. If you use the FTP command, use the commands “bin” and
“locsite fix 80” before you make the transfer. If you use the workstation FTP
client, issue the commands “bin” and “quote site fixrecfm 80” before you
make the transfer. See “Example of using FTP to get the Linux boot files” on
page 79.
2. If the hardware management console (HMC) supports accessing HMC
removable media from the z/VM logical partition, you do not need a remote
FTP server to get the Linux installation files. See “Example of using FTP to
install Linux from the hardware management console,” on page 139.
2Punch the Linux boot files to the virtual machine reader. See “Example of
punching Linux boot files to the virtual machine reader” on page 80.
3Boot (IPL) Linux from the virtual machine reader. See “Example of booting (IPL)
the Linux boot files from the virtual machine reader” on page 81.
4Use the tools and documentation from your Linux distribution to install and
configure Linux.
Note: Installation of Linux itself, not just the transfer of the installation files, can
also be accomplished using FTP.
During Linux configuration, you need to know these important points about the
LINMSTR virtual machine configuration:
v When you log on to LINMSTR, CMS is loaded automatically and the PROFILE
EXEC is automatically executed. This allows you to interact with z/VM to get
the Linux installation process started.
v Load the Linux boot files onto the 192 disk. The 191 disk is too small to hold the
boot files. You must access 192 as your A-disk:
access 192 a
DMSACC724I 192 replaces A (191)
Ready;
v The default memory for LINMSTR is 128 MB.
v The 150 minidisk is for the Linux root file system.
v The 151 minidisk is for the Linux swap space.
78z/VM: Getting Started with Linux on System z
v LINMSTR connects to the IP network through the virtual network interface
connection that you defined in LINDFLT PROTODIR. There are three qeth
device addresses that start at the virtual address that you defined on the
NICDEF statement.
Example: If you used the statement:
NICDEF 600 TYPE QDIO LAN SYSTEM VSWITCH1
the qeth device addresses you enter during Linux configuration are 0.0.0600,
0.0.0601, and 0.0.0602.
For information about device drivers, see Linux on System z: Device Drivers,Features, and Commands on the IBM developerWorks Linux on System z Web site
entitled “Documentation for Development stream” at:
v Before you install Linux, format the 150 and 151 minidisks. From the CMS
command line, type these commands, press the Enter key, then answer the
prompts:
format 150 z
.
.
.
format 151 x
v During the Linux installation process, predefine extra device addresses, making
it unnecessary to do this after the system has been installed and loaded. When
needed, you can add DASD easily through the CP LINK command. This
strategy helps you avoid additional steps to add new DASD.
v After you install Linux, check for Linux service packs and apply them before
you clone Linux virtual servers.
v Ensure your Linux server /etc/resolv.conf points to the correct name server.
v If you want to use the signal shutdown function for all your Linux systems, you
can make the required modification now so it will be included in all clones. See
“Steps for enabling Linux virtual servers to shut down automatically” on page
87.
v If you want to monitor the performance of Linux virtual servers with the
Performance Toolkit for VM, you might need to install additional software on
the master Linux so all clones automatically get the monitoring software. See
“Monitoring Linux virtual servers with Performance Toolkit for VM” on page
118.
Example of using FTP to get the Linux boot files
This topic is an example of how to use FTP to get the Linux boot files from a
remote server.
Tip: If you do not have an external FTP server or do not want to create an external
connection due to security concerns, you can install Linux by accessing a DVD or
removable medium in the hardware management console (HMC) through FTP. For
more information, see “Example of using FTP to install Linux from the hardware
management console,” on page 139.
In this example, parts in bold indicate commands you would issue. First, access as
your A-disk a disk large enough to hold the boot files (the 192 disk in the
example). Note the command locsite fix 80, which sets the VM file format to
fixed length 80, the file format necessary for punching the binary files to the
virtual machine reader.
Chapter 7. Creating your first Linux virtual machine and installing Linux79
Note: Because the directory containing the Linux boot files varies based on the
Linux distribution and distribution level, the directory information used in
the FTP GET commands in this topic is for example use only.
access 192 a
DMSACC724I 192 replaces A (191)
Ready;
ftp 9.185.246.25
VM TCP/IP FTP Level 54
Connecting to 9.185.246.25, port 21
220 linux390 FTP server (Version wu-2.4.2-VR17(1) Thu May 18 03:18:13 EDT 2000)
ready.
USER (identify yourself to the host):
user_ID
>>>USER user_ID
331 Password required for user_ID.
Password:
>>>PASS ********
230 User user_ID logged in.
Command:
bin
>>>TYPE i
200 Type set to I.
locsite fix 80
Command:
get /boot/s390x/vmrdr.ikr
>>>PORT 9,185,246,26,4,5
200 PORT command successful.
>>>RETR /boot/s390x/vmrdr.ikr
150 Opening BINARY mode data connection for vmrdr.ikr (1511884 bytes).
226 Transfer complete.
1511920 bytes transferred in 1.972 seconds. Transfer rate 766.69 Kbytes/sec.
Command:
get /boot/s390x/initrd suse.initrd
>>>PORT 9,185,246,26,4,7
200 PORT command successful.
>>>RETR /boot/s390x/initrd
150 Opening BINARY mode data connection for initrd (9862505 bytes).
8299680 bytes transferred.
226 Transfer complete.
9862560 bytes transferred in 12.366 seconds. Transfer rate 797.55 Kbytes/sec.
Command:
asc
>>>TYPE a
200 Type set to A.
Command:
get /boot/s390x/parmfile parm.file
>>>PORT 9,185,246,26,4,8
200 PORT command successful.
>>>RETR /boot/s390x/parmfile
150 Opening ASCII mode data connection for parmfile (38 bytes).
226 Transfer complete.
40 bytes transferred in 0.081 seconds. Transfer rate 0.49 Kbytes/sec.
Command:
quit
Example of punching Linux boot files to the virtual machine
reader
This example shows commands used to punch Linux boot files to the virtual
machine reader. When you punch files to the reader, note the spool identifiers
(0126, 0127, and 0128 in the example–yours will differ) so if there are other reader
files present you can queue (ORDER) the reader files in the proper order.
80z/VM: Getting Started with Linux on System z
spool punch * close
Ready;
punch vmrdr ikr a (noh
RDR FILE 0126 SENT FROM LINMSTR PUN WAS 0126 RECS 3129 CPY 001 A NOHOLD NOKEEP
Ready;
punch parm file a (noh
RDR FILE 0127 SENT FROM LINMSTR PUN WAS 0127 RECS 3129 CPY 001 A NOHOLD NOKEEP
Ready;
punch suse initrd a (noh
RDR FILE 0128 SENT FROM LINMSTR PUN WAS 0128 RECS 3129 CPY 001 A NOHOLD NOKEE
Ready;
order reader 126 127 128
0000003 FILES ORDERED
Ready;
Tip: If you forget the spool file identifiers, issue QUERY RDR ALL.
Example of booting (IPL) the Linux boot files from the virtual
machine reader
This example shows how you get the Linux installation and configuration started
by booting (IPL) the virtual machine reader.
ipl 00c clear
.
.
.
Linux version release (root@ikr_rdr.suse.de)
.
.
.
Command line is: ramdisk_size=32768 root=/dev/ram0 ro
We are running under VM
This machine has no IEEE fpu
Initial ramdisk at: 0x02000000 (9862560 bytes)
Detected device 2000 on subchannel 0000 - PIM = 80, PAM = 80, POM = FF
Detected device 2001 on subchannel 0001 - PIM = 80, PAM = 80, POM = FF
Detected device 0202 on subchannel 0002 - PIM = C0, PAM = C0, POM = FF
Detected device 0192 on subchannel 0003 - PIM = C0, PAM = C0, POM = FF
Detected device 0200 on subchannel 0004 - PIM = C0, PAM = C0, POM = FF
Detected device 0201 on subchannel 0005 - PIM = C0, PAM = C0, POM = FF
Detected device 000C on subchannel 0006 - PIM = 80, PAM = 80, POM = FF
Detected device 000D on subchannel 0007 - PIM = 80, PAM = 80, POM = FF
Detected device 000E on subchannel 0008 - PIM = 80, PAM = 80, POM = FF
.
.
.
Here is an example of some of the errors you might see on your virtual machine
console when formatting DASD during the Linux IPL. These errors are normal and
are not a problem.
block_group = 2, inode_bitmap = 16777472
EXT3-fs error (device dasd(94,1)) in ext3_new_inode: IO failure
EXT3-fs error (device dasd(94,1)): ext3_new_inode: reserved inode or inode > ino
des count - block_group = 0,inode=1
EXT3-fs error (device dasd(94,1)) in ext3_new_inode: IO failure
EXT3-fs error (device dasd(94,1)): ext3_new_inode: reserved inode or inode > ino
des count - block_group = 0,inode=2
EXT3-fs error (device dasd(94,1)) in ext3_new_inode: IO failure
At this point, you would continue with instructions for your Linux distribution.
See “Overview of defining virtual machines for Linux” on page 71.
Chapter 7. Creating your first Linux virtual machine and installing Linux81
Tip: When interacting with the Linux installation program, you might enter virtual
machine console mode. For instance, the installation program might tell you to
press Enter to accept a default option and pressing the Enter key results in the VM
READ state. If this happens, simply press the Enter key again. For more
information about virtual machine console states, see “The virtual machine
console” on page 4. Also, see “Virtual machine operation tasks” on page 107.
(Optional) Steps for loading Linux automatically at logon
Once you are satisfied with your Linux master, you might want to automate the
loading of Linux whenever its virtual machine is logged on. You can do this by
placing an IPL command in the PROFILE EXEC.
logged on, the PROFILE EXEC automatically executes and, through the IPL
command, loads the Linux operating system.
Because the same PROFILE EXEC is replicated in every clone, this automation
makes it convenient for systems with many Linux virtual servers. Chapter 9,
“Setting up basic system automation,” on page 85 shows you how to automate the
startup of Linux virtual servers whenever z/VM itself loads; thus whenever z/VM
loads, all your virtual machines are logged on and, in turn, each virtual machine
loads the Linux operating system.
Before you begin: You need to be logged onto the LINMSTR virtual machine.
Perform these steps to load Linux automatically at logon:
4
Whenever the virtual machine is
1. If Linux is operating, shut it down.
2. Load (IPL) CMS. Issue this command:
ipl cms
z/VM V6.1.02004-02-11 16:57
.
.
.
Ready;
3. Edit the PROFILE EXEC. Issue this command:
xedit profile exec
4. At the bottom of the file, add this line:
.
.
.
"CP IPL 150 CLEAR"
5. Save the file. From the XEDIT command line, issue this command:
====> file
You are done.
4. As an alternative to using the PROFILE EXEC, you can use the COMMAND directory control statement to specify a command or
a list of commands to be issued automatically whenever the Linux virtual machine is logged on. Note that the commands to be
executed may be of any class, and that privileged commands can therefore be executed this way without having to give the
virtual machine the associated privilege class. For more information, see the COMMAND directory control statement in z/VM: CPPlanning and Administration, SC24-6178.
82z/VM: Getting Started with Linux on System z
Chapter 8. Cloning Linux virtual servers
This topic covers a rudimentary way to replicate (or clone) Linux virtual servers.
In Chapter 7, “Creating your first Linux virtual machine and installing Linux,” on
page 71, you created the LINUX prototype and installed the Linux operating
system into LINMSTR. In this topic, you create a clone or replica of LINUX, copy
the Linux file system from LINMSTR to the clone, and change the IP address of
the clone in the Linux configuration files.
Steps for cloning a Linux virtual server
These steps tell you how to clone a Linux virtual server using DirMaint.
Before you begin: You need to
v Be sure that LINMSTR is not running so the new clone can use LINMSTR’s IP
address. You will use LINMSTR’s IP address temporarily for each Linux clone
during the cloning process. Since no two Linux virtual servers can have the
same IP address at the same time, you must clone Linux servers one at a time,
then customize them.
v Have the new IP address for the cloned Linux virtual server.
v Log on as MAINT.
Perform these steps to clone a Linux virtual server:
1. Add a clone of LINUX to the user directory. Issue this DirMaint command:
dirm add linux02 like linux pw new_password
where you supply a password for new_password.
2. Unlock LINMSTR’s directory entry. From the command line, type this
command and press the Enter key:
dirm for linmstr unlock
DVHXMT1191I Your UNLOCK request has been sent for processing.
Ready;
DVHREQ2288I Your UNLOCK request for LINMSTR at * has been accepted.
DVHREQ2289I Your UNLOCK request for LINMSTR at * has completed; with
DVHREQ2289I RC = 0.
3. Clone the disks from LINMSTR to the clone LINUX02. From the command
line, type these DirMaint commands and press the Enter key after each one:
dirm for linux02 clonedisk 191 linmstr 191
dirm for linux02 clonedisk 150 linmstr 150
dirm for linux02 clonedisk 151 linmstr 151
Tip: Cloning might take time. You are ready to move to the next step after
your work units have completed successfully. To determine the status of your
work units, type this command and press the Enter key:
dirm query datamove *
4. Log onto LINUX02 and IPL the Linux operating system.
5. Telnet to the new Linux virtual server and update the network configuration
files to make permanent the network changes.
Example: On a SUSE SLES9 system, you need to modify the IP address and
host name through a tool like yast2.
6. Shut down the Linux operating system in LINUX02 and reboot. Check that the
Linux operating system reboots properly and that the network connections are
correct.
7. Try pinging this Linux server or try to access a remote site from this Linux
server.
You know you are done when the Linux operating system reboots properly and
the network connections are correct.
84z/VM: Getting Started with Linux on System z
Chapter 9. Setting up basic system automation
This section covers basic forms of z/VM system automation:
v Starting and stopping virtual machines automatically
v Automating z/VM system and virtual machine operations through the
programmable operator facility.
Starting and stopping virtual machines automatically
You can start and stop virtual machines manually, but it is more convenient to
have z/VM do these tasks automatically. This topic shows you how to:
v Start your Linux virtual servers and important virtual machines automatically.
You already configured DirMaint to start automatically in “Steps for
automatically starting DIRMAINT” on page 59, and TCP/IP in “Steps for
automatically starting TCP/IP” on page 63. Now you will do the same for other
virtual machines.
By including the CP XAUTOLOG command in the AUTOLOG1 virtual
machine’s PROFILE EXEC, a virtual machine starts automatically when z/VM is
loaded (IPL). The AUTOLOG1 user ID is the default user that z/VM logs on at
IPL time. When logged on, AUTOLOG1 executes its PROFILE EXEC, which can
contain an XAUTOLOG command to start a virtual machine that runs Linux or
any other vital system service. In turn, each virtual machine executes its own
PROFILE EXEC, which contains the necessary commands to establish its
operating environment; in the case of Linux, the PROFILE EXEC can load the
Linux operating system (see “(Optional) Steps for loading Linux automatically at
logon” on page 82.)
v Stop Linux virtual servers automatically. You can enable Linux to perform an
orderly shutdown whenever you shut down z/VM or force the Linux virtual
machine to log off with the FORCE command. Because Linux shuts down
gracefully, Linux does not have to examine or repair disks when rebooting.
Additionally, Linux can notify network monitors that it is shutting down.
Prior to shutting down or forcing a virtual machine to log off, z/VM sends a
signal to enabled virtual machines to shut down. The SYSTEM CONFIG file sets
the amount of time that z/VM allows a virtual machine operating system to
process a shutdown signal. In this topic, you configure Linux to process a
shutdown signal.
Related information
z/VM: CP Planning and Administration, SC24-6178
Steps for automatically starting Linux virtual servers and
other virtual machines
This procedure configures the AUTOLOG1 virtual machine to startup virtual
machines automatically whenever z/VM starts.