Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Integrity Virtual Machines Version 4.0 Installation, Configuration, and Administration > Integrity VM Manpages

hpvmdevmgmt(1M)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

NAME

hpvmdevmgmt — Manage the devices that are associated with the VM Host and the guests.

SYNOPSIS

hpvmdevmgmt -a { server env |rdev gdev }:entry-name [-V]

hpvmdevmgmt -d { server env |rdev gdev }:entry-name [-V]

hpvmdevmgmt -d gdev : { all entry-name }:depend:dependent-name [-V]

hpvmdevmgmt -d { gdev|rdev }:/devpath:IGNOREWWID

hpvmdevmgmt -d { server env |rdev gdev }:entry-name:attr:attr-name [-V]

hpvmdevmgmt -m { server env |rdev gdev }:entry-name:attr:attr-name=attr-value [-V]

hpvmdevmgmt -m { gdev|rdev }:/devpath:IGNOREWWID={YES|NO}

hpvmdevmgmt -n {[gdev ] [rdev]}:oldentry-name:newentry-name0 [,newentry-name1] [-V]

hpvmdevmgmt -l { all |server env rdev gdev } [:entry-name] [-V]

hpvmdevmgmt -l { all |server env | rdev gdev }:depend:dependent-name [-V]

hpvmdevmgmt -l { all |server env | rdev gdev }:attr-name=attr-value [-V]

hpvmdevmgmt -I [-V]

hpvmdevmgmt -r > repair_script.h

hpvmdevmgmt -v

hpvmdevmgmt [-A] -S file-size file-name [-V]

DESCRIPTION

Manages entries in the Integrity VM device-management database, which tracks and validates guest-device usage, ensures that devices are only shared deliberately, and restricts guest access to devices used by the VM Host. Guest devices are added, modified, and removed from this database when you use Integrity VM commands, such as hpvmcreate, hpvmmodify, and hpvmclone. The hpvmdevmgmt command allows you to examine the database entries, alter specific device attributes, such as shared devices. You can also use the hpvmdevmgmt command to create database entries for restricted devices (to which guest access is prohibited) and for pre-extending files used as virtual devices.

The device management database contains four types of entries:

  • Restricted devices (rdev)

  • Guest devices (gdev)

  • Environmental entries (env)

  • VM Host devices (server)

A device management database entry contains a name or alias, attributes in the form attribute-name=value, a list of guest names and device entities that depend on the entry (called its dependents), and a unique identifier.

The Integrity VM device-management facility allows you to restrict devices and directories for exclusive use by the VM Host in two ways:

  • By specifying individual device, file, or directory paths:

    # hpvmdevmgmt -a rdev:/some-device # hpvmdevmgmt -a rdev:/some-file # hpvmdevmgmt -a rdev:/some-directory

    This method restricts the ability to later designate the specified device, file, or directory for use by a guest.

  • By specifying recursive directory paths:

    Restrict everything in and under a specified directory that is also in the same file system that the specified restricted directory is in. # hpvmdevmgmt -a rdev:/some-directory:attr:RECURSIVE=FS Restrict everything in and under a specified directory, even if sub-paths to the specified restricted directory contain mount points to other file systems. # hpvmdevmgmt -a rdev:/some-directory:attr:RECURSIVE=DIR

    This method restricts the ability to later designate anything in or hierarchically below the specified directory for use by a guest. Recursion can be specified as either limited to directories, files, and devices in the same file system as the restricted directory (RECURSIVE=FS), or as unlimited by the file system, applying to everything hierarchically below the restricted directory (RECURSIVE=DIR).

The RECURSIVE attribute can be specified only for restricted directories and can be disabled or removed entirely. Note the following:

Disable restricted directory recursion, but keep the RECURSIVE attribute. # hpvmdevmgmt -m rdev:/some-directory:attr:RECURSIVE=NONE Disable restricted directory recursion by removing the RECURSIVE attribute. # hpvmdevmgmt -d rdev:/some-directory:attr:RECURSIVE

The Integrity VM device-management facility automatically makes two directories, /etc/ and /stand, recursively restricted by file system when you run hpvmdevmgmt -I. This command is always run when Integrity VM is started with /sbin/init.d/hpvm start. To inhibit the automatic restriction of these directories, add one of the following lines to the /etc/rc.config.d/hpvmconf file:

HPVMRESDIRELIST="" HPVMRESDIRLIST=

To replace the default list of restricted directories, the HPVMRESDIRLIST parameter can be specified as follows:

HPVMRESDIRLIST="RECURSIVE={DIR|FS}:/dir1[,...]" HPVMRESDIRLIST=RECURSIVE={DIR|FS}:/dir1[,...]

If the device pathnames have changed for disk backing stores and have been assigned as guest devices, run the hpvmdevmgmt -r report and repair function to determine the new pathnames for those disks and have Integrity VM reassign them for you. This command generates a shell script that performs the reassignment using the hpvmdevmgmt -n command. See the examples, for syntax and usage.

If the report and repair function determines that more than one device path can be selected to replace an obsolete device path, you must manually edit the script to make the selection. The report and repair script might also suggest that you remove certain device entries with which it has found a problem from the device database. You must manually edit the script to enable all such removals. If the report and repair function finds errors, it might write warning and information messages to stderr. All repair-script output is written to stdout. If no errors are found, you do not need to manually edit the repair script in order for it to run.

The IGNOREWWID attribute allows you to set the WWID. The attribute value can be YES or NO. The following example sets the WWID to WWID_NULL and forces the Integrity VM device management utilities to ignore the WWID field and do no WWID field checking:

# hpvmdevmgmt -m gdev:/someguestdevice:attr:IGNOREWWID=YES
NOTE: HP recommends that you do not use IGNOREWWID=YES on a multipath device, or use it only on one path of a multipath device, because serious device or guest conflicts could arise.

Only superusers can execute the hpvmdevmgmt command.

A set of Integrity VM servers can be grouped into an Integrity VM multiserver environment, MSE. This grouping is required when a set of Integrity VM servers is also configured as a Serviceguard cluster. To set up an Integrity VM multiserver environment, use the hpvmdevmgmt command on each of the servers in the group to establish each server entry and the MSE group entry. The same set of hpvmdevmgmt commands can be run on each Integrity VM server in the group with the exception of the local server entry. In most cases, the local server entry is already present. If it is already present, use the hpvmdevmgmt -m command to add the attributes to the existing entry. If you attempt to add a new server entry, an error is issued advising you that an entry with the same name already exists.

NOTE: If the Serviceguard cluster is configured before establishing the MSE group, the Integrity VM servers form an MSE server group name by adding the prefix HPVM-SG- to the Serviceguard cluster name. This MSE group entry is automatically formed on each MSE server once the server entries are defined and guests are configured into Serviceguard packages.

When the HPVM_MSE_GROUP_ENTRY is made automatically, it receives a required UUID attribute. This UUID attribute must be the same on each MSE server. To do this, choose one of the UUIDs and change the other servers to match.

The following commands set up the an Integrity VM MSE group and also changes the UUID attribute:

#hpvmdevmgmt -a env:HPVM_MSE_GROUP_ENTRY:attr:GROUPNAME=HPVM-SG-clustername #hpvmdevmgmt -m env:HPVM_MSE_GROUP_ENTRY:attr:UUID=b7a4ec05-c2a2-11db-be42-adc07415534

In this command sequence, you supply the IP address (ip-address) used by Serviceguard to monitor the cluster. Also, specify a server identifier (server-id) from 1 to 255.

# hpvmdevmgmt -a server:hostname:attr:SERVERADDR=ip-address,SERVERID=server-id

If the entry already exists, use the following command:

#hpvmdevmgmt -m server:hostname:attr:SERVERADDR=ip-address,SERVERID=server-id

To delete a multiserver entry, enter the following command:

#hpvmdevmgmt -d server:hostname

Options

The following options can be specified only once.

The hpvmdevmgmt command recognizes the following command-line options and arguments:

-l {server | rdev | gdev|env}

Lists an entry. This option can perform the following actions:

  • List all entries:

    hpvmdevmgmt -l all

  • List all devices with a specific attribute:

    hpvmdevmgmt-V -l {all|server|rdev|gdev}:attr-name=attr-value

  • List all devices with a specific dependency:

    hpvmdevmgmt -V -l {all|server|rdev|gdev}:depend:dependent-name

  • List a single entry by name:

    hpvmdevmgmt -V -l {all|server|rdev|gdev}:entry-name

-v

Displays the version number of the hpvmdevmgmt output format. The version number is displayed first, followed by the display specified by other options.

-V

Increases the amount of information displayed (verbose mode).

-S size filename

Creates a file for use as a virtual device. The size argument must end in either M for megabyte or G for gigabyte. The filename is the path name of the file to be created. An error is returned on an attempt to overwrite an existing file.

-I

Creates attached (passthrough/sctl) devices. Attached devices include tape devices, media changers, and CD/DVD burners. Also, automatically adds /etc and /stand to the device database as restricted directories (using RECURSIVE:FS).

NOTE: The hpvmdevmgmt -I command works only on device directories that have changed. If you want the command to rigorously search all device directories regardless of whether changes have happened since the last search, remove the /var/opt/hpvm/common/hpvm_devinit file before running hpvmdevmgmt -I.
-m {server | rdev |gdev |env}:entry-name[:attr:attr-name=attr-value]

Modifies an existing attribute or adds the attribute if it does not already exist.

-a {server | rdev | gdev | env}:entry_name[:attr:attr-name=attr-value]

Adds an entry. This option can be used for:

  • Adding a restricted device (rdev)

  • Adding a VM Host device (server)

  • Adding a guest device (gdev)

  • Adding a Serviceguard cluster entry

-d {server | rdev | gdev |env}:entry-name[:param:arg]

Deletes an entry. This option can perform the following deletions:

  • Deletion of an entry:

    -d {server | rdev | gdev}:entry-name

    An entry cannot be deleted if it has dependents.

  • Delete a dependent from one or all entries of a certain type:

    -d gdev:{all | entry-name}:depend:dependent_name

  • Delete an attribute from an entry:

    -d {server | rdev | gdev}:entry-name:attr:attr-name

To delete a cluster entry, specify the server host name for the entry-name.

-n gdev|rdev:oldentry-name:newentry_-name0[,newentry-name1]

Replaces a device. Typically used when a device goes bad.

-r

Generates a report script that can be used after inspection to fix various device database problems.

RETURN VALUES

The hpvmdevmgmt command exits with one of the following values:

0: Successful completion.

1: One or more error conditions occurred.

DIAGNOSTICS

The hpvmdevmgmt command displays error messages for any of the following conditions:

  • An invalid option is specified.

  • An invalid value is specified for an option.

  • A value was omitted for an argument that requires one, or a value was supplied for an argument that does not take one.

  • The hpvmdevmgmt command and Integrity VM are at different revision levels.

EXAMPLES

Generate a device report and repair script and redirect the output to a file. This example also sets the script to executable and writable, starts an editor to edit the file, and then runs the edited file. If the script is not edited and there are errors to report or repair, you receive a message directing you to edit it. If there are no errors to report or repair, the script runs without editing.

# hpvmdevmgmt -r > repair_script.sh # chmod +wx repair_script.sh # ./repair_script.sh Device database status - Total problems found: zz. Number of restricted devices with problems: xx. Number of guest devices with problems: yy. Since errors were found, please edit and inspect this script by hand to enable its repair functions. # vi repair_script.sh # ./repair_script.sh

List a guest-device entry:

# hpvmdevmgmt -l gdev:/dev/rdisk/disk2

List all the restricted devices:

# hpvmdevmgmt -l rdev

List all the guest devices used by the guest phantom:

# hpvmdevmgmt -l gdev:depend:phantom

List all shareable guest devices (those with the attribute SHARE=YES):

# hpvmdevmgmt -l gdev,SHARE=YES

Allocate a 4 GB file:

# hpvmdevmgmt -S 4G /var/opt/hpvm/guests/mirage/disk_4G_file

Create attached (passthrough/esctl) devices:

# hpvmdevmgmt -I

Modify a guest device attribute on an ISO file from not shared to shared:

# hpvmdevmgmt -m gdev:/var/opt/hpvm/ISO-images/hpux/kit:attr:SHARE=YES

Add a restricted device entry:

# hpvmdevmgmt -a rdev:/dev/vg00/lvol8

Delete a restricted device:

# hpvmdevmgmt -d rdev:/dev/vg00/lvol8

Delete the guest mirage dependent from all guest devices:

# hpvmdevmgmt -d gdev:all:depend:mirage

Replace a guest device:

# hpvmdevmgmt -n gdev:/dev/vgvm/lvol5:/dev/rdisk/disk4

AUTHORS

The hpvmdevmgmt command was developed by HP.

SEE ALSO

On the VM Host:

hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), hpvmsar(1M), hpvmstart(1M), hpvmstatus(1M), hpvmstop(1M), hpvmupgrade(1M), p2vassist(1M)

On the Integrity VM guest:

hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3)

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.