HP-UX virtual Machine Cheat Sheet
HP VM Cheat Sheet
1) How to Start HP VM?
On a host
a)
# vi /etc/rc.config.d/hpvmconf
# Set to 1 (0) to enable (disable) Integrity VM at boot time.
HPVM_ENABLE=1
# /sbin/init.d/hpvm start
Note: When host is rebooted it will start all the guest by default
b) Starting HPVM on the guest
# hpvmstart –P guestname
2) How to Stop HP VM?
# shutdown –hy 0 (gracefully shutdown, from guest OS)
# hpvmstop -P guestname ( forced shutdown from host – not recommended)Examples: Using hpviminfo on a host
hpvminfo (-v, -V)(on host)
# hpvminfo
hpvminfo: Running on an HPVM host.
# hpvminfo -v
Version B.04.10.00
hpvminfo: Running on an HPVM host.
#hpvminfo -V
hpvminfo: Running on an HPVM host.
# model
ia64 hp server XXXX
Example: Using hpviminfo on a Guest
# model
ia64 hp server Integrity Virtual Machine
# hpvminfo (On guest OS)
hpvminfo: Running inside an HPVM guest.
# hpvminfo -v
Version B.04.10.0
hpvminfo: Running inside an HPVM guest.
#hpvminfo -V
hpvminfo: Running inside an HPVM guest.configured guest name: guest_hostname
Host chassis information
Host model string : ia64 hp server xxxxx
Host serial number :xxxxxxxxxxxxxxxxxxxx
Host partition ident : xxxxxxxxxxxxxxxxxxxxxxx
Host machine ident : bxxxxxxxxxxxx
Host physical serial number :xxxxxxxxxxx
Host physical ident : xxxxxxxxxxxxxxxxx
Host Inet information
Hostname : hostname.x.x.x
Number of host IPv6 Addresses : 0
Number of host IPv4 Addresses : 2
IP Address : X.X.X.X
IP Address : X.X.X.X
Host SCSI information
Timeout : 4000
C
4) How to connect to guest console?
# hpvmconsole –P guestname
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
[XXXXX] vMP> co
5) How to check status of VM's?
# hpvmstatus
6) How to create a VM?
# hpvmcreate -P (name)\
-O (ostype)\
-a (resource/device)\
-e (CPU entitlement in %)\
-E (CPU entitlement in clock cycles)\
-r (memory allocation in MB or GB; default: 2GB)\
-c (#cpus; default: 1)
7) How to check the device management
Procedures to add memory to an HPVM guest:
a. Display and note status of guests (on host)
# hpvmstatus
b. Display and note current available resources (on host)
# hpvmstatus -s
# hpvmdevmgmt -l all (List all entries)
# hpvmdevmgmt -d rdev:/dev/vx/rdsk/rootdg/test1vol ( to delete Restricted device)
# hpvmdevmgmt -l rdev (to check restricted devices)
8) How to add memory to an HPVM guest?
Procedures to add memory to an HPVM guest:
a. Display and note status of guests (on host)
# hpvmstatus
b. Display and note current available resources (on host)
# hpvmstatus -s
c. Change memory of guest (use below command on host)
# hpvmmodify -P <guest_name> -r <total_amout_of_memory_in_GB>
Example: hpvmmodify -P guesthostname -r 10G
Note: The command above will go in as deferred (pending).
d. Display deferred memory assignment (on host)
# hpvmstatus -D -P <guest_name>
# hpvmmodify -P <guest_name> -r <total_amout_of_memory_in_GB>
Example: hpvmmodify -P guesthostname -r 10G
Note: The command above will go in as deferred (pending).
d. Display deferred memory assignment (on host)
# hpvmstatus -D -P <guest_name>
e. Reboot system (on guest)
# shutdown -ry 0
f. Display and note status of guests to verify change (on host)
# hpvmstatus
# shutdown -ry 0
f. Display and note status of guests to verify change (on host)
# hpvmstatus
g. Display and note remaining resources to verify change (on host)
#hpvmstatus -s
9) How to remove a guest?
a)# shutdown -ry 0 (on guest)
b) # hpvmstatus (on host, check if all guests are "off" state"
c)# hpvremove -P guestname
hpvmremove: Remove the virtual machine 'guestname'? [n/y]: y
Confirm all retired guests are gone:
d) # hpvmstatus
hpvmstatus: No guests currently configured.
hpvmstatus: Unable to continue.
Comments
Post a Comment