Virtual

nPartitions (Node Partition)

Node partitioning is a hardware partitioning technique which is used to divide a cell based server into several small computer called node partitions. Each nPar can then be used as a separate, independent, standalone server running HP-UX OE instances wit its own dedicated processors, memory and I/O chassis. Depending on the hardware model, a server complex may be divided into as many electrically separated nPars as the total number of cell boards in the complex.

Genesis Partition
The very first partition created in a server complex is referred to as the Genesis partition. It is a single cell partition built via MP. Once created, you can load HP-UX into it.

To create Genesis partition, go to MP --> CM --> CC and choose option G. Pick a cell that contain processors and memory and is connected to an I/O chassis with a core I/O card installed. When created, use the bo MP command to boot the nPar.

Partition can be created using SMH also.

 http://IPaddress:2301/parmgr
 or SMH --> Tools --> partition Management

If the above ip address belongs to another physical system which is not in the target partition, you will be given an option to manage the partitions using the MP LAN port of the target system.

parcreate and parmodify commands are used to create partition and modify the partition properties respectively.
parremove command is used to remove an nPar
cplxmodify modify an attribute of a system complex

To modify the Name of complex from default "Complex 01" to "Prod DB Server"

 # /usr/sbin/cplxmodify -N "Prod DB Server"

parstatus

 -A Only display the available resources in the complex
 -B Show information for all cabinets in the complex
 -b cabinet Show information about the specified cabinet
 -C Show information for all cells in the complex
 -c cell Show information about the specified cell. Cell name is 
    given as cab#/Cell# eg. 0/2
 -I Show information for all I/O chassis in the complex
 -i I/Ochassis Show information about the specified I/Ochassis
 -P Show information for all partitions in the complex
 -p parnumber Show information about the specified partition
 -V verbose mode
 -w Display the local partition number in a full sentence
 -X Display the complex attributes
 -h IPaddress|hostname specifies the IP address or hostname of the target partition
 -u  username Specifies the required authorization to access a partition 
     other than the local partition. Used along with -h option
 -g Used along with -h option. If used, then access is through MP LAN port

To get the local partition number

 # parstatus -w
 The local partition number is 1.

To list all the partition in a system

# parstatus -P

[Partition]
Par              # of  # of I/O
Num Status       Cells Chassis  Core cell  Partition Name (first 30 chars)
=== ============ ===== ======== ========== ===============================
0   Active       1     1        cab0,cell0 test2
1   Active       1     1        cab0,cell1 test4 

To get detailed information about partition number 0

# parstatus -Vp0
[Partition]
Partition Number       : 0
Partition Name         : test2
Status                 : Active
IP Address             :
Primary Boot Path      : 0/0/0/2/0.0x6.0x0
Alternate Boot Path    :
HA Alternate Boot Path : 0/0/0/1/0
PDC Revision           : 9.48
IODCH Version          : N/A
Cell Architecture      : Itanium(R)-based
CPU Compatibility      : CDH-640
CPU Speed              : 1598 MHz
Core Cell              : cab0,cell0
Core Cell Choice [0]   : cab0,cell0
Total Good Memory Size : 64.0 GB
Total Interleave Memory: 64.0 GB
Total Requested CLM    : 0.0 GB
Total Allocated CLM    : 0.0 GB
GSM Sharing            : Disabled complex-wide
Hyperthreading Enabled : yes


[Cell]
                        CPU     Memory                                Use
                        OK/     (GB)                          Core    On
Hardware   Actual       Deconf/ OK/                           Cell    Next Par
Location   Usage        Max     Deconf    Connected To        Capable Boot Num
========== ============ ======= ========= =================== ======= ==== ===
cab0,cell0 Active Core  8/0/8   64.0/0.0  cab0,bay0,chassis0  yes     yes  0

Notes: * = Cell has no interleaved memory.


[Chassis]
                                 Core Connected  Par
Hardware Location   Usage        IO   To         Num
=================== ============ ==== ========== ===
cab0,bay0,chassis0  Active       yes  cab0,cell0 0 

parmodify

 -a cell:[celltype]:[use_on_next_boot]:[failure_usage][:clm_value]
 -m cell:[celltype]:[use_on_next_boot]:[failure_usage][:clm_value]
 -d cell 
 -B reboot the partition now

To change the partition name of partition 0

 # parmodify -p0 -P <new_name>

To add cell 2 to partition 0 (-B option reboots nPar and activates the cell)

 # parmodify -p0 -a2::y: -B
 # shutdown -Ry now (-R to reconfigure the partition after reboot) 

To delete an active cell 2 from partition 1

 # parmodify -p1 -d2 -B
 # shutdown -Ry now

To delete an in-active cell 2 from partition 1

 # parmodify -p1 -d2 (no need to reboot)

parremove
To delete a partition number "1"

 # parremove -p 1

Dynamic nPar

A cell can be defined as either Base Cell or Floating Cell. Any cell not specifically designated as a floating cell is a base cell. A base cell cannot be online deactivated

The system administrator designates a cell as a base cell or floating cell using the nPartition commands. Designation as a floating cell has two important implications. First, a floating cell can never contain any interleaved memory. 100% of the memory on a floating cell is cell local memory. Second, the operating system cannot place certain vital data elements in memory on floating cells. This precaution ensures that the operating system can continue to run at optimal performance if the floating cell is online deactivated.

The core cell for an nPartition is a base cell; therefore, every nPartition must contain at least one base cell. The system administrator might designate additional cells as base cells so that the operating system can have more memory in which to place its vital data elements.

A cell's designation as base or floating can be changed while the cell is active, however the change cannot take effect until the partition is rebooted. Similarly, the fraction of cell local memory on a base cell can be changed while the cell is active, but the change cannot take effect until the partition is rebooted.

parolrad (Partition Online Reconfigure Add Delete)
olrad (Online Reconfigure Add Delete)

To make cell 1 as floating from base cell

 # parmodify -p0 -m 1:floating:y::100%
 Warning: Changing the celltype of  cell from base to floating would change the CLM of the cell to 100%.
 Note: It may take a longer time for the partition to boot if 
 any cell is performing power-on selftest.

http://books.google.com/books?id=msUsnf423QkC&printsec=frontcover&source=gbs_summary_r&cad=0#PPT29,M2

Hp Integrity Virtual Machines

01. Prepare the system for VM. Run the following commands to tune the kernel parameters of VM host system. Otherwise, VM may not start

 kctune base_pagesize=64
 kctune filecache_max=1%
 kctune filecache_min=1%
 /usr/sbin/setboot -m off

02. Create new virtual machine. The command and format of the command is as follows

 hpvmcreate -P <virtual system name> -c <# of virtual CPUS> -e <CPU Entitlement> -r <Memeory amount?

 # hpvmcreate -P test01 -c 4 -e 20 -r 4G
 # hpvmstatus
 [Virtual Machines]
 Virtual Machine Name VM #  OS Type State     #VCPUs #Devs #Nets Memory  Runsysid
         
 ignite                   1 UNKNOWN Off            4     0     0    4 GB        0 

03. Use the hpvmmodify command to modify the VM properties as required

 # hpvmmodify -P ignite -O hpux
 # hpvmstatus
 [Virtual Machines]
 Virtual Machine Name VM #  OS Type State     #VCPUs #Devs #Nets Memory  Runsysid
         
 ignite                   1 HPUX    Off            4     0     0    4 GB        0

04. Create Virtaul Switch

 hpvmnet -c -S <switch name> -n nic-id
  • -c indicates the creation of a vswitch.
  • -S vswitch-name specifies the name of the vswitch.
  • -n nic-id specifies the network interface on the VM Host that the new vswitch will use.
       For example, —n 0 indicates lan0.

 # hpvmnet -c -S backup -n 0
 # hpvmnet -c -S sap -n 3
 # hpvmnet
 Name     Number State   Mode      NamePPA  MAC Address    IPv4 Address
       
 localnet      1 Up      Shared             N/A            N/A
 backup        2 Down    Shared    lan0                    216.226.174.88
 sap           3 Down    Shared    lan3                    192.168.248.34

05. To start the switch

 # hpvmnet -S backup -b
 # hpvmnet -S sap -b
 # hpvmnet
 Name     Number State   Mode      NamePPA  MAC Address    IPv4 Address
       
 localnet      1 Up      Shared             N/A            N/A
 backup        2 Up      Shared    lan0     0x001a4b097f9a 216.226.174.88
 sap           3 Up      Shared    lan3     0x001a4b096829 192.168.248.34

06. Add the Virtual NIC

 hpvmmodify -a network:avio_lan|lan:vsiwtch:vswitch_name
 # hpvmmodify -P ignite -a network:avio_lan::vswitch:sap
 # hpvmmodify -P ignite -a network:avio_lan::vswitch:backup

07. Add virtual storage

 hpvmmodify -P <Vm_Name> -a <disk|tape|dvd|burner>:scsi|avio_stor:HW_Address:<disk|lv|file>:device_name

To Add physical disks as disks to to VM

 # hpvmmodify -P ignite -a disk:avio_stor::disk:/dev/rdisk/disk10
 # hpvmmodify -P ignite -a disk:avio_stor::disk:/dev/rdisk/disk11
 # hpvmmodify -P ignite -a disk:avio_stor::disk:/dev/rdisk/disk12

To add a LV as disk to VM

 # hpvmmodify -P ignite -a disk:avio_stor::lv:/dev/vg00/rroot_ignite

08. To view the detailed status of Virtual machine

# hpvmstatus -v -P ignite
Version B.04.10.00
[Virtual Machine Details]
Virtual Machine Name VM #  OS Type State
==================== ===== ======= ========
ignite                   1 HPUX    Off

[Authorized Administrators]
Oper Groups             :
Admin Groups            :
Oper Users              :
Admin Users             :

[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
     4       40.0%  100.0%

[Memory Details]
Total    Reserved
Memory   Memory
=======  ========
   4 GB     64 MB

[Storage Interface Details]
Guest                                 Physical
Device  Adaptor    Bus Dev Ftn Tgt Lun Storage   Device
======= ========== === === === === === ========= =========================
disk    avio_stor    0   2   0   0   0 disk      /dev/rdisk/disk10
disk    avio_stor    0   2   0   1   0 disk      /dev/rdisk/disk11
disk    avio_stor    0   2   0   2   0 disk      /dev/rdisk/disk12

[Network Interface Details]
Interface Adaptor    Name/Num   PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch   avio_lan   backup     1         0   0   0 2e-53-f2-50-2f-64
vswitch   avio_lan   sap        1         0   1   0 7e-dc-36-f8-61-c5

[Misc Interface Details]
Guest                                 Physical
Device  Adaptor    Bus Dev Ftn Tgt Lun Storage   Device
======= ========== === === === === === ========= =========================
serial  com1                           tty       console 

09. To start the VM

 # hpvmstart -P ignite
 # hpvmstatus
 [Virtual Machines]
 Virtual Machine Name VM #  OS Type State     #VCPUs #Devs #Nets Memory  Runsysid
         
 ignite                   1 HPUX    On (EFI)       4     3     2    4 GB        0

10. Connect to VM console

 # hpvmconsole -P ignite


    vMP MAIN MENU

          CO: Console
          CM: Command Menu
          CL: Console Log
          SL: Show Event Logs
          VM: Virtual Machine Menu
          HE: Main Help Menu
           X: Exit Connection

11. After OS is installed on the VM, make sure to install the HPVM-Guest software. This software is included in /opt/hpvm/guest-images/hpux/11iv3 directory of guest system.

 # swinstall -x autoreboot=true \
   -s /opt/hpvm/guest-images/hpux/11iv3/hpvm_guest_depot.11iv3.sd HPVM-Guest

Virtual Machine Tasks

Virtual Switch

 hpvmnet 
        -S switch Name
        -s switch number
        -c creates a new switch
        -d deletes an existing switch
        -b start the switch
        -h halt the switch
        -r reboot the swich
        -n nic_id Designates the network interface on the VM Host
        -C changes the specified VM Switch
        -N New_VS_Name

To change the Virtual swith testswitch to use lan900 interface

 # hpvmnet -C -S testswitch  -n 900

hpvmmodify

To delete a virtual Lan adapter from test1 system

 # hpvmmodify -P test1 -d network:avio_lan::vswitch:sap

Dynamic Memory

 # hpvmmodify -P test1 -r 24G -x ram_dyn_type=any -x ram_dyn_min=4G -x ram_dyn_max=24G 
-x ram_dyn_target_start=16G

The above This command specifies the following values:

  • The virtual machine memory size is set to 24 GB.
  • Dynamic memory is enabled using any dynamic memory support available.
  • The minimum amount of memory that the virtual machine can be reduced to is 4GB.
  • The maximum amount of memory that the virtual machine can be increased to is 24GB.
  • The memory size to reduce to after it boots is 16 GB. When the guest starts, it initially has access to the guest memory size (specified by the -r option), then the dynamic memory driver reduces the memory to the value of the ram_dyn_target_start parameter.

To dynamically increase the memory to 20GB for test1 system

 # hpvmmodify -P test1 -x ram_target=20G

To view the Dynamic memory status

 # hpvmstatus -P test1 -V
 .
 .
 .
  [Dynamic Memory Information]
 Type                    : driver
 Minimum memory          : 4096 MB
 Target memory           : 12346 MB
 Maximum memory          : 16378 MB
 Current memory          : 12346 MB
 Comfortable minimum     : 5498 MB
 Boot memory             : 16378 MB
 Free memory             : 8825 MB
 Available memory        : 359 MB
 Memory pressure         : 0
 Memory chunksize        : 65536 KB
 Driver Mode(s)          : STARTED ENABLED
 . 
 .

To remove a virutual machine from system

 # hpvmremove -P test3
 hpvmremove: Remove the virtual machine 'test3'? [n/y]: y

Resource Partitions

Resource Partitions are created from HP Process resource manager and allow resources for specific applications within a single operating systems. This is also a resource management tool which allows one to manage CPU, memory and disk bandwidth. It allows minimum allocations of CPUs and even allows one to cap a CPU by group. In many ways this is similar to a Solaris containers or AIX WPARs in that it allows one to have several applications reside in one copy of HP-UX. This feature has been available since HP-UX 9.0.