HPVM Cheat Sheet

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4
At a glance
Powered by AI
The document discusses commands for managing HP-UX virtual machines including creating, starting, stopping, checking status of VMs as well as modifying and removing VMs.

To start a VM, use the hpvmstart command and to stop use hpvmstop or shutdown commands. Forced shutdown is not recommended.

You can check the status of VMs using hpvmstatus and resources using hpvmstatus -s. hpvmstatus -D shows deferred memory assignments.

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)

3) How to identify Identify Host or Guest using hpvminfo command?

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
# 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>
e. Reboot system (on guest)
# 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.
HPVM Commands:

hpvmcreate : Create a new virtual machine


hpvmremove: Remove a virtual machine
hpvmstart: Boot a virtual machine
hpvmstop: Stop a virtual machine
hpvmconsole: Connect to the console of a virtual machine
hpvmstatus: Display information about one or more virtual machines
hpvmmodify: Modify the attributes of a virtual machine
hpvmnet: Create and control an Integrity Virtual Machines virtual
network switch (vswitch)
hpvmdevmgtm: Manage the devices that are associated with the VM host and
the guests
hpvmclone: Create a VM that is copy of an existing VM
hpvmmigrate (*): Migrate a VM to a different host
hpvmcollect: Collect crash dumps, logs, system status, and configuration on
the VM host or guests for analysis
hpvminfo: Display information about VM environment

You might also like