When using VIOS (aka Powervm) there will be a time to install an O/S, or perhaps do a mksysb restore onto an existing LPAR. This can be done by putting an ISO image within your virtual optical repository, then booting the LPAR from that optical disk. The first step is to confirm / create a virtual optical repository on the VIOS first.
On the VIOS, first determine if you have a virtual optical repository with:
lsrep
If no repository exists, you will get the output like the below example:
$ lsrep
The DVD repository has not been created yet.
Assuming you don’t have a virtual repository, you will want to create one. Keep in mind that the virtual optical repository should be using the disk space from rootvg. In the example below we will check to see how much space is available in rootvg, and then create a 15GB disk repository for storing ISO images.
lsvg rootvg | grep "FREE PPs"
MAX LVs: 256 FREE PPs: 65 (16640 megabytes)
mkrep -sp rootvg -size 15G
Virtual Media Repository Created
Repository created within "VMLibrary" logical volume
You can confirm it with:
df -m |grep VMLibrary
/dev/VMLibrary 15360.00 15297.34 1% 4 1% /var/vio/VMLibrary
So now that you have a virtual repository, you can upload ISO images to <hostname:/var/vio/VMLibrary>.
Additionally, one can “convert” an existing mksysb image into a bootable ISO image. This may be preferable to using your nim server to perform nim restore operations.
Note: if you remove the “write” permission of the ISO file, you can use that specific ISO image on multiple virtual optical devices at the same time.
Once the ISO image has been uploaded to your repository, you can create a virtual optical device (via the gui VIO) or via the command-line. Using the command line, we will need to know the name of the ISO image file, and the virtual host adapter you will require.
The virtual mappings are found with: lsmap -all
Here is an example, that has one LPAR already created, with one virtual disk (assigned as a Logical Unit from the Shared Storage Pool).
First, let’s see what exists. Then create and assign the ISO image as a virtual optical device.
$ lsmap -all
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U77XX.XXX.XXXXXXX-V1-C11 0x00000002
VTD vtscsi0
Status Available
LUN 0x8100000000000000
Backing device test_rootvg.f8xxcxcx0x6xx9exxdxby44ad0xe0
Physloc
Mirrored N/A
OK, the above is LPAR ID #2, which has one disk assigned. We will now look for the available ISO images, and create and mount the ISO image for this LPAR.
$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
15297 14630 rootvg 50944 1280
Name File Size Optical Access
ubuntu.server.iso 667 None ro
$ lsvopt
$
From the above, we can see that the 15GB virtual repository exists, and that a ubuntu.server.iso image has been uploaded. It also shows the amount of free space remaining in the repository. From the lsvopt command above, we see that “no” virtual optical devices exist. Now let’s create one with:
$ mkvdev -fbo -vadapter vhost0 -dev DVD_4_test_LPAR
DVD_4_test_LPAR Available
* -fbo = File Backed Optical
* -vadapter = The VirtualServerAdapter to use
* -dev = A more friendly virtual device name to use (without specifying -dev, the VIOS will generate a name for it automatically). However, it may be created with a name like vtopt0. Which doesn’t help determine what LPAR it belongs to with a simple “lsvopt” command.
$ lsvopt
VTD Media Size(mb)
DVD_4_test_LPAR No Media n/a
$
As you can see above, the virtual optical device has been created, however “no media” is currently allocated to use it. Let’s do that now:
$ loadopt -disk ubuntu.server.iso -vtd DVD_4_test_LPAR
$
* -disk => disk image to mount (found with lsrep)
* -vtd => Virtual optical device to use
Now let’s see what is available.
$ lsmap -all
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U7778.23X.1069C6A-V1-C11 0x00000002
VTD DVD_4_test_LPAR
Status Available
LUN 0x8200000000000000
Backing device /var/vio/VMLibrary/ubuntu.server.iso
Physloc
Mirrored N/A
VTD vtscsi0
Status Available
LUN 0x8100000000000000
Backing device test_rootvg.f8xxcxcx0x6xx9exxdxby44ad0xe0
Physloc
Mirrored N/A
$
Now that you have an ISO image associated to the LPAR, you can mount it (or boot from it). Assuming the LPAR does NOT already have an OS installed, we can boot the system with the ubuntu.server.iso image (for a powerpc). First, activate the LPAR in the VIO (gui webpage) by clicking the paritition ID and clicking the Activate button. Alternateively, you can activate the LPAR from the cli on the VIOS server (in restricted shell) with:
chsysstate -r lpar -o on --id 2
Start Virtual Console
In the Cli window, you can get a virtual console with:
mkvt -id 2
The above command assumes the VIOS server has the authorization to do remote virtual consoles. If your hardware is being managed by a HMC (Hardware Management Console) then that system should be used instead. Typically a virtual console is started on a HMC with:
ssh hscroot@
$ vtmenu
The above will provide a list of the available managed hardware. Select the managed system you’ll be using, and then select the specific LPAR. That will start the remote console.
Follow along for a Bootup of AIX, and changing the boot sequence (temporarily).
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM IBM
1 = SMS Menu 5 = Default Boot List
8 = Open Firmware Prompt 6 = Stored Boot List
Select 1 on the keyboard to enter the SMS Menu
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
——————————————————————————-
Navigation Keys:
X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 5 [enter]
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Multiboot
1. Select Install/Boot Device
2. Configure Boot Device Order
3. Multiboot Startup
4. SAN Zoning Support
——————————————————————————-
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 1 [enter]
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Select Device Type
1. Diskette
2. Tape
3. CD/DVD
4. IDE
5. Hard Drive
6. Network
7. List all Devices
——————————————————————————-
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 3 [enter]
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Select Media Type
1. SCSI
2. SSA
3. SAN
4. SAS
5. SATA
6. USB
7. IDE
8. ISA
9. List All Devices
——————————————————————————-
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 1 [enter]
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Select Media Adapter
1. U7778.XXX.0XXXXX9X-V5-C2-T1 /vdevice/v-scsi@30000002
2. List all devices
——————————————————————————-
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 1 [enter]
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Select Device
Device Current Device
Number Position Name
1. - SCSI CD-ROM
( loc=U7778.23X.069699A-V5-C2-T1-L8200000000000000 )
——————————————————————————-
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 1 [enter]
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Select Task
SCSI CD-ROM
( loc=U7778.23X.069699A-V5-C2-T1-L8200000000000000 )
1. Information
2. Normal Mode Boot
3. Service Mode Boot
——————————————————————————-
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 2 [enter]
PowerPC Firmware
Version EA350_159
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Are you sure you want to exit System Management Services?
1. Yes
2. No
——————————————————————————-
Navigation Keys:
X = eXit System Management Services
——————————————————————————-
Type menu item number and press Enter or select Navigation key:
Select 1 [enter]
The system will now boot from the virtual ISO image, and boot into the contained OS.