Friday, October 29, 2010

hpvmmodify dynamic_memory_control

Currently one of the system under my maintenance is a HPUX system running two virtual machines on top of the host HPUX system. The system is currently in use a project environment and a sandbox. Due to a setup request for a Oracle product we needed to switch some of the memory from one virtual machine to the other virtual machine. Due to the fact that HPUX is not our core expertise some investigation was needed before this trick was done. Please find some pointers below to administer the memory of HPUX virtual machines.

Under /opt/hpvm/bin you can find some tools which can be used to administer your virtual machines. The first thing you most likely will be using when you are for the first time on a system and want to check the HPUX vm's is the hpvmstatus command. This will display the status information about one or more virtual machines. The below example is the hpvmstatus command used on my machine.


rx90135:root-/opt/hpvm/bin # hpvmstatus
[Virtual Machines]
Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid
==================== ===== ======= ========= ====== ===== ===== ======= ========
vm-db 1 HPUX On (OS) 4 2 2 4 GB 0
vm-ap1 2 HPUX On (OS) 4 3 2 6 GB 0

This shows you the current virtual machines and what has been allocated to them. In our case the vm-db has 4GB memory and the vm-ap has 6GB memory. For our new setup we needed to switch those. This can be done in basic with the following commands:


hpvmmodify -P vm-db -r 6g -x dynamic_memory_control=1
hpvmmodify -P vm-ap1 -r 4g -x dynamic_memory_control=1


Some other things are their to be noted. For example did you install the guest additions. You can check this on the clients (virtual machines) with the swlist command as shown below:


hpvm13:root-/ # swlist HPVM-Guest
# Initializing...
# Contacting target "hpvm13"...
#
# Target: hpvm13:/
#

# HPVM-Guest A.03.00.01 Integrity VM Guest
HPVM-Guest.vmTools A.03.00.01 Integrity VM Tools
hpvm13:root-/ #


A great blogpost on HPVM memory is the website from Juan Manuel. If you start working with this technology this is a mus read weblog.

No comments: