Download as pdf or txt
Download as pdf or txt
You are on page 1of 128

V10.

cover

IBM Training Front cover


Student Exercises
with hints

Essentials of PowerKVM
Course code LX022G ERC 1.0
Student Exercises with hints

Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in many
jurisdictions worldwide:
AIX® PartnerWorld® Power Architecture®
Power Systems™ Power® PowerVM®
POWER6® POWER7® PureFlex®
Redbooks® Storwize® WebSphere®
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United
States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Other product and service names might be trademarks of IBM or other companies.

April 2016 edition


The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without
any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer
responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While
each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will
result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.

© Copyright International Business Machines Corporation 2016.


This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
V10.1
Student Exercises with hints

TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Exercise 1. System preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


1.1. Lab hardware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Section 1: Lab network access overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Section 2: Lab system exercise data sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Section 3: Using your IPMI server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
1.2. Accessing the Flexible Service Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Section 1: Navigate the ASMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

Exercise 2. Installing PowerKVM host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1


2.1. System preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Section 1: Prepare FSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Section 2: IPMI tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
2.2. Host installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Section 1: Petitboot menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Section 2: Installation menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9

Exercise 3. Navigating the basic PowerKVM environment . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1


3.1. Basic administration tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Section 1: Using the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Section 2: Accessing the Kimchi interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

Exercise 4. Managing networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1


4.1. Basic Kimchi navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Section 1: Navigate network environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Section 2: Create bridge device - virsh command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Section 3: Create virtual bridged network using Kimchi . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Section 4: Monitor network resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
4.2. Create bridge device example - configure-system utility . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
4.3. Create bridge device example - Manual edit process . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15

Exercise 5. Storage operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1


5.1. Basic storage operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Section 1: Identify storage resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Section 2: Directory-based storage pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Section 3: Logical storage pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Section 4: Creating storage volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
5.2. Optional exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Section 1: Fibre Channel attached storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Section 2: iSCSI storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18

Exercise 6. Creating templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1


6.1. Building and editing templates in Kimchi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Section 1: Create template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3

© Copyright IBM Corp. 2016 Contents iii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Section 2: Remote templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5

Exercise 7. Define and install Guests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-1


7.1. Manage guest operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Section 1: Define guest definition using Kimchi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Section 2: Install Linux to guest VM with Kimchi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Section 3: Defining and installing guest definition using CLI . . . . . . . . . . . . . . . . . . . . . . 7-12

Exercise 8. Host management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-1


8.1. Host functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Section 1: Navigate the host interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Section 2: Log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Section 3: System information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
8.2. Manage virtualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10

Appendix A. Exercise data sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1

iv PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

TMK
Trademarks
The reader should recognize that the following terms, which appear in the content of this training
document, are official trademarks of IBM or other companies:
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in many
jurisdictions worldwide:
AIX® PartnerWorld® Power Architecture®
Power Systems™ Power® PowerVM®
POWER6® POWER7® PureFlex®
Redbooks® Storwize® WebSphere®
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the United
States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Other product and service names might be trademarks of IBM or other companies.

© Copyright IBM Corp. 2016 Trademarks v


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

vi PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

pref
Exercises description
This course includes the following exercises:
• System preparation
• Installing PowerKVM host
• Navigating the basic PowerKVM environment
• Manage networks
• Storage operations
• Creating templates
• Define and install Guests
• Host management
In the exercise instructions you will see each step prefixed by a line. You
might want to check off each step as you complete it to keep track of your
progress.
Most exercises include required sections which should always be completed.
These might be required before performing later exercises. Some exercises
might also include optional sections that you might wish to perform if you
have sufficient time and want an additional challenge.
This course includes two versions of the course exercises, “with hints” and
“without hints”.
The standard “Exercise instructions” section provides high-level instructions
for the tasks you should perform. You need to apply the knowledge you
gained in the unit presentation to perform the exercise.
The “Exercise instructions with hints” provide more detailed instructions and
hints to help you perform the exercise steps.

© Copyright IBM Corp. 2016 Exercises description vii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

viii PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 1. System preparation
(with hints)

What this exercise is about


This exercise covers lab system access, and team assignments.

What you should be able to do


At the end of this exercise, you should be able to:
• Access, and navigate assigned lab systems

Introduction
Before you can begin working with PowerKVM, you need to make you
familiar with your lab environment. The following lab steps introduce you to
your systems that are used in the remainder of the lab assignments.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with OPAL firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 1. System preparation 1-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.

1-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 1.1. Lab hardware overview


Section 1: Lab network access overview
Visually, the lab system components are connected to the lab network like the following:

Lab team 1

Power 8 server

Internet Citrix
Student 1 server

Student 2
Linux network server
(common platform for all lab teams)
Number of lab teams dependent
on VIOS instances

Lab team Lab Environment


On IBM CLP VPN

Section 2: Lab system exercise data sheet

Note

In this procedure, the student uses the exercise data sheet, which is Appendix A in this guide (or in
a separate document provided by your instructor).

Important

If you have any trouble connecting to your lab system, or do not see the shared applications, notify
your instructor.

__ 1. Determine which team and student number you have been assigned. This information is
provided by instructor.

© Copyright IBM Corp. 2016 Exercise 1. System preparation 1-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Section 3: Using your IPMI server


__ 2. Access your IPMI server platform with the user ID provided.
» While you are sharing access to this platform, each team is provided a unique user ID.
__ 3. Run the command ipmitool.
You are using ipmitool in later exercises. This step confirms that the command is available
to you. When you run ipmitool without arguments you are presented with a list of options.
» You should notice that the ipmitool, run by itself, will show the available options to the
command. You will use this command in the following exercises.
# ipmitool
No command provided!
Commands:
raw Send a RAW IPMI request and print response
i2c Send an I2C Master Write-Read command and print response
spd Print SPD info from remote I2C device
lan Configure LAN Channels
chassis Get chassis status and set power state
. . .
__ 4. Run the ipmitool command again, this time adding -help to the operation. Is there any
difference to the previous example?
» You should see more options listed at the top of the screen, as in this example:
# ipmitool -help
ipmitool version 1.8.11

usage: ipmitool [options...] <command>

-h This help
-V Show version information
-v Verbose (can use multiple times)
-c Display output in comma separated format
-d N Specify a /dev/ipmiN device to use (default=0)

1-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 1.2. Accessing the Flexible Service Processor


Section 1: Navigate the ASMI

Note

In the event the console becomes unavailable. You need to be able to access the ASMI so you can
reset the system.

__ 5. Open a new browser window, and connect to your FSP.


» Remember to use https, not http!
__ 6. Your browser should bring up the Advanced System Management interface (also known
as ASMI). Log in to the ASMI with the provided credentials.
» Your browser window should appear similar to the following example:

Lab team 1

Power 8 server

Internet Citrix
Student 1 server

Student 2
Linux network server
(common platform for all lab teams)
Number of lab teams dependent
on VIOS instances

Lab team Lab Environment


On IBM CLP VPN
__ 7. Under the left panel, there are various options, with + boxes to open sub menus. What
options are available under the Power/Restart Control group?
» The following example shows the available options.

© Copyright IBM Corp. 2016 Exercise 1. System preparation 1-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 8. Select Power On/Off System. What do you see?


» Your system should be powered up for class, though it might be in a powered off
condition. The right section of your browser window should provide an option to power
on or power off the system.
What options are available under the System Service Aids group?
» The following example shows the available options.

What options are available under the System information group?


» The following example shows the available options.

__ 9. Select Real-time Progress Indicator. What happens?


» A new browser window should appear, showing progress indicator values. This is helpful
when you perform steps later in class.
What options are available under the System Configuration group?

1-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » The following example shows the available options.

__ 10. Select Firmware Configuration option. What do you see?


» The menu option allows for changing between PowerVM and OPAL, however the
system must be powered off to make change.
What options are available under the Login Profile group?
» The following example shows the available options.

__ 11. Select User Access Policy option. What do you see?

© Copyright IBM Corp. 2016 Exercise 1. System preparation 1-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The menu option allows for changing passwords for various IDs. To use the ipmitool
later you will need to assign an IPMI password.

__ 12. Set the IPMI password to abc123.


__ 13. Notify your instructor that you have completed this exercise.

Important

You return to these menus in the Installing PowerKVM host exercise. For now, notify your instructor
you have completed these exercise steps.

End of exercise

1-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty Exercise review and wrap-up


This exercise is designed to make sure you have access to assigned lab systems.

© Copyright IBM Corp. 2016 Exercise 1. System preparation 1-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

1-10 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 2. Installing PowerKVM host
(with hints)

What this exercise is about


This exercise covers PowerKVM host installation.

What you should be able to do


At the end of this exercise, you should be able to:
• Install PowerKVM host

Introduction
PowerKVM uses a Linux kernel to provide virtualization. In this exercise, you
install the base host image.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with OPAL firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints that are marked by a » sign.

2-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 2.1. System preparation


Section 1: Prepare FSP

Important

Terminology that is used in this exercise. Node refers to the physical system. When the word node
is used, you are dealing with the server, or the FSP (or ASMI). Host refers to the operating system
installed. So IP information for the node and host are two different values.

__ 1. Log in to assigned ASMI as USERID.


» Remember to use HTTPS to access your ASMI menu.

__ 2. So you can monitor activity, open the Real-time progress indicator from your ASMI.
» From the System Information group, select Real-time Progress Indicator. You should
see a browser window appear similar to the following example:

Section 2: IPMI tool

Information

IPMI tools are available as part of most Linux distributions. There is also a version that can be
installed on other platforms also.

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 3. On your assigned Linux server, open a terminal window.


» You should be using the same server as in the System preparation exercise.
__ 4. Use ipmitool to check status of your node.
» The syntax of the command is as follows (replace correct IP information for your host):
$ ipmitool -H 10.1.2.3 -I lanplus -P abc123 chassis status
System Power : off
Power Overload : false
Power Interlock : inactive
Main Power Fault : false
Power Control Fault : false
Power Restore Policy : always-off
Last Power Event :
Chassis Intrusion : inactive
Front-Panel Lockout : inactive
Drive Fault : false
Cooling/Fan Fault : false

Information

The term chassis, when used with ipmitool command, does not refer to a PureFlex chassis, it
refers to the Power8 server.

__ 5. Use ipmitool to open a console window.


» The example shows the command syntax.
$ ipmitool -H 10.1.2.3 -I lanplus -P abc123 sol activate
What happens if the console shows already active?
Use the deactivate flag with ipmitool.
__ 6. Use ipmitool escape sequence to leave the console.
» The escape sequence is Tilde dot (~.) keys that are struck in sequence. If successful,
you should return to the Linux prompt.
__ 7. Use ipmitool to power up your node.
» The example shows the command syntax.
$ ipmitool -H 10.1.2.3 -I lanplus -P abc123 chassis power on
__ 8. Use ipmitool to open a console window.
» The example shows the command syntax.
$ ipmitool -H 10.1.2.3 -I lanplus -P abc123 sol activate

2-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty __ 9. Monitor your system console as it boots, watching for Petitboot menu. There is a timeout
value for this menu, and there is no guarantee that it is set high enough to pause for you to
interrupt the boot process (if there is a valid OS on the disk, it will boot), you should plan on
using the keyboard to stop at the Petitboot menu. To accomplish this, use the up-arrow key
to change from the default Exit to shell option.

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

2.2. Host installation


Section 1: Petitboot menu
__ 10. Once Petitboot menu appears, check the system information.
» The default position is Exit to shell, though you changed this in the previous exercise
step. Select System information by moving line with arrow keys so System
information is highlighted. Use Enter key to activate selection.
Petitboot System Information
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
System type: 8247-21L
System id: 212E3BA

Network interfaces
eth0:
MAC: 98:be:94:58:82:80
link: down

. . .

eth2:
MAC: 98:be:94:58:54:d0
link: up

eth3:
MAC: 98:be:94:58:54:d2
link: down
. . .
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
x=exit, h=help

What information is available on this screen?


» You should see information such as machine type and serial number, Ethernet MAC
values, and storage device information. This might be of value in troubleshooting, or
setting up network boot servers.
__ 11. Exit from System information, and go to System configuration menu for your host.

2-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Use the X key to exit menu. You should then see a configuration menu similar to the
following example:
Petitboot System Configuration
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
Boot Order (0) Any Network device
(1) Any Device:

[ Add Device: ]
[ Clear & Boot Any ]
[ Clear ]

Timeout: 999 seconds

Network: ( ) DHCP on all active interfaces


( ) DHCP on a specific interface
(*) Static IP configuration

Device: ( ) eth0 [98:be:94:58:82:80, link down]


( ) eth1 [98:be:94:58:82:82, link down]
(*) eth2 [98:be:94:58:54:d0, link up]
( ) eth3 [98:be:94:58:54:d2, link down]
( ) eth4 [98:be:94:54:c2:40, link down]
( ) eth5 [98:be:94:54:c2:42, link down]
( ) eth6 [98:be:94:54:c2:b0, link down]
( ) eth7 [98:be:94:54:c2:b2, link down]
( ) eth8 [98:be:94:58:49:d0, link down]
( ) eth9 [98:be:94:58:49:d2, link down]
( ) tunl0 [00:00:00:00:08:00, link down]

IP/mask: 10.1.2.3 / 24 (eg. 192.168.0.10 / 24)


Gateway: 10.1.2.254 (eg. 192.168.0.1)
DNS Server(s): 10.9.9.99 (eg. 192.168.0.2)

Disk R/W ( ) Prevent all writes to disk


(*) Allow bootloader scripts to modify disks

[ OK ] [ Help ] [ Cancel ]
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
tab=next, shift+tab=previous, x=exit, h=help

__ 12. If your system has a fixed IP address, verify it matches your lab system assignment.
» Use the arrow keys to maneuver within the menu. The IP values can be adjusted by
typing in the required value.
__ 13. If not already set, change the timeout value to 999. Change the Autoboot value by removing
the * in the field.

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Use the arrow keys to maneuver within the menu. The time value can be adjusted by
typing in the required value. The * can be removed with the space bar.
__ 14. Return to main Petitboot menu.
__ 15. Select Exit to shell option.
__ 16. The shell prompt gives you some limited ability. For example, you can access network
functions, such as telnet or ping. These commands can be used to verify network
access, or authenticate through a firewall.
From the shell prompt, ping the gateway assigned to your lab. this will verify your network is
active.
» The ping command works the same within the shell as from any OS command prompt
you have worked with.
__ 17. Return to the main Petitboot menu.
__ 18. Create a new boot option, using the n key.
» When you type n, the following menu will appear:
Petitboot Option Editor
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq

Device: (*) Specify paths/URLs manually

Kernel:
Initrd:
Device tree:
Boot arguments:

[ OK ] [ Help ] [ Cancel ]

qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
tab=next, shift+tab=previous, x=exit, h=help

__ 19. From the Petitboot Option Editor, fill in the information required.
» Use the information provided by instructor to complete these steps.
Kernel:_____________________________
Initrd:______________________________
Device tree: Not needed
Boot arguments:______________________

2-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » The following example shows the format required. While you might reduce the amount
of information provided at this point in the process, it is more convenient to input all of
this at the beginning of the installation.
kernel http://YOUR-SERVER-IP/PATH-TO-FILE/vmlinuz

initrd http://YOUR-SERVER-IP/PATH-TO-FILE/initrd.img

append root=live:http://YOUR-SERVER-IP/PATH-TO-FILE/squash.img
repo=http://YOUR-SERVER-IP/PATH-TO-FILE/packages rd.dm=0 rd.md=0
console=hvc0 console=tty0 ifname=net0:MAC-ADDRESS
ip=POWERKVM-HOST-IP::GATEWAY:NETMASK:HOSTNAME-DNS-ADDRESS:net0:none
nameserver=NAMESERVER-IP
__ 20. Once the information has been provided, use the tab or arrow key to highlight the OK box.
» Your menu should look similar to the following example, though IP information might be
different:
Petitboot Option Editor
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq

Device: (*) Specify paths/URLs manually

Kernel: http://192.168.2.1/export/vmlinuz
Initrd: http://192.168.2.1/export/initrd.img
Device tree:
Boot arguments: root=live:http://192.168.2.1//export/squashfs.img repo

[ OK ] [ Help ] [ Cancel ]

qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
tab=next, shift+tab=previous, x=exit, h=help
__ 21. When you select OK, you will be returned to the main Petitboot menu. From this location
you use the Enter key to accept your entry. The installation should start at this point.

Section 2: Installation menus

Information

You are now moving into a series of menu screens to complete the installation. Follow the steps to
complete the exercise.

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Note

The version of PowerKVM might be different in the following examples from what you install on your
system.

__ 22. The first menu option is Choose a language. You can choose whatever language you want,
however the remaining exercise steps will assume you select English.
» Your menu should look similar to the following:

__ 23. Acknowledge general terms of the installation.

2-10 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Your menu should look similar to the following:

__ 24. Accept terms of the installation.


» Your menu should look similar to the following:

Without accepting the terms, you cannot proceed.


__ 25. Select Install IBM PowerKVM.

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Your menu should look similar to the following.

If PowerKVM exists on your system, you see an option to reinstall.


__ 26. Select first disk available in your system to install PowerKVM to.
» Your menu should look similar to the following:

__ 27. Select logical volume sizes.

2-12 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » For class we will use the default values.

__ 28. Set root password as assigned by instructor.


» Your menu should look similar to the following:

You use a simple password in class. You know you use a more complex password in
production!
__ 29. Set timezone to New York, and select UTC option.
» You can use the Page down key on your keyboard to search for New York. Use the tab
key to move within the menu to select UTC setting with space bar. Your menu should

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

look similar to the following:

__ 30. NTP server configuration. Leave default values.


» As with previous menus, use the space bar to make the selection. This will bring up
pre-defined NTP servers, You can then use the down arrow key to go to bottom of
screen to select OK. Your menu should look similar to the following:

__ 31. Adjust time configuration as needed.

2-14 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Within each field, you use the up or down arrow keys to change these values.Your
menus should look similar to the following:

__ 32. Configure network adapter menu. View the contents of this list, and compare to what you
saw in Petitboot menu. Proceed with installation (you will configure bridge device in a later
exercise).
» Since you created a device net0 with the boot string, the device is already configured.
Use the tab key to select OK. Your menu should look similar to the following (depending
on the server model):

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 33. Verify hostname, and set DNS entry.


» The DNS server information should be provided by instructor. Your menu should look
similar to the following, though you will only have one DNS server defined (hostname
should match your assigned hostname, which you passed during the boot process):

__ 34. Review the summary screen to verify selections are correct.


» Your menu has different values to the following, but should look similar:

__ 35. If PowerKVM exists on your host, you have one more chance to verify changes.

2-16 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty __ 36. Monitor console as installation progresses.


» Your menu should look similar to the following:

__ 37. Once the installation completes, you have to select Reboot to complete the process.
» Your menu should look similar to the following:

__ 38. When the installation completes, log in to your system.


__ 39. Notify your instructor that you have completed this exercise.

End of exercise

© Copyright IBM Corp. 2016 Exercise 2. Installing PowerKVM host 2-17


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise review and wrap-up


This exercise dealt with installing PowerKVM host by using network source. If this system had a
local optical drive, we might have installed from that source.

2-18 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 3. Navigating the basic PowerKVM
environment
(with hints)

What this exercise is about


This exercise covers PowerKVM host management using the command line,
and Kimchi.

What you should be able to do


At the end of this exercise, you should be able to:
• Access assigned lab system with administrative tools
- Virt-tools
- Kimchi
• Gather system information

Introduction
In this exercise, you access the command line and Kimchi to perform basic
administrative operations. These tools will be used the remainder of class.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with OPAL firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 3. Navigating the basic PowerKVM environment 3-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.

3-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 3.1. Basic administration tools


Section 1: Using the CLI
__ 1. Open a terminal session to your system console by using ipmitool.
» Access your assigned IPMI server to open ipmitool.

Important

You will be working on the console at times during this class. This is not always the proper way to
access any system. The purpose of this is two-fold. First, our goal is to make you more comfortable
with the IPMI tool. Second, some configuration steps are not yet complete, so you will need console
access.

__ 2. Verify available space in file systems with df command.


» This step reminds you PowerKVM is running standard Linux environment. The following
example is presented in smaller font size to show the output without line-feed.
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/ibmpkvm_vg_root00-ibmpkvm_lv_system 20511312 2078968 17367384 11% /
devtmpfs 31914048 0 31914048 0% /dev
tmpfs 32934656 0 32934656 0% /dev/shm
tmpfs 32934656 19008 32915648 1% /run
tmpfs 32934656 0 32934656 0% /sys/fs/cgroup
/dev/mapper/ibmpkvm_vg_root00-ibmpkvm_lv_var 10190100 102776 9546652 2% /var
/dev/sdc2 499656 73400 389560 16% /boot
. . .
__ 3. ISO images have been placed on the web server you installed PowerKVM from. These files
need to be copied to your host so you can create guest VMs. You use scp to accomplish
this. Run the following commands (with the correct IP address information), with the correct
IP address. The password is pKVM.
# scp pKVM@X.X.X.X:/export/qv260/RHEL7.1-BE /var/lib/libvirt/images/RHEL7.1-BE
# scp pKVM@X.X.X.X:/export/qv260/RHEL7.1-LE /var/lib/libvirt/images/RHEL7.1-LE
__ 4. Login to your assigned PowerKVM host terminal window as root.
__ 5. Access virsh interface with virsh command.
» You can run virsh operations from the root command line, or within the virsh command
line.The following exercise steps use the virsh command line.
# virsh
Welcome to virsh, the virtualization interactive terminal.

Type: 'help' for help with commands


'quit' to quit
__ 6. Use the help function to see how to use the command echo.

© Copyright IBM Corp. 2016 Exercise 3. Navigating the basic PowerKVM environment 3-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» To access help, add --help to the command.


virsh # echo --help
NAME
echo - echo arguments

SYNOPSIS
echo [--shell] [--xml] [<string>]...

DESCRIPTION
Echo back arguments, possibly with quoting.

OPTIONS
--shell escape for shell use
--xml escape for XML use
<string> arguments to echo
__ 7. Run help command to see available commands.
» The help command will show all available commands.
virsh # help
Grouped commands:

Domain Management (help keyword 'domain'):


attach-device attach device from an XML file
attach-disk attach disk device
. . .
__ 8. How do you list all guest VMs on your host? The command is list. Try it on your system
now.
» The command list will show guest VMs on your system. Since no guests have been
configured, th list will be empty.
virsh # list
Id Name State
----------------------------------------------------
__ 9. Exit from the virsh prompt, and return to the root prompt.
» Use the command exit to leave virsh prompt.
__ 10. Run the same command as in step 7, but from the root prompt.
» Any virsh command can be run from the root prompt. Once the command is run, you
remain at the root prompt. From the root prompt, type virsh help.
# virsh help

3-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Note

The following steps deal with listing commands. You will perform configuration changes in later
exercises.

__ 11. List the version information of your system.


» The version command shows key information about your system. The following
example shows sample output.
virsh # version
Compiled against library: libvirt 1.2.16
Using library: libvirt 1.2.16
Using API: QEMU 1.2.16
Running hypervisor: QEMU 2.3.0
__ 12. List storage pools configured on your host.
» Since no additional storage pools have been created at this point, you should only see
two pools (default and ISO). The pool-list command provides this information.
virsh # pool-list
Name State Autostart
-------------------------------------------
default active no
ISO active no
__ 13. List storage volumes on your host.
» As with storage pools, no additional volumes have been added, so you will see only
what is part of base install. The following example shows this.
virsh # vol-list default
Name Path
-------------------------------------------------------------------------
lost+found /var/lib/libvirt/images/lost+found
__ 14. List all Network interface available on your host.
» Depending on the hardware platform you are working with, you should see at least one
network interface (adapter). The following example shows a system with one physical
adapter, and a loop-back device.
# virsh iface-list
Name State MAC Address
---------------------------------------------------
lo active 00:00:00:00:00:00
net0 active 98:be:94:01:6d:58
__ 15. List all Network resources known to your host.

© Copyright IBM Corp. 2016 Exercise 3. Navigating the basic PowerKVM environment 3-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» While the iface-list command shows physical interfaces, the net-list command
shows network devices available to be assigned to guest VMs. PowerKVM is built with
two networks pre-defined, which you can see in the following example.
virsh # net-list
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes
kop active yes yes
__ 16. List all node devices on your host system.
» Device nodes correspond to resources that an operating system's kernel has already
allocated. The command nodedev-list will show all such devices known to your host.
The following example has been shortened to save space. Your results will be much
longer.
virsh # nodedev-list
block_sda_1IBM_IPR_0_6AA1740000000020
block_sdb_1IBM_IPR_0_6AA1740000000060
block_sdc_1IBM_IPR_0_6AA1740000000040
block_sdd_1IBM_IPR_0_6A9E1600000000C0
. . .
__ 17. Exist from virsh command line, and return to the root prompt.

Section 2: Accessing the Kimchi interface


__ 18. Open a browser window on your desktop.
__ 19. In the browser window, access your PowerKVM host.
» Remember that Kimchi requires secure HTTP, and you are connecting to port 8001.
Note: If you run into problems accessing the Kimchi interface, you can disable the
firewall. This can be done with the following command sequence:
# service iptables save
# service iptables stop
# chkconfig iptables off
__ 20. Log in to your host as root, with the password you set during the installation.
» Your login screen should look similar to the following example:

3-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty __ 21. Access the top of the browser window should be the Kimchi banner, with the various tabs of
operations available. The following exercise steps look at each of these in their default state.
» This example shows the Kimchi banner.

__ 22. Your session should default to the Host tab. If it does not, select the Host tab from the
banner. You should see general statistics for your host. Select each of the sections, and look
at information provided.
» Your system will show system statistics when you select the tab.

__ 23. Select the Guests tab. What do you see?

© Copyright IBM Corp. 2016 Exercise 3. Navigating the basic PowerKVM environment 3-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Since your system is newly installed, no guests should appear.

__ 24. From the banner, select the Templates tab. Are there any templates?
» You copied 1ISO file to your host at the beginning of the exercise, this will not show up
until you define them. So, you should see no templates defined.

__ 25. From the banner, select Storage tab. View the available storage on your host.

3-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Depending on the version of PowerKVM, you can see different storage options. There
should be at least a selection named default. Later in this exercise you create extra
storage.

__ 26. From the banner, select Network. What networks are configured?
» You should have two networks available, default and kop. At this point, you cannot
create a guest VM that would have full access to the outside network. Later in this
exercise you create a bridge network.

__ 27. From the banner, select Administration. View the options available from this menu.

© Copyright IBM Corp. 2016 Exercise 3. Navigating the basic PowerKVM environment 3-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The Administration tab provides basic operations tools, such as firmware updates,
device configuration, and power management.

__ 28. This completes all exercise steps. You will use these two methods (CLI and Kimchi) in all
remaining exercises. Notify your instructor you have completed this exercise.

End of exercise

3-10 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty Exercise review and wrap-up


This exercise dealt with basic command operations, using the command line, and Kimchi tool by
using a web browser.

© Copyright IBM Corp. 2016 Exercise 3. Navigating the basic PowerKVM environment 3-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

3-12 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 4. Managing networks
(with hints)

What this exercise is about


This exercise covers PowerKVM networking concepts.

What you should be able to do


At the end of this exercise, you should be able to:
• Define a physical network bridge
• Create a virtual network bridge
• Monitor network resources

Introduction
In this exercise, you will navigate the PowerKVM host to gather information
about network resources, and configure a bridge device for use by guests.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with OPAL firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.

4-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 4.1. Basic Kimchi navigation


Section 1: Navigate network environment
__ 1. Open a console session to your system.

Important

As mentioned in previous exercises, we will be working form the console during this lab. This is
because you will be deactivating the network at times, so all connections outside of the console will
be turned off. Only use the console when necessary!

__ 2. In the previous exercise, you used the virsh command iface-list to find all physical
adapters. Use a different command to list physical Ethernet adapters on your system.
» Use the command lspci to search for Ethernet devices, as in the following example:
# lspci |grep Ethernet
0002:01:00.0 Ethernet controller: Emulex Corporation OneConnect NIC (Lancer) (rev 30)
0002:01:00.1 Ethernet controller: Emulex Corporation OneConnect NIC (Lancer) (rev 30)
0002:01:00.2 Ethernet controller: Emulex Corporation OneConnect NIC (Lancer) (rev 30)
0002:01:00.3 Ethernet controller: Emulex Corporation OneConnect NIC (Lancer) (rev 30)
0003:05:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet
PCIe (rev 01)
0003:05:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet
PCIe (rev 01)
0003:05:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet
PCIe (rev 01)
0003:05:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet
PCIe (rev 01)
» This example shows two 4-port adapters (Emulex and Broadcom). The information for
the second adapter is too long for our page, so the line feeds.
What is the MAC address to the first adapter on your system?
» A simple method is to use the find command to identify the address file, and then the
cat command to show the contents of the file .../net0/address.
# find / -name address
/sys/devices/pci0002:00/0002:00:00.0/0002:01:00.0/net/enP2p1s0f0/address
/sys/devices/pci0002:00/0002:00:00.0/0002:01:00.1/net/enP2p1s0f1/address
. . .
# cat
/sys/devices/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:09.0/0003:05:00.0/net/ne
t0/address
98:be:94:01:6d:58

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Information

The iface-list command provided the same information in a single operation. These exercise
steps showed the under-lying file structure where the information resides.

What is the physical location code of the same adapter?


» As with the previous exercise step. use the find and cat commands as in the following
example:
# find / -name ibm,loc-code |grep net
/sys/firmware/devicetree/base/pciex@3fffe40400000/pci@0/ethernet@0/ibm,loc-code
/sys/firmware/devicetree/base/pciex@3fffe40400000/pci@0/ethernet@0,1/ibm,loc-code
/sys/firmware/devicetree/base/pciex@3fffe40400000/pci@0/ethernet@0,2/ibm,loc-code
. . .
# cat /sys/firmware/devicetree/base/pciex@3fffe40400000/pci@0/ethernet@0/ibm,loc-code
U78CB.001.WZS0663-P1-C6-T1
U78CB.001.WZS0663-P1-C6-T1

Important

Since you will probably have more than 1 Ethernet adapter, it is important to understand how to find
the physical device you are working with. Refer to system documentation to match the location
code to the physical device.

__ 3. List networks available to your system.


» A network runs on top of a physical adapter, so it is separate. Use the virsh command
net-list to find this information.
# virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes
kop active yes yes
__ 4. Navigate to the /etc/sysconfig/network-scripts directory. What do you see in that
location?

4-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » The configuration files for managing network adapters. There should be a ifcfg file for
each network adapter on your system.
# ls
ifcfg-enP2p1s0f0 ifdown-eth ifup ifup-post
ifcfg-enP2p1s0f1 ifdown-ib ifup-aliases ifup-ppp
ifcfg-enP2p1s0f2 ifdown-ippp ifup-bnep ifup-routes
ifcfg-enP2p1s0f3 ifdown-ipv6 ifup-eth ifup-sit
ifcfg-enP3p5s0f1 ifdown-isdn ifup-ib ifup-tunnel
ifcfg-enP3p5s0f2 ifdown-ovs ifup-ippp ifup-wireless
ifcfg-enP3p5s0f3 ifdown-post ifup-ipv6 init.ipv6-global
ifcfg-lo ifdown-ppp ifup-isdn network-functions
ifcfg-net0 ifdown-routes ifup-ovs network-functions-ipv6
ifdown ifdown-sit ifup-plip
. . .
__ 5. View the content of the net0 file. What information is located in this file?
» The example below is ifcfg-net0:
# cat ifcfg-net0
# Generated by dracut initrd -> System generated message
NAME="net0"
HWADDR="98:be:94:01:6d:58" -> MAC address
DEVICE="net0" -> Device name
ONBOOT=yes -> Adapter is activated at boot. (no or yes)
NETBOOT=yes
UUID="110bb7c3-dedd-4f57-aee1-34af9fe3a6b8"
BOOTPROTO=none -> Boot protocol option (none, bootp, or DHCP)
IPADDR="129.40.227.71"
NETMASK="255.255.252.0"
GATEWAY="129.40.227.254"
TYPE=Ethernet -> Adapter type
DNS1="129.40.106.1"
__ 6. Navigate to the directory /etc/libvirt/qemu/networks. What are the contents?
» These are network XML configuration files. Your system should have two active files,
default.xml and kop.xml.
__ 7. View contents of default.xml file. Are there any important messages?

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The file warns not to edit directly, or changes will be lost.


# cat default.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh net-edit default
or other application using the libvirt API.
-->

<network>
<name>default</name>
<uuid>16be8de2-0b74-4716-85dd-293cff443018</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:7e:95:36'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
</network>
__ 8. View contents of kop.xml file. Is there any significant difference in this file compared to the
default.xml file?
» Structurally they are the same, though each file provides unique information for the
network definition.
# cat kop.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made
using:
virsh net-edit kop
or other application using the libvirt API.
-->

<network>
<name>kop</name>
<uuid>123d4550-83b3-49a4-b487-8c1c8c16210e</uuid>
<bridge name='virbr1' stp='on' delay='0'/>
<mac address='52:54:00:04:e0:38'/>
<ip address='192.168.121.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.121.2' end='192.168.121.254'/>
</dhcp>
</ip>
</network>

4-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty Section 2: Create bridge device - virsh command

Important

The following steps should be performed on your system to create a bridge device.

__ 9. Verify bridge device created before no longer exists.


» Use the brctl command to show bridges.
# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.5254007f6797 yes virbr0-nic
virbr1 8000.525400e406dc yes virbr1-nic
__ 10. Change your location to /etc/sysconfig/network-scripts.
__ 11. Build a bridge named BRIDGE_0 with the virsh command.
» The virsh command iface-bridge will create this device.
# virsh iface-bridge net0 BRIDGE_0
Created bridge BRIDGE_0 with attached device enP3p5s0f0
Bridge interface BRIDGE_0 started
__ 12. View the contents of the file ifcfg-net0 to see the changes you made.
» Our example shows the output similar to what you should see (depending on the
network device). Compare this to what you saw earlier in this exercise.
# cat ifcfg-net0
DEVICE="net0"
HWADDR="98:be:94:01:6d:58"
ONBOOT=yes
BRIDGE=BRIDGE_0
__ 13. View the contents of the file ifcfg-BRIDGE_0 to see the new bridge device.
» Our example shows the output similar to what you should see (depending on the
network device).
# cat ifcfg-BRIDGE_0
DEVICE=BRIDGE_0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
IPADDR=129.40.227.71
NETMASK=255.255.252.0
GATEWAY=129.40.227.254
STP=on
DELAY=0

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 14. List the available bridge devices.


» A new bridge device should now appear.
# brctl show
bridge name bridge id STP enabled interfaces
BRIDGE_0 8000.98be94016d58 yes net0
virbr0 8000.52540056c264 yes virbr0-nic
virbr1 8000.5254004d0cd0 yes virbr1-nic

Section 3: Create virtual bridged network using Kimchi


__ 15. Open a web browser to your PowerKVM host Kimchi session.
__ 16. Select Network from the Kimchi banner.
__ 17. From the Network menu, select option to add a network.
» Select the icon, which is located at the upper right corner of the menu.
__ 18. Create a bridge network with the name br0. Make the bridge use the network adapter that
you installed over.
» The Create a Network menu has one field you use to define a name, a network type
selection, and destination selection (the network adapter). In the example, you will use
the device BRIDGE0 you created in the previous section.
» Note, when you select the destination, you might have to use a scroll bar on the right
side to see all network destination choices.

__ 19. Activate your new network adapter.

4-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Select the Actions button that is associated to the new device br0, and select Start
from sub-menu.

Section 4: Monitor network resources


__ 20. List all virtual networks.
» Use the virsh command net-list to see this information.
# virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
br0 active yes yes
default active yes yes
kop active yes yes
__ 21. Look at more detailed information about the network br0.
» Use the virsh command net-info to see this information.
# virsh net-info br0
Name: br0
UUID: c15dcfbf-58ea-40b6-bdd1-eacbddb2b3c8
Active: yes
Persistent: yes
Autostart: yes
Bridge: BRIDGE_0
__ 22. List information about iptables for your host.
» The iptables command will provide this.
# iptables -L -v -n
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp -- virbr1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
0 0 ACCEPT tcp -- virbr1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
0 0 ACCEPT udp -- virbr1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
. . .

__ 23. The previous command gave a lot of information. Narrow your search for port 8001 (the port
KImchi uses to access the system).

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Use the same command as the previous step, add a grep search for 8001.
# iptables -L -v -n |grep 8001
12 624 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8001
ctstate NEW

__ 24. Verify DNS forwarder (dnsmasq) is active on your system.


» Use the ps command, as in the following example:
# ps -ef | grep dnsmasq
nobody 5304 1 0 18:02 ? 00:00:00 /sbin/dnsmasq
--conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro
--dhcp-script=/usr/libexec/libvirt_leaseshelper
root 5305 5304 0 18:02 ? 00:00:00 /sbin/dnsmasq
--conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro
--dhcp-script=/usr/libexec/libvirt_leaseshelper
. . .
__ 25. Notify your instructor you have completed this exercise.

4-10 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 4.2. Create bridge device example - configure-system utility

1+1
=2 Example

The next two sections create the same device via different methods. Since the system cannot have
multiple instances of a bridge on the same device, these are provided as examples only.

__ 26. From the root prompt, type configure-system. Your screen should look similar to the
following example:

++ Welcome to IBM PowerKVM 3.1.0.0.41.0 ++


| |
| Menu |
| |
| Root Password |
| Timezone selection |
| Date and Time |
| Configure Network |
| DNS configuration |
| |
+----------------------------------------+

<Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen

__ 27. Select Configure Network option. Your menu should change to the Configure Network
menu, similar to the following:
+--------------+ Configure network +--------------+
| |
| Select the device on the list to be configured: |
| enP2p1s0f0 [ 00:90:fa:95:32:64 ] (DOWN) ^ |
| enP2p1s0f1 [ 00:90:fa:95:32:65 ] (DOWN) # |
| enP2p1s0f2 [ 00:90:fa:95:32:66 ] (UP) : |
| enP2p1s0f3 [ 00:90:fa:95:32:67 ] (UP) : |
| enP3p5s0f0 [ 98:be:94:01:6d:58 ] (UP) v |
| +----+ +------+ |
| | OK | | Back | |
| +----+ +------+ |
| |
| |
+-------------------------------------------------+
__ 28. When you installed the system, you selected the adapter that was active. Find the adapter
on this menu, and select. Using the arrow keys, move the selection to the appropriate line,
then use the Tab key to move the selection to OK. Press enter.

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 29. Create a network bridge to that adapter. Our example shows the device enP3p5s0f0. Using
the Tab or Arrow key, move to the line Create a Network Bridge (brenP3p5s0f0) and use
the Space bar to activate the selection.

+-------------+ Network Device Configuration +--------------+


| |
| Device enP3p5s0f0__________ |
| MAC Address 98:be:94:01:6d:58___ |
| Use DHCP [ ] |
| Static IP 192.168.2.1_________ |
| Netmask 255.255.255.0_______ |
| Default gateway IP 192.168.2.254_______ |
| Create Network Bridge (brenP3p5s0f0) [*] |
| Enable [*] |
| |
| +------+ +------+ |
| | Save | | Back | |
| +------+ +------+ |
| |
| |
+-----------------------------------------------------------+

Information

If you are working in a larger environment, the best practice is not to create a bridge using this
method, as more advanced operations such as moving a guest to a difference physical server may
be impacted by the name of the bridge. If you are working in a smaller environment, then this
process will not create issues.

» Select Save, and watch for configuration message.

+----------+ IBM PowerKVM +-----------+


| |
| Configuring enP3p5s0f0 interface... |
| |
+-------------------------------------+

4-12 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty __ 30. From the main menu, scroll down, and select Exit. The Exit option will not show up until you
scroll down the menu.

++ Welcome to IBM PowerKVM 3.1.0.0.41.0 ++


| |
| Menu |
| |
| Timezone selection |
| Date and Time |
| Configure Network |
| DNS configuration |
| Exit |
| |
+----------------------------------------+
» Watch for any messages that appear.

+-----------------+ IBM PowerKVM +-----------------+


| |
| The system configuration is completed. Exit from |
| the configuration tool and log into the system. |
| |
| +------+ |
| | Exit | |
| +------+ |
| |
| |
+--------------------------------------------------+
Is there a new entry in the directory /etc/libvirt/qemu/networks?
» No, this new device is a bridge device, not a network device. You will create a network
that uses this bridge later.
__ 31. List all files under /etc/sysconfig/network-scripts. You should see a new file associated to the
bridge device created. View the contents of this file. Our example shows
ifcfg-brenP3p5s0f0. Your file output should look similar.
# cat ifcfg-brenP3p5s0f0
# Generated by IBM powerkvm installer
IPADDR=192.168.2.1
ONBOOT=yes
DELAY=0
NM_CONTROLLED=no
NETMASK=255.255.252.0
BOOTPROTO=none
DEVICE=brenP3p5s0f0
TYPE=Bridge
GATEWAY=192.168.2.254

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 32. Show all configured bridge devices.


» Your lab system should now have 3 bridge devices. The first two are used for default
and kop networks. The new bridge has not yet been assigned a network.
# brctl show
bridge name bridge id STP enabled interfaces
brenP3p5s0f0 8000.98be94016d58 no enP3p5s0f0
virbr0 8000.5254007e9536 yes virbr0-nic
virbr1 8000.52540004e038 yes virbr1-nic
__ 33. Delete the new bridge device.
» Use the brctl command as in the following example (since the bridge is technically
active, you will have to bring the interface down as well).
# brctl delbr brenP3p5s0f0
bridge brenP3p5s0f0 is still up; can't delete it
# ifdown brenP3p5s0f0
# brctl delbr brenP3p5s0f0

4-14 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 4.3. Create bridge device example - Manual edit process

1+1
=2 Example

This section continues the demonstration process of creating a network bridge. Since you already
created a bridge in the first section these steps cannot be performed on your lab system.

__ 34. View the contents of the directory /etc/sysconfig/network-scripts. Is the file


created in the previous step still there?
» It should be, as the delete operation performed in the last section should not have
deleted the file. If it is gone, create a new file with the same information (the example
above shows the file contents).
__ 35. Activate the bridge device.
» Use the ifup command to complete this step.
# ifup brenP3p5s0f0
__ 36. List all bridge devices.
» As before, use the brctl command to do this.
# brctl show
bridge name bridge id STP enabled interfaces
brenP3p5s0f0 8000.000000000000 no
virbr0 8000.5254007e9536 yes virbr0-nic
virbr1 8000.52540004e038 yes virbr1-nic
__ 37. Delete the new bridge device.
» Use the brctl command as in the following example (since the bridge is technically
active, you will have to bring the interface down as well).
# brctl delbr brenP3p5s0f0
bridge brenP3p5s0f0 is still up; can't delete it
# ifdown brenP3p5s0f0
# brctl delbr brenP3p5s0f0

End of exercise

© Copyright IBM Corp. 2016 Exercise 4. Managing networks 4-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise review and wrap-up


This exercise dealt with networking concepts. These exercise steps only cover a small portion of
networking capabilities of PowerKVM. This was intended as a sampling of basic operations.

4-16 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 5. Storage operations
(with hints)

What this exercise is about


This exercise covers PowerKVM storage resources.

What you should be able to do


At the end of this exercise, you should be able to:
• Create storage pools of multiple types using both CLI and GUI
• Create storage volume using both CLI and GUI

Introduction
In this exercise, you will define storage pools, and create volumes within that
defined space.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with OPAL firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.

5-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 5.1. Basic storage operations


Section 1: Identify storage resources
__ 1. Open a terminal window to your assigned PowerKVM host.
__ 2. List all block devices on your host system.
» The lsblk command will list block devices configured to your host. The following
example shows multiple drives. Your lab system output might not have as many drives.
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 130G 0 disk
|-sda1 8:1 0 8M 0 part
|-sda2 8:2 0 512M 0 part /boot
`-sda3 8:3 0 129.5G 0 part
|-ibmpkvm_vg_root-ibmpkvm_lv_swap
253:0 0 8G 0 lvm [SWAP]
|-ibmpkvm_vg_root-ibmpkvm_lv_var
253:1 0 10G 0 lvm /var
|-ibmpkvm_vg_root-ibmpkvm_lv_system
253:2 0 20G 0 lvm /
`-ibmpkvm_vg_root-ibmpkvm_lv_data
253:3 0 91.5G 0 lvm /var/lib/libvirt/images
sdb 8:16 0 130G 0 disk
sdc 8:32 0 130G 0 disk
sdd 8:48 0 130G 0 disk
sde 8:64 0 130G 0 disk
sdf 8:80 0 130G 0 disk
sdg 8:96 0 5G 0 disk
`-mpathb 253:4 0 5G 0 mpath
sdh 8:112 0 5G 0 disk
`-mpatha 253:5 0 5G 0 mpath
sdi 8:128 0 5G 0 disk
`-mpathb 253:4 0 5G 0 mpath
. . .
__ 3. PowerKVM includes some IBM service tools as part of the installation. One tool is the
lscfg command. Run this, with a search for “sd” devices.

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» This information will show physical location code. As we discussed previously, this can
be critical information when dealing with Power servers.
# lscfg |grep sd
+ sdg U78CB.001.WZS0663-P1-C11-B0-T0-L0
+ sdh U78CB.001.WZS0663-P1-C11-B0-T0-L1
+ sdi U78CB.001.WZS0663-P1-C11-B0-T0-L0
+ sdj U78CB.001.WZS0663-P1-C11-B0-T0-L1
+ sda U78CB.001.WZS0663-P1-C14-B2-T0-L0
+ sdb U78CB.001.WZS0663-P1-C14-B2-T1-L0
+ sdc U78CB.001.WZS0663-P1-C14-B2-T2-L0
. . .
__ 4. List all storage pools on your system.
» Use the virsh command pool-list to show this information.
# virsh pool-list
Name State Autostart
-------------------------------------------
default active no
ISO active no

Section 2: Directory-based storage pool


__ 5. Create three new directory mount points to be used, /pool_1, /pool_2 and /pool_3.
You will create directory-based pools for these using both the command line, and Kimchi.
» Use standard Linux command mkdir to accomplish this.
# mkdir /pool_1
# mkdir /pool_2
# mkdir /pool_3

Information

There is no requirement that directory-based storage pools use the name of the directory. We are
using this for consistency, and convenience.

__ 6. Using the command line, create a new pool, named pool_1, with the backing device as
/pool_1.
» The virsh command pool-create-as with accomplish this.
# virsh pool-create-as pool_1 dir --target /pool_1
Pool pool_1 created
__ 7. List contents of /run/libvirt/storage directory.
» You should see an XML file for the new storage pool.
# ls /run/libvirt/storage
ISO.xml default.xml pool_1.xml

5-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty __ 8. List contents of /etc/libvirt/storage. Is there any difference?


» The pool-create-as command creates a storage pool, but it does not define it. The
/run/libvirt/storage directory is a representation of active pools, while
/etc/libvirt/storage contains pool definitions.
# ls /etc/libvirt/storage
ISO.xml default.xml
__ 9. Using the command line, define a new storage pool.
» The virsh command pool-define-as with accomplish this.
# virsh pool-define-as pool_2 dir --target /pool_2
Pool pool_2 defined
__ 10. List the files in both /run/libvirt/storage and /etc/libvirt/storage. Does
pool_2 now exist?
» The XML file for pool_2 will exist in the etc directory, but not in the run directory
# ls /etc/libvirt/storage /run/libvirt/storage
/etc/libvirt/storage:
ISO.xml default.xml pool_2.xml

/run/libvirt/storage:
ISO.xml default.xml pool_1.xml
__ 11. Using the proper virsh command, list all pools on your system.
» Unlike the previous step of listing pools, run the command with --all as part of
command. In our example, you can see pool_1 is active, even though it is not a
“permanent” pool (rebooting the system will remove this entry). The pool_2 entry is not
yet active.
# virsh pool-list --all
Name State Autostart
-------------------------------------------
default active no
ISO active no
pool_1 active no
pool_2 inactive no
__ 12. Activate pool_2 from the command line.

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The virsh command pool-start will accomplish this. Start pool_2, and then list active
pools on your host.
# virsh pool-start pool_2
Pool pool_2 started

# virsh pool-list
Name State Autostart
-------------------------------------------
default active no
ISO active no
pool_1 active no
pool_2 active no
__ 13. Open a browser window to your host Kimchi session.
__ 14. From the Storage tab, show all active storage pools.
» You should see all four pools that the virsh command showed previously.

__ 15. Using Kimchi, create a new storage pool, pool_3, using the directory mount point /pool_3
as a location.

5-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Use the to create the new storage pool, as in the following example:

__ 16. Verify the new pool exists, and activate from Kimchi.
» Use the Actions option, and select Activate.

__ 17. Return to your terminal session. List the contents of the directories
/etc/libvirt/storage and /run/libvirt/storage. Is there any difference?

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Since you activated the new storage pool you just defined, it now appears in the run
directory tree.
# ls /etc/libvirt/storage /run/libvirt/storage
/etc/libvirt/storage:
ISO.xml default.xml pool_2.xml pool_3.xml

/run/libvirt/storage:
ISO.xml default.xml pool_1.xml pool_2.xml pool_3.xml
__ 18. View the XML configuration files for pool_3 in both /run/libvirt/storage and
/etc/libvirt/storage directories. What is different about the two files?
» The file in /run/libvirt/storage is the same file, but with the XML tag poolstate
wrapping the contents.

5-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » The following example shows these two files. Your system should look similar.
# cat /etc/libvirt/storage/pool_3.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh pool-edit pool_3
or other application using the libvirt API.
-->
<pool type='dir'>
<name>pool_3</name>
<uuid>b1f0abae-6289-4242-92dd-d0ae217e1d5b</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
</source>
<target>
<path>/pool_3</path>
</target>
</pool>

# cat /run/libvirt/storage/pool_3.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh pool-edit pool_3
or other application using the libvirt API.
-->
<poolstate>
<pool type='dir'>
<name>pool_3</name>
<uuid>b1f0abae-6289-4242-92dd-d0ae217e1d5b</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
</source>
<target>
<path>/pool_3</path>
</target>
</pool>
</poolstate>

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Section 3: Logical storage pools


__ 19. Return to the Kimchi session, create a new logical storage pool, pool_4, using any available
local disk on your system.
» In our example, we are using /dev/sdf. Select an available device on your host.

Note

If you are unsure of what local disks exist, you can use the lsblk command to find them.

» Confirm the operation. The warning reminds you that there might be some content on
the target disk.

__ 20. Activate your new storage pool.

5-10 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » The Actions box provides an additional option with logical storage, Extend. In this case
you will simply use Activate.

Section 4: Creating storage volumes


__ 21. Return to your terminal session.
__ 22. List volumes in the default storage pool.
» The virsh command vol-list will display this information.
# virsh vol-list default
Name Path
------------------------------------------------------------------------
lost+found /var/lib/libvirt/images/lost+found
__ 23. Create a new volume, class_vol_1, with a size of 5 G, in storage pool pool_2.
» The virsh command vol-create-as will create the volume, as in the following
example:
# virsh vol-create-as pool_2 class_vol_1 5G
Vol class_vol_1 created
__ 24. List all volumes in the storage pool pool_2.
» As previously shown, the virsh command vol-list will show this information.
# virsh vol-list pool_2
Name Path
------------------------------------------------------------------------
class_vol_1 /pool_2/class_vol_1
__ 25. Return to your Kimchi session, and display the volumes contained within the storage pool
pool_2.

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The box next to the Actions box should be clicked to expand the view. This will show all
volumes contained in the storage pool.

__ 26. Create another volume in pool_2, named class_vol_2. For this instance, specify the format
as qcow2, set allocation to 4 G, and name the file class_vol_2.qcow2.
» You will use the same command, with more details, as in the following example:
# virsh vol-create-as pool_2 class_vol_2.qcow2 --format qcow2 5G --allocation 4G

Note

When creating a volume, it is not a requirement to name the file with the extension matching the
volume type. As a simple way to identify the file as this type you can add the extension. We will see
later how to identify the volume type.

From the Kimchi session, is there any difference between the volumes shown?
» The new volume shows the same capacity, but a smaller allocation value.

__ 27. List the file types in the directory /pool_2 to see the new volumes.

5-12 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » The virsh command vol-list will not show this information. One way to get this
information is to use the Linux command file.
# file /pool_2/*
/pool_2/class_vol_1: data
/pool_2/class_vol_2.qcow2: QEMU QCOW Image (v2), 5368709120 bytes
The virsh command vol-create-as requires arguments to complete. The command
vol-create requires an XML file for use to define what the volume will look like. What
does this XML file look like?
» When you create a volume, there is no XML file created with it (with the directory-backed
volumes we are working with in these examples). So, use the virsh command
vol-dumpxml to build an XML file as a sample you might use to create more volumes.
# virsh vol-dumpxml --vol class_vol_2.qcow2 --pool pool_2
<volume type='file'>
<name>class_vol_2.qcow2</name>
<key>/pool_2/class_vol_2.qcow2</key>
<source>
</source>
<capacity unit='bytes'>5368709120</capacity>
<allocation unit='bytes'>200704</allocation>
<target>
<path>/pool_2/class_vol_2.qcow2</path>
<format type='qcow2'/>
<permissions>
<mode>0600</mode>
<owner>0</owner>
<group>0</group>
<label>system_u:object_r:default_t:s0</label>
</permissions>
<timestamps>
<atime>1449694254.088109408</atime>
<mtime>1449694182.458102245</mtime>
<ctime>1449694182.468102246</ctime>
</timestamps>
</target>
</volume>
This concludes formal exercise steps. If time permits, and additional lab equipment is available,
continue to the optional exercise. If no SAN is attached, you can continue to experiment with the
storage resources.

End of exercise

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

5.2. Optional exercise


Section 1: Fibre Channel attached storage

Note

If your lab environment has SAN storage preconfigured for your system, these optional exercises
can be performed. Your instructor will notify you if this equipment is available.

__ 1. If not still available, open a terminal session to your PowerKVM host.


__ 2. Return to your Kimchi session, and navigate to the Administration tab. View the
information about SAN adapters. Does the information match what the systool command
provided?
» This information is provided by the systool command when viewing fc_hosts.

__ 3. Using host2, create a new storage pool, named pool_FC, from your Kimchi session.

5-14 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Once you select the storage pool type of SCSI Fibre Channel, you will see a list of
adapters. You can only select one adapter from the list.

__ 4. Expand the view of the new storage pool. Are any volumes in place?
» If the lab environment is set up correctly, you should see at least one volume in place.
Our example has two volumes, each 5 G in size. The name is defined by the LUN value
associated to each device on the storage server side.

__ 5. View the contents of the XML configuration file for your new storage pool.

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The directory /etc/libvirt/storage contains the XML files. Look in this directory
for the file pool_FC.xml.
# cat /etc/libvirt/storage/pool_FC.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh pool-edit pool_FC
or other application using the libvirt API.
-->
<pool type='scsi'>
<name>pool_FC</name>
<uuid>435b40fa-5b71-472b-b711-0221a2c2a1e1</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
<adapter type='fc_host' wwnn='20000120fa89c09e' wwpn='10000090fa89c09e'/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
__ 6. Copy the file /etc/libvirt/storage/pool_VC.xml to
/etc/libvirt/storage/pool_FC_2.xml. Edit the new file, replacing the values for the
pool name, uuid (change any number in the string) and wwn (using host3 information for
the proper wwn).
» You can either use the systool command, or view the Kimchi session to get this
information.
__ 7. Define a new storage pool with the XML file you just created.
» The virsh command pool-define will accomplish this.
# virsh pool-define /etc/libvirt/storage/pool_FC_2.xml
Pool pool_FC_2 defined from /etc/libvirt/storage/pool_FC_2.xml
__ 8. List all storage pools on your system at this point.

5-16 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » The virsh command pool list --all will show this information. If you do not use the
--all argument, you will not see inactive pools.
# virsh pool-list --all
Name State Autostart
-------------------------------------------
default active no
ISO active no
pool_1 active no
pool_2 active no
pool_3 active no
pool_4 active yes
pool_FC active yes
pool_FC_2 inactive no
__ 9. Run the command systool to gather information about your installed FC adapters
(fc_host).
» As shown during the unit discussion, the systool command is one of many ways to
find information about system resources, including FC adapters. Run the command as
in the following example (output truncated to save space).
# systool -c fc_host -v
Class = "fc_host"

Class Device = "host2"


Class Device path =
"/sys/devices/pci0001:00/0001:00:00.0/0001:01:00.0/0001:02:01.0/0001:03:00.0/ho
st2/fc_host/host2"
active_fc4s = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 "
dev_loss_tmo = "30"
fabric_name = "0x100050eb1ab3bd73"
issue_lip = <store method only>
max_npiv_vports = "255"
maxframe_size = "2048 bytes"
node_name = "0x20000120fa89c09e"
npiv_vports_inuse = "0"
port_id = "0x010400"
port_name = "0x10000090fa89c09e"
port_state = "Online"
. . .
__ 10. Use the systool command again, looking at the device type fc_transport.

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-17


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» This command shows you what devices are connected “downstream”. If you get no
output, your host is not communicating with any system. In our example below, host2
sees the WWN 500507680200144b from the target device.
# systool -c fc_transport -v
Class = "fc_transport"

Class Device = "0:0"


Class Device path =
"/sys/devices/pci0001:00/0001:00:00.0/0001:01:00.0/0001:02
:01.0/0001:03:00.0/host2/rport-2:0-6/target2:0:0/fc_transport/target2:0:0"
node_name = "0x500507680200144b"
port_id = "0x011c00"
port_name = "0x500507680240144b"
uevent =
. . .

Section 2: iSCSI storage


__ 11. From your terminal session, navigate to the directory /etc/iscsi. List the contents.
» There should be two files, as in the following example:
# ls /etc/iscsi
initiatorname.iscsi iscsid.conf
__ 12. Edit the initiator configuration file, replacing the current value with
iqn.2016-01.<reverse-DNS-value:hostname (your instructor will provide this information).
» When PowerKVM is installed, a default initiator file is defined to assure a random name.
If you reload the system again the contents of this file will change. The lab is predefined
with information about your host, so when you change the initiator name on the host it
will match the storage server. Our example is for a system named
fulmer.pbm.ihost.com. So, the name is reversed for the iqn format.
# cat initiatorname.iscsi
InitiatorName=iqn.2005-03.org.open-iscsi:d7daf2541eb
Create a copy before you edit the file.
# cp initiatorname.iscsi initiatorname.iscsi.old
Make changes to file and view new file.
# cat initiatorname.iscsi
InitiatorName=iqn.2016-01.com.ihost.pbm:fulmer
__ 13. Create a new storage pool named pool_iSCSI, provide correct IP information to the storage
server, and select the proper target.

5-18 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Setup separately to your host is a storage server with iSCSI enabled. Select the storage
pool type, then you will be provided with a selection box for the iSCSI server. Enter the
IP address information, and then click the Target box. As the example below shows, a
storage server at IP address 129.40.224.47 has a iSCSI target
iqn.1986-03.com.ibm:2145.usse-v7000-5.node1. Your lab system will be different.

__ 14. Activate the new storage pool.


» Select the Actions box, and proceed with activation.
__ 15. View the contents of the storage pool. If everything is correct, you should see a 5 G volume,
unit0, in place. The name is based on the LUN assignment.
» Our example shows the volume as available.

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-19


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Troubleshooting

If the volume does not appear, you might have to restart the iSCSI daemon. Use the following steps
to accomplish this:
systemctl stop iscsid
systemctl stop iscsi
systemctl start iscsid
systemctl start iscsi
systemctl status iscsi
You might also have to force the PowerKVM host to acknowledge the iSCSI server:
iscsiadm --mode discovery --type sendtargets --portal <iSCSI_server_IP_Address>

__ 16. List the contents of the directory /etc/libvirt/storage. All the defined storage pools
are in place. View the file pool_iSCSI.xml to see the configuration.
__ 17. Notify your instructor that you have completed the optional exercise.

End of exercise

5-20 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty Exercise review and wrap-up


This exercise dealt with PowerKVM storage resources.

© Copyright IBM Corp. 2016 Exercise 5. Storage operations 5-21


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

5-22 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 6. Creating templates
(with hints)

What this exercise is about


This exercise covers Kimchi template management.

What you should be able to do


At the end of this exercise, you should be able to:
• Create templates using local and remote media
• Edit template definitions

Introduction
In this exercise, you will create and edit template definitions.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with OPAL firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 6. Creating templates 6-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.

6-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 6.1. Building and editing templates in Kimchi


Section 1: Create template
__ 1. This exercise depends on files you copied to your host in a previous exercise. verify that
they are in place by listing the contents of the directory /var/lib/libvirt/images.
» Use the ls command from your terminal session.
# ls /var/lib/libvirt/images
RHEL7.1-BE RHEL7.1-LE lost+found
__ 2. Open a browser window to your assigned lab system’s Kimchi interface.
__ 3. From Kimchi banner, select Templates.
__ 4. From the Templates menu, select option to add a new template.
» Select the icon, which is located at the upper right corner of the menu.
__ 5. Select Local ISO image.
» You should see two ISO images available, as in the following example (the names
should match the ISO files you have in place, this example has slightly different names.
You will also see that this example has.iso as part of the name, which is not required):

__ 6. Select the RedHat v7.1 BE ISO image you copied to your host previously.
» Click the selected image, and click the Create Template bar.

__ 7. From the Template window, select the new template, and from the Action bar, select Clone.
» This creates a duplicate of the original template.

© Copyright IBM Corp. 2016 Exercise 6. Creating templates 6-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 8. Your Templates menu should now have a new entry. The name will look the same as the
original, but it has the extension -clone1 added to the name. Hover your mouse over the
image to see this.
» The name is built from the source ISO. We will change this in the following step.

__ 9. Select the newly created template. Click Actions button, and select Edit.
» This brings up a new menu showing the configuration of the template.
__ 10. Set the name of the new template to rhel7.1-BE, double the memory value, and change the
network interface to the bridge network.
» From the General tab, set the name of the template to rhel7.1.BE, and the memory
from 2048 to 4096.

6-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Select the Interface tab, and change to the br0 bridge network.

__ 11. Create a new template using the other ISO image, RHEL7.1-LE. After creation, edit the
template, setting the name to rhel7.1-LE, memory to 4096, and interface to br0.
» At this point you will have three templates defined.

__ 12. Delete the original template you created.


» Select the Actions bar, then the Delete option.

Section 2: Remote templates

Important

If your lab environment does not have Internet access, the following steps will not work.

__ 13. From your Kimchi session, select Template tab, then Remote ISO Image option.
» The Remote ISO Image selection has a globe.

__ 14. Select any ISO image from the list provided.

© Copyright IBM Corp. 2016 Exercise 6. Creating templates 6-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Since this is being written well before you attend the class, we cannot guarantee what
images will be available. You will most likely see Fedora or Ubuntu ISO images
available.

__ 15. View all templates, can you see any difference between the local ISO templates and the
remote ISO templates?
» The remote templates have a globe ICON, while the local ISO templates have a file
drawer.

What is the source for the CDROM?


» View the properties of the template by selecting Edit. The CDROM should show a
web-based source for the optical device.

__ 16. Return to your terminal console, and go to /etc/kimchi directory.


__ 17. View the contents of the file template.conf. What do you see?

6-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » This file is used to define Kimchi templates.


# cat template.conf
#
# Configuration file for Kimchi Templates
#

[main]
# Memory in MB
#memory = 1024

# List of networks separated by comma


# Represents the virtual network interfaces to be assigned to guest
#networks = default,

[storage]
# Storage pool used to handle the guest disk
#pool = default

# Specify multiple [[disk.X]] sub-sections to add multiples disks to guest


# All the disk files will be created in the same storage pool as set above
[[disk.0]]
# Disk size in GB
#size = 10

. . .
__ 18. Notify your instructor that you have completed this exercise.

End of exercise

© Copyright IBM Corp. 2016 Exercise 6. Creating templates 6-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise review and wrap-up


This exercise dealt with templates, creation, and edit functions.

6-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 7. Define and install Guests
(with hints)

What this exercise is about


This exercise covers PowerKVM guest management using CLI and GUI.

What you should be able to do


At the end of this exercise, you should be able to:
• Create guest definition
• Activate new guest
• Perform basic administration functions on the guest

Introduction
In this exercise, you will define and install guest VM’s.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with OPAL firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 7. Define and install Guests 7-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.

7-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 7.1. Manage guest operations


Section 1: Define guest definition using Kimchi
__ 1. Open a window to your Kimchi session.
__ 2. From Kimchi banner, select Guests.
__ 3. From the Guests menu, select option to add a new guest.
» Select the icon, which is located at the upper right corner of the menu.
__ 4. Your instructor provided a list of guest machine names. Select the first guest name and
address available. Next, select the template that you named RHEL7.1-LE.
» Depending on what templates you have created, you see a list of templates to select
from.

__ 5. View the configured hosts on your system.


» This example shows a host that is named fulmer2. Your guest VM name is different.

© Copyright IBM Corp. 2016 Exercise 7. Define and install Guests 7-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 6. Create a clone of your new guest.


» Select the Actions bar, then Clone.

» The warning message shows the new storage device will be cloned to the default
storage pool. Since the original guest was defined to use the default pool, this will not
make a big difference.

__ 7. At this point you should have two guests defined.

7-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » In our example, you see the fulmer2 guest, and a new guest named fulmer2-clone-1.
(your guest name will be different).

__ 8. Return to your terminal session, and list the contents of the directory
/etc/libvirt/qemu.
» The XML configuration files exist in this space.
# ls -al /etc/libvirt/qemu
total 20
drwx------. 3 root root 4096 Dec 11 18:05 .
drwx------. 5 root root 4096 Dec 8 17:19 ..
-rw-------. 1 root root 3206 Dec 11 17:45 fulmer2-clone-1.xml
-rw-------. 1 root root 3190 Dec 11 17:15 fulmer2.xml
drwx------. 3 root root 4096 Dec 8 18:17 networks
__ 9. View the files, and then display the differences. What is the important message at the top of
the file?

© Copyright IBM Corp. 2016 Exercise 7. Define and install Guests 7-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The first line in each file is a warning to only edit the file with virsh edit command.
The differences can be seen easily with the Linux command diff.
# more fulmer2.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit fulmer2
or other application using the libvirt API.

# diff fulmer2.xml fulmer2-clone-1.xml


4c4
< virsh edit fulmer2
---
> virsh edit fulmer2-clone-1
9,10c9,10
< <name>fulmer2</name>
< <uuid>2c2c7459-3bb8-4be2-a88d-74cb5f0dbe98</uuid>
---
> <name>fulmer2-clone-1</name>
> <uuid>e340be4d-3022-443b-be5f-f90c6b9ca2a4</uuid>
46c46
< <source
file='/var/lib/libvirt/images/2c2c7459-3bb8-4be2-a88d-74cb5f0dbe98-0.img'/>
---
> <source
file='/var/lib/libvirt/images/e340be4d-3022-443b-be5f-f90c6b9ca2a4-0.img'/>
65c65
< <mac address='52:54:00:55:83:f7'/>
---
> <mac address='52:54:00:60:6d:08'/>
__ 10. Using virsh edit, try to change the name of the guest. What happens?
» You will get an error saying the uuid is already defined.
error: operation failed: domain 'fulmer2-clone-1' is already defined with uuid
c46dee0a-e5f8-4d23-8d9d-983217406c08
Failed. Try again? [y,n,i,f,?]:

7-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty Section 2: Install Linux to guest VM with Kimchi

Note

The next two topics deal with installing RedHat v7.1. The exercise steps do not require in-depth
knowledge of the installation process, and you will not perform advanced configuration steps. This
course is not designed as a Linux administration course. As a convenience, we have blocked out
the steps to install RedHat.

__ 11. Activate the first new guest VM you just created.


» From the Guests menu, click the button that is associated to your first guest.
__ 12. Open LiveTile window that is associated to your guest.
» When you click the LiveTile box, a new tab should open in your browser window.
__ 13. Monitor installation process, reboot when complete.
» The system will not automatically reboot, so unless you pay attention to the window, you
might not realize the installation is complete.
__ 14. From PowerKVM window, what do you see under Guests tab?
» The LiveTile box shows the console window of the guest you just installed, along with
the second uninstalled guest.

__ 15. Open the LiveTime window to view the guest console. Start the installation.

© Copyright IBM Corp. 2016 Exercise 7. Define and install Guests 7-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Our example shows the default option, English, chosen

__ 16. The RedHat menu will provide a marker telling you what items need to be modified before
the installation can continue. Select the required items to make adjustments.
» Our example shows the Installation Destination as the only required adjustment (just
scrolling off the bottom of the menu):

__ 17. Select the Installation Destination option, verify the correct target device exists,

7-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » In our guest template, we have only configured a single device, so you should only see
that as an option. All you have to do is select Done to proceed. (If you click the target
disk in this case, you are actually reseting the selection.)

__ 18. While not required, select the Network & Hostname option.
» You can install the system without activating the network, though you will configure at
this point.

__ 19. From the Network & Hostname menu, configure the hostname, set a static address, and
activate the interface,

© Copyright IBM Corp. 2016 Exercise 7. Define and install Guests 7-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Our example shows these items as the default choices. Edit the hostname field (lower
left) select the On option (upper right), and select Configure box to set static address.

» Select IPv4 tab, change from DHCP to Manual, and set the IP address, netmask, and
gateway as required in your lab environment.

» When you return to the main menu, the Network & Host Name icon will show
connected.

7-10 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty __ 20. Proceed with the installation process.


» Now that all required questions have been answered, the Begin Installation box will be
active.

__ 21. The next menu shows the installation process, and the status indicator line will continue to
update as the installation continues.
» Our example shows that the installation menu still expects passwords to be set.

__ 22. Set the password to abc123.


» abc123 is NOT a good password, but for class we will accept it!

» You will see a warning that the password is too simple. Select Done once again to
continue.

__ 23. Complete the installation by rebooting your system.

© Copyright IBM Corp. 2016 Exercise 7. Define and install Guests 7-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The Reboot box should now be active.

Section 3: Defining and installing guest definition using CLI


__ 24. Return to your host terminal session. Create a new guest, and initiate installation RedHat
v7.1 with a single root-level command.
Name: Use fourth available name assigned (example: fulmer5)
virt-type: kvm
Boot from: CDROM
Network: default
Disk: class_vol_2 disk created in previous exercise topic
Memory: 4 GB
Image source: /var/lib/libvirt/images/RHEL7.1-LE file
» The command virt-install is used to accomplish this task (using correct
hostname).
# virt-install --machine=pseries --name=<fulmer5> --virt-type=kvm --boot
cdrom,hd --network=default,model=virtio --disk path=/pool_2/class_vol_2.qcow2
--memory=4096 --vcpu=2 --cdrom=/var/lib/libvirt/images/RHEL7.1-LE
__ 25. Continue with installation.
» When the installation menu appears, you will see the same selections as provided with
the GUI console. Each field that shows a “!” needs to be selected. Once you have an
“X” in each field, you can select to begin the installation.
===============================================================================
===============================================================================
Installation

1) [!] Timezone settings 2) [x] Language settings


(Timezone is not set.) (English (United States))
3) [!] Installation source 4) [!] Software selection
(Processing...) (Processing...)
5) [!] Install Destination 6) [x] Network settings
(No disks selected) (Not connected)
7) [x] Kdump 8) [!] Set root password
(Kdump is enabled) (Password is not set.)
9) [!] Create user
(No user will be created)
Please make your choice from above ['q' to quit | 'b' to begin installation |
'r' to refresh]:

Please respond 'yes' or 'no': yes


===============================================================================

7-12 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Note

This exercise is intended to show the virt-install command operation. If you are unable to
accomplish the installation (unsure of fields, or other errors reported), continue to next exercise
section.

__ 26. Reboot system when installation completes.


__ 27. Use escape sequence to leave console window.
» The escape sequence is the Ctrl key and ] key.
__ 28. From root prompt, list all domains on your host.
» The virsh command list provides this information. Use the argument --all to show
domains that are not active
# virsh list --all
Id Name State
----------------------------------------------------
3 fulmer2 running
5 fulmer5 running
- fulmer2-clone-2 shut off
__ 29. Notify your instructor you have completed this exercise.

Information

When using the virt-install command, you can use the automated installation options
provided by the distribution (such as kickstart for RedHat, or preseed for Ubuntu). Our lab step was
only focused on the conceptual aspect of the virt-install command.

End of exercise

© Copyright IBM Corp. 2016 Exercise 7. Define and install Guests 7-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise review and wrap-up


This exercise dealt with guest management.

7-14 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Exercise 8. Host management
(with hints)

What this exercise is about


This exercise covers PowerKVM host management functions, and
virtualization administration.

What you should be able to do


At the end of this exercise, you should be able to:
• Navigate key directories
• Review system log files
• Monitor system performance
• Modify guest configuration

Introduction
In this exercise, you access the command line to perform basic
administrative operations, such as viewing log files, configuring guest
configuration, and managing other resources.

Requirements
• This workbook
• A workstation that is connected to a network
• Power server with Sapphire firmware supporting PowerKVM
• Secondary system with IPMI utilities
• For virtual classroom a shared desktop solution
- IPMI sharing server

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

Exercise instructions with hints

Preface
• All exercises of this unit depend on the availability of specific equipment in your
classroom. You need a computer system that is configured with a network connection to
your assigned host.
• Information provided for locating documentation on particular web pages was correct
when this course was written. However, web pages tend to change over time. Ask your
instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.

8-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty 8.1. Host functions


Section 1: Navigate the host interface

Information

The initial sections are intended to identify various key files and subdirectories. You will not make
any changes to the system configuration.

__ 1. Open a terminal session to your PowerKVM host.


__ 2. Verify build level of your host system.
» Use the cat and uname commands to find this information.
# cat /etc/issue
IBM_PowerKVM release 2.1.1 build 12 alpha (pkvm2_1_1)
Kernel \r on a \m (\l)

# uname -a
Linux host1.rtp.stglabs.ibm.com 3.10.42-2012.1.pkvm2_1_1.31.ppc64 #1 SMP Fri
Sep 19 11:45:18 CDT 2014 ppc64 ppc64 ppc64 GNU/Linux
__ 3. View the contents of the directory /var/lib/libvirt. What have you used from this
directory in class?
» The subdirectory images contains the ISO image you installed a guest from. While not
required to reside in this location, the directory tree provides a logical point for these ISO
files.
__ 4. Change your location to /etc/libvirt. View the contents of this subdirectory.
» Use the ls command to see the contents.
# ls
boot dnsmasq filesystems images lxc network qemu sanlock
__ 5. Follow the subdirectory tree to storage, then to autostart. What do you see?
» There should be an XML file for each storage pool that is defined on your host
# ls
ISO.xml default.xml pool_1.xml pool_2.xml
__ 6. Change your location to the /sys/fs/cgroup directory. From this location, do a search for
files named machine. What do you see?

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Each guest VM has information about their configuration that is located in this directory
tree. The subdirectory machine under each category contains configuration information
for that guest.
# find . -name machine
./perf_event/machine
./blkio/machine
./net_cls/machine
./freezer/machine
./devices/machine
./memory/machine
./cpu,cpuacct/machine
./cpuset/machine
./systemd/machine

Section 2: Log files


__ 7. Open a terminal window, and go to /var/log.
__ 8. List the directory contents, and verify that there is a subdirectory named Kimchi. Go to that
subdirectory and list the available files.
» Your system should have two files in this directory tree.
# pwd
/var/log/kimchi
# file *
kimchi-access.log: ASCII text, with very long lines
kimchi-error.log: ASCII text
__ 9. If not already open, open a browser window to your system Kimchi interface.
» Remember to use secure HTTP, and point to port 8001!
__ 10. From the terminal window, view the last lines of the kimchi-error.log file.
» Use the tail command to view the end of this file.
# tail kimchi-error.log
rc: 10 error: serviceable event provider is not running
returned from cmd: /opt/ibm/seprovider/bin/sepcli status
serviceable event provider is not running

serviceable event provider is not running

rc: 1 error: returned from cmd: /opt/ibm/seprovider/bin/getSubscriber


rc: 1 error: returned from cmd: /opt/ibm/seprovider/bin/getSubscriber
__ 11. From the Kimchi session, select the Administration tab, and then the Firmware Update
option. Enter the string /tmp/test in the field, and select the Update button. This action
will fail, and you will see an error in the browser menu.
__ 12. Return to the terminal window, and view the end of the kimchi-error.log file again. Has
anything changed?

8-4 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » You should see an event message from your failed FW update.
# tail kimchi-error.log
rc: 10 error: serviceable event provider is not running
returned from cmd: /opt/ibm/seprovider/bin/sepcli status
serviceable event provider is not running

serviceable event provider is not running

rc: 1 error: returned from cmd: /opt/ibm/seprovider/bin/getSubscriber


rc: 1 error: returned from cmd: /opt/ibm/seprovider/bin/getSubscriber
Cannot update system fw while running VMs.
Cannot update system fw while running VMs.
__ 13. Change your location to /var/log/powerkvm, and list the contents. Review the contents
of the file installer.log, looking for any errors reported.
» Your results might vary, use the cat and grep commands to look for possible errors.
# cat installer.log |grep error
2014-09-17 17:11:38,987 - model.installfunctions - DEBUG - * Package:
libgpg-error
__ 14. Change your location to the directory /var/log/opal-elog. View the files in place.
» You should have various files in this directory tree, as in the following example:
# ls
1410975695-0x50dc3253 1410975697-0x50dc3b25 1410975697-0x50dc3b37
1410975697-0x50dc3b46 1410977652-0x50dc4ad0
1410975696-0x50dc3259 1410975697-0x50dc3b2a 1410975697-0x50dc3b39
1410975697-0x50dc3b48 1410977654-0x50dc4adb
. . .
__ 15. Issue the command opal-elog-parse -l to list log files.
» Your output should look similar to the following:
# opal-elog-parse -l
|------------------------------------------------------------------------------
|
|ID Date Time SRC Creator Event Severity |
|------------------------------------------------------------------------------
|
|50DC3253 2014-09-17 17:23:34 B1819548 Service Processor Informational Event |
|50DC3259 2014-09-17 17:23:35 B181D30E Service Processor Informational Event |
|50DC3273 2014-09-17 17:23:41 B181D30E Service Processor Informational Event |
. . .

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

__ 16. The names provided are files located in your current directory. Select the first file in your
current directory, and use the opal-elog-parse command to view the contents.
# opal-elog-parse -a 1410975695-0x50dc3253 |more
|------------------------------------------------------------------------------
|
| Private Header |
|------------------------------------------------------------------------------
|
| Section Version : 1 (PH) |
| Sub-section type : 0x0 |
| Section Length : 0x30 |
| Component ID : 9500 |
| Created at : 2014-09-17 | 17:23:34 |
| Committed at : 2014-09-17 | 17:23:34 |
| Created by : Service Processor |
. . .

Section 3: System information


__ 17. From your terminal window, issue the command lscpu. What does this command show?
» You should see information similar to the following example:
# lscpu
Architecture: ppc64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Big Endian
CPU(s): 80
On-line CPU(s) list: 0,8,16,24,32,40,48,56,64,72
Off-line CPU(s) list: 1-7,9-15,17-23,25-31,33-39,41-47,49-55,57-63,65-71,73-79
Thread(s) per core: 1
Core(s) per socket: 5
Socket(s): 2
NUMA node(s): 2
Model: 8247-21L
CPU max MHz: 3690.0000
CPU min MHz: 2061.0000
L1d cache: 64K
L1i cache: 32K
L2 cache: 512K
L3 cache: 8192K
NUMA node0 CPU(s): 0,8,16,24,32
NUMA node1 CPU(s): 40,48,56,64,72
__ 18. Use the ppc64_cpu command to show the number of cores, and frequency.

8-6 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Important

In order to run PowerKVM on the IBM Power Systems, the SMT option needs to be turned off in the
hypervisor. The SMT feature will only be visible inside the guests, other than on the hypervisor.

» Depending on the number of processors in your lab system, your results will vary. Our
example shows 8 cores available to the host. The “*” in the first column shows enabled
threads.
# ppc64_cpu --info
Core 0: 0* 1 2 3
Core 1: 4* 5 6 7
Core 2: 8* 9 10 11
Core 3: 12* 13 14 15
Core 4: 16* 17 18 19
Core 5: 20* 21 22 23
Core 6: 24* 25 26 27
Core 7: 28* 29 30 31

# ppc64_cpu --frequency
min: 3.304 GHz (cpu 24)
max: 3.304 GHz (cpu 8)
avg: 3.304 GHz
__ 19. Display the contents of the file /proc/meminfo to see available memory resources.
» Are sample system has 64 GB of RAM installed.
# cat meminfo
MemTotal: 65899840 kB
MemFree: 56807104 kB
Buffers: 208896 kB
Cached: 5510720 kB
SwapCached: 0 kB
Active: 4081664 kB
Inactive: 4076288 kB
__ 20. View the contents of the file /proc/cpuinfo.

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» Our sample system shows POWER7 processors.


# cat cpuinfo
processor : 0
cpu : POWER7 (raw), altivec supported
clock : 3304.000000MHz
revision : 2.3 (pvr 003f 0203)

processor : 4
cpu : POWER7 (raw), altivec supported
clock : 3304.000000MHz
revision : 2.3 (pvr 003f 0203)
. . .
__ 21. Use the top command to show host performance.
» The top command output is screen based, just as it is with other Linux distributions.
top - 17:48:42 up 1 day, 3:57, 2 users, load average: 0.15, 0.16, 0.14
Tasks: 339 total, 73 running, 264 sleeping, 0 stopped, 2 zombie
%Cpu(s): 0.1 us, 0.2 sy, 0.0 ni, 99.5 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 65899840 total, 9087936 used, 56811904 free, 203904 buffers
KiB Swap: 8384448 total, 0 used, 8384448 free, 5508992 cached
. . .
__ 22. Use the mpstat command to show performance information over 8 seconds, every 2
second intervals.
» Our example shows the first two lines of a sample output.
# mpstat 2 8
Linux 3.10.42-2012.1.pkvm2_1_1.27.ppc64 (unode44-1.rtp.stglabs.ibm.com)
09/18/14 _ppc64_ (32 CPU)

17:49:07 CPU %usr %nice %sys %iowait %irq %soft %steal %guest
%gnice %idle
17:49:09 all 0.19 0.00 0.12 0.00 0.00 0.00 0.00 0.00
0.00 99.69
17:49:11 all 0.12 0.00 0.19 0.25 0.00 0.00 0.00 0.00
0.00 99.44
Average: all 0.16 0.00 0.16 0.12 0.00 0.00 0.00 0.00
0.00 99.56
__ 23. Use the pidstat command to look at process ID activity.

8-8 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Just as with other performance related commands, you can see performance
information about the host.
# pidstat
Linux 3.10.42-2012.1.pkvm2_1_1.27.ppc64 (unode44-1.rtp.stglabs.ibm.com)
09/18/14 _ppc64_ (32 CPU)

17:49:27 UID PID %usr %system %guest %CPU CPU Command


17:49:27 0 1 0.00 0.00 0.00 0.01 8 systemd
17:49:27 0 2 0.00 0.00 0.00 0.00 0 kthreadd
17:49:27 0 7 0.00 0.00 0.00 0.00 0 migration/0
. . .

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

8.2. Manage virtualization

Information

This topic deals with guest VM configuration. You will make changes to your guest VM to see what
affects they have.

__ 24. Open two terminal windows to your assigned PowerKVM host.


__ 25. In the first session, enter the virsh subsystem, and list guest VMs.
» Use the command virsh to access the subsystem, and then use the list command.
# virsh
Welcome to virsh, the virtualization interactive terminal.

Type: 'help' for help with commands


'quit' to quit

virsh # list
Id Name State
----------------------------------------------------
4 hostname-2 running
7 hostname-3 running
9 hostname-4 running
__ 26. Open a console session to the last guest you installed (guest #4).
__ 27. View the contents of the file /proc/cpuinfo, what do you see?
» You should see two processors configured.
# cat /proc/cpuinfo
processor : 0
cpu : POWER7 (architected), altivec supported
clock : 3425.000000MHz
revision : 2.1 (pvr 004b 0201)

processor : 1
cpu : POWER7 (architected), altivec supported
clock : 3425.000000MHz
revision : 2.1 (pvr 004b 0201)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
__ 28. From the second terminal session, set the CPU shares for the last guest VM you configured
(guest 4) to 256.

8-10 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » From the virsh prompt, use the edit command. Move to the bottom of the file, just
before the last line, and add the following three lines:
<cputune>
<shares>256</shares>
</cputune>
» Close the file, and then re-open. Where is the cputune element now? The XML editor
has placed it in the first part of the file.
<vcpu placement='static'>2</vcpu>
<cputune>
<shares>256</shares>
</cputune>
<os>
<type arch='ppc64' machine='pseries-2.2'>hvm</type>
__ 29. Set the CPU compatibility to POWER6 mode.
» Edit the guest VM XML file, and add the text as follows:
<cpu mode=’custom’>
<model>power6</model>
</cpu>
» Close the file, and then re-open. You should see the cpu compatibility element has been
positioned correctly.
<apic/>
</features>
<cpu mode='custom' match='exact'>
<model fallback='allow'>power6</model>
</cpu>
<clock offset='utc'/>
__ 30. Return to the first terminal session, reboot the guest (shutdown -r now). Once the
system reboots, look at the contents of /proc/cpuinfo. Has it changed?
» No, the XML file will only be read if the guest is completely shutdown.
__ 31. Shutdown the last guest completely. Once the shutdown is complete, return to the second
terminal session and start the guest.
» From the virsh prompt, start guest-4 (use the correct guest name).
__ 32. When the guest restarts, return to the first terminal session and login to console. View the
contents of the file /proc/cpuinfo. What do you see?

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The processor type should have changed to Power6 at this point.


# cat /proc/cpuinfo
processor : 0
cpu : POWER6 (architected), altivec supported
clock : 3425.000000MHz
revision : 2.1 (pvr 004b 0201)

processor : 1
cpu : POWER6 (architected), altivec supported
clock : 3425.000000MHz
revision : 2.1 (pvr 004b 0201)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
__ 33. Change the SMT setting using the following text:
<vcpu placement=’static’>4</vcpu>
<cpu>
<model>power7</model>
<topology sockets’1’ cores=’2’ threads=’4’/>
</cpu>
What happens?
» The text string is incorrect, and the editor will warn you of the failure.
Failed. Try again? [y,n,f,?]:
error: (domain_definition):68: Specification mandate value for attribute sockets
<topology sockets'1' cores='2' threads='2'/>
-----------------^
Failed. Try again? [y,n,f,?]:
» Fix the error by adding a “=” after sockets.
__ 34. On PowerKVM host, issue command virsh dominfo hostname-4 (replace correct value
for hostname-4).

8-12 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty » Our example shows the active guest running with 4 GB memory maximum.
# virsh dominfo hostname-4
Id: 7
Name: hostname-4
UUID: ec6a3e0f-9d94-427b-8b41-a47c9a3ccc65
OS Type: hvm
State: running
CPU(s): 2
CPU time: 27.4s
Max memory: 4194304 KiB
Used memory: 4194304 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: system_u:system_r:svirt_t:s0:c232,c460 (enforcing)
__ 35. Set the maximum memory for guest 4 to double the current value. What happens when you
try this?
» This command can only work when the domain is inactive.
# virsh setmaxmem hostname-4 8388608 --config --live
error: Unable to change MaxMemorySize
error: Requested operation is not valid: cannot resize the maximum memory
on an active domain
__ 36. Shut down the guest 4 domain.
» Use the destroy option to the virsh command.
# virsh destroy hostname-4
Domain hostname-4 destroyed
__ 37. Try the setmaxmem command again (without the “live” option).
» The command should work now that the domain is inactive.
__ 38. View the domain information, what has changed?

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

» The Max memory value should have changed to match the new assignment.
# virsh dominfo hostname-4
Id: -
Name: hostname-4
UUID: ec6a3e0f-9d94-427b-8b41-a47c9a3ccc65
OS Type: hvm
State: shut off
CPU(s): 2
Max memory: 8388608 KiB
Used memory: 4194304 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
__ 39. The domain still only has 4 GB of memory used at this point. Use the virsh command to
use the full memory available.
» The setmem option to the virsh command will perform this operation, as in the
example below.
# virsh setmem hostname-4 8388608 --config --live
__ 40. View the domain settings again for your guest 4 domain. Has the memory values changed?
» You should now see both Max and Used memory values as the same.
# virsh dominfo hostname-4
Id: 14
Name: hostname-4
UUID: ec6a3e0f-9d94-427b-8b41-a47c9a3ccc65
OS Type: hvm
State: running
CPU(s): 2
CPU time: 18.7s
Max memory: 8388608 KiB
Used memory: 8388608 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: system_u:system_r:svirt_t:s0:c307,c686 (enforcing)
__ 41. Notify instructor you have completed this exercise.

End of exercise

8-14 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty Exercise review and wrap-up


This exercise combined a look at general host administration processes, along with some ways to
manipulate guest virtualization settings.

© Copyright IBM Corp. 2016 Exercise 8. Host management 8-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

8-16 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1
Student Exercises with hints

EXempty
Appendix A. Exercise data sheet
The following information is required to complete exercises:

Power8 server FSP IP address


PowerKVM host name
PowerKVM host IP address
Guest1 name / IP address
Guest2 name / IP address
Guest3 name / IP address
Guest4 name / IP address
Gateway IP address
Netmask
Nameserver IP address
IPMI server IP address
IPMI server userID
IPMI server password

The following information is required to complete the Installing PowerKVM host exercise:

Web server IP
Kernel
Initrd
Boot args

Optional Storage exercise

Storage server IP
iSCSI initiator name

© Copyright IBM Corp. 2016 Appendix A. Exercise data sheet A-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints

A-2 PKVM © Copyright IBM Corp. 2016


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V10.1

backpg
Back page

You might also like