Showing posts with label VIO. Show all posts
Showing posts with label VIO. Show all posts

Sunday, February 3, 2013

Installing the Virtual I/O Server from the HMC


Find instructions for installing the Virtual I/O Server (VIOS) from the HMC by using the installios command.
Before you start, complete the following tasks:
  1. Ensure that you meet the following requirements:
    • There is an HMC attached to the managed system.
    • The Virtual I/O Server logical partition and logical partition profile are created.
    • If you are installing Virtual I/O Server Version 2.2.1.0, or later, ensure that the HMC is at Version 7 Release 7.4.0, or later.
    • The Virtual I/O Server logical partition has at least one Ethernet adapter and a 16 GB disk assigned to it.
    • You have hmcsuperadmin authority.
  2. Gather the following information:
    • Static IP address for the Virtual I/O Server
    • Subnet mask for the Virtual I/O Server
    • Default gateway for the Virtual I/O Server
To install the Virtual I/O Server, follow these steps:
  1. Insert the Virtual I/O Server CD or DVD into the HMC.
  2. If you are installing the Virtual I/O Server through the public network interface, continue to step 3. If you are installing the Virtual I/O Server through a private network interface, type the following from the HMC command line:
    export INSTALLIOS_PRIVATE_IF=interface
    where interface is the network interface through which the installation should take place.
  3. From the HMC command line, type:
    installios
  4. Follow the installation instructions according to the system prompts.
After you install the Virtual I/O Server, finish the installation by checking for updates, setting up remote connections, creating additional user IDs, and so on. For instructions, see Finishing the Virtual I/O Server installation.
Note: As an alternative to the HMC, you can use the IBM® Systems Director Management Console (SDMC) to install the VIOS.

How to setup SEA failover with Load Sharing configuration


Abstract

Use this Techdoc to help you to configure primary and backup Shared Ethernet Adapters for load sharing in the Virtual I/O Server.

Content

Table of contents:

Introduction
Requirements
Functionality
Simple test scenario from scratch
- Setup
- How do I know that load sharing is working and how do I know which VLANs are bridged by each SEA?
- Some outputs in disaster cases Enhanced test scenario (adding additional trunk adapter dynamically to the SEA)
- Setup
- Some outputs in disaster cases Switching from SEA Load Sharing to SEA failover
Switching from SEA failover to SEA Load Sharing
FAQs
References


Introduction:

The first implementation to fulfil redundancy requirements for Power System with network virtualization was the introduction of NIB (Network Interface Backup, s. Figure 1)

Figure 1: Network Interface Backup (NIB)


The client LPAR is connected to two separate VLANs. VLAN tagging cannot be supported in this case is because you can’t have one (virtual) switch with two connections.

To get around this problem, a different configuration needs to be used, namely, Shared Ethernet Adapter (SEA) Failover (s. Figure 2)


Figure 2: SEA Failover


The Shared Ethernet Adapter failover configuration provides redundancy only by configuring a backup Shared Ethernet Adapter on a different Virtual I/O Server.
This backup Shared Ethernet Adapter is in the standby mode and can be used only if the primary Shared Ethernet Adapter fails.
Hence, the bandwidth of the backup Shared Ethernet Adapter is not used. When using very expensive 10 Gb/s ethernet adapter the utilization of both, primary and backup adapter, would be highly appreciated. This can be obtained with use of SEA together with virtual switches (s. Figure 3).

Figure 3: Multiple Virtual Ethernet Switches


A significant benefit to this design is that both Virtual I/O Servers can be active at the same time.
Half of the clients could be configured to use Virtual I/O Server 1 and the other half to use Virtual I/O Server 2 as their primary paths. Each client would failover to its respective secondary path in the case that its primary path was lost. So the customer's investment in hardware is more effectively utilized.
If you need more detailed information, refer to the doc "Using Virtual Switches in PowerVM to Drive Maximum Value of 10 Gb Ethernet" (http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP101752)

Different to SEA with vswitch mode is the SEA with load sharing configuration, where the SEA algorithm itself decides which VLAN is bridged by the primary or the backup SEA (s. Figure 4).

Figure 4: SEA with Load Sharing


Functionality

In the Shared Ethernet Adapter failover with load sharing configuration, the primary and the backup Shared Ethernet Adapters negotiate the set of virtual local area network (VLAN) IDs that they are responsible for bridging. After successful negotiation, each Shared Ethernet Adapter bridges the assigned trunk adapters and the associated VLANs. Thus, both the primary and the backup Shared Ethernet Adapter bridge the workload for their respective VLANs. If a failure occurs, the active Shared Ethernet Adapter bridges all trunk adapters and the associated VLANs. This action helps to avoid disruption in network services (s. Figure 4).


Requirements

--> Both of primary and backup Virtual I/O Servers are at Version 2.2.1.0, or later.
--> Two or more trunk adapters are configured for the primary and backup SEA pair.
--> Load Sharing mode must be enabled on both primary and backup SEA pair.
--> The virtual local area network (VLAN) definitions of the trunk adapters are
identical between the primary and backup SEA pair.
--> You need to set the same priority to all trunk adapters under one SEA. The
primary and backup priority definitions are set at the SEA level, not at trunk
adapters level.


Simple test scenario from scratch

If you already have traditional SEA failover configured refer to section “How to switch from ha_mode to sharing mode”.
For maintainability we only have tagged traffic in our szenario.


After doing below steps your setup will look like this:

Figure 5: SEA Load Sharing Scenario

p72vio1:p72vio2:
State: PRIMARY_SH
Bridge Mode: Partial
VID shared: 1 10 11

High Availability Mode: Sharing
Priority: 1
State: BACKUP_SH
Bridge Mode: Partial
VID shared: 2 12 13

High Availability Mode: Sharing
Priority: 2

If the ha_mode is set to "sharing" on both the primary and the backup SEA but the state of the SEA is "PRIMARY" or "BACKUP" as opposed to "PRIMARY_SH" or "BACKUP_SH" something went wrong.

An error must have occurred which forced SEA to go back to non-sharing state even though Load sharing is enabled. Try to enable Load sharing again by running a chdev command on the backup SEA device. Check the SEA state again. If the SEA has recovered from its error, then it must be operating in Load sharing mode again. If the SEA is still not operating in Load sharing mode, then further detail investigation is required.


Setup

1.) Create virtual ethernet adapters on p72vio1
HMC --> select p72vio1 --> select Configuration --> select Manage Profiles
--> select the correct profile
--> Actions --> Edit --> Select Virtual Adapters
--> Actions --> Create Virtual Adapter --> Ethernet Adapter

Create first trunk adapter on p72vio1:

Create second trunk adapter on p72vio1:



Create Control Channel on p72vio1:



2.) Create virtual ethernet adapters on p72vio2

HMC --> select p72vio2 --> select Configuration --> select Manage Profiles
--> select the correct profile
--> Actions --> Edit --> Select Virtual Adapters
--> Actions --> Create Virtual Adapter --> Ethernet Adapter


Create first Trunk Adapter on p72vio2:




Create second Trunk Adapter on p72vio2:




Create Control Channel on p72vio2:



3.) Power on both VIO servers

p72vio1:
# lsdev -Cc adapter |grep Ethernet
ent0 Available Logical Host Ethernet Port (lp-hea)
ent1 Available Virtual I/O Ethernet Adapter (l-lan)
ent2 Available Virtual I/O Ethernet Adapter (l-lan)
ent3 Available Virtual I/O Ethernet Adapter (l-lan)
lhea0 Available Logical Host Ethernet Adapter (l-hea)

# entstat -d ent1 |grep Trunk
Trunk Adapter: True
# entstat -d ent2 |grep Trunk
Trunk Adapter: True
# entstat -d ent1 |grep VLAN
Port VLAN ID: 1
VLAN Tag IDs: 10 11
# entstat -d ent2 |grep VLAN
Port VLAN ID: 2
VLAN Tag IDs: 12 13

p72vio2:
# lsdev -Cc adapter |grep Ethernet
ent0 Available Logical Host Ethernet Port (lp-hea)
ent1 Available Virtual I/O Ethernet Adapter (l-lan)
ent2 Available Virtual I/O Ethernet Adapter (l-lan)
ent3 Available Virtual I/O Ethernet Adapter (l-lan)
lhea0 Available Logical Host Ethernet Adapter (l-hea)

# entstat -d ent1 |grep Trunk
Trunk Adapter: True
# entstat -d ent2 |grep Trunk
Trunk Adapter: True
# entstat -d ent1 |grep VLAN
Port VLAN ID: 1
VLAN Tag IDs: 10 11
# entstat -d ent2 |grep VLAN
Port VLAN ID: 2
VLAN Tag IDs: 12 13


On HMC:

hscroot@p7hmc:~>
lshwres -r virtualio --rsubtype eth -m p72 --level lpar |grep p72vio1
lpar_name=p72vio1,lpar_id=1,slot_num=2,state=1,is_required=0,is_trunk=1,trunk_priority=1,ieee_virtual_eth=1,port_vlan_id=1,vswitch=ETHERNET0,"addl_vlan_ids=10,11",mac_addr=761FA3934802,allowed_os_mac_addrs=all,qos_priority=none
lpar_name=p72vio1,lpar_id=1,slot_num=3,state=1,is_required=0,is_trunk=1,trunk_priority=1,ieee_virtual_eth=1,port_vlan_id=2,vswitch=ETHERNET0,"addl_vlan_ids=12,13",mac_addr=761FA3934803,allowed_os_mac_addrs=all,qos_priority=none
lpar_name=p72vio1,lpar_id=1,slot_num=4,state=1,is_required=0,is_trunk=0,ieee_virtual_eth=0,port_vlan_id=99,vswitch=ETHERNET0,addl_vlan_ids=,mac_addr=761FA3934804,allowed_os_mac_addrs=all,qos_priority=none

hscroot@p7hmc:~>
lshwres -r virtualio --rsubtype eth -m p72 --level lpar |grep p72vio2
lpar_name=p72vio2,lpar_id=2,slot_num=2,state=1,is_required=0,is_trunk=1,trunk_priority=2,ieee_virtual_eth=1,port_vlan_id=1,vswitch=ETHERNET0,"addl_vlan_ids=10,11",mac_addr=761FA4F6A602,allowed_os_mac_addrs=all,qos_priority=none
lpar_name=p72vio2,lpar_id=2,slot_num=3,state=1,is_required=0,is_trunk=1,trunk_priority=2,ieee_virtual_eth=1,port_vlan_id=2,vswitch=ETHERNET0,"addl_vlan_ids=12,13",mac_addr=761FA4F6A603,allowed_os_mac_addrs=all,qos_priority=none
lpar_name=p72vio2,lpar_id=2,slot_num=4,state=1,is_required=0,is_trunk=0,ieee_virtual_eth=0,port_vlan_id=99,vswitch=ETHERNET0,addl_vlan_ids=,mac_addr=761FA4F6A604,allowed_os_mac_addrs=all,qos_priority=none


4.) Creating SEA with Load Sharing mode

If all the Load sharing criteria are satisfied, then Load sharing can be enabled by setting the ha_mode attribute of SEA device to "sharing". This value must be set on primary SEA first before it is set for the backup SEA, because the backup SEA initiates the request for load sharing. If this sequence is not followed (means not activated on the primary first), then a chdev must occur on the backup SEA for Load sharing to work.

- When the backup SEA is configured in Load sharing mode it initiates the request for Load sharing by sending a special packet over the control channel to the primary SEA.
- The packet contains the list of VLANs the backup SEA proposes to take over for bridging.
- When the primary SEA receives the request for sharing it verifies the request and grants the request if it meets the sharing criteria.
- After the primary SEA grants the request, it switches over to sharing mode and sends an ACK packet to backup SEA via the control channel.
- When the backup SEA receives the ACK packet it switches to sharing mode and starts bridging for VLANs it had proposed to bridge.
- From then on, heartbeats are exchanged between the primary and the backup SEA in load sharing mode.
- Different to the traditional SEA failover mode, both the primary and the backup SEAs send and receive heartbeats.
Note that these heartbeats are in addition to heartbeats sent by the primary SEA in traditional SEA failover mode
- When either side (primary or backup) fails to receive load sharing heartbeats for a predetermined period of time, it is assumed that the other SEA has encountered a problem and it falls back to non-sharing mode and starts bridging traffic for all VLANs.
- To restart Load sharing, a chdev must occur on the backup SEA for the backup SEA to reinitiate Load sharing request.

On p72vio1:

$ mkvdev -sea ent0 -vadapter ent1,ent2 -default ent1 -defaultid 1 -attr ha_mode=sharing ctl_chan=ent3

ent4 Available
en4
et4

On p72vio2:

$ mkvdev -sea ent0 -vadapter ent1,ent2 -default ent1 -defaultid 1 -attr ha_mode=sharing ctl_chan=ent3

ent4 Available
en4
et4

How do I know that load sharing is working and how do I know which VLANs are bridged by each SEA?

--> Check the value of ha_mode attribute of the SEA device. It must be set to
"sharing" on both the primary SEA and the backup SEA
--> Run entstat -all (as padmin) or entstat -d (as root) for SEA device. If the SEA
is operating in Load sharing state, then its state must be either PRIMARY_SH or
BACKUP_SH
--> Run the entstat on the SEA device and look for values for VID Bridged. These are
the VLANs bridged by the SEA while SEA is operating in Load sharing mode.

On p72vio1:

# lsattr -El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
...
ha_mode sharing High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ...
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2 List of virtual adapters associated with the SEA (comma separated) 

# entstat –d ent4

State: PRIMARY_SH 
Bridge Mode: Partial 
VID shared: 1 10 11 

High Availability Mode: Sharing 
Priority: 1


On p72vio2:

# lsattr -El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
...
ha_mode sharing High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ...
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2 List of virtual adapters associated with the SEA (comma separated)

# entstat –d ent4

State: BACKUP_SH 
Bridge Mode: Partial 
VID shared: 2 12 13 

High Availability Mode: Sharing 
Priority: 2 


Some outputs in disaster cases
Shutdown primary vio server (p72vio1)
p72vio1 (primary):p72vio2 (backup):
# errpt
E136EAFA 0112173112 I H ent4 BECOME PRIMARY

# entstat –d ent4

State: PRIMARY
Bridge Mode: All
High Availability Mode: Sharing
Priority: 2
Power on primary vio server (p72vio1)
p72vio1 (primary):p72vio2 (backup):
# errpt

E136EAFA 0112105212 I H ent4 BECOME PRIMARY


# entstat –d ent4

State: PRIMARY_SH
Bridge Mode: Partial
VID shared: 1 10 11
High Availability Mode: Sharing
Priority: 1
# errpt

40D97644 0112174812 I H ent4 BECOME BACKUP


# entstat –d ent4

State: BACKUP_SH
Bridge Mode: Partial
VID shared: 2 12 13
High Availability Mode: Sharing
Priority: 2
Shutdown backup vio server (p72vio2)
p72vio1 (primary):p72vio2 (backup):
# errpt


# entstat –d ent4

State: PRIMARY
Bridge Mode: All
High Availability Mode: Sharing
Priority: 1
Power on backup vio server (p72vio2)
p72vio1 (primary):p72vio2 (backup):
# errpt





# entstat –d ent4

State: PRIMARY_SH
Bridge Mode: Partial
VID shared: 1 10 11
High Availability Mode: Sharing
Priority: 1
On backup vio server:
# errpt

40D97644 0112180112 I H ent4 BECOME BACKUP


# entstat –d ent4

State: BACKUP_SH
Bridge Mode: Partial
VID shared: 2 12 13
High Availability Mode: Sharing
Priority: 2


Enhanced test scenario (adding additional trunk adapter dynamically to the SEA)

Figure 6: Enhanced SEA Load Sharing Scenario



p72vio1:p72vio2:
State: PRIMARY_SH
Bridge Mode: Partial
VID shared: 3 4 33 44 333

High Availability Mode: Sharing
Priority: 1
State: BACKUP_SH
Bridge Mode: Partial
VID shared: 1 2 10 11 12 13

High Availability Mode: Sharing
Priority: 2

Setup

1.) create additional trunk adapter on the vio server with dlpar
HMC --> select p72vio1 --> select Dynamic Logical Partitioning Select Virtual
Adapter
--> Actions --> Create Virtual Adapter --> Ethernet Adapter

Create additional trunk adapter on p72vio1:

Create additional trunk adapter on p72vio1:



1.) create additional trunk adapter on the vio server with dlpar
HMC --> select p72vio2 --> select Dynamic Logical Partitioning Select Virtual
Adapter
--> Actions --> Create Virtual Adapter --> Ethernet Adapter

Create additional trunk adapter on p72vio2:



Create additional trunk adapter on p72vio2:



3.) add adapter to the profile
(starting with HMC 7.7.3 the existing profile can be overwritten,
previously you needed to specify new profile name )

On both vio server (p72vio1 and p72vio2):

HMC --> select Configuration --> seclect Save Current Configuration Overwrite
Existing Profile

4.) run cfgmgr (or cfgdev as padmin) on both vio server (p72vio1 and p72vio2):

# cfgmgr
# lsdev -Cc adapter |grep Ethernet
ent0 Available Logical Host Ethernet Port (lp-hea)
ent1 Available Virtual I/O Ethernet Adapter (l-lan)
ent2 Available Virtual I/O Ethernet Adapter (l-lan)
ent3 Available Virtual I/O Ethernet Adapter (l-lan)
ent4 Available Shared Ethernet Adapter
ent5 Available Virtual I/O Ethernet Adapter (l-lan)
ent6 Available Virtual I/O Ethernet Adapter (l-lan)
lhea0 Available Logical Host Ethernet Adapter (l-hea)

new virual adapter ent5 and ent6


5.) Add the new trunk adapter to the SEA

On p72vio1:
$ chdev -dev ent4 -attr virt_adapters=ent1,ent2,ent5,ent6
ent4 changed
On p72vio2:
$ chdev -dev ent4 -attr virt_adapters=ent1,ent2,ent5,ent6
ent4 changed

How do I know that load sharing is working and how do I know which VLANs are bridged by each SEA?

On p72vio1:
# lsattr –El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
... 
ha_mode sharing High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ...
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2,ent5,ent6 List of virtual adapters associated with the SEA (comma separated) 

# entstat –d ent4
...
State: PRIMARY_SH
Bridge Mode: Partial
VID shared: 3 4 33 44 333

High Availability Mode: Sharing
Priority: 1
...

On p72vio2:

# lsattr -El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
... 
ha_mode sharing High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ...
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2,ent5,ent6 List of virtual adapters associated with the SEA (comma separated) 

# entstat –d ent4
...
State: BACKUP_SH
Bridge Mode: Partial
VID shared: 1 2 10 11 12 13

High Availability Mode: Sharing
Priority: 2
...



Some outputs in disaster cases
Shutdown primary vio server (p72vio1)
p72vio1 (primary):p72vio2 (backup):
# errpt

E136EAFA 0113115612 I H ent4 BECOME PRIMARY


# entstat –d ent4

State: PRIMARY
Bridge Mode: All
High Availability Mode: Sharing
Priority: 2
Power on primary vio server (p72vio1)
p72vio1 (primary):p72vio2 (backup):
# errpt:

E136EAFA 0113050512 I H ent4 BECOME PRIMARY

# entstat –d ent4

State: PRIMARY_SH
Bridge Mode: Partial
VID shared: 3 4 33 44 333
High Availability Mode: Sharing
Priority: 1
# errpt:

40D97644 0113120112 I H ent4 BECOME BACKUP

# entstat –d ent4

State: BACKUP_SH
Bridge Mode: Partial
VID shared: 1 2 10 11 12 13
High Availability Mode: Sharing
Priority: 2



Switching from SEA Load Sharing to SEA failover

Switching to auto or to load sharing, you have to change ha_mode on the primary SEA first before changing ha_mode on the backup SEA.


On p72vio1 (Primary):


$ chdev -dev ent4 -attr ha_mode=auto
ent4 changed

# lsattr -El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
...
ha_mode auto High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ...
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2,ent5,ent6 List of virtual adapters associated with the SEA (comma separated)

# entstat –d ent4

State: PRIMARY
Bridge Mode: All

High Availability Mode: Auto
Priority: 1


On p72vio2 (Backup):


$ chdev -dev ent4 -attr ha_mode=auto
ent4 changed

# lsattr -El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
...
ha_mode auto High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ... 
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2,ent5,ent6 List of virtual adapters associated with the SEA (comma separated)

# entstat –d ent4

Limbo Packets: 0
State: BACKUP
Bridge Mode: None

High Availability Mode: Auto
Priority: 2


Switching from SEA failover to SEA Load Sharing


On p72vio1 (Primary):


$ chdev -dev ent4 -attr ha_mode=sharing
ent4 changed


# lsattr -El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
...
ha_mode sharing High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ...
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2,ent5,ent6 List of virtual adapters associated with the SEA (comma separated)

# entstat –d ent4

State: PRIMARY
Bridge Mode: All

High Availability Mode: Sharing
Priority: 1



On p72vio2 (Backup):

$ chdev -dev ent4 -attr ha_mode=sharing
ent4 changed

# lsattr -El ent4
...
ctl_chan ent3 Control Channel adapter for SEA failover True
...
ha_mode sharing High Availability Mode True
...
pvid 1 PVID to use for the SEA device True
pvid_adapter ent1 Default virtual adapter to use for non-VLAN-tagged packets ...
real_adapter ent0 Physical adapter associated with the SEA True
...
virt_adapters ent1,ent2,ent5,ent6 List of virtual adapters associated with the SEA (comma separated)

# entstat –d ent4

State: BACKUP_SH
Bridge Mode: Partial
VID shared: 1 2 10 11 12 13

High Availability Mode: Sharing
Priority: 2



On p72vio1 (Primary):

State: PRIMARY_SH
Bridge Mode: Partial
VID shared: 3 4 33 44 333

High Availability Mode: Sharing
Priority: 1




FAQs 

1) What is the algorithm that the VIOS pair uses to determine which VIOS should "own" the VID's?
VIOS divides the number of trunk adapters by 2. One VIOS bridges all VLANs of one half, and the other VIOS does bridging for VLANs of the other half.

2) As time goes on will the list of VID's change for each VIOS? (related to my algorithm question).
Not if the SEA configuration remains the same.

3) In load sharing mode is there any potential for broadcast storm if either of the VIOS are rebooted? (one at a time).
No.

4) Before rebooting each VIOS (one at a time) do I need to switch it back to "auto" mode?
No.

5) If I want to rmdev the SEA can I do this when it's in "sharing" mode on either VIOS? Based on what I've read I'd have to do this on the Primary SEA VIOS (with the lowest priority) first. In "auto"mode I can run rmdev against the SEA on either VIOS.
Yes.


Changes Section:

July 31, 2012
a) Correction to figures 4,5 and 6
b) Added, "For maintainability we only have tagged traffic in our szenario"
in the section Simple test scenario from scratch.
c) Figure 2 on the first VIOS the PVID was empty in the trunk adapter and is now added.
d) Figure 3 (multiple virtual ethernet switches) had incorrect PVID in the SEA on the second VIOS .
(PVID 2 instead of PVID 1)


References 
http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP101752
http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=/p7hb1/iphb1_vios_scenario_sea_load_sharing.htm
http://www.redbooks.ibm.com/abstracts/sg247590.html
Redbook - IBM PowerVM Virtualization Managing and Monitoring

Related information


Friday, November 9, 2012

How to configure a VIOS Media Repository/Virtual Media Library (ex. AIX Install/Restore)


Question

What's the procedure to install an AIX base ISO to an AIX parition using a VIOS media repository?

What's the procedure to create/use/remove a virtual media repository?

Can a mksysb ISO be restored through the virtual media repository?

Cause

     This document provides a step by step command line procedure for using a virtual media repository or Virtual Media Library (VML) to install/restore an AIX partition.
This applies to VIOS version 2.x.

Answer

PART I. REQUIREMENTS BEFORE PROCEEDING:
     Please ensure the following requirements are met before proceeding:
     A.) There should be an existing pair of virtual scsi adapters paired between the VIO server (vhost) and the VIO client (vscsi). Since the client may not have an OS, the adapter pairing can be verified through the partition properties/profile on the HMC or IVM.
     B.) A basic understanding of managing VIO virtual optical devices.
     C.) A basic understanding of the AIX Installation Menu and how to install AIX.

PART II. PERFORMING NEW AIX INSTALL WITH VML:
Step 1: Obtain AIX base ISO image from ESS and store on the VIO server.
     AIX base ISO images can be obtained by contacting Entitled Software Support (ESS) at 1-800-879-2755 option 2, option 2. The representatives should be able to verify entitlement and guide customers on how to download the ISO image.
     After the AIX ISO image had been downloaded, the image can be stored in the /home/padmin directory of the VIO server.

$ ls -al /home/padmin/AIX_iso

total 8687952
drwxr-xr-x 2 padmin staff 256 Apr 13 17:07 .
drwxr-x--- 9 padmin system 4096 Apr 13 17:10 ..
-rw-r--r-- 1 root staff 4448223232 Apr 13 17:08 AIX_6.1_Base_Operating_System_TL_6100-07-00_DVD_1_of_2_102011.iso
Step 2: Create/Modify the media repository
     A.) Creating the repository in rootvg:
$ mkrep -sp rootvg -size 6G
Virtual Media Repository Created
Repository created within "VMLibrary" logical volume
     B.) Creating the repository in a new VG:
$ mkvg -vg <new volume group name> hdisk#
$ mkrep -sp <repository name> -size 6G
     C.) Increasing the size of the media repository:

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
6118    6118    rootvg     139776     26624

$ chrep -size 4G ==> Adds an additional 4GB to the repository

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    10198    rootvg     139776     22528
NOTE: Increasing the size is currently the only option, to reduce the size of the repository it will need to be removed and recreated.
Step 3: Create the virtual media disk
$ mkvopt -name <new media disk name> -file <ISO filename> -ro
Example:
$ mkvopt -name base_61_TL7 -file/home/padmin/AIX_iso/AIX_6.1_Base_Operating_System_TL_6100-07-00_DVD_1_of_2_102011.iso -ro
NOTE: This command may take a few minutes to complete.
Step 4: Verify the virtual media disk is part of the repository

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198     5955    rootvg    139776     22528

Name File Size Optical Access
base_61_TL7 4243 None ro

Step 5: Create the file backed optical device and map it to a vhost:
~ Shown without the vtopt device ~

$ lsmap -vadapter vhost0
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U9117.MMA.10708D0-V1-C11 0x00000002

VTD L1_rootvg
Status Available
LUN 0x8100000000000000
Backing device lpar1_lv
Physloc 
Mirrored N/A

     Create the vtopt device.
$ mkvdev -fbo -vadapter vhost0
vtopt0 Available

~ Shown with the vtopt device ~

$ lsmap -vadapter vhost0
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U9117.MMA.10708D0-V1-C11 0x00000002

VTD L1_rootvg
Status Available
LUN 0x8100000000000000
Backing device lpar1_lv
Physloc 
Mirrored N/A

VTD vtopt0
Status Available
LUN 0x8200000000000000
Backing device 
Physloc 
Mirrored N/A

NOTE: Additional vtopt devices can be created and mapped to other vhosts. Consequently, each vtopt device will appear as a cd-rom device on the VIO client(s).

Step 6: Load the virtual media disk on the vtopt device:

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    5955    rootvg     139776     22528

Name File Size Optical Access 
base_61_TL7 4243 None ro 

$ loadopt -vtd vtopt0 -disk base_61_TL7

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    5955    rootvg    139776     22528

Name File Size Optical Access 
base_61_TL7 4243 vtopt0 ro 


     Verify that the vtopt# backing device is the virtual media disk location.

$lsmap -vadapter vhost0

...
...

VTD vtopt0
Status Available
LUN 0x8200000000000000
Backing device /var/vio/VMLibrary/base_61_TL7
Physloc 
Mirrored N/A

Step 7: Boot the client partition from the virtual optical device:

     A.) Activate the AIX Partition to the SMS Menu

     B.) Select the virtual optical device (CD-ROM)

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 <<<

Multiboot
1. Select Install/Boot Device <<<
2. Configure Boot Device Order
3. Multiboot Startup <OFF>

Select Device Type
1. Diskette
2. Tape
3. CD/DVD
4. IDE
5. Hard Drive
6. Network
7. List all Devices <<<

Select Device
Device Current Device
Number Position Name
1. - Interpartition Logical LAN
( loc=U9117.MMA.10708D0-V2-C3-T1 )
2. - SCSI CD-ROM
( loc=U9117.MMA.10708D0-V2-C2-T1-L8200000000000000 ) <<<

NOTE: The location code lun ID L8200000000000000 should match the LUN ID of the vtopt mapped to the vhost:

$lsmap -vadapter vhost0

...
...

VTD vtopt0
Status Available
LUN 0x8200000000000000
Backing device /var/vio/VMLibrary/base_61_TL7
Physloc 
Mirrored N/A

SCSI CD-ROM
( loc=U9117.MMA.10708D0-V2-C2-T1-L8200000000000000 )

1. Information
2. Normal Mode Boot <<<
3. Service Mode Boot

Are you sure you want to exit System Management Services?
1. Yes <<<
2. No


     Upon exiting SMS, the AIX partition will boot up from the virtual optical device to the AIX Installation Menus.

Step 8: Install the AIX operating system.


Step 9: Unloading the virtual media disk:

$ unloadopt -vtd vtopt0


Step 10: Removing the VM Library

     A.) Unmap the vtopt# VTDs from the vhost(s)

$ rmvdev -vtd <VTDname>

     B.) Remove the virtual media disk(s) from the Virtual Media Repository:

$ rmvopt -name <name of virtual optical disk>

     C.) Remove the repository:

$ rmrep [-f]


PART III: PERFORMING MKSYSB RESTORE WITH MKSYSB ISO AND VML:

Step 1: Check the remaining space of the repository and the size of the mksysb ISO file:

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    5955    rootvg     139776     22528

Name File Size Optical Access 
base_61_TL7 4243 None ro

# ls -al
total 38609016
drwxr-xr-x 3 root system 4096 Apr 25 19:02 .
drwxr-x--- 9 padmin system 4096 Apr 25 21:59 ..
-rw-r----- 1 padmin staff 4448223232 Apr 02 15:59 AIX_6.1_Base_Operating_System_TL_6100-07-00_DVD_1_of_2_102011.iso
-rw-r----- 1 padmin staff 4032843776 Apr 09 22:12 Virtual_IO_Server_V2.2.1_DVD_1_of_2_102011.iso
-rw-r--r-- 1 root system 3120545792 Apr 25 19:01 cd_image_6357164
drwxr-xr-x 2 root system 256 Apr 12 10:16 lost+found
-rw-r--r-- 1 root staff 2542 Apr 02 12:08 mybackup.tar.gz
-rw-r--r-- 1 root staff 183 Apr 02 12:12 mybackup_DEPLOYED
-rw-r--r-- 1 root staff 102 Apr 02 12:12 mybackup_NONDEPLOYED
-rw-r--r-- 1 root staff 1476 Apr 02 12:12 mybackup_VALID
-rw-r----- 1 root system 8163543040 Apr 13 11:48 nim_resources.tar


Step 2: Create the virtual media disk out of the mksysb ISO and add to the repository

$ mkvopt -name lpar1_sysb -file /home/padmin/mount/cd_image_6357164 -ro
Step 3: Verify the new virtual media disk in the repository:

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    2979    rootvg     139776     22528

Name File Size Optical Access
base_61_TL7 4243 None ro
lpar1_sysb 2976 None ro 

Step 4: As it was done in Part II Step 6, load the new mksysb virtual media disk to the available virtual optical device mapped to the vhost:

$ lsmap -vadapter vhost0
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U9117.MMA.10708D0-V1-C11 0x00000002

VTD L1_rootvg
Status Available
LUN 0x8100000000000000
Backing device lpar1_lv
Physloc
Mirrored N/A

VTD vtopt0
Status Available
LUN 0x8200000000000000
Backing device <== Available to add backing device
Physloc
Mirrored N/A
     Load the virtual media disk:

$ loadopt -vtd vtopt0 -disk lpar1_sysb
     Verify that the virtual media disk is assigned as the backing device:
$ lsmap -vadapter vhost0
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U9117.MMA.10708D0-V1-C11 0x00000002

VTD L1_rootvg
Status Available
LUN 0x8100000000000000
Backing device lpar1_lv
Physloc
Mirrored N/A

VTD vtopt0
Status Available
LUN 0x8200000000000000
Backing device /var/vio/VMLibrary/lpar1_sysb
Physloc
Mirrored N/A

     Follow Step 6 and Step 7 to boot the client LPAR and restore from the virtual media disk.

Step 5: Restoring a mksysb with multiple volumes

     Locate the directory with your multiple ISO images.

NOTE: Ensure that the volume order (vol1,vol2, etc.) are identifiable to reduce the probability of corrupting the restore.

$ ls -al /home/padmin/mount/*lpar2*
total 6139912
drwxr-xr-x 2 root system 256 Apr 26 07:21 .
drwxr-xr-x 5 root system 4096 Apr 25 22:28 ..
-rw-r--r-- 1 root system 674078720 Apr 26 00:24 cd_image_3014874.vol1
-rw-r--r-- 1 root system 676304896 Apr 26 02:20 cd_image_3014874.vol2
-rw-r--r-- 1 root system 676304896 Apr 26 04:10 cd_image_3014874.vol3
-rw-r--r-- 1 root system 676304896 Apr 26 05:56 cd_image_3014874.vol4
-rw-r--r-- 1 root system 440211456 Apr 26 07:21 cd_image_3014874.vol5

(Total Sum of ISO file sizes = 3143204864 or 3.143 G)

     Ensure that the repository has enough space:

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    2979     rootvg     139776      22528

Name File Size Optical Access
base_61_TL7 4243 None ro
lpar1_sysb 2976 vtopt0 ro

     The repository needs more space. Increase the size of the repository.

$ chrep -size 2G

     Check the space available.

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
12238    5019     rootvg     139776     20480

Name File Size Optical Access
base_61_TL7 4243 None ro
lpar1_sysb 2976 vtopt0 ro

     Now, create the virtual media disks out of each volume.

Volume1
$ mkvopt -name lpar2_sysb_vol1 -file/home/padmin/mount/vioc_lpar2_backup/cd_image_3014874.vol1

Volume2
$ mkvopt -name lpar2_sysb_vol2 -file/home/padmin/mount/vioc_lpar2_backup/cd_image_3014874.vol2

Volume3
$ mkvopt -name lpar2_sysb_vol3 -file/home/padmin/mount/vioc_lpar2_backup/cd_image_3014874.vol3

Volum4
$ mkvopt -name lpar2_sysb_vol4 -file/home/padmin/mount/vioc_lpar2_backup/cd_image_3014874.vol4

Volume5
$ mkvopt -name lpar2_sysb_vol5 -file/home/padmin/mount/vioc_lpar2_backup/cd_image_3014874.vol5

     Verify that all of the volumes have been made into a virtual disk:

$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
12239    2022     rootvg     139776     20480

Name File Size Optical Access
base_61_TL7 4243 None ro
lpar1_sysb 2976 vtopt0 ro
lpar2_sysb_vol1 643 None rw
lpar2_sysb_vol2 645 None rw
lpar2_sysb_vol3 645 None rw
lpar2_sysb_vol4 645 None rw
lpar2_sysb_vol5 420 None rw

     Check that a vtopt has been mapped to the appropriate vhost serving the client and that the backing device is available:

$ lsmap -vadapter vhost1
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost1 U9117.MMA.10708D0-V1-C12 0x00000003

VTD L2_rootvg
Status Available
LUN 0x8100000000000000
Backing device lpar2_lv
Physloc
Mirrored N/A

VTD vtopt1
Status Available
LUN 0x8200000000000000
Backing device <== Available for a virtual media disk from repository
Physloc
Mirrored N/A


     Load volume 1 of the virtual media disks to the virtual optical device:

$ loadopt -vtd vtopt1 -disk lpar2_sysb_vol1

     Verify it's been assigned as the backing device:

$ lsmap -vadapter vhost1
...

VTD vtopt1
Status Available
LUN 0x8200000000000000
Backing device /var/vio/VMLibrary/lpar2_sysb_vol1
Physloc
Mirrored N/A


     Boot the client from the virtual optical device and begin the install with virtual media disk volume 1 (Follow Part II Steps 7 and 8)

     When prompted for volume 2 (and every additional volume) "Please remove volume 1, insert volume 2, and press the ENTER key.", on the VIOS we'll need to unload the current volume and load the next volume:

Example:

$ unloadopt -vtd vtopt1
$ set -o vi
$ loadopt -vtd vtopt1 -disk lpar2_sysb_vol2

     Back on the client getting installed, strike ENTER/RETURN to begin reading from the second volume and continue the install.

     Continue the process of unloading and loading the virtual media disk volumes in order as the client asks for them until the restore has completed.