0% found this document useful (0 votes)
1K views6 pages

HPVM Cook Book

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 6

# vparmodify -p vpar2 -o "-lq"

7. Restting a vPar
# vparreset -p vpar1 [-h | -t] [-q] [-f]

Install vPar
1. Install via DVD Assign an LBA with a DVD attached to the vPar.
MON> vparload -p vpar2 -D 0

HPVM
Requirements on Host 50MB free space in /opt Swap: phisical memory size + 4GB 4.7 MB for each guest CPU number of and amount
hpvmcreate ... -e percent:max_persent

Memory overhead +/-7% Boot device of VM Host as restricted Commands /opt/hpvm/bin Logfile /var/opt/hpvm/common/hpvm_mon_log Kernel parameter: base_pagesize filecache_max 1% filecache_min 1% maxdsit_64bit
vmhost nproc PIDvm1 PIDvm2 . . PIDvmn | mvguest | | | vm1 | nproc | vm2 | nproc | vm3 | nproc

HPVM cookbook
1. Check configuration
# # # # # print_manifest lvlnboot -v lanscan swapinfo kctune

2. Prerequisits Disable multithreading


# /usr/sbin/setboot -m off # reboot

Check the device management


# hpvmdevmgmt -l all # hpvmdevmgmt -d rdev:/dev/vx/rdsk/rootdg/vm1vol # hpvmdevmgmt -l rdev

3. Start hpvm manually


# /sbin/init.d/hpvm start

4. Create a virtual switch


# hpvmnet -c -S vswlan1 -n 1 # hpvmnet -b -S vswlan1

5. Create the hpvm


# hpvmcreate -P -O -a -e -E -r -c (name)\ (ostype)\ (resource/device)\ (CPU entitlement in %)\ (CPU entitlement in clock cycles)\ (memory allocation in MB or GB; default: 2GB)\ (#cpus; default: 1)

Example:
# vpvmcreate -P vm1 -e 20 -r 3G

6. Check the status


# hpvmstatus

7. Add a viratual device


# hpvmmodify -P (vmname) -a device_type:adapter_type:args:device_type:name [ virtual (guest view) | physical (host device) ]

Example:
# hpvmmodify -P vm1 -a disk:scsi::lv:/dev/vg01/rvol1 ^ could be hw path # hpvmmodify -P vm1 -a network:lan::vswitch:vswlan1 ^ could be bus.device.mac_address ex.: ,,aa-aa-aa-10-01-92

8. Display network device (with guest mac address)


# hpvmstatus -VP vm1 ... Mac Address

: aa-aa-aa-10-01-92

9. Add virtual storage


# hpvmdevmgmt -S 10G /vmdisks/vm1_1 # hpvmmodify -P vm1 -a disk:scsi::file:/vmdisks/vm1_1

10. Add a virtual disk


# lvcreate -L 4000 -n vm2vol /dev/vgvmdisks # hpvmmodify -P vm1 -a disk:scsi::lv:/dev/vgvmdisks/rvm2vol

11. Start the virtual machine


# hpvmstart -P vm1 [-s] (-s: sanity check first) --> vMP> pc -on

12. Goto the console of the vm1


# hpvmconsole -P vm1 [-c 'command']

13. Provide access to Vm console


# useradd -s /opt/hpvm/bin/hpvmconsole \ -r no -d /var/opt/hpvm/guests/vm1 vm1oper # passwd vm1oper # hpvmmodify -P vm1 -u vm1oper:oper # hpvmmodify -P vm1 -u vm1admins:admin

14. Network installation


Shell> lanboot select

15. Set Start_Attr of the VM to auto to start the VM automatically on a server reboot
# hpvmmodify -P RHEL -B auto

Install a HPVM
1. Get information about the created HPVMs
# hpvmstatus -V [P vm1] | pg

2.

# cd /var/opt/hpvm # cd guests # ls -l # ... vm1 -> /var/opt/hpvm... # cd vm1 # pg vmm_config.current # pg log # cd console # pg ocnslog # cd ../..hpvmnet # cd vswlan1 # pg hpvmnet_config name = vswlan1 nic = 1 # cd ../common # pg command.log (history of hpvm commands) # cd ../ISO-images (iso images of the os i'd like to install) # cd /opt/hpvm # cd bin (hpvm commands)

3. View the prozesses of hpvm


# ps -ef | grep vm ... hpvmnetd hpvmmonlogd vm_fssagt -n 5 (faire share scheduler agent: DO NOT KILL!) hpvmapp -d vm1 (PID for vm1) hpvmapp -d vm2 (PID for vm2) ...

4. Get information about the vm from the OS on the vm itself


# hpvmconsole -P vm1 MP> CO # ioscan # lanscan # ifconfig lan3

5. Managing virtual dvd devices


# hpvmmodify -P vm1 ... -a dvd:scsi::disk:/dev/rdisk/disk# -a dvd:scsi::file:/vmiso/image1.iso -m dvd:scsi::file:/vmiso/image2.iso vMP> insert vMP> eject

6. Install the vm from LAN


# hpvmconsole -P vm2 Shell> lanboot select Select Desired LAN: 01

7. Install the vm from dvd.iso


# hpvmmodify -P vm2 -a dvd:scsi::file:/var/DVD/B.11.23.iso # hpvmconsole -P vm2 Shell> mar -r Shell> fs0: fs:\> install

8. AVIO disk device creation


# hpvmmodify -P vm2 \ -a disk:avio_stor::disk:/dev/rdisk/disk#

9. AVIO network device creation

# hpvmmodify -P vm2 \ -a disk:avio_lan::vswitch:vswB

10. Allow guest to extend its memory dynamically


# hpvmmodify -P vm1 -r 6G \ -x dynamic_memory_control=1 \ -x ram_dyn_min=1222M \ -x ram_dyn_max=6G \ -x ram_dyn_target_start=2G \ -x ram_dyn_type={any|driver} # hpvmmgmt -l ram -V # hpvmmgmt -x ram_target={0|amaount|start} (0: vm sets the value so that it does not need to page)

Set a volume as a shared volume between multiple hpvms


1. Add the disk to one of the hpvms
# hpvmmodify -P vm1 -a disk:scsi::lv:/dev/vg00/rlvlock

2. Review the current state of the device


# hpvmdevmgmt -l all

3. Set the SHARE attribute to YES


# hpvmdevmgmt -m gdev:/dev/vg00/rlvlock:attr:SHARE=YES

Migrate a HPVM

Prerequisits
On the source host and the target host HPVM >= 4.1 must be installed Both servers must have access to the OS disk (as shown in the picture above) On both hosts execute the secsetup tool
# secsetup <otherhostname>

Migrate it
1. Prepare the hpvm on the target site along the prerequisits 2. Migrate the vm
# hpvmmigrate -o -P <hpvmName> -h <targetHostName>

hpvmmigrate: Connected to target host using 'targetHotname' hpvmmigrate: Starting guest 'myvm' on target host 'targetHostname' (C) Copyright 2000 - 2009 Hewlett-Packard Development Company, L.P. Opening minor device and creating guest machine container Creation of VM, minor device 1 Initialize guest memory mapping tables Starting event polling thread Online migration initiated by source 'sourceHostname' (ip-address) hpvmmigrate: hpvmmigrate: hpvmmigrate: hpvmmigrate: hpvmmigrate: Init phase completed successfully. Copy phase completed successfully. I/O quiesce phase completed successfully. Frozen phase completed successfully. Guest migrated successfully.

You might also like