Dec 22, 2008 ... That may change in the future, but for now the sa76-0101.pdf file must be ... AIX
VIO clients may sometimes read incorrect data from virtual ...
IBM developerWorks: Wikis - AIX - VIOLoadISO Country/region
[select]
Terms of use
All of dW
Home
Products
Services & solutions
Support & downloads
My account
developerworks > Dashboard > AIX > ... > AIXV53Howtos > VIOLoadISO
Log In
developerWorks AIX and UNIX Information Mgmt Lotus Rational Tivoli WebSphere
Overview
●
Java™ technology
●
Linux
●
Multicore acceleration
●
SOA and Web services Web development XML
Forums
Blogs
Podcasts
Wikis
Exchange
VIOLoadISO
Architecture
Open source
Spaces
Browse Space
View
Info
Added by oneskywalker, last edited by oneskywalker on Dec 22, 2008 (view change) Labels: (None)
How to load a .ISO file into a virtual CDROM device on a VIO Server at the VIOS 1.5 level
Feedback
The following instructions were cribbed from the VIO Server file-backed devices web page. My thanks to Joe Pu for publishing it. Any errors in this article are, of course, not Mr. Pu's responsibility. Related links ISV resources alphaWorks (emerging technologies)
A .ISO image file can be obtained in several different ways:
IBM Academic Initiative IBM Virtual Innovation Center (Bus. Partners) IBM Redbooks IBM Press books IBM communities
1. Download it 2. Build your own 3. Copy from CD or DVD media: dd if=/dev/cd0 of=/tmp/cdcopy.iso bs=1m
Several articles on the web suggest that the third alternative will work, but no testing has been done. And please consider potential copyright violations before using the third alternative.
Local sites developerWorks •• developerWorks Japan developerWorks •• developerWorks ••••••
Note
For information about the VIOS 1.5 commands used below, see the Power Systems Virtual I/O Server and Integrated Virtualization Manager Command Reference (SA76-0101-04 as of 8/28/2008, downloadable from the Virtual I/O Server command descriptions web page. Please note that on 8/28/2008, the command descriptions on the web page itself are for an earlier level of VIOS. That may change in the future, but for now the sa76-0101.pdf file must be downloaded to get descriptions of commands at the VIOS 1.5 level. First, when logged in as padmin on a Virtual I/O Server: 1. Because support for virtual CDROM devices was introduced in VIOS 1.5, confirm that VIO Server software is at the 1.5 level or above:
$ ioslevel 1.5.2.1-FP-11.1 $
http://www.ibm.com/developerworks/wikis/display/WikiPtype/VIOLoadISO (1 of 7)1/21/2009 3:18:24 PM
IBM developerWorks: Wikis - AIX - VIOLoadISO Notes 1. If the VIOS level is below 1.5, the instructions below will not work as described. 2. AIX VIO clients may sometimes read incorrect data from virtual CDROM devices unless the fix for APAR IZ20663
is installed.
2. Determine if a Virtual Media Repository has already been defined on the VIO Server:
$ lsrep The DVD repository has not been created yet. $ There is no Virtual Media Repository yet. Note
A VIO Server can have only one Virtual Media Repository, so if one has already been defined, it must be used. 3. Display the storage pools which are available on the VIO Server:
$ lssp Pool rootvg $
Size(mb) 279552
Free(mb) 122112
Alloc Size(mb) 128
BDs Type 10 LVPOOL
4. Define a Virtual Media Repository:
$ mkrep -sp rootvg -size 128M Virtual Media Repository Created Repository created within "VMLibrary_LV" logical volume $ where: o rootvg is the name of the storage pool chosen from list displayed by lssp and o 128M is the size of the Virtual Media Repository. Note
Because a VIO Server can have only one repository, the repository defined here must be large enough to hold all the CD images staged on the VIO Server. The 128 MB example used here is very small. The chrep command can be used later to increase the size of the repository. 5. List the Virtual Media Repository to confirm that it was defined properly:
$ lsrep Size(mb) Free(mb) Parent Pool 125 125 rootvg $
Parent Size 279552
Parent Free 121984
6. Add one or more ISO images to the Virtual Media Repository, which could be referred to as creating a virtual optical media disk:
http://www.ibm.com/developerworks/wikis/display/WikiPtype/VIOLoadISO (2 of 7)1/21/2009 3:18:24 PM
IBM developerWorks: Wikis - AIX - VIOLoadISO
$ pwd /home/padmin $ ls -altr *.iso -rw-r--r-1 padmin staff 102400 Aug 28 12:52 bestprac.iso $ mkvopt -name bestprac -file bestprac.iso $ where: o bestprac is the name chosen for the ISO image in the Virtual Media Repository and o bestprac.iso is the ISO image file to be loaded into the Repository. 7. Confirm that the ISO images were added to the Repository and remove the ISO image file, assuming it is no longer needed:
$ lsrep Size(mb) Free(mb) Parent Pool 126 125 rootvg Name bestprac $ rm bestprac.iso $
Parent Size 279552
Parent Free 121984
File Size Optical 1 None
Access rw
Second, when logged in as hscroot on the Hardware Management Console: 1. Get a list of managed servers:
hscroot@hmc-p520:~> lssyscfg -r sys -F name Server-9111-520-SN10-5F2CD hscroot@hmc-p520:~> There is only one managed server (named Server-9111-520-SN10-5F2CD) in this example. 2. List the LPARs on one of the managed servers listed above:
hscroot@hmc-p520:~> lssyscfg -r lpar -m Server-9111-520-SN10-5F2CD -F name,lpar_id,lpar_env,state Telstar,9,aixlinux,Not Activated p520-sr5,8,aixlinux,Not Activated RedHat,7,aixlinux,Not Activated p520-sr4,6,aixlinux,Running p520-sr3,5,aixlinux,Running 9.72.8.225,4,aixlinux,Running p520-sr2,3,aixlinux,Running p520-sr1 vio,2,vioserver,Running 10-5F2CD,1,aixlinux,Error hscroot@hmc-p520:~> where: o Server-9111-520-SN10-5F2CD is the managed server name chosen in the previous step. From the list, choose an LPAR on which media in the Virtual Media Repository will be used and which is (or can be) a http://www.ibm.com/developerworks/wikis/display/WikiPtype/VIOLoadISO (3 of 7)1/21/2009 3:18:24 PM
IBM developerWorks: Wikis - AIX - VIOLoadISO
Virtual I/O client. Note the lpar_id of the LPAR. In the example above, LPAR p520-sr4 will be chosen, the lpar_id of which is 6:
p520-sr4,6,aixlinux,Running Third, back in the padmin session on the VIO Server: 1. List the virtual server adapters:
$ lsmap -all -field svsa clientid SVSA Client Partition ID --------------- ------------------vhost0 0x00000003 SVSA --------------vhost1
Client Partition ID ------------------0x00000005
SVSA --------------vhost2
Client Partition ID ------------------0x00000006
SVSA --------------vhost3
Client Partition ID ------------------0x00000008
$ From the list, choose the virtual server adapter which connects to the Client Partition ID which is the same as the lpar_id (6) identified in the previous step, except that the Client Partition ID is displayed as 0x00000006 instead of 6. Virtual server adapter vhost2 is associated with Client Partition ID 0x00000006 in the list above. Notes 1. If there is no match in the lsmap -all -field svsa clientid output for the lpar_id identified in the previous step, then the chosen LPAR is not yet a Virtual I/ O SCSI client and a virtual server adapter must be defined for it. Defining a new virtual server adapter (if necessary) is done on the HMC GUI and is not discussed further here. For more information, see Section 3.6.1, "Virtual SCSI resources" in the PowerVM Virtualization on IBM System p: Managing and Monitoring Redbook . Other earlier sections of the Redbook provide useful background on virtual SCSI adapters. 2. If there is more than one VIO server, then to determine the VIO server(s) to which the identified lpar_id has SCSI connections, when logged in as hscroot on the Hardware Management Console:
hscroot@hmc-p520:~> lshwres -m Server-9111-520-SN10-5F2CD -r virtualio --rsubtype scsi \ --filter lpar_ids=6 -F lpar_name,remote_lpar_name p520-sr4,p520-sr1 vio hscroot@hmc-p520:~> where: o Server-9111-520-SN10-5F2CD is the managed server name and o 6 is the identified lpar_id. The VIO LPAR name is p520-sr1 vio in the example above. (Please note that the command line in the example above is continued onto a second line with the \ character.) http://www.ibm.com/developerworks/wikis/display/WikiPtype/VIOLoadISO (4 of 7)1/21/2009 3:18:24 PM
IBM developerWorks: Wikis - AIX - VIOLoadISO
2. Define a file-backed optical device on the virtual server adapter identified in the previous step:
$ mkvdev -fbo -vadapter vhost2 vtopt0 Available $ where: o vhost2 is the virtual server adapter name identified in the previous step. 3. Load virtual optical media in the file-backed optical device defined in the previous step:
$ loadopt -disk bestprac -vtd vtopt0 $ where: o bestprac is the name chosen when the ISO image was added to the Virtual Media Repository and o vtopt0 is the file-backed optical device created in the previous step. Fourth, when logged in as root on the selected LPAR which is a Virtual I/O client: 1. List CD devices which are already configured:
p520-sr4:/ # lsdev -Cc cdrom p520-sr4:/ # In this example, there are no CD devices already configured. 2. List the virtual adapters which are configured:
p520-sr4:/ # lsdev -Cc adapter ent0 Available Virtual I/O Ethernet Adapter (l-lan) ent1 Defined Virtual I/O Ethernet Adapter (l-lan) vsa0 Available LPAR Virtual Serial Adapter vscsi0 Available Virtual SCSI Client Adapter p520-sr4:/ # In this example, there is only one virtual SCSI client adapter, so it must be the one which connects to the VIO server on which the file-backed optical device was just defined. 3. Discover the new file-backed optical device:
p520-sr4:/ # cfgmgr -l vscsi0 p520-sr4:/ # lsdev -Cc cdrom cd0 Available Virtual SCSI Optical Served by VIO Server p520-sr4:/ # where: o vscsi0 is the virtual SCSI client adapter identified in the previous step. If there is more than one virtual SCSI client adapter, then it might be necessary to run cfgmgr against each of them. http://www.ibm.com/developerworks/wikis/display/WikiPtype/VIOLoadISO (5 of 7)1/21/2009 3:18:24 PM
IBM developerWorks: Wikis - AIX - VIOLoadISO 4. Define a CDROM filesystem on the file-backed optical device just discovered:
p520-sr4:/ # crfs -v cdrfs -p ro -d cd0 -m /cdrom -An p520-sr4:/ # where: o cd0 is the file-backed optical device discovered in the previous step and o /cdrom is mount point chosen for the CDROM filesystem. 5. Mount the CDROM filesystem defined in the previous step:
p520-sr4:/ # mount /cdrom p520-sr4:/ # where: o /cdrom is mount point chosen for the CDROM filesystem in the previous step. 6. Confirm that the CDROM filesystem contains the files which reside on the ISO image in the Virtual Media Repository:
p520-sr4:/ # cd /cdrom p520-sr4:/cdrom # ls .kshrc .kshrc.root .profile.ksh .profile.root README installbp p520-sr4:/cdrom #
mkuser.sys.v53.new mkuser.sys.v53.orig mkuser.sys.v53tl7.new mkuser.sys.v53tl7.orig motd.new pagemax
pagemon ptree stopcmd sysreadme
Note
Before attempting to install from the virtual optical media, unmount the filesystem (cd / ; umount / cdrom). If the filesystem is left mounted, it may interfere with the installation process. Fifth (once the Virtual I/O client is done with the virtual optical media), back in the padmin session on the VIO Server: 1. List information about the file-backed optical devices:
$ lsvopt VTD vtopt0 $
Media bestprac
Size(mb) 1
Only one file-backed optical device is displayed in this example. Note that the virtual optical media (named bestprac) is still in the file-backed optical device. 2. Remove the media from the file-backed optical device:
$ unloadopt -vtd vtopt0 $ http://www.ibm.com/developerworks/wikis/display/WikiPtype/VIOLoadISO (6 of 7)1/21/2009 3:18:24 PM
IBM developerWorks: Wikis - AIX - VIOLoadISO
where: o vtopt2 is the name of the file-backed optical device. 3. Confirm that there is no longer any media in the file-backed optical device:
$ lsvopt VTD vtopt0 $
Media No Media
Size(mb) n/a
The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the Add Comment link at the bottom of the page to provide feedback. Note: Until you log in (using the link in the upper right corner of this web page), you will not see the you can not add a comment. If you do not already have an IBM ID, use the Register Now link on the sign in page to obtain one. Registration is quick and easy.
About IBM
Privacy
Contact
http://www.ibm.com/developerworks/wikis/display/WikiPtype/VIOLoadISO (7 of 7)1/21/2009 3:18:24 PM
Add Comment link and
Virtual Optical (virtual CDROM) Virtual Optical Media (File backed Optical) QPS01 – IBM PowerVM™ on Power Systems™ - 181
© Copyright IBM Corporation 2008 Course materials may not be reproduced in whole or in part without written permission.
IBM PowerVM on System p
Progression of Virtual Optical IBM System p
The ability to share virtual SCSI disks backed by a Physical Volume (PV) or a Logical Volume (LV) has been available from the beginning. VIO server 1.2 gave the ability to share the CDROM drive with client LPARs through Virtual Optical devices. With VIO server 1.5, the ability to create “file-backed” virtual devices in addition to virtual SCSI devices backed by a PV or LV Using the cpvdi command a virtual device image can now be copied from one virtual target device (VTD) to a different VTD. This feature was added under VIO 1.5.2.1-FP11.1. © Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
2
IBM PowerVM on System p
Assign the CDROM to VIO Server – p6 IBM System p
Assign the RAID or Non-RAID SAS controller to the VIO Server This should be one of the integrated adapters (T) © Copyright IBM Corporation 2008
To make this change you can modify the VIO Server profile and reactivate or use DLPAR to add the adapter dynamically QPS01 – 180 Virtual Optical
3
IBM PowerVM on System p
Power5 Virtual Optical Device IBM System p
VIO 1.2 and higher allows the serving of DVD drive to client LPARs Add the “Other Mass Storage Controller” into VIO server Profile and reactivate Or Use DLPAR to add the CDROM drive to the VIO Server “Other Mass Storage Controller” found in p5 systems © Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
4
IBM PowerVM on System p
Add a new vSCSI server adapter – p6 IBM System p
Add the “Other Mass Storage Controller” into VIO server Profile and reactivate Or Use DLPAR to add the CDROM drive to the VIO Server
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
5
IBM PowerVM on System p
Power5 Virtual Optical Device
IBM System p
Also add a vSCSI server adapter to the VIO Server that “Any Partition” may connect to Added either through the partitions profile and then reactivating or Through a DLPAR operation © Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
6
IBM PowerVM on System p
Map the client adapter to virtual optical adapter – p6 IBM System p
Client LPAR profile Virtual SCSI Client Adapter ID
Virtual SCSI Server Adapter ID
cd0 only appears AFTER mkvdev is complete © Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
7
IBM PowerVM on System p
Power5 Virtual Optical Device Each Client LPAR gets a virtual SCSI client adapter to attach to VIO Server slot
IBM System p
Click on server adapter below, connection settings fill in here
Add to profile and reactivate or Use DLPAR
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
8
IBM PowerVM on System p
Power 5 or 6 Virtual Optical Device
IBM System p
padmin user commands in VIO server $ lsdev -type optical name status cd0 Available
description SATA DVD-ROM Drive
$ mkvdev –vdev cd0 –vadapter vhost3 vtopt0 available
IDE Device under p5
$ lsmap -vadapter vhost0 SVSA Physloc Client Partition ID --------------- ------------------------------------------- ---------vhost0 U9111.520.10C1C1C-V1-C13 0x00000000 VTD LUN Backing device Physloc
© Copyright IBM Corporation 2008
vtopt0 0x8100000000000000 cd0 U787A.001.DNZ00ZE-P4-D3
QPS01 – 180 Virtual Optical
9
IBM PowerVM on System p
Client Side - Virtual Optical Device IBM System p
First AIX client LPAR to activate will show new vscsi adapter and cd0 available # lsdev -Cs vscsi cd0 Available Virtual SCSI Optical Served by VIO Server hdisk0 Available Virtual SCSI Disk Drive # lsdev -Cs vscsi -F "name physloc“ cd0 U9111.520.10C1C1C-V3-C2-T1-L810000000000 hdisk0 U9111.520.10C1C1C-V3-C31-T1-L810000000000 # lsdev -Cc adapter ent0 Available Virtual I/O Ethernet Adapter (l-lan) vsa0 Available LPAR Virtual Serial Adapter vscsi0 Available Virtual SCSI Client Adapter vscsi1 Available Virtual SCSI Client Adapter vscsi2 Available Virtual SCSI Client Adapter Never shows CDROM information Use ‘lsdev –Cc cdrom’ © Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
10
IBM PowerVM on System p
Power5 Virtual Optical Device
IBM System p
Subsequent AIX client LPARs activate, but only show vscsi adapter Defined, and no optical device # lsdev -Cc adapter ent0 Available Virtual I/O Ethernet Adapter (l-lan) vsa0 Available LPAR Virtual Serial Adapter vscsi0 Available Virtual SCSI Client Adapter vscsi1 Available Virtual SCSI Client Adapter vscsi2 Defined Virtual SCSI Client Adapter
This client’s adapter will NOT configure while another client is connected to the server adapter # cfgmgr -vl vscsi2 … Method error (/usr/lib/methods/cfg_vclient -l vscsi2 ): 0514-040 Error initializing a device into the kernel.
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
11
IBM PowerVM on System p
Power5 Virtual Optical Device
IBM System p
To release the optical device from owning LPAR # lsdev –Cl cd0 –F parent vscsi2 # rmdev –R vscsi2 cd0 defined Now, cfgmgr in the receiving LPAR
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
12
IBM PowerVM on System p
Option One IBM System p
On old client # lsdev –Cl cd0 –F parent vscsi2 # rmdev –R vscsi2 On new client # cfgmgr
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
13
IBM PowerVM on System p
Option Two IBM System p
Move from the VIO server $ rmdev –dev vtopt0 $ mkvdev –vdev cd0 \ –vadapter vhost#
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
14
IBM PowerVM on System p
Some new Features introduced with VIO 1.5 IBM System p
Power 6 VIO Server enablement Virtual Optical Media File-backed Virtual SCSI devices VIOS Expansion Pack: additional VIOS security functionality including Kerberos, Secure SNMP, and Secure LDAP Live Partition Mobility Support under for VIO and IVM servers using p6 hardware
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
15
IBM PowerVM on System p
New Virtual Optical Media – Within IVM v1.5 IBM System p
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
16
IBM PowerVM on System p
Add Media – Still within IVM IBM System p
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
17
IBM PowerVM on System p
Virtual Optical Media on HMC Managed Systems (VIO 1.5) IBM System p
Managing the Virtual Media Repository VIO Command $ mkrep $ lsrep $ chrep $ rmrep
Description Create a Virtual media repository Display information on a Virtual Media Repository Change characteristics of a Virtual Media Repository Remove a Virtual Media Repository
Managing Virtual Optical Media VIO Command $ mkvopt $ lsvopt $ chvopt $ loadopt $ unloadopt $ rmvopt
Description Creates a new virtual optical disk in the Virtual Media Repository Displays information about file backed virtual optical devices Change the characteristics of a virtual optical media disk within the Virtual Media Repository Load a virtual optical media disk from the Virtual Media Repository into a virtual optical device Remove a virtual optical media disk from a virtual optical device Remove virtual optical media disk from Virtual Media Repository
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
18
IBM PowerVM on System p
Virtual Optical Media IBM System p
Create an ISO file from CDROM
$ mkvopt -name dvd.AIX_6.1.iso -dev cd0 -ro – You choose the name for this file, so make it meaningful – Creates an ISO image from the media in /dev/cd0 After the .iso file is in your /var/vio/VMLibrary directory, run:
$ mkvdev -fbo -vadapter vhost4 vtopt0 Available – Replace vhost4 with your Virtual SCSI server adapter name. – This mkvdev command creates your virtual optical target device.
$ loadopt -vtd vtopt0 –disk dvd.AIX_6.1.iso – The loadopt command loads vtopt0 with your ISO image – Replace “dvd.AIX_6.1.iso” with your meaningful filename © Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
19
IBM PowerVM on System p
Some advantages of Virtual Optical Media IBM System p
With read-only virtual media the same virtual optical device can be presented to multiple client partitions simultaneously You could easily boot from and install partitions remotely without having the need to swap out physical CD/DVDs or setup Network Installation Manager (NIM) server Easier to boot a partition into maintenance mode to repair problems Easier to maintain a complete library of all the software needed for the managed system. Various software packages as well as all the necessary software levels to support each partition Client partitions could use blank file-backed virtual optical media for backup purposes (read/write devices) These file-backed optical devices could then be backed up from on the VIO server to other types of media (tape, physical CD/DVD, TSM server, etc.) © Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
20
IBM PowerVM on System p
New command - cpvdi New command added at VIO 1.5.2.1-FP-11.1 $ cpvdi -src input_disk_image -dst output_disk_image [-isp input_storage_pool] [-osp output_storage_pool] [-overwrite] [-unconfigure] [-f] [-progress]
IBM System p
The cpvdi command copies a block device image, which can be either a logical or physical volume, a file-backed device, or a file on another existing disk. This command is NOT used to move data between non-virtualized disks and virtualized disks.
© Copyright IBM Corporation 2008
QPS01 – 180 Virtual Optical
21
© Copyright IBM Corporation 2008 Course materials may not be reproduced in whole or in part without written permission.