Migrating a physical LPAR to a SAN-attached virtual (VIO client) LPAR

This article outlines how to migrate physical logical partitions (LPARs) with internal disks to storage area network (SAN) attached virtual disks backed virtual LPAR as VIO client. This is an intermediate-level article and is targeted for system administrators who are interested in leveraging IBM® Power Systems™ virtualization using the Virtual I/O Server (VIOS). This overview of the migration process can prepare the user for what needs to be done and what to expect so that the migration can be as quick and easy as possible.

Bobichan P. John (jbobicha@in.ibm.com), Advisory Software Engineer, IBM

Bobichan John PhotoBobichan P. John is an Advisory Software Engineer with 13 years of experience, of which 11 years have been with IBM India. He has experience in requirement gathering, architecting, and designing software solutions and has done object-oriented analysis and design, SOA-based design, development, and IBM pSeries-based system testing. You can reach him at jbobicha@in.ibm.com.



Abhishek Kumar (abkumarl@in.ibm.com), Staff Software Engineer, IBM

Abhishek Kumar PhotoAbhishek Kumar is a Staff Software Engineer, having 4.3 years of experience with IBM India. He has experience in IBM pSeries-based system testing, IBM AIX administration, virtualization technologies, hardware administration tools and storage area network (SAN). Abhishek is currently involved in Power Systems customer test, which includes Power Systems firmware testing, Hardware Management Console (HMC) testing, and System Director Management Console (SDMC) testing. You can reach him at abkumarl@in.ibm.com.



30 August 2012

Also available in Chinese Russian Portuguese

Introduction

Virtual I/O (VIO) is the virtualization feature software implemented from IBM POWER5™ processor-based servers onwards. This software facilitates the sharing of physical I/O resources between client LPARs within the server. VIOS has all the physical I/O resources and it allocates the physical devices, such as disks and network adapters to the client partitions. For the client partitions, the devices are virtual devices. We can create LPARs without requiring additional physical I/O resources in the system. Client LPARs can share Small Computer System Interface (SCSI) devices, Fibre Channel (FC) adapters, and Ethernet adapters and expand the amount of memory available to LPARs using paging space devices.

To leverage IBM Power Systems virtualization using VIOS, customers can either freshly set up the environment on the VIO client LPAR or migrate their current physical LPAR with internal disks to SAN-attached virtual disks backed virtual LPAR as VIO client. Migrating the LPARs with internal physical disks to LPARs with virtual disks on VIOS can be challenging. This article provides the step-by-step procedure for migrating LPARs with internal disks to VIO client LPAR. This overview of the migration process prepares the user for what needs to be done and what is to be expected, so that the migration can be as quick and easy as possible.

This article demonstrates the physical to virtual migration procedures used to migrate the IBM AIX® systems. It is assumed that the reader is already familiar with AIX, VIOS, SAN, and the Hardware Management Console (HMC) and also assumed that the reader already has the HMC and VIOS in their environment. If not, it is recommended to review the documentation in the “Resources” section first.

Migrating a physical LPAR to a virtual LPAR

Migrate the root volume group (rootvg) that is on the internal disk of the server to the external disk or SAN disk which is temporarily attached to the server through FC. The rootvg exists on the internal disk of any server. Internal disk implies any disk which is on the central processor complex (CPC) server or in the I/O drawer attached to the server.

The process of migration is summarized in the following steps:

  1. Prepare for the migration.
  2. Clone the rootvg from the internal disk to the external disk by using the alt_disk_copy command.
  3. Export the altinst_rootvg from the source LPAR.
  4. Set up the VIO client LPAR (target LPAR).
  5. Use the exported disk in step 3 as the boot device for target LPAR.

Each of these steps are elaborated in the rest of this article.


Preparing for the migration

Unmirror rootvg

If rootvg is mirrored on multiple disks on the source LPAR, we have to unmirror rootvg before carrying out the migration under discussion. This section can be skipped if rootvg is not mirrored. To unmirror the rootvg, use the unmirrorvg command.

For example, run the following command to unmirror the root volume group on hdisk11.

unmirrorvg rootvg hdisk11

If multiple copies are available on different disks, unmirror the rootvg from all the mirrored disks.

Run the reducevg command to reduce the disk out of the root volume group.

reducevg rootvg hdisk11

Use the bosboot and bootlist commands to reinitialize the boot record of the remaining disk and modify the boot list in order to remove the unmirrored disk from the list. If the source LPAR has rootvg in hdisk1, run the following commands:

bosboot -a -d /dev/hdisk1
bootlist -m normal hdisk1

Assign additional hdisks from the external storage

On the source physical LPAR, we have disk hdisk1 and rootvg on hdisk1. We can check the physical volumes:

#lspv
hdisk1 00000f6ac39aea95 rootvg active

Create a logical unit number (LUN) on the storage and assign it to the source physical system and issue the chdev command to change the characteristics of the new device. Make sure that you run the cfgmgr command on the source physical LPAR to configure the new hdisk in the LPAR.

chdev -l  hdisk0 -a pv=yes

Check the status of the physical disks on the source system. The output is similar to the following example:

#lspv
hdisk1 00000f6ac39aea95 rootvg active
hdisk0 00000f6a47b2e4d5 none

In this example, hdisk1 is an internal disk and hdisk0 is an external SAN disk.


alt_disk_copy from hdisk1 (internal disk) to hdisk0 (external disk)

The alt_disk_copy command copies the current rootvg to an alternate disk. In short, it is used to clone the currently running disk to an alternate disk.

alt_disk_copy –d hdisk0 -B -O  #(hdisk0 is the target disk)

Where -B specifies to not run the boot list after the mksysb or clone.

-O performs a device reset on the target altinst_rootvg. This causes the alternate disk install to not retain any user-defined device configuration. This flag is useful if the target disk or disks become the rootvg of a different system (such as in the case of logical partitioning or system disk swap).

We can now view the altinst_rootvg on the source LPAR as:

#lspv
hdisk0 00c5f37067790da3 altinst_rootvg
hdisk1 00c5f370dda17847 rootvg active

Export the altinst_rootvg from the source LPAR

Export the altinst_rootvg on hdisk0 by using the exportvg command. This command exports the definition of a volume group from a set of physical volumes.

exportvg  altinst_rootvg

The exportvg command removes the definitions of altinst_rootvg definition from the source LPAR and allows hdisk0 to be used as the boot device in other partitions.


VIO client LPAR setup

The VIOS has the physical resources, such as disks and Ethernet adapters. These physical resources are being used by the client LPARs as virtual devices, that is, the physical resources are being allocated by the servers to the clients. The allocation of the disks from VIOS to the client partitions will be discussed.

Create the new profile for the target LPAR in the HMC. As part of VIOS and client setup, we will discuss on editing the new target LPAR profile in the HMC to add the virtual Ethernet and virtual SCSI (VSCSI) setup.

Virtual Ethernet setup

On the VIOS, the Shared Ethernet Adapter enables the client partitions to communicate with other systems outside the CPC without requiring physical Ethernet adapters in the partitions. The enabling and setup of a virtual Ethernet adapter in an AIX client partition does not require any special hardware or software. After a specific virtual Ethernet is enabled for a partition, a network device is created within the partition.

In order to create the virtual Ethernet on the client side, in the HMC GUI, select the newly created LPAR profile and in the Tasks (bottom side) section of the window:

Click Configuration-> Manage Profiles->Actions-> Edit->Virtual Adapters-> Create Ethernet Adapter.

Figure 1. Creating the virtual Ethernet adapter
Creating Virtual Ethernet Adapter screen shot

In order to use the disks from the VIOS, create a virtual SCSI adapter at the VIOS and client LPAR. At the VIOS side, create a VSCSI server adapter and at the client side, create a VSCSI client adapter.

Create these adapters using the HMC GUI. For creating the client SCSI adapter, in the HMC GUI, select the newly created LPAR profile, and in the Tasks (bottom side) section of the window:

Click Configurations->Manage profiles->Actions->Edit->Virtual Adapters->Create SCSI Adapter.

Figure 2. Creating the client SCSI adapter
Creating client SCSI Adapter screen shot

For creating the server SCSI adapter, in the HMC GUI, select the VIOS LPAR profile and in the Tasks (bottom side) section of the window:

Click Configurations->Manage profiles->Actions->Edit->Virtual Adapters->Create SCSI Adapter.

Figure 3. Creating the server SCSI adapter
Creating server SCSI Adapter screen shot

The slot number of the SCSI adapters must be mapped correctly on the VIOS and VIO client.

Assign the LUN that was created in the previous section "Assign additional hdisk from external Storage" to the VIOS and issue the chdev command to change the characteristics of the new device. Make sure that you issue the cfgmgr command in the root shell of the VIOS to configure the hdisk in the VIOS.

Map the assigned hdisk to the corresponding virtual SCSI server adapter using the mkvdev command in the padmin shell. The command to map the hdisk to the virtual SCSI server adapter is:

$mkvdev –vdev  assigned_hdiskname -vadapter  
virtual_SCSI_server_adapter -dev virtual_target_device_name

For example:

mkvdev –vdev  hdisk4 -vadapter  vhost0 -dev target_lpar_rootvg

Here hdisk4 is the same disk where we cloned the physical source LPAR.

On VIOS, the corresponding virtual SCSI host adapters and the physical devices, that is, the hdisks are mapped. You can check this mapping using the lsmap –all command in the padmin shell.

$lsmap –all 

SVSA Physloc Client Partition ID
--------------- ----------------------------- -------------------
vhost0 U9119.FHA.025F370-V1-C30 0x00000005

VTD target_lpar_rootvg
Status Available
LUN 0x8100000000000000
Backing device hdisk4
Physloc U5791.001.9920MV2-P1-T6-L8-L0

The first column of the lsmap –all output shows the server VSCSI adapter name as vhostname

In the Physloc (second column) check the last digit, which is C30. Here, 30 is the server SCSI adapter ID.

Use the exported disk as the boot device for the target LPAR

This completes the physical to virtual migration. The target LPAR now has the rootvg on the hdisk that is cloned from the source physical LPAR. The hdisk is backed by the VIOS.

Activate the migrated virtual LPAR in the HMC. For activating a new virtual LPAR in the HMC GUI, select the newly created LPAR profile in the Tasks section of the window:

Click Operations -> Activate.

Set the new host name and the new IP address after activating the migrated virtual LPAR. There might be a need to migrate the data volume group present in the source physical LPAR to the virtual LPAR, which is similar to the root volume group migration.

Resources

Learn

Get products and technologies

  • Evaluate IBM products in the way that suits you best: Download a product trial, try a product online, use a product in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture (SOA) efficiently.

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Open source
ArticleID=831478
ArticleTitle=Migrating a physical LPAR to a SAN-attached virtual (VIO client) LPAR
publish-date=08302012