Backing up your VIOS configuration with viosbr.

After applying Fix Pack to my VIOS 2.1 server, I thought I’d try out the new viosbr command.

$ ioslevel

  1. 1.2.10-FP-22

The man page for viosbr states that this command can be used to backup and restore the virtual I/O server configuration.

 

$ man viosbr

 

viosbr command

 

Purpose

 

     Performs the operations for backing up the virtual and logical configuration, listing the configuration,

     and restoring the configuration of the Virtual I/O Server.

 

     The viosbr command can be run only by the padmin user.

…..

 

 

First I attempted the -view and -list options and found that the default location for these backup files was in padmin’s home directory under cfgbackups.

 

$ viosbr -view -list

/home/padmin/cfgbackups/ not found

 

 

From the man page:

 

-list

     This option displays backup files from either the default location /home/padmin/cfgbackups or a user

     Specified location.

 

 

So I created this directory and ran a viosbr backup.

 

$ mkdir cfgbackups

 

$ viosbr -backup -file bvio83_vios_config_bkp

 

$ viosbr -view -list

  1. bvio83_vios_config_btar.gz

 

 

A tar/gzipped file was created in the cfgbackups directory.

 

$ ls -ltr cfgbackups

total 8

-rw-r--r--   1 root     staff         2959 Dec 9 09:47 bvio83_vios_config_bkp.tar.gz

 

 

This file is in XML format.

 

$ r oem

oem_setup_env

# set -o vi

# pwd

/home/padmin

# cd cfgbackups

 

# ls -ltr | tail -1

-rw-r--r--   1 root     staff         2959 Dec 9 09:34 bvio83_vios_config_bkp.tar.gz

 

$ gzip -d bvio83_vios_config_bkp.tar.gz

 

$ ls -ltr | tail -1

-rw-------   1 root staff     24576 Dec 09 09:36 bvio83_vios_config_bkp.tar

 

$ tar -tvf bvio83_vios_config_bkp.tar

-rw-r--r--   0 1   23021 Dec 09 09:34:07 2009 bvio83_vios_config_bkp

 

$ tar -xvf bvio83_vios_config_bkp.tar

x bvio83_vios_config_bkp, 23021 bytes, 45 media blocks.

 

$ vim bvio83_vios_config_bkp

 

<vios-backup>

       <general>

               <xml-version>1.0</xml-version>

               <xml-ch-date>0</xml-ch-date>

               <backUpDate>2009-12-09</backUpDate>

               <backUpTime>09:34:03</backUpTime>

               <backUpPrPID>389216</backUpPrPID>

               <aix-level>6.1.4.0</aix-level>

               <vios-level>2.1.2.10-FP-22</vios-level>

               <code-list>

                        src/bos/usr/ccs/lib/libc/__threads_init.c

                        src/rspc/usr/lib/methods/virtualcfg/virtualcfg.c

                       src/rspc/usr/lib/methods/virtualcfg/backup.c

                        src/rspc/usr/lib/methods/virtualcfg/backup_restore_utils.c

                        src/rspc/usr/lib/methods/virtualcfg/hash_utils.c

                        src/rspc/usr/lib/methods/virtualcfg/xml_writer.c

                        src/rspc/usr/lib/methods/virtualcfg/xml_utils.c

                        src/rspc/usr/lib/methods/virtualcfg/view.c

                        src/rspc/usr/lib/methods/virtualcfg/saxParser_utils.c

                       src/rspc/usr/lib/methods/virtualcfg/restore.c

                        src/rspc/usr/lib/methods/virtualcfg/restore_utils.c

                        src/rspc/usr/lib/methods/cfg_vt_common/cfg_vtdev_common.c

               </code-list>

       </general>

       <controller>

               <name>lhea0</name>

               <state>AVAILABLE</state>

               <locCode>U78A5.001.WIH074C-P1</locCode>

               <unique_type>adapter/chrp/IBM,lhea</unique_type>

               <type>LHEA</type>

      </controller>

       <controller>

               <name>ent0</name>

               <state>AVAILABLE</state>

               <locCode>U78A5.001.WIH074C-P1-T6</locCode>

               <unique_type>adapter/IBM,lhea/ethernet</unique_type>

               <type>LPHEA</type>

       </controller>

       <controller>

               <name>ent1</name>

               <state>AVAILABLE</state>

               <locCode>U78A5.001.WIH074C-P1-T7</locCode>

               <unique_type>adapter/IBM,lhea/ethernet</unique_type>

               <type>LPHEA</type>

       </controller>

....

 

The –view flag allowed me to view the configuration information stored in the backup file.

 

$ viosbr -view -file /tmp/bvio83_vios_config_bkp.tar.gz

 

Controllers:

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

Name                Phys Loc

----               --------

iscsi0

sissas0             U78A5.001.WIH074C-P1-T5

pager0             U7998.61X.10071FA-V1-C7-L0-L0

vasi0               U7998.61X.10071FA-V1-C7

usbhc0             U78A5.001.WIH074C-P1

usbhc1             U78A5.001.WIH074C-P1

vbsd0               U7998.61X.10071FA-V1-C7-L0

usbhc2             U78A5.001.WIH074C-P1

sata0               U78A5.001.WIH074C-P1-T5

lhea0               U78A5.001.WIH074C-P1

ibmvmc0             U7998.61X.10071FA-V1-C2

ati0                U78A5.001.WIH074C-P1-C5-T1

fcs0               U78A5.001.WIH074C-P1-C6-T1

fcs1               U78A5.001.WIH074C-P1-C6-T2

vts0               U7998.61X.10071FA-V1-C10

fscsi0             U78A5.001.WIH074C-P1-C6-T1

ent0               U78A5.001.WIH074C-P1-T6

fscsi1             U78A5.001.WIH074C-P1-C6-T2

ent1               U78A5.001.WIH074C-P1-T7

ent2               U7998.61X.10071FA-V1-C3-T1

ent3               U7998.61X.10071FA-V1-C4-T1

ent4               U7998.61X.10071FA-V1-C5-T1

ent5               U7998.61X.10071FA-V1-C6-T1

sas0               U78A5.001.WIH074C-P1-T5

 

Physical Volumes:

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

Name               Phys Loc

----               --------

hdisk0             U78A5.001.WIH074C-P1-D1

hdisk1             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000402D00000000

hdisk2             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000404B00000000

hdisk3             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4001404B00000000

hdisk4             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4001404C00000000

hdisk5             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000408000000000

hdisk6             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4001408000000000

 

Optical Devices:

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

Name               Phys Loc

----               --------

cd0

 

Tape Devices:

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

Name               Phys Loc

----               --------

 

Ethernet Interfaces:

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

Name

----

en0

en1

en2

en3

en4

en5

en6

 

Storage Pools:

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

SP Name                      PV Name

-------                       -------

rootvg                        hdisk0

 

 

Shared Ethernet Adapters:

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

Name               Physical Adapter   Default Adapter     Virtual Adapters

----               ----------------   ---------------     ----------------

ent6               ent0               ent2               ent2

 

 

Virtual Server Adapters:

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

SVSA               Phys Loc                      VTD

----               --------                    ---

vhost0             U7998.61X.10071FA-V1-C11      vtscsi2

                                                  vtscsi1

                                                  vtscsi0

 

 

The –mapping flag provided me with VTD and SEA mappings (same as lsmap –all and lsmap –all –net)

 

$ viosbr -view -file /tmp/bvio83_vios_config_bkp.tar.gz -mapping

SVSA               Physloc                            Client Partition ID

------------------- ---------------------------------- --------------------

vhost0             U7998.61X.10071FA-V1-C11           0x00000003

 

VTD                      vtscsi0

Status                   Available

LUN                      0x8200000000000000

Backing Device           hdisk1

Physloc                  U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000402D00000000

 

SVSA               Physloc                            Client Partition ID

------------------- ---------------------------------- --------------------

vhost0             U7998.61X.10071FA-V1-C11           0x00000003

 

VTD                      vtscsi1

Status                   Available

LUN                      0x8400000000000000

Backing Device           hdisk2

Physloc                  U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000404B00000000

 

SVSA               Physloc                            Client Partition ID

------------------- ---------------------------------- --------------------

vhost0             U7998.61X.10071FA-V1-C11           0x00000003

 

VTD                      vtscsi2

Status                   Available

LUN                      0x8100000000000000

Backing Device           hdisk5

Physloc                  U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000408000000000

 

SVEA   Physloc

------- ---------------------------------------

ent2   U7998.61X.10071FA-V1-C3-T1

 

VTD                      ent6

Status                   Available

Backing Device           ent0

Physloc                  U78A5.001.WIH074C-P1-T6

 

The –detail flag provided extended configuration information.

 

$ viosbr -view -file /tmp/bvio83_vios_config_bkp.tar.gz -detail

 

Controllers:

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

Name               Phys Loc

----               --------

iscsi0

Attribute Name     Attribute Value

--------------     ---------------

initiator_name     iqn.bvio83.hostid.0a03496c

 

sissas0             U78A5.001.WIH074C-P1-T5

Attribute Name     Attribute Value

--------------     ---------------

bus_io_addr         0x80000000

intr_lsi           289

dual_init_cfg       default

serial_number       YL3000000001

 

pager0             U7998.61X.10071FA-V1-C7-L0-L0

vasi0               U7998.61X.10071FA-V1-C7

usbhc0             U78A5.001.WIH074C-P1

..etc..

 

 

The –type flag allows you to select details for a particular type of device for example, just SEA configuration information.

 

$ viosbr -view -file /tmp/bvio83_vios_config_bkp.tar.gz -type sea

 

Shared Ethernet Adapters:

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

Name               Physical Adapter   Default Adapter     Virtual Adapters

----               ----------------   ---------------     ----------------

ent6               ent0               ent2                ent2

 

 

 

 

$ viosbr -view -file /tmp/bvio83_vios_config_bkp.tar.gz -type svsa

 

Virtual Server Adapters:

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

SVSA               Phys Loc                      VTD

----               --------                     ---

vhost0             U7998.61X.10071FA-V1-C11      vtscsi2

                                                  vtscsi1

                                                  vtscsi0

Listing PV only information.

 

$ viosbr -view -file /tmp/bvio83_vios_config_bkp.tar.gz -type pv

 

Physical Volumes:

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

Name               Phys Loc

----               --------

hdisk0             U78A5.001.WIH074C-P1-D1

hdisk1             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000402D00000000

hdisk2             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000404B00000000

hdisk3             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4001404B00000000

hdisk4             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4001404C00000000

hdisk5             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4000408000000000

hdisk6             U78A5.001.WIH074C-P1-C6-T1-W500507630608059A-L4001408000000000

 

 

The –restore and –validate flags validate the devices on the server against the devices in the backup file.

 

$ viosbr -restore -file bvio83_vios_config_bkp.tar.gz -validate

Dev name during BACKUP                  Is Valid?     Is Deployable?

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

iscsi0                                  YES          NO

sissas0                                 YES           NO

pager0                                  YES           NO

vasi0                                   YES           NO

usbhc0                                  YES           NO

usbhc1                                  YES            NO

vbsd0                                   YES           NO

usbhc2                                  YES           NO

sata0                                   YES           NO

lhea0                                   YES           NO

ibmvmc0                                 YES           NO

ati0                                    YES           NO

fcs0                                    YES           NO

fcs1                                    YES           NO

vts0                                    YES            NO

fscsi0                                  YES           NO

ent0                                    YES           NO

fscsi1                                  YES           NO

ent1                                    YES            NO

ent2                                    YES           NO

ent3                                    YES           NO

ent4                                    YES           NO

ent5                                    YES           NO

sas0                                    YES           NO

hdisk0                                  YES           NO

hdisk1                                  YES           NO

hdisk2                                  YES           NO

hdisk3                                  YES            NO

hdisk4                                  YES           NO

hdisk5                                  YES           NO

hdisk6                                  YES           NO

en6                                     YES          NO

ent6                                    YES           NO

rootvg                                  YES           NO

vhost0                                  YES           YES

 

This tool looks like a great way to backup and restore your VIOS configuration.

 

Of  course backupios will also do this but it will take an image of the entire system not just the virtual and logical mappings.

 

Maybe we could automate the configuration of a VIOS using this tool.

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Unlock User ID in IBM AIX
Viewed 14603 times since Mon, May 28, 2018
Changing Ethernet Media Speed for AIX
Viewed 3090 times since Tue, Apr 16, 2019
How To Mirror VG and Root VG
Viewed 2823 times since Mon, May 21, 2018
A Change to the SMT Mode Default in POWER9
Viewed 4927 times since Fri, Jan 18, 2019
Trick to Purge/Clean Swap Usage on AIX
Viewed 7274 times since Thu, Nov 29, 2018
How to check VLAN ID number on AIX?
Viewed 12461 times since Mon, May 28, 2018
AIX How to Investigate a System Reboot
Viewed 6099 times since Tue, Aug 14, 2018
The new VIOS performance advisor tool part util
Viewed 2987 times since Tue, Jun 4, 2019
Install and configure yum on AIX
Viewed 4303 times since Thu, Feb 21, 2019
AIX Creating a Volume Group
Viewed 2304 times since Tue, Jul 17, 2018