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.

Monday, October 25, 2010

Oracle VM Agent

When you install a Oracle VM server this is only a single part of your infrastructure. You can potentially run only the Oracle VM server however if you want to make use of the options provided by a central Oracle VM Manager you will have to make sure that your Oracle VM server will be able to communicate with this centralized server.

The mechanism to do this is a Oracle VM Agent which runs on the Oracle VM server and will make sure that you can control this from your central Oracle Management Server. During the installation of the Oracle VM Server you can set the password for your Oracle VM Agent. (see below)

If you want to control your VM agent after installing it you can make use of the ovs-agent command. This can be found as a script in /etc/init.d or you can make use of the "service ovs-agent" option.

Besides the standard things you might expect from a script in /etc/init.d like stop, start, restart and status you also have the option configure. when you use the configure option you can reconfigure things like your VM agent password, IP configuration and such. A example can be seen below:

[root@vms0 init.d]# ./ovs-agent configure
;network access control by ip --
;rules := if addr.match(allow) and not addr.match(deny): return True
;pattern items delimited by comma and could be
; #single ip
;219.142.73.* #range
; #range in CIDR format
;default to allow all, deny none
now allow=*

now deny=

;share_disk_pat --
;set the directories for searching sharable block devices
;directories should be seperated by ':'
;if not set, /dev/mpath/* will be used
now share_disk_pat=/dev/mpath/*

now disk.sparse.ratio=0.25

would you like to modify password to communicate with agent (local)?[y/N]

OVS Agent configuration done.

Tell agent to reload cache ...
Agent cache reloaded.
[root@vms0 init.d]#

when you use the option status you can see what is running when you use ovs-agent

[root@vms0 init.d]# ./ovs-agent status
ok! process OVSLogServer exists.
ok! process OVSMonitorServer exists.
ok! process OVSAgentServer exists.
ok! process OVSPolicyServer exists.
ok! process OVSRemasterServer exists.
ok! OVSAgentServer is alive.
[root@vms0 init.d]#

Oracle VM and SATA

I recently picked up again on Oracle VM. Some years ago I have been working on Oracle VM and now a new project is coming up which will involve a lot of virtualization with Oracle VM.

Due to the fact I would love to play with it at home I purchased some new hardware to build my own Oracle VM instance. Issue is that Oracle VM is build for high end enterprise solutions and the drivers which are compiled into the kernel do contain almost only high end enterprise drivers. As it turns out the SATA drivers for my Asus board where not included.

The issue arrises when you try to install the Oracle VM server. The moment you need to select a media to install the Oracle VM on the installer is not showing you your SATA disks. The solution was quite simple, at least on my mainboard which is a ASUS P7P55D-E. When you enter the BIOS you set your SATA disks on AHCI instead of SATA (or RAID). After you set this and reboot the machine the Oracle VM installer will be able to find your drives. Reason for this is that AHCI drivers are in the main kernel of Oracle VM server (version 2.2.1).

The Advanced Host Controller Interface (AHCI) is a host controller interface defined by Intel which defines the operation of Serial ATA (SATA) host bus adapters in a non-implementation-specific manner. The specification describes a system memory structure for computer hardware vendors to exchange data between host system memory and attached storage devices. As of June 2008[update], the current version of the specification is v. 1.3. AHCI gives software developers and hardware designers a standard method for detecting, configuring, and programming SATA/AHCI adapters. AHCI is separate from the SATA 3Gb/s standard, although it exposes SATA's advanced capabilities (such as hot-plugging and native command queuing) such that host systems can utilize them.