HP Integrity Virtual Machines Version 4.1 Installation, Configuration, and Administration HP Part Number: T2767-90180 Published: March 2009, Edition 7 © Copyright 2009 Hewlett-Packard Development Company, L.P. Legal Notices Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Acknowledgments HP-UX Release 10.20 and later and HP-UX Release 11.00 and later (in both 32 and 64-bit configurations) on all HP 9000 computers are Open Group UNIX 95 branded products. UNIX is a registered trademark of The Open Group. Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Java is a trademark of Sun Microsystems, Inc. Oracle is a registered trademark of Oracle Corporation. VERITAS is a registered trademark of VERITAS Software Corporation in the U.S. and other countries. Table of Contents About This Document.......................................................................................................11 Intended Audience...............................................................................................................................11 New and Changed Information in This Edition...................................................................................11 Typographic Conventions....................................................................................................................11 Product Naming Conventions..............................................................................................................11 Document Organization......................................................................................................................12 Related Information.............................................................................................................................13 Publishing History...............................................................................................................................13 HP Encourages Your Comments..........................................................................................................13 1 Introduction...................................................................................................................15 1.1 About HP Integrity Virtual Machines.............................................................................................15 1.2 New Features and Enhancements in This Release..........................................................................16 1.3 Integrity VM Media.........................................................................................................................17 1.4 Using AVIO with Integrity VM.......................................................................................................17 1.5 Running Applications in the Integrity VM Environment...............................................................19 1.6 Related Products.............................................................................................................................20 1.7 Using the Integrity VM Documentation.........................................................................................21 1.7.1 Integrity VM Manpages..........................................................................................................21 1.7.2 Help Files................................................................................................................................22 1.8 Using This Manual.........................................................................................................................22 2 Installing Integrity VM..................................................................................................23 2.1 Installation Requirements...............................................................................................................23 2.1.1 VM Host System Requirements..............................................................................................23 2.1.2 Inhibitors to Installing Integrity VM.......................................................................................24 2.1.3 Bundle Names.........................................................................................................................24 2.1.4 Integrity VM Requires HP WBEM Services on the VM Host.................................................25 2.2 Installation Procedure for New Installations..................................................................................25 2.3 Upgrading the VM Host from Previous Versions of Integrity VM V3.X to Integrity VM V4.1......26 2.3.1 Study the Current HP-UX 11i v2 to HP-UX 11i v3 Update Documentation..........................28 2.3.2 Analyze HP-UX 11i v2 based Integrity VM Server.................................................................28 2.3.2.1 Run the HP-UX msv2v3check Tool.................................................................................29 2.3.2.2 Run the Integrity VM Upgrade Tool...............................................................................30 2.3.2.3 Determine HP-UX 11i v3 Memory and System Disk Requirements..............................30 2.3.2.4 Determine Version Requirements for HP-UX OE and Integrity VM .............................30 2.3.3 Decide Whether to Perform a Cold-Install or an Update........................................................32 2.3.4 Perform Required Hardware and Firmware Upgrades..........................................................32 2.3.5 Perform Either a Cold-Install or an Update............................................................................32 2.3.6 Verifying Guests after Installing Layered Products................................................................34 2.3.7 Upgrade Troubleshooting Issues............................................................................................34 2.4 Updating Integrity VM V4.0 VM Host to Integrity VM V4.1.........................................................35 2.5 Verifying the Installation of Integrity VM.......................................................................................36 2.6 Removing Integrity VM..................................................................................................................36 2.7 Reserving VM Host Devices............................................................................................................36 2.8 Troubleshooting Installation Problems...........................................................................................37 2.8.1 Error Messages During Installation........................................................................................37 Table of Contents 3 3 Creating Virtual Machines..........................................................................................39 3.1 Legacy and Agile Device Names.....................................................................................................39 3.2 Specifying Virtual Machine Characteristics....................................................................................40 3.2.1 Virtual Machine Name............................................................................................................41 3.2.2 Guest Operating System Type.................................................................................................41 3.2.3 Virtual CPUs...........................................................................................................................41 3.2.4 Entitlement.............................................................................................................................41 3.2.5 Guest Memory Allocation.......................................................................................................42 3.2.6 Automatic Cell Balancing........................................................................................................43 3.2.7 Virtual Devices........................................................................................................................43 3.2.7.1 Creating Virtual Network Devices..................................................................................43 3.2.7.2 Creating Virtual Storage Devices....................................................................................44 3.2.8 Creating Virtual Machine Labels............................................................................................46 3.2.9 Specifying the Virtual Machine Boot Attribute.......................................................................46 3.2.10 Specifying Dynamic Memory Parameters.............................................................................47 3.2.11 Configuration Limits.............................................................................................................47 3.3 Using the hpvmcreate Command................................................................................................48 3.3.1 Example of Virtual Machine Creation.....................................................................................49 3.4 Starting Virtual Machines................................................................................................................49 3.5 Changing Virtual Machine Configurations.....................................................................................51 3.6 Cloning Virtual Machines...............................................................................................................54 3.7 Stopping Virtual Machines..............................................................................................................57 3.8 Removing Virtual Machines............................................................................................................58 3.9 Troubleshooting Virtual Machine Creation Problems....................................................................59 3.9.1 Configuration Error on Starting the Virtual Machine.............................................................59 4 Creating HP-UX Guests................................................................................................61 4.1 Installing the HP-UX Guest Operating System...............................................................................61 4.2 Installing HP-UX Guest Management Software.............................................................................64 4.3 Troubleshooting HP-UX Guest Creation.........................................................................................64 4.3.1 The guest hangs in the EFI shell..............................................................................................64 5 Creating Windows Guests..........................................................................................65 5.1 Windows Guest Requirements........................................................................................................65 5.2 Installing Windows Guests.............................................................................................................65 5.2.1 Installing from HP Reinstall (OPK) Media.............................................................................67 5.2.2 Installing from Windows Media.............................................................................................70 5.2.3 Disabling the Windows Watchdog Timer...............................................................................74 5.3 Managing Windows Guests............................................................................................................74 5.4 Installing Integrity VM Windows Guest Management Software...................................................77 5.5 Troubleshooting Windows Guest Installation................................................................................77 5.5.1 Remote desktop unable to connect.........................................................................................77 6 Creating Linux Guests..................................................................................................79 6.1 Installing Linux Guests...................................................................................................................79 6.1.1 Preparing to Install Linux Guests...........................................................................................79 6.1.2 Using this Procedure...............................................................................................................79 6.1.3 Linux Guest Installation Media...............................................................................................80 6.2 Installing Red Hat Enterprise Linux Guests from ISO Images.......................................................80 6.3 Installing Red Hat Enterprise Linux Guests from a Boot Disk and Network Server.....................84 6.4 Installing SUSE Linux Guests from ISO Images.............................................................................86 6.5 Installing Integrity VM Linux Guest Management Software.........................................................89 4 Table of Contents 6.6 Managing Linux Guests..................................................................................................................89 7 Creating Virtual Storage Devices...............................................................................91 7.1 Introduction to Integrity VM Storage.............................................................................................91 7.1.1 Integrity VM Storage Goals.....................................................................................................91 7.1.1.1 Storage Utilization...........................................................................................................91 7.1.1.2 Storage Availability.........................................................................................................91 7.1.1.3 Storage Performance.......................................................................................................91 7.1.1.4 Storage Security...............................................................................................................92 7.1.1.5 Storage Configurability...................................................................................................92 7.1.2 Integrity VM Storage Architectures........................................................................................92 7.1.2.1 Shared I/O........................................................................................................................92 7.1.2.2 Attached I/O....................................................................................................................93 7.1.3 Integrity VM Storage Implementations..................................................................................93 7.1.3.1 Integrity VM Storage Adapters.......................................................................................93 7.1.3.2 Integrity VM Storage Devices.........................................................................................93 7.1.3.2.1 Virtual Devices........................................................................................................94 7.1.3.2.2 Attached Devices.....................................................................................................94 7.2 Configuring Integrity VM Storage..................................................................................................94 7.2.1 Integrity VM Storage Considerations.....................................................................................94 7.2.1.1 VM Storage Supportability.............................................................................................95 7.2.1.2 Performance of Virtual Devices.......................................................................................95 7.2.1.3 VM Storage Multipath Solutions.....................................................................................97 7.2.1.4 VM Storage Management................................................................................................98 7.2.1.5 VM Storage Changes.......................................................................................................99 7.2.1.6 Virtual Storage Setup Time ............................................................................................99 7.2.2 Setting Up Virtual Storage.....................................................................................................100 7.2.2.1 VM Guest Storage Specification....................................................................................100 7.2.2.2 VM Host Storage Specification......................................................................................101 7.2.2.3 VM Storage Resource Statements..................................................................................102 7.2.2.3.1 Virtual Disks..........................................................................................................102 7.2.2.3.2 Virtual LvDisks......................................................................................................103 7.2.2.3.3 Virtual FileDisks....................................................................................................105 7.2.2.3.4 Virtual DVDs.........................................................................................................106 7.2.2.3.5 Virtual FileDVDs...................................................................................................107 7.2.2.3.6 Virtual NullDVDs..................................................................................................107 7.2.2.3.7 Attachable Devices................................................................................................109 7.3 Using Integrity VM Storage...........................................................................................................110 7.3.1 Integrity VM Storage Roles...................................................................................................111 7.3.1.1 VM Host Administrator................................................................................................111 7.3.1.2 Guest Administrator......................................................................................................111 7.3.1.3 Guest User.....................................................................................................................112 7.3.2 Integrity VM Storage Use Cases............................................................................................112 7.3.2.1 Adding Virtual Storage Devices....................................................................................112 7.3.2.2 Deleting VM Storage Devices........................................................................................113 7.3.2.3 Modifying VM Storage Devices....................................................................................113 8 Creating Virtual Networks........................................................................................119 8.1 Introduction to Virtual Network Configuration...........................................................................119 8.2 Creating and Managing vswitches................................................................................................120 8.2.1 Creating vswitches................................................................................................................120 8.2.1.1 Local Networks..............................................................................................................122 8.2.2 Changing vswitches..............................................................................................................122 Table of Contents 5 8.2.3 Cloning vswitches.................................................................................................................122 8.2.4 Deleting vswitches.................................................................................................................123 8.2.5 Recreating vswitches.............................................................................................................124 8.2.6 Starting vswitches..................................................................................................................124 8.2.7 Halting vswitches..................................................................................................................124 8.3 Managing vNICs..........................................................................................................................124 8.3.1 Adding vNICS.......................................................................................................................125 8.3.2 Removing vNICs...................................................................................................................126 8.4 Configuring VLANs......................................................................................................................126 8.4.1 Cloning Guests with VLAN Information..............................................................................128 8.4.2 Displaying VLAN Information.............................................................................................129 8.4.3 Configuring VLANs on Physical Switches...........................................................................130 8.5 Troubleshooting Network Problems.............................................................................................130 8.5.1 Redefining pNICs for HP-UX Guests....................................................................................130 8.5.2 Troubleshooting VLAN Problems.........................................................................................131 9 Managing Guests......................................................................................................133 9.1 Monitoring Guests.........................................................................................................................133 9.2 Creating Guest Administrators and Operators.............................................................................135 9.3 Installing the Guest Management Software..................................................................................137 9.4 Using the Virtual Console.............................................................................................................138 9.5 Guest Configuration Files..............................................................................................................140 9.6 Dynamic Memory.........................................................................................................................140 9.6.1 Managing Dynamic Memory from the VM Host..................................................................140 9.6.1.1 Configuring a Virtual Machine to Use Dynamic Memory............................................141 9.6.1.2 Viewing Dynamic Memory on the VM Host................................................................142 9.6.1.3 Modifying a Virtual Machine's Memory Size on the VM Host.....................................144 9.6.2 Managing Dynamic Memory from the Guest.......................................................................144 9.6.2.1 Viewing Dynamic Memory Information from the Guest.............................................144 9.6.2.2 Modifying a Virtual Machine's Memory Size from the Guest......................................145 9.6.3 Troubleshooting Dynamic Memory Problems......................................................................145 9.6.3.1 Dynamic Memory Restrictions......................................................................................145 9.6.3.2 VM Host Resource Considerations...............................................................................145 9.6.3.3 Guest Resource Considerations.....................................................................................146 9.6.3.4 Specify Sufficient Guest Memory..................................................................................146 9.6.3.5 Actual Memory Allocations Might Differ.....................................................................147 9.6.3.6 Enable Dynamic Memory on the Guest and on the VM Host......................................147 9.6.3.7 Upgrade the Guest Kit When Upgrading Integrity VM...............................................147 9.7 Integrity VM Log Files...................................................................................................................148 9.8 Managing the Device Database.....................................................................................................148 9.8.1 The Device Database File.......................................................................................................148 9.8.2 Using the hpvmdevmgmt Command...................................................................................148 9.8.2.1 Sharing Devices.............................................................................................................149 9.8.2.2 Replacing Devices.........................................................................................................150 9.8.2.3 Deleting Devices............................................................................................................150 9.8.2.4 Restricting VM Host Devices........................................................................................150 9.9 HP AVIO Stor EFI Driver Enumeration Policy..............................................................................150 10 Migrating Virtual Machines....................................................................................153 10.1 Introduction to Virtual Machine Migration.................................................................................153 10.1.1 Reasons for Migrating an Online Guest..............................................................................155 10.1.2 Reasons for Migrating Virtual Machines Offline................................................................156 10.2 Command Line Interface for Online and Offline Migration.......................................................156 6 Table of Contents 10.2.1 Using the hpvmmigrate Command...................................................................................157 10.2.2 Examples of the hpvmmigrate Command........................................................................160 10.2.3 Using the hpvmstatus Command to See Migration Details............................................161 10.2.4 Options to hpvmmodify Command for Online Migration.................................................161 10.2.5 Using the hpvminfo Command in the Guest.....................................................................162 10.3 VM Host and Virtual Machine Configuration Considerations...................................................162 10.3.1 VM Host Requirements and Setup......................................................................................163 10.3.1.1 VM Host Processors for Online Migration..................................................................163 10.3.1.2 Private Network Setup................................................................................................164 10.3.1.3 Conventions for Using target-hpvm-migr Names for Private Networks.............165 10.3.1.4 Using NTP on VM Hosts.............................................................................................166 10.3.2 SSH Setup Between the VM Hosts......................................................................................166 10.3.2.1 Troubleshooting SSH Key Setup.................................................................................166 10.3.2.2 Using a Third-Party SSH.............................................................................................166 10.3.3 Virtual Machine Requirements and Setup..........................................................................167 10.3.3.1 Setting Online Migration Phase Time-Out Values......................................................167 10.3.3.2 Using NTP on the VM Guests.....................................................................................168 10.3.3.3 Marking a Guest Not Runnable...................................................................................168 10.3.4 Restrictions and Limitations of Online VM Migration........................................................168 10.4 Migrating Serviceguard Packaged Guests and Serviceguard Cluster Nodes.............................169 10.5 Migrating Guests from Physical to Virtual Machines.................................................................169 10.5.1 Requirements for Migrating a Workload............................................................................169 10.5.2 Using the p2vassist Utility...................................................................................................169 10.5.3 Troubleshooting P2V Problems...........................................................................................173 11 Using HP Serviceguard with Integrity VM.............................................................175 11.1 Introduction to HP Serviceguard with Integrity VM..................................................................175 11.2 VMs as Serviceguard Nodes Configurations..............................................................................176 11.2.1 Cluster in a Box....................................................................................................................177 11.2.2 Application Failover from Virtual Machine to Virtual Machine.........................................177 11.2.3 Application Failover from Virtual Machine to Physical Machine.......................................178 11.2.4 Configuring VMs as Serviceguard Nodes...........................................................................178 11.3 Serviceguard in VM Host Configuration....................................................................................179 11.3.1 Creating Guests as Packages...............................................................................................180 11.3.2 Modifying the Package Configuration Files........................................................................182 11.3.3 Starting the Distributed Guest.............................................................................................183 11.3.4 Starting the vswitch Monitor...............................................................................................184 11.3.5 Verifying That Distributed Guests Can Fail Over...............................................................184 11.3.6 Managing Distributed Guests.............................................................................................184 11.3.6.1 Starting Distributed Guests.........................................................................................184 11.3.6.2 Stopping Distributed Guests.......................................................................................184 11.3.6.3 Monitoring Distributed Guests...................................................................................184 11.3.6.4 Modifying Distributed Guests.....................................................................................185 11.3.7 Monitoring Network Connections......................................................................................185 11.4 Upgrading from the Integrity VM A.01.20 Toolkit......................................................................185 11.4.1 Removing the Serviceguard for Integrity VM Toolkit.........................................................185 11.4.2 Guest Toolkit Removal........................................................................................................186 11.4.3 Repackaging Guests............................................................................................................186 11.5 Troubleshooting Serviceguard with Integrity VM......................................................................186 11.5.1 Troubleshooting VMs as Serviceguard Packages ...............................................................186 11.5.2 Creating Distributed Guests................................................................................................187 11.5.3 Networking.........................................................................................................................187 Table of Contents 7 12 Reporting Problems with Integrity VM...................................................................189 12.1 Collecting Integrity VM Data......................................................................................................189 12.1.1 Using the hpvmcollect Command on the VM Host............................................................189 12.1.2 Using the hpvmcollect Command on Guests......................................................................191 12.2 Managing the Size of the VMM Driver Log File.........................................................................192 1 Integrity VM Manpages............................................................................................195 hpvm(5)..............................................................................................................................................196 hpvmclone(1M)..................................................................................................................................198 hpvmcollect(1M)................................................................................................................................204 hpvmconsole(1M)..............................................................................................................................208 hpvmcreate(1M).................................................................................................................................210 hpvmdevmgmt(1M)............................................................................................................................216 hpvmdevtranslate(1M).......................................................................................................................222 hpvmhostrdev(1M)............................................................................................................................224 hpvminfo(1M)....................................................................................................................................227 hpvmmigrate(1M)..............................................................................................................................229 hpvmmgmt(1M).................................................................................................................................235 hpvmmodify(1M)...............................................................................................................................238 hpvmnet(1M).....................................................................................................................................248 hpvmpubapi(3)..................................................................................................................................254 hpvmremove(1M)..............................................................................................................................256 hpvmresources(5)...............................................................................................................................258 hpvmsar(1M)......................................................................................................................................261 hpvmstart(1M)...................................................................................................................................264 hpvmstatus(1M).................................................................................................................................266 hpvmstop(1M)....................................................................................................................................273 hpvmupgrade(1M).............................................................................................................................275 p2vassist(1M).....................................................................................................................................276 Glossary........................................................................................................................283 Index..............................................................................................................................287 8 Table of Contents List of Figures 1-1 Hardware Consolidation Using Integrity VM..............................................................................15 2-1 Upgrade Procedure......................................................................................................................27 7-1 Integrity VM Storage I/O Stack.....................................................................................................96 7-2 Overdriving Physical Storage Hurts Performance........................................................................97 7-3 Sub-LUN Storage Allocation Example..........................................................................................98 7-4 Bad Multipath Virtual Media Allocation......................................................................................98 7-5 Bad Virtual Device Allocation.......................................................................................................99 8-1 Virtual Network Configuration...................................................................................................119 8-2 Integrity VM VLAN Configuration Example..............................................................................127 9-1 Installing Guest Management Software......................................................................................138 10-1 Symmetric Hosts Configured for Guest Migration.....................................................................154 10-2 Online Guest Migration from Source to Target...........................................................................155 11-1 Guest Application Failover to Another Guest on the Same VM Host........................................177 11-2 Guest Application Failover to a Guest on a Different VM Host.................................................178 11-3 Guest Application Failover to an HP Integrity Server................................................................178 11-4 Virtual Machine Failover to Another Cluster Member...............................................................179 9 List of Tables 1 HP-UX Versions............................................................................................................................12 2 Integrity VM Versions...................................................................................................................12 1-1 Chapters in this Manual................................................................................................................22 2-1 Requirements for Installing Integrity VM.....................................................................................23 2-2 Kernel Parameters........................................................................................................................26 2-3 Supported Operating Environments.............................................................................................31 3-1 Commands for Reconfiguring Guests to Agile Device Names.....................................................39 3-2 Characteristics of an Integrity Virtual Machine............................................................................40 3-3 Configuration Limits.....................................................................................................................47 3-4 Options to the hpvmcreate Command.......................................................................................48 3-5 Options to the hpvmstart Command........................................................................................50 3-6 Options to the hpvmmodify Command.......................................................................................51 3-7 Options to the hpvmclone Command.........................................................................................54 3-8 Options to the hpvmstop Command...........................................................................................57 3-9 Options to the hpvmremove Command.......................................................................................58 6-1 Linux TUI Control Keys................................................................................................................80 6-2 Linux Installation Screens.............................................................................................................82 6-3 Linux Guest Network Installation Screens....................................................................................86 8-1 Options to the hpvmnet Command............................................................................................120 8-2 VLAN Port States.........................................................................................................................128 9-1 Options to the hpvmstatus Command.....................................................................................133 9-2 Options to the hpvmconsole Command...................................................................................139 9-3 Dynamic Memory Control Command Options..........................................................................141 9-4 Dynamic Memory Characteristics...............................................................................................142 9-5 Options to the hpvmmgmt Command..........................................................................................144 9-6 Options to the hpvmdevmgmt Command...................................................................................149 10-1 Options to the hpvmmigrate Command...................................................................................158 10-2 Itanium Processor Families.........................................................................................................163 12-1 Options to the hpvmcollect Command on the VM Host............................................................189 12-2 Options to the hpvmcollect Command on Guests..................................................................192 10 List of Tables About This Document This document describes how to install and configure the HP Integrity Virtual Machines (Integrity VM) product, and how to create and install virtual machines and guest operating systems. For recent updates to the product documentation, see the HP Integrity Virtual Machines Version 4.1 Release Notes. Intended Audience This document is intended for system and network administrators responsible for installing, configuring, and managing Integrity VM and virtual machines. Administrators are expected to have an in-depth knowledge of HP-UX operating system concepts, commands, and configuration. In addition, administrators must be familiar with the Integrity machine console and how to install the operating systems running on their virtual machines. New and Changed Information in This Edition This manual supersedes the manual of the same title for HP Integrity Virtual Machines Version 4.1. For more information about the new version of the product, see the HP Integrity Virtual Machines Version 4.1 Release Notes. Typographic Conventions This document uses the following typographic conventions. Book Title Title of a book or other document. Linked Title Title that is a hyperlink to a book or other document. http:// www.hp.com A website address that is a hyperlink to the site. Command Command name or qualified command phrase. user input Commands and other text that you type. computer output Text displayed by the computer. Enter The name of a keyboard key. Note that Return and Enter both refer to the same key. A sequence such as Ctrl+A indicates that you must hold down the key labeled Ctrl while pressing the A key. term Defined use of an important word or phrase. variable The name of an environment variable, for example PATH or errno. value A value that you may replace in a command or function, or information in a display that represents several possible values. find(1) HP-UX manpage. In this example, “find” is the manpage name and “1” is the manpage section. NOTE: Examples captured from software may display software versions that differ from the actual released product. Product Naming Conventions Table 1 defines the naming conventions for the versions of the HP-UX operating system. Intended Audience 11 Table 1 HP-UX Versions Version Number Version Name HP-UX 11i v2 HP-UX 11.23 HP-UX 11i v2 (0505) HP-UX 11i v2 May 2005 release HP-UX 11i v2 (0609) HP-UX 11i v2 September 2006 release HP-UX 11i v3 HP-UX 11.31 Table 2 defines the naming conventions for the versions of the Integrity VM product. Table 2 Integrity VM Versions Version Number Version Name Integrity VM A.01.20 HP Integrity Virtual Machines version 1.2 Integrity VM A.02.00 HP Integrity Virtual Machines version 2.0 Integrity VM A.03.00 HP Integrity Virtual Machines version 3.0 Integrity VM A.03.50 HP Integrity Virtual Machines version 3.5 Integrity VM B.04.00 HP Integrity Virtual Machines version 4.0 Integrity VM B.04.10 HP Integrity Virtual Machines version 4.1 Document Organization This manual consists of the following chapters: • Chapter 1: “Introduction” (page 15) describes the Integrity VM software and related products for managing Integrity servers from HP. • Chapter 2: “Installing Integrity VM” (page 23) describes how to install the Integrity VM product. • Chapter 3: “Creating Virtual Machines” (page 39) describes how to create virtual machines. • Chapter 4: “Creating HP-UX Guests” (page 61) describes how to create HP-UX guests • Chapter 5: “Creating Windows Guests” (page 65) describes how to create Windows® guests. • Chapter 6: “Creating Linux Guests” (page 79) describes how to create Linux guests. • Chapter 7: “Creating Virtual Storage Devices” (page 91) describes how to create virtual storage devices. • Chapter 8: “Creating Virtual Networks” (page 119) describes how to create virtual networks. • Chapter 9: “Managing Guests” (page 133) describes how to start, stop, and manage virtual machines and resources. • Chapter 10: “Migrating Virtual Machines” (page 153) describes how to migrate guests to other VM Host systems. • Chapter 11: “Using HP Serviceguard with Integrity VM” (page 175) describes how to set up Serviceguard to manage your guests. • Chapter 12: “Reporting Problems with Integrity VM” (page 189) describes how to solve virtual machine problems. • Integrity VM Manpages lists the HP-UX manpages provided with the HP Integrity VM software. • Glossary : “Glossary” (page 283) defines important terms used in the Integrity VM documentation. 12 Related Information You can download the latest version of this document from docs.hp.com. The following related documents can also be downloaded from the same site: • HP Integrity Virtual Machines Release Notes • Ignite-UX Reference • Ignite-UX Installation Booting White Paper • Using Ignite-UX with Integrity VM White Paper • HP-UX Installation and Update Guide • HP-UX Reference • Managing Serviceguard • Windows on Integrity: Smart Setup Guide • HP Auto Port Aggregation (APA) Support Guide • Using HP-UX VLANS • HP Integrity Virtual Machines Manager Getting Started Guide • HP VSE Management Software Installation and Update Guide • HP Integrity Essentials Global Workload Manager User's Guide • Red Hat Enterprise Linux 4; Installation Guide for x86, Itanium, AMD64, and Intel Extended Memory Technology 64 (Intel EM64T) • HP Integrity Essentials Global Workload Manager: Workload Management for HP Integrity Virtual Machines (a white paper) The website docs.hp.com also includes technical papers about using virtual machines. For a time-limited evaluation version of Integrity VM, search software.hp.com. Publishing History Document Edition Publication Date Number Supported Operating Supported Versions Systems Manufacturing Part Number T2767-90004 HP-UX 11i v2 1.0 October 2005 T2767-90024 HP-UX 11i v2 2.0 October 2006 T2767-90067 HP-UX 11i v2 3.0 April 2007 T2767–90105 HP-UX 11i v2 4.0 December 2007 T2767–90141 HP-UX 11i v3 5.0 September 2008 T7267–90141 HP-UX 11i v3 6.0 October 2008 T2767–90180 HP-UX 11i v3 7.0 March 2009 HP Encourages Your Comments HP encourages your comments concerning this document. We are truly committed to providing documentation that meets your needs. Your comments and suggestions regarding product features will help us develop future versions of the Virtual Server Environment Management Software. Use the following e-mail address to send feedback directly to the VSE Management Software development team: vse@hpuxweb.fc.hp.com. Related Information 13 NOTE: HP cannot provide product support through this e-mail address. To obtain product support, contact your HP Support representative, your HP Services representative, or your authorized HP reseller. For more information about support services, see the support website at http://www.hp.com/go/support. For other ways to contact HP, see the Contact HP website at http://welcome.hp.com/country/us/ en/contact_us.html. 14 1 Introduction This chapter describes the Integrity VM product, including the following topics: • “About HP Integrity Virtual Machines” • “New Features and Enhancements in This Release” • “Using AVIO with Integrity VM” • “Running Applications in the Integrity VM Environment” • “Related Products” • “Using the Integrity VM Documentation” • “Using This Manual” 1.1 About HP Integrity Virtual Machines Integrity Virtual Machines is a soft partitioning and virtualization technology that provides operating system isolation, with sub-CPU allocation granularity and shared I/O. Integrity VM can be installed on an Integrity server or hardware partition (nPartition) running HP-UX. The Integrity VM environment consists of two types of components: • VM Host • Virtual machines (also called guests) The VM Host virtualizes physical processors, memory, and I/O devices, allowing you to allocate them as virtual resources to each virtual machine. Virtual machines are abstractions of real, physical machines. The guest operating system runs on the virtual machine just as it would run on a physical Integrity server, with no special modification. Integrity VM provides a small guest software package that aids in local management of the guest's virtual machine. Figure 1-1 Hardware Consolidation Using Integrity VM Run Atnt . Fault Remoet Power HP-UX Server Windows Server HP-UX Guest Windows Guest VM Host Boot Disk HP-UX Boot Disk Windows Boot Disk HP-UX Guest Storage HP Integrity Server Virtual Disk Virtual Disk Virtual Disk Virtual DVD DVD Removable Media 1.1 About HP Integrity Virtual Machines 15 Guests are fully loaded, operational systems, complete with operating system, applications, system management utilities, and networks, all running in the virtual machine environment that you set up for them. You boot and manage guests using the same storage media and procedures that you would if the guest operating system were running on its own dedicated physical hardware platform. Even the system administration privileges can be allocated to specific virtual machine administrators. One way to benefit from Integrity VM is to run multiple virtual machines on the same physical machine. There is no set limit to the number of virtual machines that can be configured, but no more than 256 virtual machines can be booted simultaneously on a single VM Host. Each virtual machine is isolated from the others. The VM Host administrator allocates virtual resources to the guest. The guest accesses the number of CPUs that the VM Host administrator allocates to it. CPU use is governed by an entitlement system that you can adjust to maximize CPU use and improve performance. A symmetric multiprocessing system can run on the virtual machine if the VM Host system has sufficient physical CPUs for it. Figure 1-1 illustrates how an HP-UX system and a Windows system can be consolidated on a single Integrity server. The HP-UX boot disk is consolidated onto the same storage device as the VM Host boot disk and the Windows guest storage. The Windows guest also has access to removable media (CD/DVD) that can be redefined as necessary. Because multiple virtual machines share the same physical resources, I/O devices can be allocated to multiple guests, maximizing use of the I/O devices and reducing the maintenance costs of the data center. By consolidating systems onto one platform, your data center requires less hardware and management resources. Another use for virtual machines is to duplicate operating environments easily, maintaining isolation on each virtual machine while managing them from a single, central console. Integrity VM allows you to create and clone virtual machines with a simple command interface. You can modify existing guests and arrange networks that provide communication through the VM Host's network interface or the guest local network (localnet). Because all the guests share the same physical resources, you can be assured of identical configurations, including the hardware devices backing each guest's virtual devices. Testing upgraded software and system modifications is a simple matter of entering a few commands to create, monitor, and remove virtual machines. Integrity VM can improve the availability and capacity of your data center. Virtual machines can be used to run isolated environments that support different applications on the same physical hardware. Application failures and system events on one virtual machine do not affect the other virtual machines. I/O devices allocated to multiple virtual machines allow more users per device, enabling the data center to support more users and applications on fewer expensive hardware platforms and devices. 1.2 New Features and Enhancements in This Release The Integrity VM V4.1 release introduces new the new Online VM Migration feature, which allows you to migrate an active guest and its applications from one VM Host to another without service interruption. New Accelerated Virtual I/O (AVIO) drivers are also supported in this release, which provide accelerated storage and networking products to improve the overall I/O performance for Integrity VM. AVIO products provide up to a 60% reduction in service demand and as much as twofold improvement in throughput over the existing fully virtualized storage and networking Integrity VM solutions. Performance depends on the application workload and, in general, is better with larger message sizes. The following list describes enhancements to Integrity VM for this release: • Support for HP-UX 11i v3 0903 VM Host • Online VM Migration • Guests can run any of the following operating systems: — HP-UX 11i v2 (0609 or later) — HP-UX 11i v3 — 0702, 0709, 0803, 0809, and 0903 16 Introduction — Windows 2003 (Enterprise or Datacenter edition) SP2 — Red Hat Linux Enterprise Edition Advanced Server Release 4 update 5 — SUSE Linux Enterprise Server (SLES) for HP Integrity servers SLES 10 update 2 • SSH third-party alternative for secure communications • Support for Serviceguard 11.19 • AVIO supports the following new features: — AVIO networking driver for Windows guests — Support for Online VM Migration for HP-UX guests — DLKM support for HP-UX 11i v3 guest storage driver — Support for Ignite 1.3 Integrity VM Media The HP Integrity Virtual Machines V4.1 software is distributed on the HP-UX 11i v3 Operating Environment media with the Virtual Server OS (VSE-OE) and the Data Center OE (DC-OE). To install Integrity VM, select the optional software bundle for HP Integrity Virtual Machines (T2767CC) prior to installing or updating HP-UX. The Integrity VM software for HP-UX 11i v3 is delivered in the following ways: • As a stand-alone product on the HP-UX 11i v3 Application Software (AR) DVD • As a product included in the HP-UX 11i v3 VSE-OE • As a product included in the HP-UX 11i v3 DC-OE NOTE: The Online VM Migration feature is provided as a separate product (T8718AC) on the HP-UX 11i v3 Application Software (AR) DVD. 1.4 Using AVIO with Integrity VM AVIO is supported by multiple guest operating systems and is optional based on a properly configured VM Host and changes to the guest operating systems. For AVIO support details, see the HP Integrity Virtual Machines Version 4.1 Release Notes and the AVIO product documentation. You must install and configure kernel drivers on both the VM Host and the guest systems. The guest configuration file and the hpvmstatus command display the avio_lan and avio_stor designators. NOTE: HP strongly recommends that you use the same AVIO components from the same release on both the VM Host and guests, for example, both from the OE or both from the same Web Release (for example, WEB0803). The following example shows the hpvmstatus command output of AVIO adapters for guest avioclone: [Storage Interface Details] Guest Device type :disk Guest Adaptor type :avio_stor Bus :0 Device :0 Function :0 Target :3 Lun :0 Physical Storage type :disk Physical device :/dev/rdisk/disk2 [Network Interface Details] Physical Storage type :vswitch Guest Adaptor type :avio_lan Backing :swlan1 1.3 Integrity VM Media 17 Vswitch Port :5 Bus :0 Device :1 Function :0 Mac Address :2a-2e-5a-05-0a-ba Physical Storage type :vswitch Guest Adaptor type :avio_lan Backing :swlan2 Vswitch port :9 Bus :0 Device :2 Function :0 Mac Address :2a-2e-5a-05-0a-bc NOTE: The CLI accepts either avio_lan or aviolan and either avio_stor or aviostor. For example, the following hpvmcreate commands add both an AVIO network and an AVIO disk to the guest aviotest: # hpvmcreate -P aviotest -O hpux -a network:aviolan::vswitch:swlan1 \ -a hba:aviostor::disk/dev/rdisk/disk1 # hpvmcreate -P aviotest -O hpux -a network:avio_lan::vswitch:swlan1 \ -a hba:avio_stor::disk/dev/rdisk/disk1 The AVIO network host driver allows simultaneous access to a vswitch from guests configured with or without AVIO guest drivers for their virtual network interface cards (vNICs). Existing guests continue to operate correctly and their configurations remain unchanged. Guests configured to use a common vswitch are allowed to share VLANs that are in use by guests with or without AVIO configured. Ports remain distinct for each running guest whether or not AVIO is in use. AVIO networks must use a Supported Host Physical Point Attachment (PPA) network device. For a list of supported AVIO PPAs, see the HP Integrity Virtual Machines Version 4.1 Release Notes. A nonphysical vswitch, such as localnet, is not supported in this release. AVIO increases the maximum number of devices that can be supported in a guest to 128. In this release, AVIO supports the disk and DVD device types, while burner, tape, and changer device types are not supported. The dynamic addition and deletion of AVIO devices is supported. The following backing-store options are supported: • Disk (such as /dev/rdisk/disk1) • Null (for DVD devices only) • File • Volume (lv) All other backing store options, such as null for non-DVD devices and attached, are not supported. NOTE: In general, AVIO devices (that is, avio_lan, aviolan, avio_stor, or aviostor) are configured and managed the same as VIO devices (that is lan and scsi). However, some additional Integrity VM command options and limitations on backing devices are noted throughout this document. With HP-UX 11i v3, the AVIO storage guest driver can receive events asynchronously from the VM Host for avio_stor devices whenever the underlying storage, such as lun or target, changes state, for example, when a new lun or target is added or deleted or when the size of a lun changes. The asynchronous event generation occurs in addition to any notifications issued using the SCSI programming model, such as CHECK CONDITION on a subsequent I/O. When the AVIO storage driver on the guest detects the events, it takes the appropriate actions, such as discovering the new targets. For example, if new targets are added using the hpvmmodify -a command, then the guest driver automatically detects the new device without the manual scan. The guest automatically detects any modification of the underlying backing storage. 18 Introduction 1.5 Running Applications in the Integrity VM Environment The VM Host system runs the Integrity VM software, which is responsible for allocating processor and memory resources to the running guests. The VM Host system can run physical resource, performance, and software management and monitoring tools. To allow the VM Host to allocate resources to the virtual machines, do not run end-user applications, such as database software, on the VM Host system. Instead, run them on virtual machines. Typical software you can run on the VM Host system includes the following: • HP-UX 11i v3 Virtual Server Operating Environment (VSE-OE) NOTE: Integrity VM Version 4.1 is included in the HP-UX VSE-OE, as well as the in the HP-UX DC-OE. You can install Integrity VM from the OE and run it on the VM Host system. For HP-UX guests, you must purchase separate HP-UX 11i v3 licenses. For information about the software that is required on the VM Host system, see Chapter 2 (page 23). • Software installation tools (Ignite-UX and Software Distributor-UX) • Hardware diagnostic and support tools to monitor guests (WBEM, online diagnostics, Instant Support Enterprise Edition [ISEE]) • System performance monitoring tools (GlancePlus, Measureware, OpenView Operations Agent) • Utility pricing tools (Instant Capacity, Pay per use) • Hardware management tools (nPartition Manager, storage and network management tools) • Multipath storage solutions • HP Serviceguard can be run on the VM Host system or on HP-UX guests. Do not run applications on the VM Host system, such as Oracle, Workload Manager (WLM), HP SIM, and so forth. Integrity VM installation modifies kernel parameters, making the system unsuitable for running applications. Regardless of whether guests are running or not, do not run applications on the VM Host system. A guest running on a virtual machine runs the way it does on a physical system. By allocating virtual resources, you provide the guest operating system and applications with access to memory, CPUs, network devices, and storage devices as if they were part of a dedicated system. Typical software you can run on a guest includes the following: • HP-UX 11i V2 or V3 Virtual Server Operating Environment (VSE-OE) • Windows 2003 for Integrity Servers (Enterprise edition) SP2 • Red Hat Linux Enterprise Edition Advanced Server Release 4 update 5 • SUSE Linux Enterprise Server (SLES) for HP Integrity servers SLES 10 update 2 • Software installation tools (Ignite-UX and Software Distributor-UX) • System performance monitoring tools (GlancePlus, Measureware, OpenView Operations Agent) Applications do not have to be changed to run on a guest OS. Operating system patches and hardware restrictions apply to guests. Do not run the following types of applications on a guest: • Integrity VM software • Hardware diagnostic tools and support tools (should be run on the VM Host) • Utility pricing tools (run on the VM Host) • Capacity planning tools (run on the VM Host) • Applications that require direct access to physical hardware (for example, disaster-tolerant solutions) • Multipath storage solutions 1.5 Running Applications in the Integrity VM Environment 19 • SAN Management tools and applications that require access to serial interfaces (Integrity VM virtualizes SCSI and Ethernet devices only) • Auto port aggregation (APA) You must purchase licenses for any software you run on a virtual machine, including the HP-UX operating system and any HP or third-party layered software. You can purchase the licenses for HP software under the HP Virtualization Licensing program. For more information, contact your HP Support representative. Always read the product release notes before installing any software product so that you have the latest information about changes and additions to the documentation. The following chapters describe how to install the Integrity VM software and how to create guests to run on the VM Host system. 1.6 Related Products Some of the HP products that you can use with Integrity VM include: • HP-UX operating system — Integrity VM runs on HP-UX 11i v3 Integrity systems on the VM Host. For more information, see the HP-UX 11i v3 Installation and Update Guide. • HP WBEM Services for HP-UX — Many related products, such as VM Manager and gWLM, require the VM Host system be running HP WBEM Services. • HP Integrity Virtual Server Environment (VSE) — A graphical user interface for managing HP Integrity central managed systems (CMS). Runs under HP Systems Insight Manager. For more information, see the HP VSE Management Software Quick Start Guide.. • HP Integrity Essentials Global Workload Manager (gWLM) — As part of the VSE suite, this software product allows you to centrally define resource-sharing policies that you can use across multiple Integrity servers. These policies increase system utilization and facilitate controlled sharing of system resources. Make sure the version of gWLM is appropriate for the version of Integrity VM, as described in the HP Integrity Virtual Machines Release Notes. • HP Integrity Virtual Machines Manager — A graphical user interface for creating and managing HP Integrity virtual machines. Runs under either HP System Management Homepage (HP SMH) or HP Systems Insight Manager (HP SIM) as part of the HP Integrity VSE. For more information, see the HP Integrity Virtual Machines Manager Getting Started Guide. • HP Integrity VM Providers — To manage Integrity VM guests with VM Manager, gWLM, or any VSE components, install the appropriate provider software from the operating system media or the Integrity VM guest management software kit. • HP Integrity Support Pack and Microsoft® Windows® Server 2003 Service Pack 2— HP recommends that you install the Support Pack and SP2 on all HP Integrity servers running Windows Server 2003, 64-bit. (HP Integrity also supports Service Pack 1.) For more information, see the HP Integrity Support Pack and Microsoft Windows Server 2003 Service Pack 1 Release Notes. • VERITAS Volume Manager— A data storage solution product that can be used to manage the physical disks on the VM Host. For more information, see the VERITAS Volume Manager Administrator's Guide. • HP Auto Port Aggregation (APA) — A network switch that allows you to manage multiple network interfaces, which can be allocated to guests. For more information, see the HP Auto Port Aggregation (APA) Support Guide • HP Serviceguard — A software product that allows you to create clusters of HP-UX systems for high availability. For more information, see the Managing Serviceguard manual, and Chapter 11 (page 175), in this manual. 20 Introduction 1.7 Using the Integrity VM Documentation The Integrity VM product includes several useful sources of information, whether you are considering how to set up your virtual machines or determining how to upgrade your installation. 1.7.1 Integrity VM Manpages For online information about using Integrity VM, see the following manpages on the VM Host system: • hpvm(5) — Describes the Integrity VM environment. • hpvmclone(1M) — Describes how to create virtual machines based on existing virtual machines. • hpvmcollect(1M) — Describes how to collect virtual machine statistics. • hpvmconsole(1M) — Describes how to use the virtual machine console. • hpvmcreate(1M) — Describes how to create virtual machines. • hpvmdevmgmt(1M) — Describes how to modify the way virtual devices are handled. • hpvmdevtranslate(1M) — Translates Integrity VM guest devices to agile devices. • hpvmhostrdev(1M) — Manages virtual machine access to devices used by the Integrity VM Host system. • hpvminfo(1M) — Describes how to get information about the VM Host. • hpvmmigrate(1M) — Describes how to migrate active guests and offline virtual machines from one VM Host to another. • hpvmmodify(1M) — Describes how to modify virtual machines. • hpvmnet(1M) — Describes how to create and modify virtual networks. • hpvmpubapi(3) — Describes several new public APIs. • hpvmremove(1M) — Describes how to remove a virtual machine. • hpvmresources(5) — Describes how to specify the storage and network devices used by virtual machines. • hpvmsar(1M) — Displays performance information about one or several guests on the same host. • hpvmstart(1M) — Describes how to start virtual machines. • hpvmstatus(1M) — Describes how to get statistics about the guests. • hpvmstop(1M) — Describes how to stop a virtual machine. • hpvmupgrade(1M) — Examines the current Integrity VM server system to determine whether any virtual machines will have difficulty booting after the upgrade to the next Integrity VM version. • p2vassist(1M) — Describes how to move applications from one server to another. On the HP-UX guest, the following manpages are provided: • hpvmcollect(1M) — Describes how to collect virtual machine statistics. • hpvminfo(1M) — Describes how to get information about the VM Host. • hpvmmgmt(1M) — Describes how to manage dynamic memory from the guest. • hpvmpubapi(3) — Describes several new public APIs. On the Linux guest, the following manpages are provided: • hpvmcollect(1M) — Describes how to collect virtual machine statistics. • hpvminfo(1M) — Describes how to get information about the VM Host. • hpvmpubapi(3) — Describes several new public APIs. 1.7 Using the Integrity VM Documentation 21 NOTE: HP-UX provides the gvsdmgr utility, which manages AVIO HBAs. For information about the gvsdmgr utility, see the HP-UX gvsdmgr (1M) manpage. 1.7.2 Help Files The virtual machine console is a special interface for managing guests. To start the virtual console after you create a guest, enter the hpvmconsole command and specify the guest name. For help using the virtual console, enter the HE command. For more information about the virtual console, see Section 9.4 (page 138). 1.8 Using This Manual This manual provides all the information you need to install Integrity VM, create virtual machines, install and manage guests, and use all the features of Integrity VM. Table 1-1 describes each chapter in this manual. Table 1-1 Chapters in this Manual Chapter Read if... Chapter 1: “Introduction” (page 15) You are new to HP Integrity Virtual Machines. You are installing the HP Integrity Virtual Machines product. Chapter 2: “Installing Integrity VM” (page 23) You are setting up new virtual machines on your VM Host system. Chapter 3: “Creating Virtual Machines” (page 39) You are creating virtual machines that will run the HP-UX operating system. Chapter 4: “Creating HP-UX Guests” (page 61) You are creating virtual machines that will run the Windows operating system. Chapter 5: “Creating Windows Guests” (page 65) You are creating virtual machines that will run the Linux operating system. Chapter 6: “Creating Linux Guests” (page 79) You need to make changes to the storage devices used by the VM Host or virtual machines. Chapter 7: “Creating Virtual Storage Devices” (page 91) You need to make changes to the network devices on the VM Host system or to the virtual network devices used by the virtual machines. Chapter 8: “Creating Virtual Networks” (page 119) You need to manage existing virtual machines and resources. Chapter 9: “Managing Guests” (page 133) You need to move virtual machines or active guests from one system to another. Chapter 10: “Migrating Virtual Machines” (page 153) You need to set up Serviceguard to manage your VM Host system or your virtual machines. Chapter 11: “Using HP Serviceguard with Integrity VM” (page 175) You encounter problems while creating or using virtual machines. Chapter 12: “Reporting Problems with Integrity VM” (page 189) You need to understand how to use an Integrity VM command. This section represents the Integrity VM manpages, which are available online using the man command. For example: # man hpvminfo Integrity VM Manpages You do not understand the definition of a term used in the Integrity VM product documentation. Glossary (page 283) 22 Introduction 2 Installing Integrity VM This chapter describes how to install the Integrity VM software and how to prepare the VM Host environment for guests. It includes the following topics: • “Installation Requirements” • “Installation Procedure for New Installations” • “Upgrading the VM Host from Previous Versions of Integrity VM V3.X to Integrity VM V4.1” • “Verifying the Installation of Integrity VM” • “Removing Integrity VM” • “Reserving VM Host Devices” • “Troubleshooting Installation Problems” 2.1 Installation Requirements To prepare your VM Host system for Integrity VM installation, your configuration must satisfy the hardware, software, and network requirements described in this section. Before you install this product, read the HP Integrity Virtual Machine Release Notes, which are available on the product media. The most up-to-date release notes are available on http:// docs.hp.com. 2.1.1 VM Host System Requirements You must install Integrity VM Version 4.1 software on a system that is running HP-UX 11i v3. You can install Integrity VM on a hard partition (nPar) running HP-UX, but do not attempt to install Integrity VM on a virtual partition (vPar). Integrity VM cannot be installed on a system that has HP-UX Virtual Partitions (vPars) software installed. There is a check during the Integrity VM installation that prevents this occurrence. The resources on the VM Host system (such as disks, network bandwidth, memory, and processing power), are shared by the VM Host and all the running guests. Guests running simultaneously share the remaining memory and processing power. By default, network devices are also sharable among guests. Some resources must be made exclusive to the VM Host, such as the VM Host operating system boot disk. Table 2-1 describes the minimum configuration requirements for installing Integrity VM on the VM Host system. Table 2-1 Requirements for Installing Integrity VM Resource Description Computer An Integrity server HP-UX 11i v3 March 2009 or later running on an Integrity server, as well as any appropriate software patches (see the HP Integrity Virtual Machines Release Notes). The license for Integrity VM includes the license for running the HP-UX 11i v3 Base Operating Environment (BOE) on the VM Host system. Operating system Local area network (LAN) Required for network connection and configuration. card Source installation media An appropriate source for installing software (DVD or network connection). 2.1 Installation Requirements 23 Table 2-1 Requirements for Installing Integrity VM (continued) Resource Description Sufficient disk space for the following: • The VM Host operating system (see the HP-UX 11i v3 Installation and Update Guide) • The VM Host software (50 MB) • Disk space for each guest operating system, including swap space • Disk space for the applications running on each guest • 4.7 MB for each running guest as the allowance for backing up configuration files For information about configuring storage devices for guests, see Chapter 7 (page 91). Disk storage Sufficient physical memory (RAM), including the following: • 1250 MB + 8.5% of total memory. • Total aggregate memory required for each guest (operating system and application requirements) HP-UX 11i v2 May 2005 requires a minimum of 1 GB of memory, so a guest running HP-UX must be configured with at least that much memory. • Additional 8% of aggregate guest memory for overhead for guests less than or equal to 4 GB and between 8% and 8.3% for guests larger than 4 GB. For example, for a VM Host with 16 GB of memory and two VMs configured with 3 GB of memory each, the memory requirements would be calculated as follows: • 2.58 GB for the VM Host (1250 MB plus 8.5% of 16 GB) • 6.48 GB total guest requirement (108% of 6 GB) • Total requirements = 9.06 GB of memory This leaves 6.93 GB of memory for additional guests. Memory A configured and operational network. To allow guests network access, the VM Host must have at least one functioning network interface card (NIC). For more information about configuring network devices for virtual machines, see Chapter 8 (page 119). Network configuration 2.1.2 Inhibitors to Installing Integrity VM The following items block Integrity VM Version 4.1 from installing: • Hierarchical Files System (HFS) files in the /etc/fstab file. You must remove any entries before installing Integrity VM. Check for these entries with the following command: # grep -i hfs /etc/fstab • HP System Insight Manager (HP SIM) Server bundle. Check for this product with the following command: # swlist | grep HPSIM-HP-UX • HP-UX Virtual Partitions bundle. Check for this product with the following command: # swlist -l bundle | grep VirtualPartition 2.1.3 Bundle Names The Integrity VM release contains the following software: • T2767CC — B.04.10 Integrity VM • T8718AC — B.04.10 Integrity VM Online Migration software bundle, provided as a separate product on the Application software (AR) DVD. • VMGuestLib — B.04.10 Integrity VM Guest Support Libraries, installed as part of the HP-UX VSE-OE and required by Integrity VM • VMGuestSW — B.04.10 Integrity VM Guest Support Software • VMProvider — B.04.10 WBEM Provider for Integrity VM, which allows you to use the HP Integrity VM Manager to manage the VM Host • VMKernelSW — B.04.10 Integrity VM Kernel Software 24 Installing Integrity VM • HP-UX 11i V3 — HP-UX 11i v3 Virtual Server Operating Environment [VSE-OE] that is provided for the VM Host system • PRM-Sw Krn — Iinstalled as part of the HP-UX VSE-OE and required by Integrity VM • B8465BA — HP WBEM Services for HP-UX, installed as part of the VSE-OE and required by Integrity VM 2.1.4 Integrity VM Requires HP WBEM Services on the VM Host The version of HP WBEM Services for HP-UX must be A.02.00 or later. Integrity VM fails to install if the version of WBEM Services on your VM Host is not A.02.00 or later. 2.2 Installation Procedure for New Installations This section describes the installation procedure to use if you have never installed Integrity VM on your system. If you are updating your HP-UX 11i v2 operating system to HP-UX 11i v3, and subsequently want to update Integrity VM V3.5 to Integrity VM 4.1, see Section 2.3 (page 26). If you are updating Integrity VM V4.0 to Integrity V4.1, see Section 2.4. Once you have read the product release notes and verified that you have met the system requirements as described in Section 2.1.1 (page 23), install the Integrity VM software as described in this section. NOTE: Installing the Integrity VM software requires the system to reboot. Therefore, the swinstall command line installation includes the autoreboot=true parameter. To install the HP Integrity VM software, follow these steps: 1. If you have the installation media, mount it. If you are installing from the network, identify the VM Host and path name that correspond to the software distribution depot that contains the T2767CC bundle (for example, my.server.foo.com:/depot/path). 2. Use the swinstall command to install Integrity VM and specify the path to the depot. For example, the following command installs Integrity VM and online VM migration bundle: # swinstall -x autoreboot=true -s my.server.foo.com:/depot/path T2767CC T8718AC If you are using the GUI (swinstall i), perform the following steps: a. Enter the following commands: # export DISPLAY=your display variable # swinstall b. Select the Integrity VM bundle (T2767CC) from the list presented by the GUI, and if included on the list, the online VM migration software bundle, T8718AC.. The VM Host and guest configuration files are stored at /var/opt/hpvm. The new configuration files are not compatible with those of previous versions of Integrity VM. Therefore, if you are upgrading to the current version, the guest configuration files (except the /ISO-Images/ directory) are saved to the /var/opt/hpvm/backup directory. If you revert to the older version of Integrity VM, you can use the backup configuration files to restore your VM Host and guest configurations. 2.2 Installation Procedure for New Installations 25 NOTE: You may receive a warning message during the swinstall session indicating that the AVIO bundles are not installed. The installation will continue and complete successfully. The AVIO bundles are optional and should install by default. If they did not, and you want to install them with the Integrity VM bundle T2767CC, go to the HP-UX 11i v3 0903 media and look for the following bundles to install on the VM Host, HostAVIOStor and HostAvioLan. 3. Unmount and remove any installation media. The VM Host system automatically reboots, if necessary. 4. Once the Integrity VM software is installed and running, the VM Host is available. Enter the following command to get information about the status of the guests: # hpvmstatus hpvmstatus: No guest information is available. hpvmstatus: Unable to continue. The installation is now complete, with the following results: • The Integrity VM guest management software is installed in the /opt/hpvm/guest-images directory. • The HP Serviceguard for Integrity VM Toolkit is installed in the /opt/cmcluster/ toolkit/hpvm directory. • The Integrity VM software and data files are installed in the /var/opt/hpvm directory. • The Integrity VM commands are installed in the /opt/hpvm/bin directory. You can now create guests using the hpvmcreate command, as described in Chapter 3 (page 39). Integrity VM installation modifies certain kernel parameters. For this reason, you cannot install any other applications besides Integrity VM on the VM Host system, regardless of whether guests are running or not. Table 2-2 lists the kernel parameters that are modified when you install Integrity VM. Table 2-2 Kernel Parameters Parameter Default Value Modified Value base_pagesize 4 64 filecache_max 50% 1% filecache_min 5% 1% lcpu_attr 0 0 lockable_mem_pct 90% 99% maxdsiz_64bit 4294967296 34359738368 NOTE: Integrity VM Version 4.1 does not support hyperthreading. Specify the following command to turn off hyperthreading; otherwise, Integrity VM will not start: /usr/sbin/setboot -m off 2.3 Upgrading the VM Host from Previous Versions of Integrity VM V3.X to Integrity VM V4.1 Integrity VM Version 4.1 VM Host requires the HP-UX 11i v3 operating system. Only HP-UX 11i v2 servers running Integrity VM Version 3.0 or Version 3.5 can be upgraded to the HP-UX 11i v3 Integrity VM Version 4.1 release. This section describes the process to follow when upgrading an HP-UX 11i v2 based Integrity VM server to an HP-UX 11i v3 based Integrity VM 26 Installing Integrity VM server. If you are upgraded the VM Host from Integrity VM V4.0 to Integrity VM V4.1, see Section 2.4. HP-UX 11i v3 supports many features that are backward compatible with 11i v2, allowing 11i v2 applications to run without modifications. The primary goal of this section is to provide direction to the administrator performing the upgrade of the VM Host to make sure that all configured virtual machines (guests) boot and run after completing the upgrade to 11i v3. Figure 2-1 provides a flowchart of the upgrade procedure from 11i v2 to 11i v3. Figure 2-1 Upgrade Procedure Upgrade HP-UX to 11i v3 and then install new layered products, including Integrity VM V4.1. 5. 7. Study current 11i v2 to 11i v3 upgrade documentation. Analyze the HP-UX 11i v2 based Integrity VM server using tools. Update hardware requiring new firmware or replace obsolete adapters. Check that all guests still boot and run correctly. Install new Integrity VM V4.1 guest kits onto guests and reboot each guest. Final check - assure all guests boot and then backup both server and guests. Decide whether to perform a cold install or update_ux. 1. 8. 9. 2. 4. 3. Perform cold install or update_ux. ...cold install update_ux... 6. 2.3 Upgrading the VM Host from Previous Versions of Integrity VM V3.X to Integrity VM V4.1 27 The first thing the administrator must do is to identify subsystems on the 11i v2 Integrity VM server that are incompatible with or that are not supported on 11i v3. Some incompatibility issues can be exposed by tools, and others are found in referenced documents. The most common update problems are caused by the following: • Unsupported hardware adapters or firmware • Memory and system disk space requirements (HP-UX 11i v3 has increased both of these.) • Obsolete or unsupported storage multipath solutions • Layered products requiring an 11i v3 compatible version 2.3.1 Study the Current HP-UX 11i v2 to HP-UX 11i v3 Update Documentation The first stage of upgrading an Integrity VM V3.0 or V3.5 server to an Integrity VM V4.1 server is to review the following HP–UX 11i v3 operating system update documents: • Mass Storage Update Guide • Read Before Installing or Upgrading • HP-UX 11i v3 Installation and Update Guide • HP-UX 11i Version 3 Release Notes • Serviceguard Specific Documentation The following websites provide a general reference covering the features and hardware supported in HP-UX 11i v3. Read these documents and become familiar with the information before beginning the upgrade procedure. • QuickSpecs for HP-UX 11i v3 Update 2 features and operating environments • Upgrading to HP-UX 11i v3 As you are reading, pay particular attention to the new mass storage model, called the agile device reference model , for naming and identifying devices. The 11i v2 model is called the legacy device reference model. The new agile device model uses worldwide device identifiers (WWIDs) to identify devices. The WWID is a device attribute that is independent of the device’s location in a SAN or in an adapter/controller access path. Therefore, the agile device names are persistent with respect to changes in the access path and can utilize multiple paths through a single device name. The legacy devices require multiple device names to access the same device through multiple paths. Many Integrity VM customers use multipath solutions such as Secure Path, which allow them to use a single device name to access all paths. Some of these 11i v2 multipath solutions will continue to work, while others you must remove. The general solution for this particular problem is to replace the existing multipath device with the new agile device name, with its inherent multipath support, once the upgrade has completed. NOTE: Dynamic Root Disk (DRD), an HP-UX system administration toolset, is available to clone an HP-UX system image to an inactive disk for software maintenance or recovery. The bundle name is DynRootDisk and the product name is DRD. Administrators can use DRD to reduce downtime for system maintenance by creating an inactive clone of the booted system, then applying patches and products to the clone. The modified clone can then be booted at a convenient time. DRD is available for download from a software depot. For information about HP-UX Dynamic Root Disk, see http://docs.hp.com/en/DRD. 2.3.2 Analyze HP-UX 11i v2 based Integrity VM Server Analyzing HP-UX 11i v2 based Integrity VM server is the most important stage of the Integrity VM server upgrade. During this analysis, it is important to discover any incompatible hardware and software subsystems. You can use the HP-UX 11i v2 to 11i v3 Mass Storage Check Utility (msv2v3check ) and the Integrity VM hpvmupgrade tool to assist in the analysis. 28 Installing Integrity VM The msv2v3check tool is free software provided on the http://software.hp.com website. Go to this website, search for msv2v3check, and download this free tool. The hpvmupgrade tool is provided with Integrity VM V4.1. Use one of the following ways to obtain this tool: • Download VMGuestLib from the http://software.hp.com website and follow the instructions documented there. • Install VMGuestLib from HP-UX 11i v2 AR media, September 2008 or later. These analysis utilities are aimed primarily at mass storage problems and problems that are specific to existing virtual machines. In most cases, you can take actions to resolve these incompatibilities before doing the upgrade, such as loading new firmware. Other solutions might require waiting until after the upgrade, such as substituting agile devices for an 11i v2 multipath solution. Another area of particular concern is the layered products running on your 11i v2 based Integrity VM server. Analyze each layered product to determine its upgrade impact: • No change - Layered product is compatible. • Delete/reinstall - Layered product requires a new version to work on 11i v3. • Delay upgrade – Layered product needs a new version that has not yet released. For more information, see the following documents: • Compatibility Issues or Exceptions in the Initial Release of HP-UX 11i v3 • HP-UX 11i Version 3 Release Notes 2.3.2.1 Run the HP-UX msv2v3check Tool The HP-UX msv2v3check command reviews all mass storage controllers and devices on your system for HP-UX 11i v3 compatibility and support. In addition, msv2v3check attempts to verify that your system meets other 11i v3 system requirements, particularly the minimum memory required and supported platforms. For more information , see the getconf (1M) and model (1M) HP-UX commands. The msv2v3check command looks at only mass storage controllers (host bus adapters) and devices for HP-UX 11i v3 compatibility and support. This includes the following: • Ultra160 SCSI (C8xx) host bus adapters and attached HP supported SCSI devices • Ultra320 SCSI (MPT) host bus adapters and attached HP supported SCSI devices • Serial Attached SCSI (SAS) host bus adapters and attached HP supported SAS devices • Smart Array RAID (CISS) host bus adapters and attached HP supported RAID devices • Fibre Channel (FCD/TD) host bus adapters and attached HP supported Fibre Channel devices • HP supported SCSI disk enclosures and arrays • HP supported Fibre Channel disk enclosures and arrays The msv2v3check command creates the following log file in the /var/adm/msv2v3check/ directory: /var/adm/msv2v3check/mmddyy_hhmm is the full log file that contains all notes, warnings, and error messages from an invocation of msv2v3check, where mmddyy_hhmm represents the month, day, year, hours and minutes at the time the msv2v3check utility was started. Once the msv2v3check utility has completed, a validation result is displayed that indicates the number of errors and warnings detected on your system configuration: • An error is a critical message that indicates that your system does not support HP-UX 11i v3 in its current configuration. Do not ignore this message. • A warning indicates a task that might require user action, for example, upgrading the firmware on a disk device, or manually reviewing the firmware of a Fibre Channel disk array. Review all warnings and make the necessary corrections before upgrading to HP-UX 11i v3. 2.3 Upgrading the VM Host from Previous Versions of Integrity VM V3.X to Integrity VM V4.1 29 For supported I/O drivers, devices, adapters; see the following document on the HP documentation website:http://docs.hp.com/en/5991-6460/ch02s04.html. 2.3.2.2 Run the Integrity VM Upgrade Tool The Integrity VM upgrade tool, hpvmupgrade, can be run on either an 11i v2 or an 11i v3 system. This tool focuses on analyzing guest configurations for problems that might cause the guest not to boot when running on an 11i v3 Integrity VM server. Run this utility during the upgrade analysis stage. To run this utility, use the following command: # hpvmupgrade –e It produces the following log file: /var/opt/hpvm/common/hpvmupgrade.current_date_and_time This log file contains a section for each guest configured on the server and displays the following message types: • Warning messages indicate problems that can cause a guest booting problem. • Error messages indicate problems that can cause a guest problem. For example, if a guest’s virtual disk is backed by a file or device that does not exist on the 11i v2 system, a warning is issued because the problem is likely to be the same on the 11i v3 system. If, however, a guest is using a device associated with a multipath solution that is no longer supported on 11i v3, an error is issued. The Integrity VM upgrade tool is focused on the devices that are used to back guest virtual devices. Each guest configuration is queried for its virtual backing storage. The guests device list is then compared to known multipath solutions, AutoPath, Secure Path, PowerPath PVLinks, or Veritas DMP devices to detect any dependencies. Because the 11i v3 storage stack supports native multipath access to devices through the agile device names, the common solution for old 11i v2 multipath solutions is to remove them and change the applications to reference the new agile devices. The upgrade tool also examines guest devices for volume backing storage that was used with multipath devices for physical storage. If this dependency is found, it is flagged in the log file. This tool also verifies that the 11i v2 Integrity VM server is at V3.0 or V3.5. 2.3.2.3 Determine HP-UX 11i v3 Memory and System Disk Requirements Integrity VM V4.1 memory requirements vary depending on the number and size of virtual machines supported by the Integrity VM server. When upgrading from an 11i v2 Integrity VM server, use the following steps to determine the amount of memory required for the 11i v3 Integrity VM server: 1. When your 11i v2 Integrity VM server is running at peak load, use the Integrity VM hpvmstatus –s command to display the available memory. 2. If the available memory is less than 1 GB, then it is highly likely that your server requires additional memory to run the same load with 11i v3 and Integrity VM V4.1. Before upgrading, add the appropriate amount of memory to ensure that there is at least 1 GB of memory available during peak loading. NOTE: Different operating environments have different minimum memory requirements 2.3.2.4 Determine Version Requirements for HP-UX OE and Integrity VM Only HP-UX 11i v2 servers running Integrity VM Version 3.0 or Version 3.5 can be upgraded to the HP-UX 11i v3 Integrity VM V4.1 release. HP recommends that all virtual machines (guests) be upgraded with Integrity VM Version 4.1 guest kits to take advantage of performance enhancements and bug fixes. Guests that booted and ran on the 11i v2 Integrity VM server will continue to function with equivalent or improved performance after the upgrade. 30 Installing Integrity VM Existing guest configuration information, operating system software, and application data are not affected when you upgrade Integrity VM. However, when you upgrade, also reinstall the guest kit that is provided with Integrity VM. This operation requires you to reboot the guest. For more information, see Section 9.3 (page 137). If you have installed the evaluation version of Integrity VM (software bundle T2801AA), remove the evaluation software before installing the Integrity VM product (see Section 2.6 (page 36)). The reasons for exceptions to this behavior, such as when guests do not boot after the upgrade, are defined in the following documents. The 11i v3 Update 2 release that Integrity VM V4.1 requires has changed its OE packaging. For information about the new 11i v3 OEs, see these documents: • Customer Support Letter Describing OE Licensing • New HP-UX 11i v3 Operating Environments The following are the new HP-UX OEs: • HP-UX 11i v3 Base OE (BOE) The BOE provides and integrated HP-UX operating environment for customers who require less complex installations. The Base OE includes the entire original Foundation Operating Environment (FOE), and offers complete HP-UX functionality including security, networking, web functionality, and software management applications. • HP-UX 11i v3 Virtual Server OE (VSE-OE) The VSE-OE provides an integrated HP-UX operating environment for customers who seeking higher resource utilization or who are embarking on consolidation projects and need virtualization for a flexibile UNIX environment. The VSE-OE contains all the products included in the BOE (and the original EOE) and adds a host of other products including the entire VSE suite. The VSE-OE includes Integrity VM (T2767CC). • HP-UX 11i v3 Data Center OE (DC-OE) Business-critical virtualization builtin —The Data Center OE is the offering for customers who are consolidating, or building an infrastructure for the future. Because the powerful software within the DC-OE is integrated and tested with the operating system, it is an effective choice for a highly available virtualized environment. DC-OE is a complete, fully tested, and integrated UNIX offering. The DC-OE includes Integrity VM (T2767CC). • HP-UX 11i High Availability OE (HA-OE) For customers requiring continuous access to data and applications, the HA-OE delivers the protection of Serviceguard and related software. The HA-OE also delivers all the software in the Base OE plus what has shipped until now in the Enterprise OE. Table 2-3 lists the HP-UX 11i v2 to HP-UX 11i v3 supported OE server upgrades. Table 2-3 Supported Operating Environments Original 11i v2 Operating Environments New 11i v3 Operating Environments Foundation OE Base OE Technical Computing OE Base OE Enterprise OE Virtual Server OE Mission Critical OE Data Center OE 2.3 Upgrading the VM Host from Previous Versions of Integrity VM V3.X to Integrity VM V4.1 31 NOTE: Many software subsystems require upgrades on the 11i v2 Integrity VM server before updating to HP–UX 11i v3. The most obvious of these is that Integrity VM must be upgraded to V3.0 or V3.5 before beginning the HP-UX upgrade. Other layered products, such as Serviceguard, require version upgrades before updating the operating system to 11i v3. Analyze each layered product for required upgrades. Remove HP Integrity Virtual Machines Manager (VMMgr) Version 3.0 or earlier before upgrading to Integrity VM V4.1. After installing Integrity VM V4.1, install VMMgr Version 3.5 or later. NOTE: If you are upgrading an Integrity VM Host from 11i v2 to 11i v3 and are using Veritas file systems and volumes, update to Veritas V5.0 and become familiar with the Veritas 5.0 Installation Guide. 2.3.3 Decide Whether to Perform a Cold-Install or an Update The preferred method for upgrading an HP-UX 11i v2 based Integrity VM Host to an 11i v3 based VM Host is to use the Update-UX program. The update-ux command takes as input the new 11i v3 OE depot. The update-ux command strives to maintain all your current user, storage, and network configurations. There are some 11i v2 multipath solutions that are not compatible with 11i v3. This same set of multipath solutions must be dealt with whichever method you choose. In most cases, the multipath conversion is to use the agile devices on 11i v3 in place of the device names that the multipath solutions invented. The Update-Ux program also strives to keep volume definitions the same. This is helpful because a cold-install most likely changes all the device names requiring a mapping of devices to volumes and to guests. One reason to choose a cold-install over an update-ux update is the ease by which you can immediately return to the 11i v2 environment. The update-ux path changes the original 11i v2 system configuration making a restore from backups the only way to return to the original 11i v2 system. The cold-install can and should be given separate disks to use allowing the original 11i v2 system disks to remain unchanged. Because the original disks can remain unchanged, there is less of a need to back up the 11i v2 based Integrity VM Host. NOTE: HP recommends a full back up of both the Integrity VM Host and guests before updating. Whether an update-ux or a cold-install upgrade is chosen, the administrator needs to study the documentation that covers the differences between HP-UX 11i v2 and HP-UX 11i v3. To obtain input on potential upgrade problems, the administrator should also run the HP-UX msv2v3check tool and the hpvmupgrade -e utility. 2.3.4 Perform Required Hardware and Firmware Upgrades Perform all hardware and firmware upgrades that are supported on 11i v2 and that are needed for 11i v3 while still running on 11i v2. This allows the administrator to verify that all guests are fully functional with the changes before upgrading to 11i v3. Read the following information: • Hardware Specific Information • System Firmware Support Matrix • Ethernet System Driver Support Matrix • HP 9000 and HP Integrity Server Connectivity/ 2.3.5 Perform Either a Cold-Install or an Update If the cold-install upgrade path is chosen, the administrator is taking the responsibility for fully configuring the 11i v3 Integrity VM Host to be functionally equivalent to the 11i v2 Integrity VM Host configuration. Integrity VM V4.1 provides the hpvmdevtranslate utility to assist in mapping the legacy devices used by guests on the 11i v2 VM Host to the new 11i v3 agile devices. 32 Installing Integrity VM The hpvmdevtranslate utility produces the script /var/opt/hpvm/common/ hpvm_ev_convert. This script needs to be reviewed and edited before running it to make the conversions. Device conversions that cannot be made are listed as comments labeled ERROR:. The administrator is responsible for determining the conversion of the ERROR lines. The hpvmdevtranslate utility translates only devices that provide unique world wide identifiers (WWIDs). After evaluating your 11i v2 Integrity VM Host and performing appropriate backups, use the following steps with the hpvmdevtranslate utility as part of a cold-install: 1. Choose the system disks that are to be used for the 11i v3 VM Host and make them as reserved disks. # hpvmdevmgmt -a rdev:device_name 2. Back up and collect all relevant configuration from the 11i v2 VM Host. 3. Back up the /var/opt/hpvm directory so that you can easily restore it to the 11i v3 system after the cold-install. NOTE: DRD can be used to clone an HP-UX system image to an inactive disk for recovery. For information about DRD, see http://docs.fc.hp.com/en/DRD. 4. Verify that all current guests that run on 11i v2 can boot and run successfully. Guests that cannot boot on 11i v2 cannot be expected to boot after the upgrade to 11i v3. 5. After verifying the guests, back up all relevant configuration data for each guest for a potential return to 11i v2. 6. Shut down the Integrity VM guests gracefully by logging into each one and shutting it down. 7. Shut down the Integrity VM Host. 8. Using the HP-UX cold-install procedure, install the appropriate 11i v3 OE using the selected system disks. For information about performing a cold-install, see the HP-UX 11i v3 Installation and Update Guide. 9. Remove any blocking layered products that might block the Integrity VM installation.. See Section 2.1.2 (page 24) for a list products. 10. Remove layered products that might cause problems or that require a new 11i v3 compatible version after the HP-UX 11i v3 upgrade. 11. Determine the order of installation of layered products, including Integrity VM V4.1 (T2767CC), so that all dependencies are met. For example, if Veritas is used to provide backing storage for guests, install it before Integrity VM.. 12. Install all 11i v3 compatible layered products that are required for equivalent functionality to the 11i v2 VM Host. 13. Install Integrity VM Version 4.1 to the 11i v3 VM Host. NOTE: See Section 2.1.2 (page 24) for a list of products that block the Integrity VM installation. 14. Stop Integrity VM using /sbin/init.d/hpvm stop. 15. Using the appropriate recovery tool, restore the 11i v2 /var/opt/hpvm directory over the existing 11i v3 /var/opt/hpvm directory on the 11i v3 VM Host. 16. Start Integrity VM using /sbin/init.d/hpvm start. 17. Run the translator: # hpvmdevtranslate -a /var/opt/hpvm/common/hpvm_mgmtdb_pre1131 18. Edit the script, /var/opt/hpvm/common/hpvm_dev_convert, taking note of ERROR lines and commenting out the exit line that prevents the running of the script. 19. Continue with the remaining 11i v3 Integrity VM Host configuration until the host is functionally equivalent to the former 11i v2 Integrity VM Host. 2.3 Upgrading the VM Host from Previous Versions of Integrity VM V3.X to Integrity VM V4.1 33 If you choose the update path, follow these steps: 1. Create a recovery image. 2. Verify that all current guests that run on 11i v2 can boot and run successfully. Guests that cannot boot on 11i v2 cannot be expected to boot after the update to 11i v3. 3. After verifying the guests, back up all relevant configuration data for each guest for a potential return to 11i v2. 4. Install the latest Update-UX bundle from the OE media. 5. Update the OS/OE from the HP-UX 11i v3 OE media using the update-ux command. For example: # swinstall -s /dev/dvd Update-Ux update-ux -s /dev/dvd/HPUX11i-VSE-OE T2767CC NOTE: There is a new update-ux option, –p, which previews and update task by running the session through the analysis phase first. If you are updating from the VSE-OE depot, specify the following: # swinstall -s my.server.foo.com:/OEdepot/path Update-UX update-ux -s my.server.foo.com:/OEdepot/path HPUX11i-VSE-OE T2767CC 6. Remove any blocking layered products that might block the Integrity VM installation. See Section 2.1.2 (page 24) for a list products. 7. Remove layered products that might cause problems or that require a new 11i v3 compatible version after the HP-UX 11i v3 update. 8. Determine the order of installation of layered products, including Integrity VM V4.1 (T2767CC), so that all dependencies are met. For example, if VERITAS is used to provide backing storage for guests, install it before Integrity VM. 9. Install Integrity VM Version 4.1 to the 11i v3 VM Host. 10. Update non-OE applications from the Application media using the swinstall command. For example, if you plan to install VMMgr, switch to the AR disk and specify the following: # swinstall -s my.server.foo.com:/Ardepot/path VMMGR 11. Create the recovery image. 2.3.6 Verifying Guests after Installing Layered Products Follow these steps after installing layered products: 1. Use the hpvmupgrade utility to see whether any guests have configuration problems. 2. Start and stop each guest, one at a time, and make sure that they boot to their OS. 3. Use the guest troubleshooting section, Chapter 12 (page 189), to resolve guest booting problems. 4. Upgrade each guest with the new guest kit. 5. If the guest OS is no longer supported, upgrade the guest OS. 2.3.7 Upgrade Troubleshooting Issues After you upgrade to 11i v3, examine the following issues: • Mass storage issues The Integrity VM V4.1 release supports the use of both legacy and agile devices in guests. It is not necessary to convert guests to use strictly agile devices. If, however, problems occur with guests using multipath solutions that are based on legacy devices, change the backing 34 Installing Integrity VM device to use the equivalent agile device. For information about mass storage compatibility issues, see the following documents: — Secure Path Migration — Known Install Update Problems — Third Party Mass Storage Interoperability Matrix — Hardware Support Matrix For VxFS 4.1 and VxVM 4.1 • Network issues Make sure there are no incompatibilities at this time. • Platform issues For 11i v3 platform support, see the following matrix: HP-UX Integrity Server Support Matrix • Serviceguard issues For information about the Storage Multi-Pathing choices in HP-UX Serviceguard environments, see the following white paper: http://haweb.cup.hp.com/ATC/Web/Whitepapers/content/HA_DT/ 4AA1-4403ENW_SG_multi-pathing_WP.pdf • Other issues 2.4 Updating Integrity VM V4.0 VM Host to Integrity VM V4.1 This section describes the process of updating the Integrity VM V4.0 VM Host to Integrity VM V4.1. Once you have read the product release notes and verified that you have met the system requirements as described in Section 2.1.1, install the Integrity VM software as described in this section. NOTE: Installing the Integrity VM software requires the system to reboot. Therefore, the swinstall command line installation includes the autoreboot=true parameter. To install the HP Integrity VM software, follow these steps: 1. If you have the installation media, mount it. If you are installing from the network, identify the VM Host and path name that correspond to the software distribution depot that contains the T2767CC bundle (for example, my.server.foo.com:/depot/path). 2. Use the swinstall command to install Integrity VM and specify the path to the depot. For example: # swinstall -x autoreboot=true -s my.server.foo.com:/depot/path T2767CC If you are using the GUI (swinstall i), perform the following steps: a. Enter the following commands: # export DISPLAY=your display variable # swinstall b. Select the Integrity VM bundle (T2767CC) from the list presented by the GUI. The VM Host and guest configuration files are stored at /var/opt/hpvm. The new configuration files are not compatible with those of previous versions of Integrity VM. Therefore, if you are upgrading to the current version, the guest configuration files (except the /ISO-Images/ directory) are saved to the /var/opt/hpvm_backup directory. If you revert to the older version of Integrity VM, you can use the backup configuration files to restore your VM Host and guest configurations. 2.4 Updating Integrity VM V4.0 VM Host to Integrity VM V4.1 35 NOTE: You may receive a warning message during the swinstall session indicating that the AVIO bundles are not installed. The installation will continue and complete successfully. The AVIO bundles are optional and should install by default. If they did not, and you want to install them with the Integrity VM bundle T2767CC, go to the HP-UX 11i v3 0903 media and look for the following bundles to install on the VM Host, HostAVIOStor and HostAvioLan. 3. Unmount and remove any installation media. The VM Host system automatically reboots, if necessary. 4. Once the Integrity VM software is installed and running, the VM Host is available. Enter the following command to get information about the status of the guests: # hpvmstatus hpvmstatus: No guest information is available. hpvmstatus: Unable to continue. 2.5 Verifying the Installation of Integrity VM To verify that Integrity VM installed successfully, enter the following command: # hpvminfo hpvminfo: Running on an HPVM host. To see exactly what versions of specific bundles are installed, enter the swlist command. (Specific version numbers on your installation may not match the examples in this manual.) # swlist | grep -i "integrity vm" T2767CC B.04.10 Integrity VM VMGuestLib B.04.10 Integrity VM Guest Support Libraries VMGuestSW B.04.10 Integrity VM Guest Support Software VMKernelSW B.04.10 Integrity VM Kernel Software When you install Integrity VM, the file /etc/rc.config.d/hpvmconf is created to record the product configuration. Note, HPVMNETINTVL has been removed from this file. 2.6 Removing Integrity VM To remove the Integrity VM product, you must remove the following software bundles: • VMProvider (if installed) • T2767CC • VMGuestLib • VMGuestSW • VMKernelSW (reboots the system) • HostAvioLan • HostAVIOStor • GuestAvioLan • GuestAVIOStor To remove these bundles, enter the following commands: # swremove -x autoreboot=true T2801AA vmProvider # rm -rf /opt/hpvm # rm -rf /opt/hpvmprovider Guests are not affected by this procedure. To remove guests, see the procedures in Section 3.8 (page 58). 2.7 Reserving VM Host Devices You can protect the storage and network resources used by the VM Host against usage and corruption by virtual machines by marking the VM Host devices as restricted devices. For 36 Installing Integrity VM example, you can reserve the disk storage on which the VM Host operating system and swap space reside, which prevents guests from being able to access the same disk storage devices. The hpvmdevmgmt command allows you to establish restricted devices. For example, to restrict the /dev/rdisk/disk1 device, enter the following command: # hpvmdevmgmt –a rdev:/dev/rdisk/disk1 To complete the restriction of volumes, each device included in the volume must also be restricted. For more information about using the hpvmdevmgmt command, see Section 9.8 (page 148). 2.8 Troubleshooting Installation Problems If the installation verification fails, report the problem using the procedures described in Chapter 12 (page 189). Some problems encountered in the process of installing Integrity VM are described in the following sections. 2.8.1 Error Messages During Installation One or more of the following messages might be displayed during Integrity VM installation: could not write monParams: Device is busy hpvmnet * already exists /sbin/init.d/hpvm start ran without running /sbin/init.d/hpvm stop You can ignore these messages. 2.8 Troubleshooting Installation Problems 37 38 3 Creating Virtual Machines After you install Integrity VM, you can create guests and virtual resources for the guests to use. This chapter includes the following topics: • “Legacy and Agile Device Names” • “Specifying Virtual Machine Characteristics” • “Using the hpvmcreate Command” • “Starting Virtual Machines” • “Changing Virtual Machine Configurations” • “Cloning Virtual Machines” • “Stopping Virtual Machines” • “Removing Virtual Machines” • “Troubleshooting Virtual Machine Creation Problems” 3.1 Legacy and Agile Device Names Integrity VM Version 4.1 supports the usage of both legacy and agile devices in guest configurations. Use of agile device names for configuring storage devices is highly recommended as it provides multipathing benefits. You can use the hpvmmodify -P guest -m rsrc command to change the existing legacy device to its agile device equivalent. The ioscan -m dsf command displays the mapping of the agile devices to legacy devices for the specific device special file dsf and vice versa. For example: # ioscan -m dsf /dev/rdisk/disk216 Or: # ioscan -m dsf /dev/rdsk/c12t0d0 NOTE: The rmsf -L command should not be executed on an Integrity VM server until all guest devices names have been changed to agile device names. The following commands are helpful for reconfiguring guests to use agile device names: Table 3-1 Commands for Reconfiguring Guests to Agile Device Names Command Description By default, creates both persistent and legacy DSFs for new devices. insf Restores legacy DSFs and legacy configuration information. insf -L Aids in migration by removing all legacy DSFs and legacy configuration information. rmsf -L Maps persistent DSFs to their equivalent legacy DSFs and vice versa. ioscan —m dsf Prints persistent DSFs when used with the -n option to list DSFs. ioscan -N Associates a new disk with an existing set of DSFs. This is used when replacing an internal disk or a disk in a JBOD. io_redirect_dsf hpvmmodify -P guest —m rsrc Modifies backing devices for guest devices. 3.1 Legacy and Agile Device Names 39 3.2 Specifying Virtual Machine Characteristics When you create a new virtual machine, you specify its characteristics. Later, you can change the virtual machine characteristics. You can set the characteristics of a virtual machine using the following commands: • hpvmcreate, which creates new virtual machines. • hpvmclone, which creates new virtual machines based on existing virtual machines. • hpvmmodify, which modifies existing virtual machines. • hpvmmigrate, which moves virtual machines from one system to another. All of these commands accept the same options for specifying virtual machine characteristics. Table 3-2 describes each characteristic and command option. Table 3-2 Characteristics of an Integrity Virtual Machine Virtual Machine Characteristic Default Setting Command Option Where Described You must specify a name -P vm-name Section 3.2.1 (page 41) when you create or modify the virtual machine. You cannot modify this characteristic. Virtual machine name -O os_type Section 3.2.2 (page 41) [:version] If you do not specify the operating system type, it is set to UNKNOWN. Operating system type If you omit this option when -c number_vcpus Section 3.2.3 (page 41) you create the virtual machine, the default is one vCPU. Virtual CPUs (vCPUs) -epercent[:max_percent] Section 3.2.4 (page 41) -E cycles[:max_cycles] If you omit this option when you create the virtual machine, the default is 10%. CPU entitlement If you omit this option when -r amount Section 3.2.5 (page 42) you create the virtual machine, the default is 2 GB. Memory If you omit this option when -a rsrc Section 3.2.7 (page 43) you create the virtual machine, it has access to no network and storage devices. Virtual devices If you omit this option, the -lvm_label Section 3.2.8 (page 46) virtual machine has no label. Virtual machine label If you omit the option, it is -B start_attribute Section 3.2.9 (page 46) set to auto, and the virtual machine starts when Integrity VM is started. Startup behavior -x Section 3.2.10 (page 47) keyword=parameter If you omit the option, dynamic memory is not enabled for the guest. Dynamic memory -g [+]group[:admin Section 9.2 (page 135) | oper] If you omit this option, no group accounts have admin or oper privileges. Group with administrator or operator privileges -u [+]user[:admin | Section 9.2 (page 135) oper] If you omit this option, no user accounts have admin or oper privileges. User with administrator or operator privileges 40 Creating Virtual Machines 3.2.1 Virtual Machine Name Use the -P vm-name option to specify the name of the new virtual machine. This option is required for the hpvmcreate command. In the following example, the new virtual machine is named host1. On the VM Host, enter the following command: # hpvmcreate -P host1 The virtual machine name can be up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and period (.). The virtual machine name must not start with a dash. 3.2.2 Guest Operating System Type Use the -O os_type option to specify the type of operating system that will run on the virtual machine. This option is not required. For os_type, specify one of the following case-insensitive values: • hpux For specific information about installing HP-UX guests, see Chapter 4 (page 61). • windows For specific information about installing Windows guests, see Chapter 5 (page 65). • linux For specific information about installing Linux guests, see Chapter 6 (page 79). If you do not supply the operating system type, it defaults to UNKNOWN. When you install the operating system and boot the guest, this guest configuration parameter is automatically set to the appropriate operating system type. In the following example, the virtual machine host1 is specified as a Linux guest: # hpvmcreate -P host1 -O linux When a running guest transitions from running in the machine console to running in the operating system, the operating system type is detected. If the operating system type is different from the information in the guest's configuration file, it is automatically updated to reflect the current operating system. 3.2.3 Virtual CPUs Use the -c number_vcpus option to the command to specify the number of virtual CPUs (vCPUs) that the virtual machine can use. If you do not specify the number of vCPUs, the default is 1. For example, to set the new virtual machine host1 to have two vCPUs, enter the following command: # hpvmcreate -P host1 -c 2 Every virtual machine has at least one vCPU. A running virtual machine cannot use more vCPUs than the number of physical CPUs on the VM Host system. (For the purpose of this discussion, the term “physical CPU” refers to a processing entity on which a software thread can be scheduled.) However, Integrity VM allows you to create a virtual machine with more vCPUs than the number of physical CPUs on the VM Host system. Warning messages are displayed if there are not enough physical CPUs to run the virtual machine. This feature allows you to create virtual machines for future configurations. However, the virtual machine is not allowed to start on a VM Host system that does not have enough physical CPUs. 3.2.4 Entitlement Use the -e or -E option to specify the virtual machine's entitlement. 3.2 Specifying Virtual Machine Characteristics 41 Virtual machine entitlement is the minimum amount of processing power guaranteed to the virtual machine from each virtual CPU. When you create a virtual machine, you can use the -e option to specify the entitlement as a percentage, from 5% to 100%. If you do not specify the entitlement, the virtual machine receives 10% entitlement by default. Alternatively, you can use the -E option to specify the entitlement as the number of CPU clock cycles per second to be guaranteed to each vCPU on the virtual machine. For example, to specify an entitlement of 20% for the new virtual machine host1, enter the following command: # hpvmcreate -P host1 -e 20 When the virtual machine starts, the VM Host ensures that sufficient processing power is available for every running virtual machine to receive its entitlement. For virtual machines with multiple virtual CPUs, the entitlement is guaranteed on each vCPU in the virtual machine's configuration. For example, if a virtual machine has four vCPUs, and the entitlement is set at 12%, the VM Host ensures that the equivalent of at least 48% of one physical CPU is available to that virtual machine. To allow multiple virtual machines to run at the same time, make sure that the entitlement of each virtual machine does not prevent the others from obtaining sufficient processor resources. The sum of all entitlements across all active virtual machines cannot total more than 100% for any physical processor. If available processor resources are insufficient, the virtual machine is not allowed to boot; error messages are displayed to indicate the specific problem. If a virtual machine is busy and sufficient processing resources are available on the VM Host system, the virtual machine can receive more than its entitlement. When there is contention for processing resources (on a VM Host system with busy virtual machines), each virtual machine is limited to its entitlement. For help managing CPU power across multiple virtual machines, install the HP Global Workload Manager (gWLM) on the VM Host system. For more information, see HP Integrity Essentials Global Workload Manager Administrator's Guide. 3.2.5 Guest Memory Allocation Use the -r amount option to specify the amount of virtual memory to be allocated to the guest. If you do not specify the memory allocation, the default is 2 GB. For example, to allocate three gigabytes to the virtual machine host1, enter the following command: # hpvmcreate -P host1 -r 3G The amount of memory to allocate is the total of the following: • The amount of memory required by the guest operating system. • The amount of memory required by the applications running on the guest. The amount of memory should be at least the total of these two amounts. If there is not enough memory in the current configuration, Integrity VM issues a warning but allows you to create the virtual machine. This allows you to create virtual machines for future configurations. When the virtual machine is started, the VM Host checks memory resources, including those allocated to running guests, and makes sure that there is sufficient memory to run the virtual machine. In addition to the amount of memory you specify for the virtual machine, the VM Host requires a certain amount of overhead for booting the guest operating system. The amount of memory allocated to all the running guests cannot exceed the amount of physical memory minus the amount used by the VM Host for its operating system and its administrative functions. For more information about the memory requirements of the VM Host, see Section 2.1 (page 23). Guest memory allocation can be viewed and allocated dynamically (that is, without stopping the guest) by using dynamic memory parameters, as described in Section 9.6 (page 140). 42 Creating Virtual Machines 3.2.6 Automatic Cell Balancing When creating a guest, Integrity VM determines the best fitting locality domain for the new guest when the VM Host is predominantly Cell Local Memory(CLM) or the guest has the sched_preference flag set to cell with the hpvmmodify, hpvmcreate or hpvmclone command. Integrity VM uses this setting as a guide for run-time scheduler planning as well as guest boot time CPU and memory binding. The hpvmstatus -C command provides a list of guests with their memory type. If you do not use CLM at all, then all the guests use Interleaved Memory (ILM). If however, CLM is set, every hpvmstart command checks whether Integrity VM chooses cell or interleaved for this particular guest, and if cell is chosen, which cell it is. For example, you have an 8 GB VM Host configured with 75 percent CLM and 25 percent ILM. With two cells, each contributes 3 GB to cell local and 1 GB to interleaved. On boot, the operating system takes 1GB of the interleaved memory. If each guest takes 1 GB to start, the breakdown looks like this: • guest 1: cell 0 (2 GB CLM left) • guest 2: cell 1 (2 GB CLM left) • guest 3: cell 0 (1 GB CLM left) • guest 4: cell 1 (1 GB CLM left) • guest 5: cell 0 (no CLM left) • guest 6: cell 1 (no CLM left) • guest 7: interleaved (no memory left at all) The general trend is for CLM if any cell has at least as much free space as the available ILM. 3.2.7 Virtual Devices Use the -a option to allocate virtual network switches and virtual storage devices to the virtual machine. The VM Host presents devices to the virtual machine as “virtual devices.” Attached I/O devices, such as tape, DVD burner, and autochanger, are not presented as virtual devices; they are presented as direct I/O devices. You specify both the physical device to allocate to the virtual machine and the virtual device name that the virtual machine will use to access the device. The following sections provide brief instructions for creating virtual network devices and virtual storage devices. 3.2.7.1 Creating Virtual Network Devices The guest virtual network consists of: • Virtual network interface cards (vNICs) • Virtual switches (vswitches) For virtual machines to communicate either with other virtual machines or outside the VM Host system, each virtual machine's virtual network must be associated with a virtual switch (vswitch). If you start a virtual machine without a vswitch, the virtual machine has no network communication channel. Each guest can have two different types of LAN network devices, VIO and AVIO. For VIO guest networks, a vswitch functions just like a physical network interface card (pNIC), accepting network traffic from one or more virtual machines and directing network traffic to all of its ports. A vswitch without the backing of a host physical network card can be used by VIO guest devices for communication among VIO guest devices registered with the same vswitch. This type of vswitch is typically referred to as localnet. For more information, see Section 8.2.1.1 (page 122). Unlike VIO guest networks, traffic from an AVIO guest LAN network device is directed to the pNIC directly by a separate host module rather than by the vswitch. In addition, AVIO does not support localnet type vswitch, because each AVIO guest device must have a backing of the host physical device. 3.2 Specifying Virtual Machine Characteristics 43 You can create vswitches before or after creating guests that access the vswitches. If you create the virtual machine before creating the vswitch, the virtual machine is created and warning messages display the specific problem. This allows you to create virtual machines for future configurations. To create a vswitch, enter the hpvmnet -c command. Include the -S option to specify the name of the virtual switch. For example: # hpvmnet -c -S vswitch-name -n nic-id where: • vswitch-name is the name you assign to the vswitch. You must specify the name of the vswitch. • nic-id is the pNIC ID on the VM Host. If you omit the nic-id, the vswitch is created for the localnet. To start the vswitch, enter the hpvmnet -b command. For example: # hpvmnet -b -S vswitch-name For more information about using the hpvmnet command, see Section 8.2.1 (page 120). To create the virtual machine and allocate the vswitch to it, use the -a option to the hpvmcreate command. For example: # hpvmcreate -P vm-name -a network:adapter-type:[hardware-address]:vswitch:vswitch-name where hardware-address (optional) is the vNIC PCI bus number, device, and MAC address. If you omit the hardware address, it is generated for you. HP recommends that you allow this information to be automatically generated. In this case, omit the hardware-address value from the command line, but retain the colon character separator. For example: # hpvmcreate -P vm-name -a network:adapter-type:vswitch:vswitch-name The adapter-type can be either lan or avio_lan. On the guest, use standard operating commands and utilities to associate the vNIC with an IP address, or use DHCP just as you would for a physically independent machine. By default, vswitches are sharable; you can allocate the same vswitch to multiple virtual machines. Virtual LANs allow virtual machines to communicate with other virtual machines using the same VLAN, either on the same VM Host or on different VM Host systems. You associate the VLAN port number with a vswitch, then allocate that vswitch to virtual machines that communicate on that VLAN. For more information about HP-UX VLANs, see the manual Using HP-UX VLANs. NOTE: If the guest is configured with a number of VLAN devices, but it does not have sufficient memory, some of the devices might be missing after the guest is booted. To resolve this issue, increase the size of the guest memory with the hpvmmodify -r command. For more information about creating and managing VLANs on virtual switches, see Section 8.4 (page 126). 3.2.7.2 Creating Virtual Storage Devices When you create a virtual machine, you specify the virtual storage devices that the virtual machine uses. Virtual storage devices are backed by physical devices on the VM Host system (backing stores). The VM Host system must have sufficient physical storage for the VM Host and for all of the virtual machines. Use the -a option to create and allocate the virtual device to the virtual machine. For example: # hpvmcreate -a VM-guest-storage-specification:VM-Host-storage-specification where: • VM-guest-storage-specification defines where and what storage is seen in the virtual machine. This is formatted as: 44 Creating Virtual Machines device:adapter-type:hardware-address: You can specify one of the following devices: — disk — dvd — tape — changer — burner • adapter-type can be scsi or avio_stor on an HP-UX 11i v2 guest (0505 or later). • hardware-address or pcibus, pcislot,scsitgt (optional) specifies the virtual device PCI bus number, PCI slot number, and SCSI target number. If you do not specify this information, it is generated automatically. HP recommends that you allow the hardware address to be generated automatically. To omit the hardware address, use the following format (including two colons): device:adapter-type::VM-Host-storage-specification • VM-Host-storage-specification defines where and how the virtual machine storage is supplied on the VM Host. Specify it using the following format: storage:location Where storage is one of the following: — disk — lv — file — null — attach And location is a VM Host system file. NOTE: AVIO adapter type has the following restrictions: • Backing store (storage) can be only disk, volume (lv), null, or file. • There is no attached device support (burners, tapes, and changers). • Guest device type (device) can be only disk or DVD. For complete information about constructing storage specifications for virtual machines, see Section 7.2.2.1 (page 100). The type of VM Host backing store can affect the performance of the virtual machine. Use the ioscan command to obtain information about the current device configuration on the VM Host system, and try to distribute the workload of the virtual machines across the physical backing stores. When you share a physical backing storage device among virtual machines. potential conflicts are not always obvious. For example, if you use a file in a file system on /dev/disk/disk1 as a backing store, the raw device (/dev/rdisk/disk1) cannot also be used as a backing store. For more information about specifying virtual devices, see Chapter 7 (page 91). Integrity VM checks the current physical configuration when you create a virtual machine using the hpvmcreate command. If the virtual machine uses backing stores that are not available, the virtual machine is created, and warning messages provide details. If you use the hpvmstart command to start a virtual machine that requires physical resources that are not available on the VM Host system, the virtual machine is not allowed to start, and error messages provide detailed information about the problem. After you create a virtual machine, you can use the hpvmmodify command to add, remove, or modify storage devices for the virtual machine. To add a device to an existing virtual machine, include the -a option, the same way you would on an hpvmcreate command. For example, 3.2 Specifying Virtual Machine Characteristics 45 the following command modifies the virtual machine named host1, adding a virtual DVD device backed by the physical disk device /c1t1d2. The virtual hardware address is omitted and will be generated automatically. # hpvmmodify -P host1 -a dvd:scsi::disk:/dev/rdisk/disk2 You can modify storage devices while the virtual machine is running. It is not necessary to restart the virtual machine; however, it may be necessary to rescan for devices on the virtual machine. Some devices should be restricted to use by the VM Host and to each guest (for example, boot devices and swap devices). Specify restricted devices using the hpvmdevmgmt command. For more information about sharing and restricting devices, see Section 9.8.2.4 (page 150). Any alternate boot devices should be set with the same care that you would use on a physical system. If the primary boot device fails for any reason, a virtual machine set to autoboot attempts to boot from devices in the specified boot order until either an option succeeds or it reaches the EFI Shell. Make sure that any specified boot options, and the boot order, are appropriate for the guest. For more information about the autoboot setting, see Table 3-4. 3.2.8 Creating Virtual Machine Labels The -l option specifies the label of the virtual machine. The virtual machine label is a descriptive label unique to this virtual machine. The label can be useful in identifying a specific virtual machine in the hpvmstatus -V display. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). If white space is desired, the label must be quoted (""). 3.2.9 Specifying the Virtual Machine Boot Attribute The -B option specifies the startup behavior of the virtual machine. The start_attr attribute can have the following (case-insensitive) values: • auto: Automatically start the virtual machine when Integrity VM is initialized on the host. • manual: Manually start the virtual machine. If the start_attr attribute is set to auto, the virtual machine is started when Integrity VM is initialized. This is the default. This occurs when the VM Host system is booted, and when the Integrity VM software is stopped and restarted on a running VM Host. For example, when you upgrade Integrity VM to a new version on a running system, the software is started automatically. The VM Host attempts to start all virtual machines for which the attribute is set to auto. If insufficient resources exist, some virtual machines may fail to start. If the attribute is set to manual, the virtual machine will not be started automatically when Integrity VM is initialized on the VM Host. The virtual machine can then be started manually with the hpvmstart command or through its virtual console. This option does not set the virtual machine's console to enable booting when the virtual machine is started. This function must be set with the virtual machine's console. The following command clones the VM oldvm, creating a new VM named newvm: # hpvmclone -P oldvm -N newvm -b disk:scsi::0,1,2:file:/hpvm/newvm/diskA The -b option copies the contents of oldvm virtual disk with bus, device, target triple of 0,1,2 to the file /hpvm/newvm/diskA. The boot options for the new virtual machine are automatically modified to use the specified disk as its boot disk. The following command displays the devices on the specified virtual machine in the same format used on the command line: # hpvmstatus -P oldvm -d [Virtual Machine Devices] [Storage Interface Details] disk:scsi::0,1,2:file:/hpvm/oldvm/disk0 disk:scsi::0,0,1:file:/hpvm/oldvm/disk1 46 Creating Virtual Machines [Network Interface Details] network:lan:0,1,0xDAA9A3B92227:vswitch:vswB [Misc Interface Details] serial:com1::tty:console 3.2.10 Specifying Dynamic Memory Parameters Specifies whether the new virtual machine will use dynamic memory and the values associated with it by including the following keywords: • dynamic_memory_control={0|1} • ram_dyn_type={none|any|driver} • ram_dyn_min=amount • ram_dyn_max=amount • ram_dyn_target_start=amount For more information about using dynamic memory for guests, see Section 9.6 (page 140). 3.2.11 Configuration Limits Table 3-3 lists the configuration limits for Integrity VM Version 4.1 (and Version 3.5). Table 3-3 Configuration Limits Description Support # vCPUs/VM—Maximum(Integrity VMV3.5Max vCPU min (#pCPUs, Max vCPU) = 4, Integrity VM V4.1 Max vCPU = 8) # vCPUs/pCPU— Maximum 20 # VMs per VM Host— Maximum min (20 * pCPUs, 254) # pCPUs in VM Host HP-UX limit Memory per VM— Minimum (11i v2 HP-UX) 1 GB Memory per VM— Minimum (11i v3 HP-UX) 1.5 GB Memory per VM— Maximum (HP-UX) 64 GB Memory per VM— Minimum (Windows) 1 GB Memory per VM— Maximum (Windows) 64 GB Memory per VM— Minimum (Linux (RH)) 512 MB Memory per VM— Maximum (Linux (RH)) 64 GB Memory per VM— Minimum (Linux (SLES)) 512 MB Memory per VM— Maximum (Linux (SLES)) 64 GB # virtual SCSI devices / VM— Maximum 128 AVIO + 30 VIO # virtual NICs / VM— Maximum 10 # virtual switches— Maximum 50 # virtual NICs / vswitch 64 # virtual AVIO storage devices / VM—Maximum 128 # file backing store devices / VM— Maximum 30 # virtual AVIO storage devices VM Maximum 128 3.2 Specifying Virtual Machine Characteristics 47 Table 3-3 Configuration Limits (continued) Description Support # file backing store devices VM Maximum 30 Maximum size of backing store (disk, lvol, file) > 2 TB 3.3 Using the hpvmcreate Command To create a virtual machine, enter the hpvmcreate command. Enter the -P option to specify the virtual machine name (up to 256 alphanumeric characters). All other options are optional and may be added to the virtual machine configuration later using the hpvmmodify command. Table 3-4 describes the options you can use with the hpvmcreate command. Table 3-4 Options to the hpvmcreate Command Option Description Virtual machine name. You must specify a name when you create or modify the virtual machine. You cannot modify this characteristic. -P vm-name Operating system. If you do not specify the operating system type, it is set to UNKNOWN. -O os_type Virtual CPUs (vCPUs) allocated. If you omit this option when you create the virtual machine, the default is one vCPU. -c number_vcpus CPU entitlement allocated. If you omit this option when you create the virtual machine, the default is 10%. -e percent[:max_percent] -E cycles[:max_cycles] Memory allocated. If you omit this option when you create the virtual machine, the default is 2 GB. -r amount Virtual devices created. If you omit this option when you create the virtual machine, it has access to no network and storage devices. -a rsrc The label for the virtual machine (an optional text string associated with the virtual machine). -l vm_label -B start_attribute The startup behavior of the virtual machine (auto or manual). Specifies values for dynamic memory setting associated with the guest, including: • dynamic_memory_control • ram_dyn_type • ram_dyn_min • ram_dyn_max • ram_dyn_target_start • sched_preference • graceful_stop_timeout For more information about dynamic memory, see Section 9.6 (page 140). -x keyword=parameter Suppresses all resource conflict checks and associated warning messages (force mode). This option is primarily intended for use by scripts and other noninteractive applications. Note that you will receive no notification of potential resource problems for a virtual machine created with the F option. -F Verifies the virtual machine configuration and returns warnings or errors, but does not create the virtual machine. This option is used to invoke the hpvmcreate command's resource checking for a virtual machine configuration without actually creating the virtual machine. If the -s option is not specified, the virtual machine is created even if resource warnings occur. -s 48 Creating Virtual Machines Table 3-4 Options to the hpvmcreate Command (continued) Option Description Group with administrator or operator privileges over the virtual machine. Enter the group name for group, and enter either admin or oper. -g group[:admin | oper] User with administrator or operator privileges over the virtual machine. Enter the user name for user, and enter either admin or oper. -u user[:admin | oper] Specifies whether the virtual machine is managed by Serviceguard or gWLM (or both). For the argument, specify the Serviceguard package name, gWLM or both. CAUTION: This option is used by Integrity VM software; do not use this option without express instruction by HP. -ipackage-name Specified whether the virtual machine is a distributed guest (that is, managed by Serviceguard and can be failed over to another cluster member). CAUTION: This option is used by Integrity VM software; do not use this option without express instruction by HP. -j {0 | 1} 3.3.1 Example of Virtual Machine Creation To create a virtual machine named host1, enter the following command: # hpvmcreate -P host1 This command creates a virtual machine named host1 with no network access and no allocated storage devices. To view the characteristics of the virtual machine, enter the hpvmstatus command. For example: # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== config1 1 HPUX Off 1 5 1 512 MB 0 config2 2 HPUX Off 1 7 1 1 GB 0 winguest1 5 WINDOWS On (OS) 1 5 1 1 GB 0 winguest2 9 WINDOWS Off 1 3 1 2 GB 0 host1 12 UNKNOWN Off 1 0 0 2 GB 0 The host1 virtual machine has been assigned virtual machine number 12, has been created with an UNKNOWN operating system type, one vCPU, no storage devices, no network devices, and 2 GB of memory. The Runsysid column indicates the VM Host that runs the virtual machine in a Serviceguard cluster. If the virtual machine runs on the local VM Host, or if Serviceguard is not configured, the Runsysid is zero. For more information about running virtual machines under Serviceguard, see Chapter 11: “Using HP Serviceguard with Integrity VM” (page 175). 3.4 Starting Virtual Machines To start the virtual machine, enter the hpvmstart command. You can specify either the virtual machine name or the virtual machine number (listed in the hpvmstatus display under VM #.) The hpvmstart command syntax is: # hpvmstart {-P vm-name | -p vm_number} [-F | -s | -Q] Table 3-5 describes the options to the hpvmstart command. 3.4 Starting Virtual Machines 49 Table 3-5 Options to the hpvmstart Command Option Description Specifies the name of the virtual machine. Specify either the -P option or the -p option. -P vm-name Specifies the number of the virtual machine. To determine the virtual machine number, enter the hpvmstatus command. -p vm_number Suppresses all resource conflict checks and associated warning messages (force mode). Use force mode for troubleshooting purposes only. -F Sanity-checks the virtual machine configuration and returns warnings or errors, but doesn't start the virtual machine. -s Quietly performs the command. The default is to prompt for confirmation of the command before performing it. -Q For example, to start the new virtual machine host1, enter the following command: # hpvmstart -P host1 (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Opening minor device and creating guest machine container Creation of VM, minor device 2 Allocating guest memory: 2048MB allocating low RAM (0-80000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/8ba249f2-3399-11db-aacc-00306ef392e0 /vmm_config.current): Allocated 2147483648 bytes at 0x6000000100000000 locking memory: 0-80000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/8ba249f2-3399-11db-aacc-00306ef392e0 /vmm_config.current): Allocated 86016 bytes at 0x6000000180000000 locked SAL RAM: 00000000ffaa0000 (4KB) locked ESI RAM: 00000000ffaa1000 (4KB) locked PAL RAM: 00000000ffaa4000 (4KB) locked Min Save State: 00000000ffaa5000 (1KB) RAM alignment: 40000000 Memory base low : 6000000100000000 Memory base FW : 6000000180000000 Loading boot image Image initial IP=102000 GP=62C000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'host1' The hpvmstatus command displays the allocation of memory and devices. After you start the virtual machine, the hpvmstatus command displays the virtual machine status as On (EFI), because the virtual machine is powered on but the guest operating system is not running. Because the operating system has not been installed, the guest OS type is listed as UNKNOWN. # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== config1 1 HPUX Off 1 5 1 512 MB 0 config2 2 HPUX Off 1 7 1 1 GB 0 winguest1 5 WINDOWS On (OS) 1 5 1 1 GB 0 winguest2 9 WINDOWS Off 1 3 1 2 GB 0 host1 13 UNKNOWN On (EFI) 1 0 0 2 GB 0 For more information about using the hpvmstatus command, see Chapter 9 (page 133). 50 Creating Virtual Machines 3.5 Changing Virtual Machine Configurations You can create a virtual machine with characteristics that the VM Host cannot supply at the time of creation. This allows you to create virtual machines to run after system configuration changes. For example, the following command creates the virtual machine host1 with 3 vCPUs and 4 GB of allocated memory: # hpvmcreate -P host1 -c 3 -r 4G HPVM guest host1 configuration problems: Warning 1: Guest's vcpus exceeds server's physical cpus. Warning 2: Insufficient cpu resource for guest. These problems may prevent HPVM guest host1 from starting. hpvmcreate: The creation process is continuing. Because the VM Host is not currently configured to support the new virtual machine, warning messages indicate the specific characteristics that are inadequate. When you start a virtual machine, the VM Host determines whether the current system configuration can support the virtual machine's characteristics. The ability of the system to run the virtual machine can be affected by the other virtual machines that are currently running, because they share the physical processors and memory. Any allocated vswitches must be started, and storage devices must be made available to the virtual machine. If the virtual machine cannot be started, the following type of message is generated: # hpvmstart -P host1 HPVM guest host1 configuration problems: Warning 1: Insufficient free memory for guest. Warning 2: Insufficient cpu resource for guest. These problems may prevent HPVM guest host1 from booting. hpvmstart: Unable to continue. You can either change the system configuration, or modify the virtual machine. To modify the characteristics of a virtual machine, use the hpvmmodify command. Table 3-6 describes the options you can use on the hpvmmodify command. Table 3-6 Options to the hpvmmodify Command Option Description Specifies the name of the virtual machine. You must specify either the -P option or the -p option.. -P vm-name Specifies the number of the virtual machine. To determine the virtual machine number, enter the hpvmstatus command. -p vm_number Suppresses all resource conflict checks and associated warning messages (force mode). Use force mode for troubleshooting purposes only. -F Sanity-checks the virtual machine configuration and returns warnings or errors, but does not start the virtual machine. -s Specifies a new name for the virtual machine. The name can consist of up to 256 alphanumeric characters including A-Z, a-z, 0-9, the dash (-), the underscore character (_), and the period (.). The virtual machine name cannot start with a dash (—). -N new-vm-name Modifies the descriptive label for this virtual machine. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). To include spaces, the label must be quoted (" "). -l vm_label Modifies the startup behavior of the virtual machine. For start_attr, enter one of the following: auto: Automatically starts the virtual machine when Integrity VM is initialized on the VM Host. manual: The virtual machine is not started automatically. Use the hpvmstart command to start the virtual machine manually. -B start_attr 3.5 Changing Virtual Machine Configurations 51 Table 3-6 Options to the hpvmmodify Command (continued) Option Description Modifies the type and version of the operating system running on the virtual machine. For the os-type, specify one of the following (case-insensitive) values: hpux windows linux -O os_type[:version] Modifies the number of virtual CPUs this virtual machine detects at boot time. If unspecified, the number defaults to one. The maximum number of vCPUs that you can allocate to a virtual machine is the number of physical processors on the VM Host system. -c number_vcpus Modifies the virtual machine's CPU entitlement in CPU cycles. To specify the percentage of CPU power, enter the following option: -e percent[:max_percent] To specify the clock cycles, enter one of the following options: -E cycles[:max_cycles]M (for megahertz) -E cycles[:max_cycles]G (for gigahertz) -e percent[:max_percent] | -E cycles[:max_cycles] Specifies a group authorization. The specified administrative level (admin or oper) is applied to the specified user group. -g group[:{admin|oper}] Specifies a user authorization. The specified administrative level (admin or oper) is applied to the specified user. -u user[:{admin|oper}] Adds a virtual storage or network device to the virtual machine. For more information, see hpvmresources(5). -a rsrc Modifies an existing I/O resource for a virtual machine. The resource is specified as described below. You must specify the hardware address of the device to modify. The physical device portion of the rsrc specifies a new physical device that replaces the one in use. -m rsrc -d rsrc Deletes a virtual resource. Modifies the amount of memory available to this virtual machine. Specify the amount as either amountM (for megabtyes) or amountG (for gigabytes). -r amount Specifies whether the virtual machine is managed by Serviceguard or gWLM (or both). For the argument, specify one or more of the following parameters: • SG indicates that the VM Host is a Serviceguard cluster node. • SG-pkgname indicates that the VM Host is a Serviceguard package. • GWLM indicates that the VM Host is managed by gWLM. • NONE indicates there are no external managers. For a node that is managed by both Serviceguard and gWLM, parameters are separated with a comma. For example: SG_host1,gWLM. Do not specify this option. This option is used internally by Integrity VM. -i package-name 52 Creating Virtual Machines Table 3-6 Options to the hpvmmodify Command (continued) Option Description Specifies whether the virtual machine is a distributed guest (that is, managed by Serviceguard) and can be failed over to another cluster member running Integrity VM. Do not specify this option. This option is used internally by Integrity VM. -j [0|1] Specifies values for dynamic memory setting associated with the guest, including: • dynamic_memory_control • ram_dyn_type • ram_dyn_min • ram_dyn_max • ram_dyn_target_start • runnable_status • not_runnable_reason • graceful_stop_timeout • sched_preference Specifies settings for Online VM Migration: • online_migration • migrate_init_phase_timeout • migrate_copy_phase_timeout • migrate_io_quiesce_phase_timeout • migrate_frozen_phase_timeout • online_migration For more information about dynamic memory, see Section 9.6 (page 140). -x keyword=parameter For example, to modify the characteristics of the problematic virtual machine host1 to remove vCPUs and memory, enter the following command: # hpvmmodify -P host1 -c 1 -r 2G This command changes the following characteristics of the virtual machine named host1: • The -c 1 option specifies one vCPU. • The -r 2G option specifies two GB of memory. The hpvmmodify command generated no warnings, so the VM Host system is ready to start the virtual machine. After you make the necessary modifications, use the hpvmstart command to start the virtual machine. For example: # hpvmstart -P host1 (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Initializing System Event Log Initializing Forward Progress Log Opening minor device and creating guest machine container Creation of VM, minor device 2 Allocating guest memory: 2048MB allocating low RAM (0-40000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/8ba249f2-3399-11db-aacc-00306ef392e0 /vmm_config.next): Allocated 1073741824 bytes at 0x6000000100000000 locking memory: 0-40000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/8ba249f2-3399-11db-aacc-00306ef392e0 /vmm_config.next): Allocated 86016 bytes at 0x6000000140000000 locked SAL RAM: 00000000ffaa0000 (4KB) locked ESI RAM: 00000000ffaa1000 (4KB) locked PAL RAM: 00000000ffaa4000 (4KB) locked Min Save State: 00000000ffaa5000 (1KB) RAM alignment: 40000000 Memory base low : 6000000100000000 Memory base FW : 6000000140000000 Loading boot image 3.5 Changing Virtual Machine Configurations 53 Image initial IP=102000 GP=62C000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'host1' The virtual machine host1 is started. Now the guest operating system must be installed. For information about creating HP-UX guests, see Chapter 4. For information about creating Windows guests, see Chapter 5. 3.6 Cloning Virtual Machines Once you have created a guest, you can quickly and easily create additional guests by using the hpvmclone command. Like the hpvmcreate, hpvmmigrate, and hpvmmodify commands, the hpvmclone command accepts the command options listed in Table 3-2 (page 40) for specifying virtual devices, network interfaces, and other virtual machine characteristics. This allows you to create new guests with similar characteristics but different virtual resources. Table 3-7 describes the options you can use with the hpvmclone command. Table 3-7 Options to the hpvmclone Command Option Description Specifies the name of the existing virtual machine to be cloned. You must specify either the -P option or the -p option. -P vm-name Specifies the number of the existing virtual machine to be cloned. You must specify either the -P option or the -p option. -p vm-number Specifies the name of the new virtual machine (the clone). The clone-vm-name can be up to 256 alphanumeric characters. The same virtual machine name cannot already exist on the same VM Host system. -N clone-vm-name Specifies the virtual machine's CPU entitlement in CPU cycles. To specify the percentage of CPU power, enter the following option: -e percent[:max_percent] To specify the clock cycles, enter one of the following options: -E cycles[:max_cycles]M (for megahertz) -E cycles[:max_cycles]G (for gigahertz) -e percent[:max_percent] | -E cycles[:max_cycles] Specifies a descriptive label for this virtual machine. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). To include spaces, the label must be quoted (" "). -l vm_label Specifies the startup behavior of the virtual machine. For start_attr, enter one of the following keywords: auto: Automatically starts the virtual machine when the VM Host is started (autoboot). manual: The virtual machine is not started automatically. Use the hpvmstart command to start the virtual machine manually. -B start_attr Specifies the type and version of the operating system running on the virtual machine. For the os_type parameter, you can specify one of the following (case-insensitive) values: hpux windows linux -O os_type[:version] 54 Creating Virtual Machines Table 3-7 Options to the hpvmclone Command (continued) Option Description Creates a virtual device for the new virtual machine (clone). Specify the virtual and physical device information for rsrc . For information about forming a virtual storage device specification, see Chapter 7. For information about forming a virtual network device specification, see Chapter 8. -a rsrc Deletes a virtual device that is defined on the existing virtual machine in the clone virtual machine configuration. Specify the virtual and physical device information for rsrc . For information about forming a virtual storage device specification, see Chapter 7. For information about forming a virtual network device specification, see Chapter 8. -d rsrc Modifies a virtual device that is defined on the existing virtual machine in the clone virtual machine configuration. Specify the virtual and physical device information for rsrc . For information about forming a virtual storage device specification, see Chapter 7. For information about forming a virtual network device specification, see Chapter 8. -m rsrc -b rsrc Specifies the boot disk for the new virtual machine. Suppresses all resource-conflict checks and associated warning messages (force mode). Use force mode for troubleshooting purposes only. -F Specifies the number of vCPUs this virtual machine detects at boot time. If unspecified, the number defaults to one. The maximum number of vCPUs that you can allocate to a virtual machine is the number of physical processors on the VM Host system. -c number_vcpus Specifies the amount of memory available to this virtual machine. Specify the amount as either amountM (for megabtyes) or amountG (for gigabytes). -r amount Specifies that the cloned guest must share the same virtual LAN (VLAN) ports as the source guest. By default, the hpvmclone command allocates VLAN ports that are different from those allocated to the guest that is the source of the clone operation. For more information about using VLANS on virtual machines, see Section 8.4 (page 126). -S amount Specifies a group authorization. The specified administrative level (admin or oper) is applied to the specified user group. -g group[:{admin|oper}] Specifies a user authorization. The specified administrative level (admin or oper) is applied to the specified user group. -u user[:{admin|oper}] 3.6 Cloning Virtual Machines 55 Table 3-7 Options to the hpvmclone Command (continued) Option Description Specifies values for dynamic memory setting associated with the guest, including: • dynamic_memory_control • ram_dyn_type • ram_dyn_min • ram_dyn_max • ram_dyn_target_start • graceful_stop_timeout • mac_address • sched_preference • serial_number • tunables For Online VM Migration: • online_migration • migrate_frozen_phase_timeout • migrate_copy_phase_timeout • migrate_io_quiesce_timeout • migrate_init_phase_timeout For more information about dynamic memory, see Section 9.6 (page 140). To specify the serial number of the new virtual machine, enter serial_number={new | same} -x keyword=parameter Provides information about the memory type for Host and guests: cell local memory, interleaved, or none. -C For example, to clone the virtual machine named host1, to create a new virtual machine named clone1, enter the following commands. First display the current guest status on the VM Host: # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== host1 2 HPUX On (OS) 1 1 1 2 GB 0 host2 3 UNKNOWN Off 1 1 1 1 GB 0 host3 4 HPUX Off 1 1 1 2 GB 0 You can create a clone of host3 by entering the following command. The new virtual machine is named clone1: # hpvmclone -P host3 -N clone1 To see the results of the command, enter the hpvmstatus command again: # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== host1 2 HPUX On (OS) 1 1 1 2 GB 0 host2 3 UNKNOWN Off 1 1 1 1 GB 0 host3 4 HPUX Off 1 1 1 2 GB 0 clone1 5 HPUX Off 1 1 1 2 GB 0 The hpvmclone command creates a copy of an existing virtual machine and its configuration information. This command copies the configuration files of the existing guest. It does not copy the actual data and software associated with the guest. The clone_vm_name must not already exist on the same VM Host. The new virtual machine's configuration information can be modified from the original configuration file by using command options. If no options are specified, all original parameters are retained. This will cause resource conflicts if both the original and clone virtual machines are booted together. 56 Creating Virtual Machines Resources are checked to determine whether the virtual machine could boot by itself on the server. Any problems are reported as WARNINGS. These warnings will not prevent the new virtual machine from being created. These conditions will, however, prevent the guest from starting. Backing storage devices (for example, directories and files) cannot be shared, and therefore they cannot be used by two running guests at the same time. In this case, you must either enter a different backing store, or run only one of the guests at a time. For more information, see Chapter 7 “Creating Virtual Storage Devices”. Use the -b option to specify a storage device to be physically duplicated in the cloning process. This feature allows the user to specify any number of storage devices and supports all of the possible physical device types (disk, lv, and file). The following example shows how to use the hpvmclone command to create a new Linux guest named linux2 based on the existing guest named linux1. The boot disk is specified. # hpvmclone -P linux1 -N linux2 -b disk:scsi::0,0,0:disk: Because there is no guarantee that other virtual machines would be running at the same time the new virtual machine would be running, use the following command to check the device for dependents: # hpvmdevmgmt -l entry_name For more information about the hpvmdevmgmt command and the guest device management database, see Chapter 7. 3.7 Stopping Virtual Machines To stop a running virtual machine, use the hpvmstop command. You must confirm this command. Table 3-8 describes the options to the hpvmstop command: Table 3-8 Options to the hpvmstop Command Option Description -P vm-name Specifies the name of the virtual machine. Specifies the number of the virtual machine. To display the virtual machine number, enter the hpvmstatus command. -p vm_number -a Specifies all the virtual machines that are running. You must also specify the -F option. -h Performs a hard stop on the virtual machine, similar to a power failure. -g Performs a graceful shutdown on the virtual machine. This is the default. -F Forces the command to act without requiring confirmation. -Q Performs the operation without requiring you to confirm the command. -q Makes certain scripted operations less verbose (quiet mode). For example, the following command stops the virtual machine named host1. The hpvmstatus command shows that the virtual machine is Off. # hpvmstop -P host1 hpvmstop: Stop the virtual machine 'host1'? [n/y]: y # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== config1 1 HPUX Off 1 5 1 512 MB 0 config2 2 HPUX Off 1 7 1 1 GB 0 winguest1 5 WINDOWS On (OS) 1 5 1 1 GB 0 3.7 Stopping Virtual Machines 57 winguest2 9 WINDOWS Off 1 3 1 2 GB 0 host1 12 UNKNOWN Off 1 0 0 2 GB 0 The default action of this command (if you press Enter) is to not perform the command operation. To continue the operation, you must enter y. To enter the command without requiring a confirmation (for example, in a script), enter the following command: # hpvmstop -P host1 -Q # To quickly shut down all three virtual machines that are running on the VM Host, enter the following command: # hpvmstop -a -F Stopping virtual machine host1 Stopping virtual machine host2 Stopping virtual machine host3 NOTE: When stopping a guest that is running a heavy I/O load, the hpvmstop command can exhaust its timeout allotted for the stop and exit. When this happens, the SIGKILL has been sent to the running hpvmapp process and will be received by that process when pending I/Os complete. The SIGKILL then terminates the guest. This is expected behavior for an I/O intensive process receiving a SIGKILL. This behavior is not specific to Integrity VM, but is how the signal-delivery mechanism works in the HP-UX operating system. You can also use the hpvmconsole command to force the virtual machine to shut down. However, after you install the guest operating system, you should use the standard operating system commands and procedures on the guest to shut it down. NOTE: It is important to shut down guests gracefully before stopping Integrity VM by specifying the -g option with the hpvmstop command. The guest operating system is notified of an imminent power failure, which gives it time to perform cleanup operations. Because behavior of guest shutdown can vary, HP recommends stopping virtual machines using their native operating system commands. 3.8 Removing Virtual Machines To remove a virtual machine from the VM Host, use the hpvmremove command. By default, you are required to confirm this action. Table 3-9 describes the options to the hpvmremove command. Table 3-9 Options to the hpvmremove Command Option Description Specifies the name of the virtual machine. You must include either the —P or —p option. -P vm-name Specifies the number of the virtual machine. To display the virtual machine number, enter the hpvmstatus command. -p vm_number -F Forces the command to act regardless of errors. Performs the command without requiring user input to confirm. -Q For example, the following command removes the virtual machine named host1. The subsequent hpvmstatus command shows that host1 is gone: 58 Creating Virtual Machines # hpvmremove -P host1 hpvmremove: Remove the virtual machine 'host1'? [n/y]: y # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== config1 1 HPUX Off 1 5 1 512 MB 0 config2 2 HPUX Off 1 7 1 1 GB 0 winguest1 5 WINDOWS On (OS) 1 5 1 1 GB 0 winguest2 9 WINDOWS Off 1 3 1 2 GB 0 The default action of this command (if you press Enter) is to not perform the command action. To perform the action, you must enter y. This command removes host1 and all its configuration files, and restores any resources allocated to that guest to the VM Host's pool of available resources. (Any guest operating system and application data on the VM Host storage devices are not affected.) To remove the guest without requiring user confirmation (for example, in a script), enter the following command: # hpvmremove -P host1 -Q 3.9 Troubleshooting Virtual Machine Creation Problems If you encounter problems with creating virtual machines, report them through your support channel. For information about collecting information to report the problem, see Chapter 12. The following section describes a problem that might be encountered during virtual machine creation. 3.9.1 Configuration Error on Starting the Virtual Machine When you start the virtual machine, the following message is displayed: Configuration error: Device does not show up in guest If you encounter this type of problem: 1. Verify that the path name to the file-backing store is correct and that the physical storage device is mounted. 2. Verify that the size of the physical storage device is divisible by 512 bytes (for a disk device) or 2048 (for a DVD device). 3. Modify the virtual machine using the hpvmmodify command. 3.9 Troubleshooting Virtual Machine Creation Problems 59 60 4 Creating HP-UX Guests To create HP-UX guests, install the HP-UX operating system on the virtual machine. To install the HP-UX guest operating system, follow the procedures in the following sections: • “Installing the HP-UX Guest Operating System” • “Installing HP-UX Guest Management Software” • “Troubleshooting HP-UX Guest Creation” 4.1 Installing the HP-UX Guest Operating System You can install either HP-UX 11i v2 operating system or the HP-UX 11i v3 operating system as a guest OS, See the HP Integrity Virtual Machines Version 4.1 Release Notes, Chapter 11 Integrity VM Support Policy for a list of supported versions of the HP-UX operating system. To install the HP-UX operating system on the virtual machine, follow this procedure: 1. Start the virtual machine from the VM Host administrator account using the hpvmstart command. For example, to start the virtual machine called host1, enter the following command. The hpvmstatus command shows that the virtual machine is started. # hpvmstart -P host1 (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Initializing System Event Log Initializing Forward Progress Log Opening minor device and creating guest machine container Creation of VM, minor device 2 Allocating guest memory: 2048MB allocating low RAM (0-40000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/8ba249f2-3399-11db-aacc-00306ef392e0 /vmm_config.next): Allocated 1073741824 bytes at 0x6000000100000000 locking memory: 0-40000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/8ba249f2-3399-11db-aacc-00306ef392e0 /vmm_config.next): Allocated 86016 bytes at 0x6000000140000000 locked SAL RAM: 00000000ffaa0000 (4KB) locked ESI RAM: 00000000ffaa1000 (4KB) locked PAL RAM: 00000000ffaa4000 (4KB) locked Min Save State: 00000000ffaa5000 (1KB) RAM alignment: 40000000 Memory base low : 6000000100000000 Memory base FW : 6000000140000000 Loading boot image Image initial IP=102000 GP=62C000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'host1' # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== config1 1 HPUX Off 1 5 1 512 MB 0 config2 2 HPUX Off 1 7 1 1 GB 0 winguest1 5 WINDOWS On (OS) 1 5 1 1 GB 0 winguest2 9 WINDOWS Off 1 3 1 2 GB 0 host1 12 UNKNOWN On (EFI) 1 0 0 2 GB 0 2. To boot the guest from the virtual console, enter the following command: # hpvmconsole -P host1 vMP MAIN MENU CO: Console CM: Command Menu 4.1 Installing the HP-UX Guest Operating System 61 CL: Console Log SL: Show Event Logs VM: Virtual Machine Menu HE: Main Help Menu X: Exit Connection [host1] vMP> The hpvmconsole command opens the virtual machine console. From the virtual console, you can control the virtual machine just as if it were a physical Integrity server. 3. In response to the virtual machine prompt, enter the co command: [host1] vMP> co EFI Boot Manager ver 1.10 [14.62] [Build: Wed Jun 4 11:37:36 2008] Please select a boot option EFI Shell [Built-in] Boot option maintenance menu Use ^ and v to change option(s). Use Enter to select an option 4. Select Boot option maintenance menu. EFI Boot Maintenance Manager ver 1.10 [14.62] Main Menu. Select an Operation Boot from a File Add a Boot Option Delete Boot Option(s) Change Boot Order Manage BootNext setting Set Auto Boot TimeOut Select Active Console Output Devices Select Active Console Input Devices Select Active Standard Error Devices Cold Reset Exit 5. Select Add a Boot Option. EFI Boot Maintenance Manager ver 1.10 [14.62] Add a Boot Option. Select a Volume Removable Media Boot [Acpi(PNP0604,0)] Load File [Acpi(PNP0A03,0)/Pci(1|0)/Mac(763AE48F393F)] Load File [EFI Shell [Built-in]] Legacy Boot Exit To install from virtual DVD, select Removable Media Boot. To install from the Ignite-UX server, select the entry with your MAC address. For example: Device Path Acpi(PNP0A03,0)/Pci(1|0)/Mac(763AE48F393F) Enter New Description: lan0boot New BootOption Data. ASCII/Unicode strings only, with max of 240 characters Enter BootOption Data Type [A-Ascii U-Unicode N-No BootOption] : N 62 Creating HP-UX Guests Save changes to NVRAM [Y-Yes N-No]: Y 6. Exit the EFI Boot Maintenance Management screen to return to the EFI Boot Manager screen. Boot from the new boot entry, indicated by the virtual machine's MAC address:. EFI Boot Maintenance Manager ver 1.10 [14.62] Add a Boot Option. Select a Volume Removable Media Boot [Acpi(PNP0604,0)] Load File [Acpi(PNP0A03,0)/Pci(1|0)/Mac(763AE48F393F)] Load File [EFI Shell [Built-in]] Legacy Boot Exit The installation process continues just as if the virtual machine were an Ignite-UX client. When the basic installation process is complete, the software is copied from the distribution media to the guest's disk. Then the operating system reboots. If this reboot fails, restart it, as follows: 1. Enter the EFI shell by enter the co command at the virtual machine console prompt: [host1] vMP> CO (Use Ctrl-B to return to vMP main menu.) - - - - - - - - - - Prior Console Output - - - - - - - - - - Shell> 2. Enter fs0: Shell> fs0: 3. Enter hpux: fs0\> hpux The guest boots from fs0. If you used a DVD to install the guest operating system, remove the virtual DVD, as follows: 1. Determine the bus, device, and target ID by entering the following command: # hpvmstatus -P host1 2. Delete the virtual DVD by entering the following command (substituting the correct PCI bus, slot, and target number for 0,0,0): # hpvmmodify -P host1 -d dvd:scsi::0,0,0 3. If necessary, restart the guest to remove the DVD from the guest configuration. 4.1 Installing the HP-UX Guest Operating System 63 NOTE: You might receive a warning message during the guest installation process indicating that the AVIO bundles are not installed. The installation will continue and complete successfully. The AVIO bundles are optional and install by default. If they do not, and if you want to install them with the Integrity VM bundle T2767CC, go to the HP-UX 11i v3 0903 media and look for the following bundles to install on the HP-UX guest, GuestAVIOStor and GuestAvioLan. After you install the AVIO bundles, upgrade your guest configurations to use AVIO. NOTE: After installing the HP-UX operating system as a guest OS, HP recommends that you also install the PHKL_38623 and PHKL_38762 patches on the guest. These patches, which are included with the feature11i 0903 bundle, increase the accuracy of cycle-based accounting in the guest. 4.2 Installing HP-UX Guest Management Software After you install the HP-UX operating system on the virtual machine, install the Integrity VM guest management software. The guest management software includes: • Operating system patches to optimize virtual machine operation • Integrity VM management tools, including hpvmcollect and hpvminfo • The VM Provider, which allows you to use the VM Manager to manage the guest. To install guest management software on an HP-UX guest, select the appropriate version of HP-UX: • 11iv2 indicates HP-UX 11.23. For HP-UX 11.23 guests, the guest depot file is: /opt/hpvm/guest-images/hpux/11iv2/hpvm_guest_depot.11iv2.sd • 11iv3 indicates HP-UX 11.31. For HP-UX 11.31 guests, the guest depot file is: /opt/hpvm/guest-images/hpux/11iv3/hpvm_guest_depot.11iv3.sd Complete instructions for installing the guest management software are in the README.txt file in /opt/hpvm/guest-images/hpux directory. HP-UX guests reboot as part of the guest management software installation process. 4.3 Troubleshooting HP-UX Guest Creation The following section describes a problem that might occur during HP-UX guest installation. 4.3.1 The guest hangs in the EFI shell The guest hangs in the EFI when you are starting the guest and you get the following message: Shell> \efi\hpux\hpux '\efi\hpux\hpux' not found Exit status code: Invalid Parameter The EFI boot parameters were probably not set up correctly during guest operating system installation. Choose the correct EFI partition from which to boot. For example: Shell> fs3: fs3:\> hpux Installation continues from the specified partition. 64 Creating HP-UX Guests 5 Creating Windows Guests You can install HP Integrity Windows 2003 on your virtual machines. These Windows guests can be managed like a Windows server running on an independent Integrity server or nPartition, by either the VM Host administrator or the Windows system administrator. This chapter includes the following topics: • “Windows Guest Requirements” • “Installing Windows Guests” • “Managing Windows Guests” • “Troubleshooting Windows Guest Installation” 5.1 Windows Guest Requirements To run Windows on a virtual machine, you must install the following on the virtual machine: • HP Integrity Windows 2003 software media with Service Pack 1 or Service Pack 2. Make sure you have the product key, which appears on the lower section of your Certificate of Authenticity. • Integrity VM Windows guest management software. • Optional: For management from HP Integrity Virtual Machines Manager (VM Manager) and the HP Virtual Server Environment (VSE), the provider utilities are available on the Windows Smart Setup Media (SSM). The following procedure assumes that HP Integrity Virtual Machines A.02.00 or later is installed on the VM Host system. To install the Windows operating system on the virtual machine, select a physical backing storage unit to be used as the guest's boot disk. HP recommends using a whole disk of at least 34 GB. Logical volumes and file backing stores do not perform as well as whole disks. To determine the device file name, enter the following command: # ioscan -funC disk To prepare for the installation: • If you are installing from the host's physical CD/DVD, find the physical CD/DVD in the ioscan output. HP recommends that the virtual disk be cleared of data before you begin the installation procedure. • If you are installing from an ISO file on the host, determine the full path name to that file. If you are using a file for the backing storage, use the hpvmdevmgmt utility with the -S option to create the file. The utility automatically cleans the file when it is created The installation procedure automatically repartitions the virtual disk. 5.2 Installing Windows Guests To install the Windows guest operating system, follow these steps: 1. Create a Windows guest. In the following example, the virtual machine name (guest name) is win1: # hpvmcreate -P win1 -O windows -c 1 -r 2G \ -a disk:scsi::disk:/dev/rdisk/disk0 \ -a dvd:scsi::disk:/dev/rdisk/disk2 \ -a network:lan::vswitch:switch1 The hpvmcreate command creates the /var/opt/hpvm/guests/win1/ directory and creates the guest configuration in that directory. 2. Boot the virtual machine to the EFI menu and take control of the virtual console by entering the following command: 5.1 Windows Guest Requirements 65 # hpvmconsole -P win1 -fi -c "pc -on" 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 [guest1] vMP> pc -on System will be powered on. -> System is being powered on. Please wait for the guest start sequence to complete. Use of the attention character can prevent the guest from running. (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Opening minor device and creating guest machine container Creation of VM, minor device 1 Allocating guest memory: 2048MB allocating low RAM (0-80000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/682da886-06b2-11db-a3aa-00306e4a931c /vmm_config.current): Allocated 2147483648 bytes at 0x6000000100000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/682da886-06b2-11db-a3aa-00306e4a931c /vmm_config.current): Allocated 86016 bytes at 0x6000000180000000 Loading boot image Image initial IP=102000 GP=62A000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'win1' -> Command successful. [guest1] vMP> CO (Use Ctrl-B to return to vMP main menu.) Loading device drivers EFI Boot Manager ver 1.10 [14.62] [Build: Sun Jun 8 12:30:44 2008] Please select a boot option EFI Shell [Built-in] Boot option maintenance menu Use ^ and v to change option(s). Use Enter to select an option Boot option maintenance menu 3. Typically, the EFI shell is automatically be selected upon startup. If not, choose EFI Shell [Built-in] from the menu. Loading.: EFI Shell [Built-in] EFI Shell version 1.10 [14.62] Device mapping table fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0) blk1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0) blk2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) Shell> 66 Creating Windows Guests 4. Connect to the CDROM file system (listed in the EFI output) by entering the name of the file system. For example: EFI Shell> fs0: 5. Enter the ls command to make sure you are connected to the right device (look for the setupldr.efi file): fs0: ls Now that the EFI is ready, you can install the Windows® operating system. The procedure for installing the operating system depends on the type of media you are installing from: • To install the Windows operating system from the reinstall kit (OPK), follow the instructions in Section 5.2.1 (page 67). • To install from Microsoft media, follow the instructions in Section 5.2.2 (page 70). 5.2.1 Installing from HP Reinstall (OPK) Media 1. Start the operating system loader by entering the following command: fs0:\> setupldr The installation script runs. The SAC> prompt is displayed. When the EVENT message is displayed indicating that the cmd command is available, type cmd and press Enter. Starting BUILD ENT20K.US HP Re-install Environment. Please wait... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Press F6 if you need to install a third party SCSI or RAID driver... . . . SAC> EVENT: The CMD command is now available. SAC>cmd The Command Prompt session was successfully launched. SAC> 2. In response to the following prompt, press the Esc-Tab keys. Then press Enter to change to the new command channel: Press for next channel. Press 0 to return to the SAC channel. Use any other key to view this channel. X:\ia64\system32> 3. At the command prompt, type txtrestore and press Enter: X:\ia64\system32> txtrestore This is txtrestore.cmd Batch file Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. You are about to install Windows Server on the following drive: Drive 0: HP Virtual Disk SCSI Disk Device (36GB) Bus Number 0, Target ID 0, LUN 0 H Attached to SCSI Controller In Embedded Slot (PCI bus 0, device 0, function 0) Drive Layout: Partition table style is MBR Signature = 0C9C0C9C WARNING: If you continue with the installation, all data, including partition table information, on the above drive will be erased and permanently lost. Continue with installation (Y/N)? y Enter y to continue using the specified device. To use a different device, enter n. 4. If you continue, the following information is displayed: Target drives set to default. TARGETHDD=0 TARGETPQI=1 ImageDrive=X: ImagePath=\Images ScriptDrive=X: 5.2 Installing Windows Guests 67 ScriptPath=\IA64\ADDINS Support=X:\Supp IVPQET2373ALABA.PQI ================================================================= Note: Will always exit. ========================== TASK MENU ============================ A - 16GB Drive Partition Size. B - 33GB Drive Partition size. C - Full Drive size. Q - Exit to console. ================================================================= Select a task by typing a letter A, B, C or Q and then press enter: WARNING, SELECTING A, B OR C WILL ERASE THE DATA ON BOOT DRIVE. Input : c Type your selection from the following list, and press Enter. HP recommends that you specify C. In response to the following prompt, enter y: WARNING, This could potentially wipe out important data! Recommended: Only the boot controller and hard drive be installed. Target Drive selected: Drive0 Target Partition Size Selected: Full Drive size Input [Y/N] : y 5. Do not power off the system while the files are being copied to the hard drive. The restore process displays 99% complete for a long time. At the end of the successful process, the following message is displayed. Type Exit to reboot the system. Re-install Total Time: 23 minutes Re-Install Finished [OK]. To restart the system... Type [exit] to exit from command console. At the SAC console, type [restart]. X:\IMAGES> exit The Command Console session is exiting. If an error message is displayed, solve the problem that causes the error and restart the process. At the following prompt, press Esc-Tab keys to get the SAC> prompt. Restart the system by pressing Enter in response to the SAC> prompt: Press for next channel. Press 0 to return to the SAC channel. Use any other key to view this channel. SAC> Enter 6. The virtual machine is restarted. When you are prompted for the boot option, press Enter to accept the Windows Server 2003 option. The SAC will become unavailable soon. The computer is shutting down. SAC> *** VM restarting *** Scsi(Pun1,Lun0) HP Virtual FileDVD 0.04 Scsi(Pun1,Lun0) HP Virtual FileDVD 0.04 ( 80 MBytes/sec) EFI version 1.10 [14.62] Build flags: Running on Intel(R) Itanium Processor EFI_DEBUG EFI IA-64 SDV/FDK (BIOS CallBacks) [Sun Jun 8 12:30:44 2008] - HP 68 Creating Windows Guests Cache Enabled. This image MainEntry is at address 0000000000102000 FPSWA.EFI preload successful. FPSWA.EFI start successful. Loading device drivers EFI Boot Manager ver 1.10 [14.62] [Build: Sun Jun 8 12:30:44 2008] Please select a boot option Windows Server 2003, Enterprise EFI Shell [Built-in] Boot option maintenance menu Use ^ and v to change option(s). Use Enter to select an option Default boot selection will be booted in 30 seconds Starting: Windows Server 2003, Enterprise ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Starting Windows... 7. When the Windows SAC> prompt is followed by EVENT:, the CMD command is available. Press the Esc-Tab keys , then press Enter to go to the following command prompt: Computer is booting, SAC started and initialized. Use the "ch -?" command for information about using channels. Use the "?" command for general help. SAC>... EVENT: A new channel has been created. Use "ch -?" for channel help. Channel: Unattended Setup Channel SAC> EVENT: The CMD command is now available. SAC> SAC> END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE MICROSOFT WINDOWS SERVER 2003, STANDARD EDITION WITH SERVICE PACK 2 MICROSOFT WINDOWS SERVER 2003, ENTERPRISE EDITION WITH SERVICE PACK 2 IMPORTANT-READ CAREFULLY: This end user license agreement ('EULA') is a legal agreement between you (either an individual or a single legal entity) and the manufacturer ('Manufacturer') of the computer system ('Server') with which you acquired the Press F8 to accept or ESC to decline the EULA. Press PAGE DOWN for next page. To accept the EULA, press the Escape key, then 8, which emulates the F8 function key. 8. In response to the following prompt, enter the product key, including the dashes: Type the Product Key below in the form XXXXX-XXXXX-XXXXX-XXXXX-XXXXX Product ID: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (The 25–character product key appears on the lower section of your Certificate of Authenticity.) 9. At the following prompt, enter the administrator password and press Enter: Enter the password that will be used for the Administrator Account on this machine. This password must not be blank. Administrator Password:******* Please re-enter the Administrator password. Password Confirmation:******* Setup will now proceed in an automated fashion. 10. Press Esc-Tab keys to cycle through screens until you see the one running the installation script. The system boots to the Windows operating system. To go back to the SAC> prompt, press Esc-Tab keys. 11. Obtain the guest's IP address by entering the i command to the SAC> prompt. Use the Remote Desktop Connection from a PC to connect to that IP address and log in as Administrator. The Support Pack completes installation: 5.2 Installing Windows Guests 69 Computer is booting, SAC started and initialized. Use the "ch -?" command for information about using channels. Use the "?" command for general help. SAC>... EVENT: The CMD command is now available. SAC>i Net: 2, Ip=1.2.3.4 Subnet=255.255.248.0 Gateway=16.116.0.1 SAC> NOTE: If the system displays System model could not be verified, simply acknowledge the dialog. When asked to confirm, select No and then reboot the virtual machine. 12. From the Windows control panel, follow the initial system setup instructions from the platform user's guide. For example: a. Control Panel->System (Set Computer name) b. Control Panel->System->Advanced->Virtual Memory 13. Reboot the virtual machine. 5.2.2 Installing from Windows Media To install the Windows Enterprise operating system from Windows media, follow these steps: 1. Allocate a virtual DVD to the virtual machine, as described in Chapter 3. 2. Boot the virtual machine to the EFI menu and take control of the virtual console by entering the following command: # hpvmconsole -P win1 -i -c "pc -on" 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 [host1] vMP> pc -on Please wait for the guest start sequence to complete. Use of the attention character can prevent the guest from running. (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Opening minor device and creating guest machine container Creation of VM, minor device 1 Allocating guest memory: 2048MB allocating low RAM (0-80000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/682da886-06b2-11db-a3aa-00306e4a931c /vmm_config.current): Allocated 2147483648 bytes at 0x6000000100000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/682da886-06b2-11db-a3aa-00306e4a931c /vmm_config.current): Allocated 86016 bytes at 0x6000000180000000 Loading boot image Image initial IP=102000 GP=62A000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'win1' -> Command successful. [guest1] vMP> 3. From the EFI shell, enter the map command: 70 Creating Windows Guests Shell> map Device mapping table fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0) blk1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0) blk2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) Shell> 4. Enter the file system entry for the DVD. For example: Shell> fs0: Fs0: 5. Enter the setupldr command: fs0:> setupldr The Windows Setup Begins... screen is displayed. The status bar shows the following: Setup is loading files (Windows Executive)... 6. On following page, continue by pressing Enter: 7. When prompted whether to use Express Setup or Custom Setup, select Express Setup. Do not select Custom Setup as its functionality is not yet supported on virtual machines. 8. Enter and confirm an Administrator password: 5.2 Installing Windows Guests 71 9. Accept the Windows license by pressing Esc-8, which emulates F8. 10. Select the partition in which to install Windows: If the disk you are installing to has been cleaned as described in Section 5.2 (page 65), two partitions (EFI and Reserved) are automatically created. The remainder of the disk is unpartitioned space. Select the unpartitioned space using the down arrow. Create a new partitiion by entering C. If the disk was not cleaned in preparation for this procedure, a list of the current partitions is displayed. using the down arrow, select the existing NTFS partition. Enter D to delete it, and then enter L to confirm, and press Enter. Create a new partition by entering C. 11. Select the new (raw) partition to which to install Windows: 72 Creating Windows Guests Choose an NTFS partition. If there is no NTFS partition, format one. The partition is formatted, the files are copied, and the system reboots. 12. Start the Windows installation. In response to the SAC> prompt, press Esc-Tab SAC>...Esc-Tab Setup is being restarted................. EVENT: A new channel has been created. Use "ch -?" for channel help. Channel: Unattended Setup Channel SAC> EVENT: The CMD command is now available The following message is displayed: Name: Unattended Setup Channel Description: . . . Press Esc-Tab for next channel. Press 0 to return to the SAC channel. Use any other key to view this channel. Press Enter to accept the Unattended Setup Channel. 13. In response to the following prompt, enter the 25-character product key. Product ID: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX Setup proceeds automatically. To monitor the installation, enter Esc-Tab. The setup process can take several minutes to complete. 14. When the Windows operating system is installed, Windows reboots and displays the SAC> prompt: SAC> EVENT: The CMD command is now available. 15. By default, the machine name is set to a temporary name, and the network defaults to DHCP. To check this information, enter the id and i commands in response to the SAC> prompt: 5.2 Installing Windows Guests 73 5.2.3 Disabling the Windows Watchdog Timer The Windows Watchdog Timer is enabled in the Windows guest by default. You should disable this setting by using the Windows guest's SSH. The following steps disable the Windows Watchdog Timer: 1. Set SNMP Service to READ-WRITE: a. Go to the Start menu: Start -> Programs -> Administrative Tools -> Services b. Right-click the following: SNMP Service -> Properties -> Security Tab -> Edit ... c. Change the public community setting from READ ONLY to READ WRITE. 2. Disable the Watchdog Timer: a. Double-click the HP System Manage Homepage icon on the desktop, which opens Internet Explorer. b. Acknowledge the Security Alert dialog (Yes) c. Log in as the Windows Administrator. d. In the System Config box, click the Autorecovery link. e. In the General Information category, change the Status radio button from the default of Enabled to Disabled and then click the Set button. f. Close the browser. If you do not want to reboot the guest, the watchdog timer is automatically disabled approximately 2 minutes after making the setting change. 5.3 Managing Windows Guests Use the Windows Remote Desktop to manage the Windows guest: Log in as Administrator and configure Windows TCP/IP using the same networking information supplied earlier at the SAC> prompt. Install SNMP from the Windows Management and Monitoring Tools and configure it. SNMP is required for the HP Systems Insight Manager (SIM), which provides the Virtual Server Environment (VSE). 74 Creating Windows Guests The HP Integrity Support Pack for Windows provides the components required for managing the Windows guest using VSE, including: • Agents for HP SIM • Providers for VSE • Basic Windows updates for Integrity VM • System Management Homepage To install the SSM media, you must first insert it into the virtual DVD. If the virtual DVD is mapped to the physical DVD, then you will need to physically insert the SSM media disk into the physical DVD drive on the VM Host. If your virtual DVD is mapped to an ISO file (for example, the Windows installation media), you must virtually eject the current media and virtually insert the SSM. To do this, modify the virtual DVD so that it now maps to the ISO file containing the SSM. For example, the following hpvmstatus command displays the virtual DVD on the Windows guest vmwin0: # hpvmstatus -P vmwin0 |grep scsi disk scsi 0 0 0 0 0 file /hpvm/VHD/vmwin0/vhd0 dvd scsi 0 0 0 1 0 file /ISO/MS_Ent_Ed_wSP1.iso To change the virtual DVD, you must use the virtual bus, device, and target values for the existing DVD with the hpvmmodify command. For example, in the hpvmstatus example, the virtual bus, device, and target are 0, 0, and 1, respectively. The corresponding hpvmmodify command is: # hpvmmodify -P vmwin0 -m dvd:scsi::0,0,1:file:/ISO/SmartSetup.iso Now that the SSM is in the virtual DVD, it will appear in the Windows Explorer display that corresponds to My Computer. From the Explorer window, open the DVD and then open the start.html file there. This file has information to guide you through installation of SSM. Consult the Smart Setup Guide for more details. After install the Smart Setup, install the components of HP's Smart Update media. This media is available from HP. Insert the Smart Update media into the virtual DVD as described for SSM. You initiate the Smart Update installation the same way you initiated SSM. Open the virtual DVD, then open the start.html file. Install OS and Security components and other components of Smart Update that apply to your Windows system deployment To enable VSE, modify the Windows Firewall settings, as follows: 1. As the administrator of the Windows guest, open the Windows Firewall utility from the Control Panel and select the Exceptions tab: 5.3 Managing Windows Guests 75 2. Create an opening in the firewall for the VSE providers. Select Add Port… Set the name to wbem-https. Set the port number to 5989, and select TCP. For example: 76 Creating Windows Guests You can now monitor and manage the Windows guest using VM Manager and HP SMH. For more information, see the Getting Started with VM Manager manual. To shut down a Windows guest, use the Windows system management procedures. The Integrity VM commands for stopping guests do not shut down the Windows software properly and can lead to problems when the Windows guest is rebooted. 5.4 Installing Integrity VM Windows Guest Management Software After you install the Windows guest operating system, you must install the Integrity VM Windows guest management kit from the VM Host system. When you install Integrity VM, the Windows guest management kit is loaded into the following directory: /opt/hpvm/guest-images/windows This directory contains a README.TXT file that contains instructions for installing the Windows guest management software on the Windows guest. 5.5 Troubleshooting Windows Guest Installation You can use the following commands at the SAC> prompt: • ID displays the host name and the system up time. • I displays network information. • S shows the system time and date. • CMD creates a command-shell channel. Commands you can use in the command shell include: — TASKLIST — NET START “TERMINAL SERVICES” — IPCONFIG — SAFEBOOT 5.5.1 Remote desktop unable to connect If the Windows guest is installed and on, but the Remote Desktop displays the following error, you might have to set the required Windows Registry parameters: Unable to connect Set the following registry parameters: • Set fDenyTSConnections to 0. • Set TSEnabled to 1. 5.4 Installing Integrity VM Windows Guest Management Software 77 78 6 Creating Linux Guests You can install the Linux operating system on your virtual machines. Linux guests can be managed like a discreet Integrity server or nPartition, by either the VM Host administrator or the Linux system administrator. This chapter includes the following topics: • “Installing Linux Guests” • “Installing Red Hat Enterprise Linux Guests from ISO Images” • “Installing Red Hat Enterprise Linux Guests from a Boot Disk and Network Server” • “Installing SUSE Linux Guests from ISO Images” • “Installing Integrity VM Linux Guest Management Software” • “Managing Linux Guests” To run Linux guests, install Red Hat Enterprise Linux 4 Update 5. 6.1 Installing Linux Guests To install the Linux guest operating system, follow these basic steps: 1. Obtain installation materials and necessary site-specific information. 2. Create the virtual machine with appropriate virtual devices. 3. Boot the Linux installation (Boot) program onto the guest. 4. Use the boot program to install and configure Linux in the guest. 5. Add scripts to the installed Linux that are specific to running Linux in a guest. Each step is described in more detail in the following sections. 6.1.1 Preparing to Install Linux Guests Before you begin the installation process, make sure you have the following information about the guest: • Guest's networking information: — Network host name assigned to the guest — IP Address assigned to the guest (if fixed) — Netmask — IP address of one or more DNS servers — IP address of the gateway machine • Time zone of the guest • Guest's root password • If using a network server: — The network name of the server — Method by which it exports the Linux installation tree (FTP or NFS) — Directory path to the installation tree • The ISO image files for a supported Linux guest operating system. For more information about specific Linux guest operating system requirements, see the HP Integrity Virtual Machines Release Notes. 6.1.2 Using this Procedure The following procedure shows how to install a Linux guest with a fixed IP address. For information about setting up the Linux operating system with a DHCP-served IP address, see your specific operating system product documentation. Table 6-1 describes the Linux text user interface (TUI) movement keys: 6.1 Installing Linux Guests 79 Table 6-1 Linux TUI Control Keys tab Moves to next field alt Moves to the previous field space Selects the item from a list arrow Scroll lists that are too long for a single screen enter Activates the action 6.1.3 Linux Guest Installation Media You can install Linux guests using any one of the following types of installation media: • Images (*.iso files) of the Red Hat Installation DVDs (recommended) (described in Section 6.2 (page 80)). • Boot disk containing the boot program and a network server containing the packages (described in Section 6.3 (page 84)). The procedures for installing from each type of media are described in the following sections. 6.2 Installing Red Hat Enterprise Linux Guests from ISO Images 1. On the VM Host system, load the *.iso files of Red Hat Advanced Server 4 Update 4 (or Update 5) into the following directory: /var/opt/hpvm/ISO-images/linux/ Use the following file names: • RHEL4-U4-ia64-AS-disc1.iso • RHEL4-U4-ia64-AS-disc2.iso • RHEL4-U4-ia64-AS-disc3.iso • RHEL4-U4-ia64-AS-disc4.iso • RHEL4-U4-ia64-AS-disc5.iso For security reasons, you should mark the ISO images as read-only. 2. Create a virtual machine with one disk and five DVD devices, one for each of the ISO files. Specify the operating system type as LINUX, as well as one network virtual switch. For example: # hpvmcreate -P linux1 -B manual -O LINUX -c 1 -r 2G \ -a dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc1.iso \ -a dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc2.iso \ -a dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc3.iso \ -a dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc4.iso \ -a dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc5.iso \ -a disk:scsi::lv:/dev/vg00/rguest1 \ -a network:lan::vswitch:switch1 If you create all the virtual DVDs on the guest, you do not have to enter multiple EJ and IN commands during the installation procedure. 3. On the VM Host system, start the virtual machine: # hpvmstart -P linux1 (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Opening minor device and creating guest machine container Creation of VM, minor device 1 Allocating guest memory: 2048MB allocating low RAM (0-80000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids /eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next): Allocated 2147483648 bytes at 0x6000000100000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) 80 Creating Linux Guests /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids /eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next): Allocated 86016 bytes at 0x6000000180000000 Loading boot image Image initial IP=102000 GP=62E000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'linux1' Use the hpvmconsole command to connect to the guest. 4. Boot the guest. There are two ways to boot the guest: • From the EFI shell • From the File menu To boot from the EFI shell: a. Go to the EFI shell. For example: fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig5D1D1134-C809-11DB-9AEB-000000000000) fs1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part2,Sig5DB58D88-C809-11DB-9AEB-000000000000) fs2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) EFI lists devices with file systems detected as fs{n}. In this example, fs0 and fs1 are older file systems that are present on the disk. File system fs2 corresponds to the bootable Linux ISO image/Virtual DVD, as can be recognized by the CD against it. b. Boot the first installation DVD, which is indicated in the device-mapping table as /CDROM, by entering the following commands: shell > fsn: fsn > bootia64 where n corresponds to the Virtual DVD. The following example shows how to boot from fs0: # hpvmconsole -P linux1 - - - - - - - - - - Prior Console Output - - - - - - - - - - Device mapping table fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0) blk1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0) blk2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk3 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun2,Lun0) blk4 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun3,Lun0) blk5 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun4,Lun0) blk6 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun5,Lun0) Shell> fs0: fs0:>bootia64 To boot from the File menu: a. Exit the EFI shell. b. Select Boot from a file. c. Select the option Removable Media Boot, then press Enter. The guest boots from the media. 5. Add the console=ttyS0 option by entering the following command: ELILO boot: linux console=ttyS0 6.2 Installing Red Hat Enterprise Linux Guests from ISO Images 81 NOTE: Failure to add this option results in an apparent guest hang, where the guest is trying to run a graphical installation program without a display. If this happens, reset the virtual machine. Press Ctrl/B to reach the virtual console. Enter the RS command to restart the virtual machine. Then resume the installation procedure. The installation process continues: Uncompressing Linux... done Loading initrd initrd.img...done Linux version 2.6.9-42.EL (bhcompile@altix2.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-2)) #1 SMP Wed Jul 12 23:25:09 EDT 2006 . 9. . Welcome to Red Hat Enterprise Linux +--------------+ CD Found +--------------+ | | | To begin testing the CD media before | | installation press OK. | | | | Choose Skip to skip the media test | | and start the installation. | | | | +----+ +------+ | | | OK | | Skip | | | +----+ +------+ | | | | | +----------------------------------------+ / between elements | selects | next screen On the CD Found screen, select Skip. 6. The boot program presents a sequence of screens that allow you to customize Linux. Respond to each screen as described in Table 6-2. (Note: These responses are suggested, not mandatory.) Table 6-2 Linux Installation Screens Screen Typical Response Red Hat Enterprise Linux AS Enter OK. Language Selection Select your language and enter OK. Disk Partitioning Setup Select Autopartition. Automatic Partitioning Select "Remove all partitions. Select drive sda. Enter OK. Warning (about remove all) Enter Yes. Partitioning Enter OK. Network Configuration for eth0 Type the guest's IP address and Netmask. Enter OK. Type the Gateway IP address and at least one DNS server IP address. Enter OK. Miscellaneous Network Settings Select manually. Type the guest's full host name (for example, linux1.abc.com). Enter OK. Host name Configuration Firewall Enter Customize. Customize FirewallConfiguration Select which accesses to allow and enter OK. Security Enhanced Linux Select Disabled and enter OK. 82 Creating Linux Guests Table 6-2 Linux Installation Screens (continued) Screen Typical Response Select your primary language plus any additional languages, then enter OK. Language Support Time Zone Selection Select a city in your time zone from the list, then enter OK. Root Password Type the guest's root password in each entry, then enter OK. Package Defaults Select Customize software selection and then enter OK. Package Group Selection Scroll to the bottom, select Everything, and then enter OK. Installation to begin Enter OK. Required Install Media Enter Continue. Processing Watch the progress percentage increment to 100%. Install Starting Observe installation process. Package Installation Observe progress. Complete Enter Reboot. NOTE: If you use ISO images for installation, you can leave the virtual CD images mounted, so that you can easily install additional software at a later time. The guest reboots and displays a normal Linux boot sequence on the console. EFI Boot Manager ver 1.10 [14.62] [Build: Wed May 7 11:13:44 2008] Please select a boot option Red Hat Enterprise Linux AS EFI Shell [Built-in] Boot option maintenance menu Use ^ and v to change option(s). Use Enter to select an option Loading.: Red Hat Enterprise Linux AS Starting: Red Hat Enterprise Linux AS ELILO boot: Uncompressing Linux... done Loading initrd initrd-2.6.9-42.EL.img...done << Lots of lines deleted here >> Red Hat Enterprise Linux AS release 4 (Nahant Update 5) Kernel 2.6.9-42.EL on an ia64 guest1.abc.com login: 7. Optionally, remove the virtual DVD devices from the guest using the hpvmmodify command. For example, on the VM Host: # hpvmmodify -P guest1 \ -d dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U4-ia64-AS-disc1.iso \ -d dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc2.iso \ -d dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc3.iso \ -d dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc4.iso \ -d dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/RHEL4-U5-ia64-AS-disc5.iso 6.2 Installing Red Hat Enterprise Linux Guests from ISO Images 83 6.3 Installing Red Hat Enterprise Linux Guests from a Boot Disk and Network Server This section describes how obtain the Linux Installation (Boot) image from a boot disk and then obtain the Linux packages to be installed from a network server. This procedure assumes the Linux installation directory tree has been created from the ISO images on a network server. For more information, see Red Hat Enterprise Linux 4; Installation Guide for x86, Itanium, AMD64, and Intel Extended Memory Technology 64 (Intel EM64T). Export this directory tree using NFS or make sure it is otherwise accessible to the VM Host system (for example, using FTP). 1. Create the boot disk by copying the boot.iso file from the Linux Installation Tree on the server into /var/opt/hpvm/images/linux/boot.iso on the VM Host. For example, on the VM Host, enter the following commands: # cd /var/opt/hpvm/ISO-images/linux # ftp yourserver.abc.com ftp> cd /dist/pbfd/ftp/dist/redhat/release/rhel4/as/U4/ia64 ftp> cd images ftp> get boot.iso ftp> quit In this procedure, this file backs a virtual DVD in the guest. The guest is booted from this DVD and the installation program is loaded from it. The option askmethod is used on the linux command to specify the location of the installation tree. The installation program installs Linux into the guest from packages obtained over the network from the server. 2. Create the virtual machine with a boot disk and a virtual DVD backed by the boot.iso file on the VM Host. The network device is also required. Specify the operating system type as linux. For example: # hpvmcreate -P linux3 -B manual -O LINUX -c 1 -r 2G \ -a disk:scsi::lv:/dev/vg00/rguest1 \ -a dvd:scsi::file:/ISO-images/Linux/boot.iso \ -a network:lan::vswitch:switch1 3. On the VM Host system, start the virtual machine: # hpvmstart -P linux3 (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Opening minor device and creating guest machine container Creation of VM, minor device 1 Allocating guest memory: 2048MB allocating low RAM (0-80000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next): Allocated 2147483648 bytes at 0x6000000100000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids/eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next): Allocated 86016 bytes at 0x6000000180000000 Loading boot image Image initial IP=102000 GP=62E000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'linux3' On the VM Host, use the hpvmconsole command to connect to the guest. Alternatively, exit the EFI shell and select Boot from a file. Select the option Removable Media Boot. Press Enter. The guest boots from the DVD device. 4. Boot the guest. Boot the guest in one of the following ways: 84 Creating Linux Guests • From the EFI shell • From the File menu To boot from the EFI shell: a. Go to the EFI shell. For example: fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig5D1D1134-C809-11DB-9AEB-000000000000) fs1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part2,Sig5DB58D88-C809-11DB-9AEB-000000000000) fs2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) EFI lists devices with filesystems detected as fs{n}. In the preceding example, fs0 and fs1 are older filesystems that are present on the disk. The fs2 file system corresponds to the bootable Linux ISO image/Virtual DVD, as can be recognized by the CD against it. b. Boot the first installation DVD, which is indicated in the device-mapping table by /CDROM , by entering the following commands: shell > fsn: fsn > bootia64 where n corresponds to the Virtual DVD. The following example shows how to boot from fs0: # hpvmconsole -P linux1 - - - - - - - - - - Prior Console Output - - - - - - - - - - Device mapping table fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0) blk1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0) blk2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk3 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun2,Lun0) blk4 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun3,Lun0) blk5 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun4,Lun0) blk6 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun5,Lun0) Shell>fs0: fs0:> bootia64 To boot from the File menu: a. Exit the EFI shell. b. Select Boot from a file. c. Select Removable Media Boot, then press Enter. The guest boots from the media. 5. Specify the console=ttyS0 and askmethod options using the linux command. For example: ELILO boot:linux console=ttyS0 askmethod NOTE: The askmethod option tells the Linux Installation Program to display a screen that allows you to specify the network server from which to obtain the Linux packages and the method by which the network server is accessed (FTP or NFS). The installation process continues: Uncompressing Linux... done Loading initrd initrd.img...done Linux version 2.6.9-42.EL (bhcompile@altix2.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-2)) #1 SMP Wed Jun 11 23:25:09 EDT 2008 . . 6.3 Installing Red Hat Enterprise Linux Guests from a Boot Disk and Network Server 85 . Welcome to Red Hat Enterprise Linux 6. The boot program presents a few screens that allow you to specify the network parameters of the guest (IP address, netmask, gateway, DNS), the network name of the server, and the directory path to the installation tree on the server. Respond to the screens as described in Table 6-3. Table 6-3 Linux Guest Network Installation Screens Screen Title Response Language Selection Select your language and enter OK. Select Installation Method NFS or FTP and enter OK. Network Configuration for eth0 Type the guest's IP address and netmask. Enter OK. Enter the server name, path to theiInstallation tree, and FTP parameters (if any). Request for server parameters Complete the installation procedure as described in the previous sections. For information about setting up the network server using the network, see the following Red Hat website for the appropriate documentation: http://www.redhat.com/docs/manuals/enterprise/ RHEL-4-Manual/en-US/rhel-ig-x8664-multi-en-4/ 6.4 Installing SUSE Linux Guests from ISO Images Before installing the SUSE Linux guest, note the following: • You must install the tog-pegasus RPM kit prior to installing the SUSE Linux RPM guest kit; however, the SUSE Linux installation media does not contain the tog-pegasus RPM kit. This RPM kit is available in the “HP Integrity Essentials Foundation Pack for Linux” (also known as HPIEFL for Linux). The SUSE Linux RPM guest kit is actually two parts, a guest kit and a provider kit. The Hpvm.*.rpm kit contains: — Tuning scripts — hpvminfo — hpvmcollect — Guest library The Hpvmprovider.*.rpm kit contains the VMprovider and related files. This RPM requires that both the hpvm and tog-pegasus kits must be installed. http://h20293.www2.hp.com/portal/swdepot/ displayProductInfo.do?productNumber=T2387AA The information you need is provided in Chapter 5 of the HP Integrity Essentials Foundation Pack for Linux User's Guide. To download the HPIEFL for Linux kit, click the link http://www.hp.com/go/ integritylinuxessentials listed in Chapter 5, then click Download for HP Integrity Essentials Foundation Pack for Linux link on this website. • The first time you install the Linux guest management software, the following error may occur: === from /var/log/messages file === Jan 18 22:45:00 1sn000 kernel: ipmi_si: Error clearing flags: cl 86 Creating Linux Guests === from "dmesg" command === ipmi_si: Error clearing flags: cl You can ignore this error message. • SLES 10 requires the media to be in the first optical drive present to the guest; otherwise, the installation fails with the following error: Failed to initialize the catalog. Try again? The following steps install SUSE Linux Enterprise Server (SLES) for HP Integrity servers SLES 10 update 2 guests: 1. On the VM Host system, load the *.iso files of SUSE Linux Enterprise Server (SLES) for HP Integrity servers SLES 10 update 2 into the following directory: /var/opt/hpvm/ISO-images/linux/ Use the following file names or any file names you prefer: • SLES-U2-ia64-AS-disc1.iso • SLES-U2-ia64-AS-disc2.iso For security reasons, mark the ISO images as read-only. 2. Create a virtual machine with one disk and one DVD device for the ISO files, as well as one network virtual switch. Specify the operating system type as LINUX. For example: # hpvmcreate -P linux -B manual -O LINUX -c 1 -r 2G \ -a disk:scsi::lv:/dev/vg01/sles10_boot_volume \ -a dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/SLES10-SP2-DVD-ia64-DVD1.iso \ -a network:lan::vswitch:switch1 If DVD2 is required during your installation, eject (EJ) DVD1 and insert (IN) DVD2 from the guest management console. 3. On the VM Host system, start the virtual machine: # hpvmstart -P linux1 (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Opening minor device and creating guest machine container Creation of VM, minor device 1 Allocating guest memory: 2048MB allocating low RAM (0-80000000, 2048MB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids /eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next): Allocated 2147483648 bytes at 0x6000000100000000 allocating firmware RAM (ffaa0000-ffab5000, 84KB) /opt/hpvm/lbin/hpvmapp (/var/opt/hpvm/uuids /eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next): Allocated 86016 bytes at 0x6000000180000000 Loading boot image Image initial IP=102000 GP=62E000 Initialize guest memory mapping tables Starting event polling thread Starting thread initialization Daemonizing.... hpvmstart: Successful start initiation of guest 'linux1' Use the hpvmconsole command to connect to the guest. 4. Boot the guest. Boot the guest in one of the following ways: • From the EFI shell • From the File menu To boot from the EFI shell: a. Go to the EFI shell. For example: 6.4 Installing SUSE Linux Guests from ISO Images 87 fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig5D1D1134-C809-11DB-9AEB-000000000000) fs1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part2,Sig5DB58D88-C809-11DB-9AEB-000000000000) fs2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) EFI lists devices with file systems detected as fs{n}. In this example, fs0 and fs1 are older file systems that are present on the disk. fs2 is the file system corresponding to the bootable Linux ISO image/Virtual DVD, as can be recognized by the CDROM against it. b. Boot the first installation DVD, which is indicated in the device mapping table by /CDROM by entering the following commands: shell > fsn: fsn > bootia64 Where n corresponds to the Virtual DVD. The following example shows how to boot from fs0: # hpvmconsole -P linux1 - - - - - - - - - - Prior Console Output - - - - - - - - - - Device mapping table fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0) blk1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0) blk2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0) blk3 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun2,Lun0) blk4 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun3,Lun0) blk5 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun4,Lun0) blk6 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun5,Lun0) Shell> fs0: fs0:>bootia64 To boot from the File menu: a. Exit the EFI shell. b. Select Boot from a file. c. Select Removable Media Boot, then press Enter. The guest boots from the media. 5. When the screen labeled SUSE Linux Itanium Edition appears, enter the following: console=ttyS0 command in the Boot: box: Boot: console=ttyS0 NOTE: Failure to add this option results in an apparent guest hang, where the guest is trying to run a graphical installation program without a display. If this happens, reset the virtual machine. Press Ctrl/B to reach the virtual console. Enter the RS command to restart the virtual machine. Resume the installation procedure. The installation process continues: On the CD Found screen, select Skip. 6. The boot program presents a sequence of screens that allow you to customize Linux. Follow normal SUSE SLES10 install procedures. NOTE: If you use ISO images for installation, you can leave the virtual CD images mounted, so that you can easily install additional software at a later time. 7. Optionally, remove the virtual DVD device from the guest using the hpvmmodify command. For example, enter this command on the VM Host: # hpvmmodify -P guest1 \ -d dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/SLES-U2-ia64-AS-disc1.iso \ dvd:scsi::file:/var/opt/hpvm/ISO-images/linux/SLES-U2-ia64-AS-disc2.iso 88 Creating Linux Guests 6.5 Installing Integrity VM Linux Guest Management Software After you install the Linux guest operating system, you must install the Integrity VM Linux guest management kit from the VM Host system. When you install Integrity VM, the Linux guest management kit is loaded into the following directory: /opt/hpvm/guest-images/linux This directory contains a README.txt file that contains instructions for installing the Linux guest management kit on the Linux guest. The guest management software provides the following Integrity VM commands on the Linux guest: • hpvmcollect • hpvminfo For online information about using these commands, after you install the guest management software, enter the man command. For example: # man hpvminfo hpvminfo(1M) hpvminfo(1M) NAME hpvminfo - Display information about the Integrity VM environment. . . . 6.6 Managing Linux Guests Daily administration of the guest should be done using remote console connection and standard Linux system management procedures. The Integrity VM commands for stopping virtual machines do not take into account the requirements of applications and utilities running on the guest. This limitation can cause problems when guests are started again later. You can monitor and manage the Linux guest using VM Manager and HP SMH. For more information, see the HP Virtual Machines Manager Getting Started Guide. To shut down a Linux guest, use the Linux system management procedures. The Integrity VM commands for stopping guests do not shut down the operating system and applications properly, which can lead to problems when the guest is rebooted. 6.5 Installing Integrity VM Linux Guest Management Software 89 90 7 Creating Virtual Storage Devices This chapter describes what Integrity VM storage is, how to configure it, and how to use it. The topics included in this chapter are: • “Introduction to Integrity VM Storage” • “Configuring Integrity VM Storage” • “Using Integrity VM Storage” 7.1 Introduction to Integrity VM Storage The way you configure and manage Integrity VM storage affects the way virtual machines perform. To get the most benefit from using virtual machines, learn how Integrity VM makes storage devices available to virtual machines. The following sections describe: • “Integrity VM Storage Goals” • “Integrity VM Storage Architectures” • “Integrity VM Storage Implementations” 7.1.1 Integrity VM Storage Goals To successfully configure and manage virtual storage, it is helpful to understand the basic goals of the Integrity VM storage subsystem, including: • “Storage Utilization” • “Storage Availability” • “Storage Performance” • “Storage Security” • “Storage Configurability” 7.1.1.1 Storage Utilization The main purpose of Integrity VM is to increase system resource utilization on Integrity servers. The Integrity VM storage subsystem meets this goal by permitting multiple virtual machines to share a variety of physical storage adapters and devices that are available on an Integrity server. Furthermore, the Integrity VM storage subsystem allows for a single storage LUN on the VM Host to be carved up into smaller entities that can be used as separate individual disks or DVDs on the virtual platform. 7.1.1.2 Storage Availability Like HP Integrity servers, it is expected that virtual machines will have several different storage device types available for use. The Integrity VM storage subsystem provides for disks, DVDs, tapes and media changers to be used by a guest OS. Additionally, the way that virtualization abstracts the physical hardware provides a common supportable interface for a guest OS to interact with. Because a guest OS only accesses Integrity VM virtual hardware, the guest OS can use physical hardware that it does not support on an Integrity server. 7.1.1.3 Storage Performance Each release of the Integrity VM storage subsystem strives to improve performance. Performance is improved in each release by lowering costs of virtualization, exploiting new features in the VM Host, and tuning operating systems for the virtual platform. At the same time, Integrity VM provides more virtualization choices to VM Host administrators, so that they can find the best balance between virtualization and performance to meet their needs. 7.1 Introduction to Integrity VM Storage 91 7.1.1.4 Storage Security To avoid problems while supporting multiple virtual machines on one physical machine, Integrity VM isolates each virtual machine. Using Integrity VM commands, the VM Host administrator determines the physical storage resources that each virtual machine can access. This storage isolation is maintained by the Integrity VM storage subsystem through DMA boundary checks on each virtual machine I/O operation, thereby ensuring that one virtual machine does not access the memory of another. 7.1.1.5 Storage Configurability VM Host administrators expect the virtual machines to be as easily configurable as HP Integrity servers. The Integrity VM storage subsystem allows for easy changes of the storage devices through Integrity VM commands. Using these commands, the VM Host administrator dynamically adds, deletes, and modifies storage devices on virtual machines. Guest administrators can change some storage, limited in scope by the VM Host administrator, using the virtual console. 7.1.2 Integrity VM Storage Architectures To provide the flexibility required to meet a variety of data center needs, the Integrity VM storage subsystem consists of two storage architectures, shared I/O and attached I/O. 7.1.2.1 Shared I/O The shared I/O architecture is a means by which a virtual machine accesses an entirely virtualized storage subsystem provided by Integrity VM. The Integrity VM storage subsystem emulates real hardware to the virtual machine while interacting with the VM Host to complete the virtual machine I/O operation to the VM Host storage entity. This abstraction provides the ability of a VM Host administrator to share physical VM Host storage hardware across multiple virtual machines and to allocate that storage at sub-LUN levels. The sharing of individual storage LUNs is accomplished by dividing a VM Host LUN into smaller parts, like logical volumes, or files. Each of these sub-LUN VM Host entities can then be used as media for separate virtual storage devices. Virtual machines access the virtual storage devices as real storage devices, with no knowledge that the virtual storage media is actually a sub-LUN VM Host entity. The way the virtual storage media is accessed by the Integrity VM storage subsystem allows virtual machines to share physical VM Host storage adapters. All virtual storage media is accessed through user-defined interfaces on the VM Host. The VM Host maintains complete control of the physical hardware and handles the virtual machine I/O operations just as it would be handled for any other user application. Thus, just as hardware is shared among normal applications running on the VM Host, virtual machine I/O is shared across the physical storage as well. This architecture also provides for whole LUNs to be virtualized. While this does not increase storage utilization, it does provide higher storage availability. Because the LUN is virtualized, the guest OS does not have to support the physical VM Host LUN. It only has to be able to support the virtualized version of it. Thus by using shared I/O, a virtual machine can run with any physical hardware that is supported by the VM Host. Finally, all virtual machine I/O requests in shared I/O are processed by virtual adapters. A virtual adapter is either an emulation of a real adapter that a native guest OS driver accesses as real hardware, or a special driver loaded into the guest OS. In either case, the virtual adapter uses internal Integrity VM storage subsystem calls to handle communication of virtual machine I/O to the virtual devices. This connection between the virtual adapter and the virtual devices need not resemble anything in an HP Integrity server system. It is emulated so that the virtual machine does not know the difference. 92 Creating Virtual Storage Devices 7.1.2.2 Attached I/O Attached I/O allows a virtual machine to access to a VM Host LUN directly. In this architecture, the Integrity VM storage subsystem attaches a LUN on the VM Host to a virtualized storage adapter. A LUN can be a disk, DVD, tape, media changer, or other peripheral device types. Because attached I/O does not require device virtualization, the performance of attached I/O might be better than shared I/O. The main difference between shared I/O and attached I/O is the degree to which a physical storage subsystem is virtualized. In shared I/O, an entire storage subsystem is virtualized. Therefore, all physical adapters on the VM Host and all the storage connected to those adapters may be shared among virtual machines. In attached I/O, only the storage adapter is virtualized. Therefore, only the VM Host physical storage adapters may be shared. At least one LUN, the attached LUN, cannot be shared. It is owned and solely controlled by the virtual machine it is attached to. To provide the VM with complete control over attached devices, the Integrity VM storage subsystem interprets I/O requests from the guest device drivers into I/O requests that can be completed by the VM Host storage subsystem on the guest's behalf. In the process, the VM Host storage subsystem sends all the actual data and responses back the guest device drivers. With all this data, the guest device driver is in complete control over the device. As such, the guest OS must have built-in support for the attached VM Host LUN to use it. Attached I/O uses a virtual adapter to communicate with the guest OS and the attached LUN. The virtual adapter either can be an emulation of a real adapter or it can be controlled by a special driver loaded into the guest OS. Either solution produces a virtual adapter that communicates with both virtual devices and attached physical devices. 7.1.3 Integrity VM Storage Implementations This section describes the implementations of the Integrity VM storage architectures. 7.1.3.1 Integrity VM Storage Adapters Integrity VM provides two types of virtual PCI storage adapters to process virtual storage I/O requests: • Virtual parallel SCSI MPT adapter • Accelerated Virtual I/O (AVIO) adapter All supported guest operating systems contain native MPT SCSI adapter drivers that communicate with this PCI register emulation. All virtual and attachable devices can be used with this single virtual storage adapter. The AVIO storage adapter is a high performance adapter and needs guest OS drivers. AVIO supports up to 128 storage devices per guest and also leverages the VM Host 11i v3 storage stack features to provide better storage manageability in the guest. VxVM is also supported as an AVIO backing store. HP recommends the use of AVIO for the supported guest operating systems, guest devices and host backing stores. See the HP Integrity Virtual Machines Version 4.1 Release Notes and AVIO documentation for details. 7.1.3.2 Integrity VM Storage Devices Integrity VM supports a variety of virtual and attachable devices. Disk and DVD-ROM devices support several virtual media types (see Section 7.1.3.2.1 (page 94)). Physical tapes, media changers, and CD/DVD burners are attachable; they can be used to perform data backups directly from a virtual machine (see Section 7.1.3.2.2 (page 94)). 7.1 Introduction to Integrity VM Storage 93 7.1.3.2.1 Virtual Devices Integrity VM supports the following virtual disk types: Virtual Disk Type Backing Storage Device For more information, see... Virtual Disk VM Host disk “Virtual Disks” (page 102) VM Host LVM or VxVM logical Section 7.2.2.3.2 (page 103) volume. Virtual LvDisk Virtual FileDisk VM Host VxFS file Section 7.2.2.3.3 (page 105) The following virtual DVD-ROM types are supported: Virtual DVD Type Backing Storage Device Described in ... Disk in a VM Host physical DVD Section 7.2.2.3.4 (page 106) drive Virtual DVD ISO file on a VM Host VxFS file Section 7.2.2.3.6 (page 107) system Virtual FileDVD VM Host physical DVD drive or Section 7.2.2.3.3 (page 105) VxFS directory Virtual NullDVD (empty) 7.1.3.2.2 Attached Devices Integrity VM supports a suite of attached devices to complete data backups from a virtual machine. Integrity VM attaches these devices using a special Integrity VM pass-through driver. With this pass-through driver, virtual machine I/O requests are interpreted by Integrity VM and sent through the virtual storage subsystem to the physical device. The virtual storage subsystem sends device responses to the Integrity VM pass-through driver, which sends the responses to the virtual machine. Because the virtual machine can see all the data and responses, support for the attached physical device must be provided by the guest OS. An attached device can be attached to only one virtual machine at a time. Attached devices include: • CD/DVD burners • Media changers • Tape devices The maximum transfer size can be 1 MB for any guest operating system. 7.2 Configuring Integrity VM Storage This section describes how to plan and set up Integrity VM storage, including the following topics: • “Integrity VM Storage Considerations” • “Setting Up Virtual Storage” 7.2.1 Integrity VM Storage Considerations When you configure storage for a virtual machine, consider the following: • VM storage supportability • Storage performance • VM storage multipath solutions • VM storage management • VM storage changes • Virtual storage setup time 94 Creating Virtual Storage Devices The following sections explain each of these considerations. 7.2.1.1 VM Storage Supportability Before you configure virtual machine storage, make sure the VM Host storage can be supported by the virtual machine. • All VM Host storage available for use by a VM must meet support requirements for the Integrity server and OS version that comprise the VM Host. If the physical storage is not supported by the VM Host, it is not supported for use by a virtual machine. • All VM Host storage available for use by a VM must be connected with a supported adapter and driver type. See the HP Integrity Virtual Machines Version 4.1 Release Notes for the list of supported types. If the physical storage is not connected with one of the supported adapter and driver types, it cannot be used by a guest. Use the ioscan command to display the VM Host storage that is connected to adapters and drivers. • Any VM Host attachable devices available for use by a guest must be supported by the guest OS to which it is attached. If the physical device is not supported by the guest OS, the device cannot be attached to the guest. 7.2.1.2 Performance of Virtual Devices To meet the performance requirements of applications running in guests, consider the potential performance of each type of Integrity VM storage device. Different types of virtual media have different effects on the performance of the virtual device because they communicate differently with the VM Host to complete virtual machine I/O operations. To understand the effect of the virtual device type on potential performance, consider the Integrity VM storage I/O stack illustrated in Figure 7-1. 7.2 Configuring Integrity VM Storage 95 Figure 7-1 Integrity VM Storage I/O Stack HP-UX Interface Driver HP-UX Interface Driver HP-UX Interface Driver Physical Adapter Physical Adapter Physical Adapter Physical Media Physical Media Physical Media VM Host Driver Services File Systems Layer Virtual File Disk Logical Volume Managers Layer Virtual LvDisk Disk Drivers Layer Virtual Disk Attached Devices Integrity Vm Passthrough Drivers Layer For a virtual I/O operation to be completed, it has to travel round trip between the virtual storage adapter and the VM Host physical storage device. The longer the path is, the longer it takes for virtual I/O to be completed. As shown in Figure 7-1, a virtual I/O operation must traverse each software layer in order, from where it originates to the physical media. For example, a virtual I/O operation for a Virtual FileDisk must traverse any logical volume managers the file system is on and the disk drivers that control the whole disk. Therefore, in general, the higher the virtual media is in the VM Host I/O stack, the slower it operates. The simplified I/O stack in Figure 7-1 does not completely illustrate all the choices that can affect the performance: • Performance of different software layers differs. • The interfaces to each software layer are different, allowing Integrity VM different ways to send I/O through the layers. For example, whole disks can achieve higher throughput rates than logical volumes and file systems. • The I/O layer might have features to help performance increase beyond a lower layer. For example, a file system's buffer cache may help a Virtual FileDisk perform better on some I/O workloads than the other virtual device types, which have no such caching. For further information on tuning performance at each software layer on the VM Host, see the Integrity VM white papers on the HP Documentation website at http://docs.hp.com. When you configure virtual devices, consider how the virtual media maps to the physical storage. All virtual media connects to a piece of physical media somewhere in the data center. You can help ensure the best performance by understanding the impact of the physical storage and the way I/O accesses it. 96 Creating Virtual Storage Devices It is important to know exactly where the virtual media is located on physical storage devices. With Integrity VM, a single physical disk might be sliced into logical volumes or files. Slicing up physical disks increases utilization, but it can affect the performance of the physical device. The guest OS treats the virtual disk as a whole disk, not as a part of a physical one. Over-slicing physical storage can overload a physical device's ability to handle virtual I/O that is meant for whole disks. Figure 7-2 shows a common mistake of overdriving physical storage with multiple guest OS boot disks, which are often I/O intensive. Figure 7-2 Overdriving Physical Storage Hurts Performance Guest Boot Disk Guest Boot Disk Overdriven Physical Storage Guest Boot Disk Provide workloads that the physical devices can handle for all the virtual devices layered on top of them. Use performance tools on the VM Host, like sar(1M), to see how the physical storage is keeping up with the virtual device demands. The way the virtual media I/O gets to the physical storage backing it is also an important consideration. As shown in Figure 7-1, all virtual I/O goes through a general VM Host I/O services layer that routes the virtual I/O to the correct VM Host interface driver. The interface driver then controls the physical I/O adapter to issue virtual I/O to the physical storage device. By load balancing across these physical adapters, virtual I/O bottlenecks can be eliminated at the physical hardware layers, thereby increasing performance. Load balancing can be done by using a multipathing solution on the VM Host. For help with selecting a multipath solution for a virtual media type, see Section 7.2.1.3 (page 97). The performance of attached devices is largely determined by the type of physical device attached to the virtual machine. Tapes, media changers, and CD/DVD burners are inherently slow devices, not significantly impacted by the software overhead of Integrity VM. 7.2.1.3 VM Storage Multipath Solutions Integrity VM virtual devices support the built-in multipathing of the HP-UX 11i v3 VM Host, which is enabled by default to provide improved performance, load-balancing, and higher availability for VMs. Currently, there are no multipath solutions supported for the attachable device types of tapes, media changers, and CD/DVD burners. There are no multiple paths inside a virtual machine to virtual devices. Multipathing is supported only on the VM Host for the following reasons: • The VM Host is the only place where all virtual I/O can be properly load balanced for the best overall performance. A single virtual machine cannot account for all the other virtual machine I/O with which it is competing on the VM Host (see Figure 7-1). • Running a multipath solution in a virtual machine does not provide any high availability for a virtual device. Virtual connections between virtual adapters and their devices are never lost until an hpvmmodify command is used to disconnect them. The only connection ever lost is the ability of a virtual device to access its own virtual media through the VM Host. Errors in communication to the virtual media are properly emulated as media errors sent to the guest OS, not as path failures. • The VM Host does not return specific errors to Integrity VM for hardware path failures. Integrity VM does not detect such events and does not pass them to the virtual machine. 7.2 Configuring Integrity VM Storage 97 For supported multipathing configurations, see the HP Integrity Virtual Machines Version 4.1 Release Notes. 7.2.1.4 VM Storage Management Before you decide how to divide VM Host storage, consider the impact on the management of the storage subsystem. A VM Host administrator manages VM storage to make sure virtual media is allocated safely. This begins with understanding the VM Host I/O stack and knowing from where the virtual media is being allocated. Figure 7-3 shows an example of a VM Host I/O stack as it applies to a single LUN. Figure 7-3 Sub-LUN Storage Allocation Example File File File File File File File File 2 2 Logical Volume Logical Volume Logical Volume Logical Volume Whole Disk 1 2 The virtual machine is allocated a logical volume from the LUN for a Virtual LvDisk. • The logical volume that has been allocated is labeled 1. • The parts of the disk that cannot be allocated are labeled 2. Those parts that are no longer available include the files that were on the logical volume and the whole disk that makes up part of the volume group. If any of these parts are allocated for other virtual devices, data corruption can occur on the Virtual LvDisk. Those parts that are still available for reallocation include other logical volumes that are on the disk,and files that are on those other logical volumes on the disk. These pieces can be allocated without data corruption problems because they do not overlap with the Virtual LvDisk. Beyond avoiding sub-LUN collisions, whole LUN collisions also need to be avoided. The same storage resource, virtual or attached, cannot be specified more than once to the same virtual machine. HP-UX 11i v3 supports both legacy per-path device files (for example, /dev/rdsk/ c6t2d0) and agile non-path specific device files (for example, /dev/rdisk/disk16). As shown in Figure 7-4, there may be more than one legacy device file that points to the same physical storage device, while there is only one agile device file per a given physical storage device. Use of agile device files is recommended to avoid whole LUN collisions. Figure 7-4 Bad Multipath Virtual Media Allocation Physical Adapter Physical Adapter Physical Storage /dev/rdsk/c6t2d1 /dev/rdsk/c11t2d1 Also, the same storage resource, virtual or attached, cannot be simultaneously shared between virtual machines, unless otherwise specifically exempted. Figure 7-5 shows a Virtual LvDisk being shared across virtual machines, which is not supported. 98 Creating Virtual Storage Devices Figure 7-5 Bad Virtual Device Allocation Guest A Guest B Virtual LvDisk As these examples illustrate, it is important to know where storage is allocated from to avoid data corruption with virtual machines or even the VM Host. Management utilities such as the HP System Management Homepage (HP SMH) utility allow you to track disk devices, volume groups, logical volumes, and file systems. You can use these utilities to annotate devices so that VM Host administrators can see exactly which virtual machines are using each VM Host storage device. To show each disk only once, management utilities consolidate multipath devices into one disk. When you are dividing up the disk, you should use all the parts of a single disk on a single virtual machine. Allocating different parts of the same disk to different virtual machines makes it difficult to manage and to isolate problems. 7.2.1.5 VM Storage Changes Depending on how you set up storage for a virtual machine, the resulting configuration can be more or less difficult to change. The ability to change virtual media depends on the type of virtual media used. Whole disks are not normally adjustable in terms of size, but some high-end storage enclosures might permit the adjustment of a LUN without losing that LUN's data. Logical volumes are adjustable without losing any data. Finally, files can be changed easily with VM Host file system commands. No changes to any virtual media can take place on the VM Host until the virtual device that uses the media is removed from the active VM. Attempts to change virtual devices that have I/O active on them is denied by the hpvmmodify command. Once an active virtual machine is allocated virtual media for a virtual device, that virtual machine owns that media and can access it any time. VM Host administrators need to coordinate with VM guest administrators about active virtual machine changes, if the two roles are served by different individuals. This coordination might also be necessary for attached I/O devices. Once a VM Host device is attached to the virtual machine, it is controlled and owned by that virtual machine. Modifications to the attached device, like changing a tape, can be done physically without detaching the device from the guest. However, such changes might need to be coordinated with the VM Host administrator, especially if the guest administrator has no physical access to the device attached to the virtual machine. All types of virtual storage devices can be added and removed dynamically from virtual machines. That is, virtual disks, virtual DVDs, tapes, media changers, and CD/DVD burners are all hot-swappable. However, the virtual storage adapters are currently not hot-swappable. Therefore, if all the virtual storage adapters are full, you must reboot the virtual machine when you add additional devices. 7.2.1.6 Virtual Storage Setup Time Some virtual devices take longer to set up than others. Whole disks are very easy to set up because they require nothing more than a character device file. This is usually created automatically when the VM Host system is booted. 7.2 Configuring Integrity VM Storage 99 Logical volume creation is relatively simple. Logical volumes are used widely on HP-UX systems. The Veritas Enterprise Administrator can be used to create logical volumes. With experience, you can use logical volume commands more quickly. Creating files for virtual devices is not hard, but takes time. Files are usually placed on top of logical volumes, so you might have to create a logical volume first. To create empty files for virtual disks, use the hpvmdevmgmt command (see Section 9.8 (page 148)). To create ISO files from physical CD/DVD media for use in virtual DVDs, use the mkisofs or the dd utility. For attached devices, the effort and time to set them up is spent in the creation of the HP-UX pass-through device files that point to the devices being attached. Once understood, making HP-UX pass-through device files is a fast, simple process. If device drivers for the devices are installed on the VM Host, use the hpvmdevmgmt command to quickly create the device files. Otherwise, see scsi_ctl for information about creating passthrough device files using mknod. 7.2.2 Setting Up Virtual Storage When you add or modify a virtual device, you must enter a resource statement (rsrc). The resource statement can specify either virtual network devices (as described in Chapter 8), or virtual storage devices. This section describes how to enter resource statements for use with the hpvmcreate command (described in Chapter 3) and the hpvmmodify command (described in Chapter 9). The resource statement specifies the virtual storage device that will be seen by the virtual machine and how it maps to the physical storage device on the VM Host. The following is an outline of a complete resource statement for specifying a virtual storage device: VM-guest-storage-specification:VM-Host-storage-specification where: • VM-guest-storage-specification defines where and what storage is seen in the virtual machine (see Section 7.2.2.1: “VM Guest Storage Specification” (page 100)) • VM-Host-storage-specification defines where and how the virtual machine storage is supplied on the VM Host (see Section 7.2.2.2 (page 101)) For examples of how to construct resource statements, see Section 7.2.2.3 (page 102). 7.2.2.1 VM Guest Storage Specification All virtual storage is addressed from virtual PCI buses. The Integrity VM virtual platform contains 8 PCI buses. Each PCI bus has 8 slots into which virtual PCI adapters can be placed. One such adapter, simply called scsi, is an emulated single-ported parallel SCSI MPT storage adapter that can be used to connect 15 SCSI target devices to a guest. An AVIO storage adapter is also supported. The AVIO storage adapter supports up to 128 devices per adapter (and host) and provides higher performance and guest storage manageability. A VM Host administrator specifies this SCSI MPT adapter using the following: device:scsi:pcibus,pcislot,scsitgt where: • device is one of the following: disk, dvd, tape, changer, or burner • pcibus is an integer from 0-6. The virtual AVIO and MPT adapters are supported only on PCI buses 0-7. 100 Creating Virtual Storage Devices • pcislot is an integer from 0-7. A PCI function number is not specified. It is implicitly zero because the virtual MPT storage adapter supports only a single channel. • scsitgt is an integer from 0-14 for virtual SCSI (15 is reserved for the virtual SCSI adapter) and 0–127 for AVIO. All supported storage device types can share the same virtual SCSI MPT or AVIO adapter by specifying the same PCI bus and slot numbers. A virtual SCSI MPT or AVIO adapter can be added only to a virtual machine if it has a device connected to it. Unlike real parallel SCSI bus, there is no arbitration on virtual SCSI buses. The SCSI target IDs for the virtual devices must be unique.The virtual SCSI MPT adapter takes target ID 15 for itself, leaving 0-14 for SCSI targets. All SCSI targets connected to a VM are single LUN devices. That is, virtual disks and DVDs are emulated as single LUNs and all attached devices are specified by per LUN VM Host system files. The physical LUN number of an attached device has no impact. All virtual and attached SCSI LUN numbers are implicitly zero and therefore not specified. All supported storage device types can share the same virtual SCSI MPT adapter. Up to 15 storage devices can be added to the same SCSI MPT adapter by specifying the same PCI bus and slot numbers. A virtual SCSI MPT adapter can be added only to a virtual machine if it has a device connected to it. Not all device types are virtualized. Disk and DVD devices are virtual device types, whose virtual media comes from the VM Host. Tapes, changers, and burners are physical VM Host devices. For these attached devices, the physical SCSI IDs do not determine their place on the virtual bus. 7.2.2.2 VM Host Storage Specification Each VM storage device is backed by some VM Host storage entity. A VM Host entity is defined on the VM Host with a system file, which is used by Integrity VM and the VM Host operating system in processing I/O to and from that storage entity. A VM Host administrator specifies these storage entities using the following specification: storage:location where: • storage is one of the following: disk, lv, file, null, or attach. The selection of storage type defines what VM Host system files apply. For example, lv implies the use of logical volume character device files. For virtual devices, the selection of VM Host storage determines what type of virtual media the virtual device uses. For example, the selection of lv for a virtual disk, makes it a Virtual LvDisk to the VM. It does not support the attach storage type. A VM Host storage entity can only be used for one VM device type at a time. For example, a VM Host CD/DVD drive cannot be used for a Virtual DVD and an attached burner at the same time. • location is a VM Host system file. The file permissions on the VM Host system file are not honored by Integrity VM. VM device types that support write operations can still do so using a VM Host system file marked read only. More than one VM Host system file might point to the same VM Host storage entity. For example, if multiple paths to storage are present on the VM Host, more than one disk system file can point to the same disk. Different VM Host system files change how I/O is routed to the VM storage resource, but the system files point to the same storage entity. Therefore, different system files cannot constitute different VM storage resources. A given VM storage 7.2 Configuring Integrity VM Storage 101 resource can only be specified once to a given virtual machine. Therefore, only one VM Host system file per VM Host storage entity can be provided to a virtual machine (see Section 7.2.1.4 (page 98)). Not all virtual device types support all VM Host storage types (see Section 7.1.3 (page 93)). Complete VM storage resource statements are discussed in the next section. 7.2.2.3 VM Storage Resource Statements This section provides information about formulating complete valid resource statements for Integrity VM storage devices. To specify an Integrity VM storage device for a virtual machine, use a complete valid resource statement with the hpvmcreate or hpvmmodify command. The resource statement is a combination of the VM guest resource specification (described inSection 7.2.2.1 (page 100)) and the VM Host Storage Specification (described in Section 7.2.2.2 (page 101)). This section provides examples of complete resource statements for each of the following types of virtual storage devices: • Virtual disks • Virtual LvDisks • Virtual FileDisks • Virtual DVDs • Virtual FileDVDs • Virtual NullDVDs • Attachable Devices A virtual machine can have up to 30 VIO devices or up to 128 AVIO devices total (number of virtual and attached devices). The minimum size of a virtual storage resource is 512 bytes for virtual disk and 2048 bytes for a virtual DVD. Do not specify the same storage resource, virtual or attached, for the same virtual machine more than once (see Section 7.2.1.4 (page 98)). Unless otherwise noted, storage resources, virtual or attached, cannot be simultaneously shared by virtual machines. All multipath products for storage resources must run on the VM Host; multipath solutions are not supported in a virtual machine. All multipath solutions used on the VM Host must be in valid supported configurations before being used for Integrity VM storage resources (see Section 7.2.1.3 (page 97)). The resource statements in the following subsections do not contain VM hardware addressing. The PCI bus, PCI slot, and SCSI target numbers are optional. 7.2.2.3.1 Virtual Disks A Virtual Disk is an emulated SCSI disk whose virtual media comes from a VM Host disk LUN. The VM Host disk LUN is specified using a character device file. The character device file is owned by the HP-UX esdisk or sdisk driver. Virtual Disk resources cannot be shared simultaneously across active virtual machines (except in certain cluster configurations, as indicated in this manual). Only one active virtual machine at time can be given a particular Virtual Disk resource. Virtual Disk resources can be changed dynamically among active virtual machines. To prevent virtual media conflicts that can result in data corruption, a proper accounting of how the VM Host whole disks are allocated for use by Virtual Disks needs to be done, as described in Section 7.2.1.4 (page 98). The agile Virtual Disk resource statement takes the form: disk:scsi::disk:/dev/rdisk/diskX 102 Creating Virtual Storage Devices where /dev/rdsk/diskX is an HP-UX esdisk character device file. The legacy Virtual Disk resource statement takes the form: disk:scsi::disk:/dev/rdsk/cXtYdZ where /dev/rdsk/cXtYdZ is an HP-UX sdisk character device file. Use of agile device names for configuring storage devices is highly recommended as it provides multipathing benefits. These device files can be located for a VM Host LUN using the ioscan command. These system files are installed and removed using the insf and rmsf commands, respectively. Device files are created automatically by the VM Host for any storage it identifies during boot. New devices connected or created after boot time, require the use of ioscan and insf to create the new sdisk device files. To remove old device files for storage that is no longer present, use the rmsf command. For example: # ioscan # ioscan -NfunC disk disk 16 64000/0xfa00/0x10 esdisk CLAIMED DEVICE HP HSV210 /dev/disk/disk16 /dev/rdsk/disk16 7.2.2.3.2 Virtual LvDisks A Virtual LvDisk is an emulated SCSI disk whose virtual media is provided by a raw VM Host logical volume. To specify a VM Host logical volume, use a character device file. The character device file is owned by either LVM or VxVM. Virtual LvDisks cannot be shared simultaneously across active virtual machines. Only one active virtual machine at time can be given a particular Virtual LvDisk resource. Virtual LvDisk resources can be changed dynamically between active virtual machines (see Section 7.3 (page 110)). Logical volumes can be created using the sam utility or the Veritas Enterprise Administrator. Alternatively, logical volumes can be created using the commands available with the volume manager. All logical volumes are created on whole disks. The sizes of the logical volumes come from the space available from their respective volume group types; that logical volume size can be increased without loss of data in the volume. The character devices for the logical volumes are created by their respective volume managers at the time the logical volume is created. Also to avoid file system corruptions for the VM Host and guest , use only raw logical volumes that contain no VM Host file systems and are not currently mounted on the VM Host. To prevent data corruptions, keep an account of logical volumes for Virtual LvDisks. To help with the accounting, use all logical volumes within a given volume group for a single virtual machine. When logical volumes are configured this way, you only have to keep track of the volume groups to prevent media conflicts. For information about tracking virtual media allocation, see Section 7.2.1.4 (page 98). If you are using LVM, the Virtual LvDisk resource statement takes the following form: disk:scsi::lv:/dev/vg_name/rlvol_name Where /dev/vg_name/rlvol_name is an LVM character device file for rlvol_name on vg_name. To display the LVM character device file name, enter the following command: # vgdisplay -v VG Name /dev/lvrackA VG Write Access read/write VG Status available Max LV 255 Cur LV 4 Open LV 4 Max PV 16 Cur PV 1 Act PV 1 Max PE per PV 8683 7.2 Configuring Integrity VM Storage 103 VGDA 2 PE Size (Mbytes) 4 Total PE 8681 Alloc PE 8192 Free PE 489 Total PVG 0 Total Spare PVs 0 Total Spare PVs in use 0 --- Logical volumes --- LV Name /dev/lvrackA/disk1 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 2048 Allocated PE 2048 Used PV 1 LV Name /dev/lvrackA/disk2 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 2048 Allocated PE 2048 Used PV 1 LV Name /dev/lvrackA/disk3 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 2048 Allocated PE 2048 Used PV 1 LV Name /dev/lvrackA/disk4 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 2048 Allocated PE 2048 Used PV 1 --- Physical volumes --- PV Name /dev/disk/disk237 PV Status available Total PE 8681 Free PE 489 Autoswitch On In this example, the Virtual LvDisk resource statement is disk:scsi::lv:/dev/lvrackA/rdisk2. To use VxVM, the Virtual LvDisk resource statement takes the following form: disk:scsi::lv:/dev/vx/rdsk/dg_name/v_name where /dev/vx/rdsk/dg_name/v_name is a VxVM character device file for volume v_name on disk group dg_name. To display the VxVM character device file name, enter the following command: # vxprint Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg rootdg rootdg - - - - - - dm disk01 c3t0d0 - 35562538 - - - - Disk group: VxvmTest1 104 Creating Virtual Storage Devices TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg VxvmTest1 VxvmTest1 - - - - - - dm disk01 c5t8d0 - 71680564 - - - - v vxvm_1 fsgen ENABLED 2048000 - ACTIVE - - pl vxvm_1-01 vxvm_1 ENABLED 2048000 - ACTIVE - - sd disk01-01 vxvm_1-01 ENABLED 2048000 0 - - - v vxvm_2 fsgen ENABLED 2048000 - ACTIVE - - pl vxvm_2-01 vxvm_2 ENABLED 2048000 - ACTIVE - - sd disk01-02 vxvm_2-01 ENABLED 2048000 0 - - - v vxvm_3 fsgen ENABLED 2048000 - ACTIVE - - pl vxvm_3-01 vxvm_3 ENABLED 2048000 - ACTIVE - - sd disk01-03 vxvm_3-01 ENABLED 2048000 0 - - - v vxvm_4 fsgen ENABLED 2048000 - ACTIVE - - pl vxvm_4-01 vxvm_4 ENABLED 2048000 - ACTIVE - - sd disk01-04 vxvm_4-01 ENABLED 2048000 0 - - - To use VxVM, the Virtual LvDisk resource statement is disk:scsi::lv:/dev/vx/rdsk/VxvmTest1/vxvm_2. For information about adapters that support VxVM, see the HP Integrity Virtual Machines Version 4.1 Release Notes. For information about multipath solutions for Virtual LvDisks, see Section 7.2.1.3 (page 97). 7.2.2.3.3 Virtual FileDisks A Virtual FileDisk is an emulated SCSI disk whose virtual media comes from a VM Host file. The VM Host file is specified using the absolute pathname to the file. The file can be on a VxFS file system locally mounted on the VM Host. NFS file systems are not supported for Virtual FileDisks. Virtual FileDisks cannot be shared simultaneously across active virtual machiness. Only one active virtual machine can be given a particular Virtual FileDisk resource at a time. Virtual FileDisk resources can be changed dynamically between active virtual machines (see Section 7.3 (page 110)). The file systems used for Virtual FileDisks need to be managed to prevent data corruptions. To help with accounting, it is recommended that all files under a given directory be used with a single virtual machine. Additionally, it might help to allocate file directories from complete logical volumes or whole disks to make the accounting even easier. For more information, see Section 7.2.1.4 (page 98). The Virtual FileDisk resource statement takes the following form: disk:scsi::file:/pathname/file where the /pathname/file specifies the VM Host file used as virtual media. A VxFS file system can be created on top of a whole disk or logical volume. For files over 2 GB, VxFS requires the file system be marked with a largefiles option. The mkfs command can be used to create the VxFS file systems directly. Once the file systems are created, mount can be used to mount them onto the VM Host file system. Alternatively, if using logical volumes to create the file system on, the volume manager GUIs like sam can be used to create the file systems and their mount points, when the logical volumes are created. In any case, once the file system is mounted, you can create empty files for Virtual FileDisk using the hpvmdevmgmt command. # mkfs -F vxfs -o largefiles /dev/disk/disk237 # mount /dev/disk/disk237 /fdev/frackA/ # hpvmdevmgmt -S 4G /fdev/frackA/disk1 In this example, the Virtual FileDisk resource statement is disk:scsi::file:/fdev/frackA/disk1. 7.2 Configuring Integrity VM Storage 105 Multipath options for a Virtual FileDisk device are discussed in Section 7.2.1.3 (page 97). NOTE: Each Integrity VM guest can support a maximum of 30 Virtual FileDisks (combined limit for both AVIO and VIO). 7.2.2.3.4 Virtual DVDs A Virtual DVD is an emulated SCSI DVD-ROM with virtual media that comes from a disc inside of a CD/DVD drive on the VM Host. The VM Host CD/DVD drive is specified using an HP-UX sdisk character device file. While the Virtual DVD is read-only, the slowness of the physical VM Host CD/DVD drives prohibits them from being shared across active virtual machines. Thus only one active virtual machine at time should be given a particular Virtual DVD resource. Virtual DVD resources can be changed dynamically between active virtual machines (see Section 7.3 (page 110)). Because the Virtual DVDs are read only, they do not require management to prevent conflicts writing to the device. However, to prevent sensitive information from being accessed by the wrong virtual machine, make sure you know which virtual machine currently owns the device before you load a CD/DVD. This information can be found on the VM Host with the hpvmstatus commands. The agile Virtual DVD resource statement takes the following form: dvd:scsi::disk:/dev/rdisk/disk# where /dev/rdisk/disk# is an HP-UX esdisk character device file for a VM Host CD/DVD drive. The legacy Virtual DVD resource statement takes the form dvd:scsi::disk:/dev/rdsk/cXtYdZ, where /dev/rdsk/cXtYdZ is an HP-UX sdisk character device file for a VM Host CD/DVD drive. Typically, the HP-UX esdisk and sdisk character files will already be created before booting the VM Host. If they are not, they can be created and managed using the ioscan, insf, and rmsf utilities. For example: # ioscan -NfunC disk disk 7 64000/0xfa00/0x6 esdisk CLAIMED DEVICE TEAC DW-224E /dev/disk/disk7 /dev/rdisk/disk7 # diskinfo /dev/rdsk/disk7 SCSI describe of /dev/rdsk/disk7: vendor: TEAC product id: DW-224E type: CD-ROM size: 4300800 Kbytes bytes per sector: 2048 In this example, the Virtual DVD resource statement is dvd:scsi::disk:/dev/rdisk/disk7. For a virtual machine to recognize a Virtual DVD, physical media must be present inside the VM Host CD/DVD drive. If media is not added at virtual machine start time, it can be inserted into the VM Host CD/DVD drive after the virtual machine is already up. A rescan by the guest OS picks up the new media and adds the Virtual DVD to the virtual machine. If for some reason the VM Host Administrator requires control of the VM Host CD/DVD drive claimed by a virtual machine but has no media for the VM Host CD/DVD drive, then a Virtual NullDVD should be specified (see Section 7.2.2.3.6 (page 107)). Physical media can then be inserted into the VM Host CD/DVD drive and become virtual media for a Virtual DVD using the hpvmmodify or the virtual console's insert command (see Section 7.3.1.2 (page 111)). After the Virtual DVD is in the virtual machine, the VM Host CD/DVD drive is locked. The VM Host CD/DVD drive is automatically unlocked when the virtual machine is shut down. The VM Host CD/DVD can also be changed while the virtual machine is up using the virtual console's 106 Creating Virtual Storage Devices eject command. Once ejected, the Virtual DVD turns into a Virtual NullDVD and the VM Host CD/DVD drive unlocks. After you place physical media in the VM Host's CD/DVD drive, use the virtual console's insert command to turn a Virtual NullDVD back to a Virtual DVD, relocking the VM Host CD/DVD drive. Most physical VM Host CD/DVD devices on HP Integrity servers have only one path to them. As such, no multipath software is available on the VM Host for them. 7.2.2.3.5 Virtual FileDVDs A Virtual FileDVD is an emulated SCSI DVD with virtual media that comes from a VM Host ISO file. The VM Host ISO file is specified using the absolute pathname to the ISO file. The file can be on a VxFS file systems locally mounted on the VM Host. NFS file systems are not supported for Virtual FileDVDs. The Virtual FileDVD resource statement takes the following form: dvd:scsi::file:/pathname/file.ISO where the /pathname/file.ISO specifies the VM Host ISO file to use as virtual media. A VM Host ISO file can be created using the mkisofs utility or by using the dd command to copy CD/DVD media to a file. The VxFS file system should be enabled to support largefiles, because ISO files tend to be over 2 GB in size. All the ISO files that are useful to a guest OS should be placed in the same directory to take advantage of dynamic changes using the virtual console (see Section 7.3.2.3 (page 113)). The ISO files should be marked with proper permissions; they must not be world writable. For example: # ls -l /var/opt/hpvm/ISO-images/hpux total 26409104 -rw-r--r-- 1 root sys 3774611456 Jul 11 16:59 0505-FOE-OE.iso -rw-r--r-- 1 root sys 4285267968 Jul 11 17:05 0512-FOE.iso -rw-r--r-- 1 root sys 3149987840 Jul 11 18:42 0603-FOE-D1.iso -rw-r--r-- 1 root sys 1629978624 Jul 11 18:51 0603-FOE-D2.iso In this example, the Virtual FileDVD Resource Statement is: dvd:scsi::file:/var/opt/hpvm/ISOimages/hpux/0603-FOE-D1.iso. Virtual FileDVDs, like all files, can take advantage of the multipath options with which the file system is created. See Section 7.2.1.3 (page 97) for details. Virtual FileDVDs are read-only and are shareable across active virtual machines. Use the hpvmdevmgmt command to mark them sharable. To prevent media conflicts, you must manage Virtual FileDVDs carefully (see Section 7.2.1.4 (page 98)). You can see where the file system directory where the ISO file resides using the guest's virtual console. To simplify accounting, allocate file directories from complete logical volumes or whole disks. 7.2.2.3.6 Virtual NullDVDs A Virtual NullDVD is an emulated SCSI DVD-ROM with no virtual media currently present. The next media selection may come from a VM Host CD/DVD drive or VM Host ISO file, depending on how the Virtual NullDVD is configured. Once the next media is selected, the Virtual NullDVD turns into either a Virtual DVD (see Section 7.2.2.3.4 (page 106)) or a Virtual FileDVD (see Section 7.2.2.3.5 (page 107)) device. As such, a Virtual NullDVD is a transitory state of an empty virtual DVD type. The choice of how to configure a Virtual NullDVD depends on the access that the VM Host administrator gives to the guest administrator. Virtual DVD changes can be initiated from the virtual console (see Section 7.3.1.2 (page 111)). All virtual DVD changes by the guest administrator are constrainted by the actions of the VM Host administrator. 7.2 Configuring Integrity VM Storage 107 If the VM Host administrator gives access to the guest administrator to load and unload physical media on the VM Host CD/DVD drive, the Virtual NullDVD can be set up with the following form of the resource specification: dvd:scsi::null:/dev/rdisk/disk# where /dev/rdisk/disk# is an HP-UX esdisk character device file that points to the VM Host CD/DVD drive. The legacy sdisk device file, /dev/rdsk/cXtYdZ, may also be used. This is the same as setting up a Virtual DVD (see Section 7.2.2.3.4 (page 106)), except that the VM Host CD/DVD might not contain media. The media is expected to come from the guest administrator, who should have access to the VM Host to make such physical media changes. For example: # ioscan -NfunC disk disk 7 64000/0xfa00/0x6 esdisk CLAIMED DEVICE TEAC DW-224E /dev/disk/disk7 /dev/rdisk/disk7 # diskinfo /dev/rdisk/disk7 SCSI describe of /dev/rdisk/disk7: vendor: TEAC product id: DW-224E type: CD-ROM size: 0 Kbytes bytes per sector: 0 In this example, the Virtual NullDVD resource statement is dvd:scsi::null:/dev/rdisk/disk7. If the VM Host administrator does not want to give access to the VM Host CD/DVD drive to the guest administrator, you can set up a Virtual NullDVD to a file system directory containing the ISO files that the guest administrator wants to access. This resource statement would take the following form: dvd:scsi::null:/pathname where /pathname is the file system directory where the ISO files are located. This is the same as setting up a Virtual FileDVD (see Section 7.2.2.3.5 (page 107)), except that the file is not specified. By specifying a file directory, the guest administrator can choose which ISO files to use from the virtual console. The file directory must be a locally mounted VxFS file system. NFS file systems are not supported. If the ISO files are world writable, they are not available from the virtual console. For the following ISO files: # ls -l /var/opt/hpvm/ISO-images/hpux total 26409104 -rw-r--r-- 1 root sys 3774611456 Jul 11 16:59 0505-FOE.iso -rw-r--r-- 1 root sys 4285267968 Jul 11 17:05 0512-FOE.iso -rw-r--r-- 1 root sys 3149987840 Jul 11 18:42 0603-FOE-D1.iso -rw-r--r-- 1 root sys 1629978624 Jul 11 18:51 0603-FOE-D2.iso The Virtual NullDVD resource statement is dvd:scsi::file:/var/opt/hpvm/ISO-images/hpux/. You can configure the Virtual NullDVD to be sharable or have multipath options. If the Virtual NullDVD device is configured to use the VM Host CD/DVD device, it is not sharable and no multipath options are available. If the Virtual NullDVD is configured to use a file system directory, it is sharable and you can use multipath options (see Section 7.2.1.3 (page 97)). To mark the directory sharable across virtual machines, use the hpvmdevmgmt command. For example: # hpvmdevmgmt -m gdev:/var/opt/hpvm/ISO-images/hpux/:attr:SHARE=YES For more information about using the hpvmdevmgmt command, see Section 9.8 (page 148). 108 Creating Virtual Storage Devices Virtual NullDVDs require no additional management beyond that required for the Virtual DVD (see Section 7.2.2.3.4 (page 106)) or Virtual FileDVD (see Section 7.2.2.3.5 (page 107)) types they become. 7.2.2.3.7 Attachable Devices Integrity VM allows you to attach physical VM Host backup device types to virtual machines. The VM Host backup device types are tapes, media changers, and CD/DVD burners. These devices are specified on the VM Host using HP-UX agile esctl or legacy sctl device files. Use of the agile esctl device files are recommended, because they are per physical device not per path, as legacy sctl device files are. When using legacy sctl device files, do not specify a physical device more than once to a virtual machine through different hardware paths. Information about the use of legacy sctl device files cane be found throughout this manual. The guest OS running on the virtual machine has full control over an attached physical device. Therefore, the guest OS must support the device being attached. For a list of supported guest OS drivers, see the device's product documentation. The resource statements for attached devices take the following forms depending upon device type: • For magnetic tape: tape:scsi::attach:/dev/pt/pt_tape# • For media changers: changer:scsi::attach:/dev/pt/pt_autoch# • For CD/DVD burners: burner:scsi::attach:/dev/pt/pt_disk# where /dev/pt/pt_* files are HP-UX esctl device files. Attachable devices can be specified only as scsi. To create an HP-UX esctl device file, follow these steps: 1. Run ioscan to pick up any new devices that were connected: # ioscan 2. Locate the device designated for attachment. a. Install any device special files for these new devices: # insf -e b. Verify whether the new devices were claimed by VM Host: # ioscan -Nfun The following is an example of a claimed tape device: tape 1 64000/0xfa00/0x19 estape CLAIMED DEVICE HP Ultrium 1-SCSI /dev/rtape/tape1_BEST /dev/rtape/tape1_BESTn /dev/rtape/BESTb /dev/rtape/tape1_BESTnb If the device is not seen in ioscan -fun, proceed to step 2c. Otherwise, go to step 3. c. If the device is not claimed, make sure the device is seen: # ioscan -fk The following is an example of an unclaimed media changer device: Class I H/W Path Driver S/W State H/W Type Description ============================================================================== ext_bus 6 0/2/1/0 c8xx CLAIMED INTERFACE SCSI C1010 Ultra160 Wide LVD A6828-60101 target 35 0/2/1/0.0 tgt CLAIMED DEVICE unknown -1 0/2/1/0.0.0 UNCLAIMED UNKNOWN HP ThinStor AutoLdr 7.2 Configuring Integrity VM Storage 109 If the device is not seen, there is a hardware problem or SCSI ID conflict. Consult the documentation for the particular device to resolve this issue before proceeding. If the device is seen but not claimed, this is a result of missing drivers in the VM Host. Integrity VM does not require the drivers to be loaded on the VM Host for the devices to be attached. The HP-UX tape (stape) and changer (schgr) drivers are not loaded by default unless those devices are connected at install time. To load the drivers, use the kcmodule command to statically load the drivers. To complete the installation, the VM Host must be rebooted. Any guests that are running must be shut down before loading these drivers. The following is an example of installing the tape driver: # kcmodule stape=static The following is an example of installing the media changer driver: # kcmodule schgr=static If you are not loading the VM Host drivers, proceed to step 4. If you are loading the VM Host drivers, the devices should show up in ioscan with device files after the VM Host reboot. In which case, proceed to step 3. 3. Install esctl device files using the hpvmdevmgmt command. For example: # hpvmdevmgmt -I 4. Locate the passthrough device file that corresponds to the device slated for attachment. The following are examples of a tape device: Agile = /dev/rtape/tape1_BEST ESCTL = /dev/pt/pt_tape1 The following are examples of media changer device: Agile = /dev/rchgr/autoch1 ESCTL = /dev/pt/pt_autoch1 The following are examples of CD/DVD burner device: Agile = /dev/rdisk/disk7 ESCTL = /dev/pt/pt_disk7 Attached devices cannot be shared simultaneously across active virtual machines. Only one active virtual machine can be given a particular attached device at a time. However, like virtual devices, attached devices can be attached and detached dynamically across active virtual machines (see Section 7.3 (page 110)). Also, as the device is being attached to a virtual machine, it cannot be opened by the VM Host at the time of or during attachment. Because tapes, media changers, and CD/DVD burners are not virtualized, media changes with them must be done physically. Therefore, all media changes with attached devices must be done by individuals with access to that physical storage. Changes to attached devices might require the device to be unlocked from an active guest OS. Attached devices remain in the last lock state the guest OS put it in when the device is detached or the virtual machine is shut down. Empty devices are attached and are not locked. No multipath solutions are available for attached devices on the VM Host. No multipath products are supported in the virtual machine. Manage attached devices to prevent the wrong virtual machines from viewing sensitive information. You can display which virtual machines are currently using attached devices using the hpvmstatus command. 7.3 Using Integrity VM Storage The following sections describe the roles of individuals accessing virtual storage, the commands they use, and some examples of using Integrity VM storage. 110 Creating Virtual Storage Devices 7.3.1 Integrity VM Storage Roles This section describes the roles that individuals play in working with Integrity VM storage. Each role has different responsibilities in using Integrity VM storage. The roles might be played by one or more individuals depending on security requirements and skill sets. The three roles are: • “VM Host Administrator” (page 111) • “Guest Administrator” (page 111) • “Guest User” (page 112) 7.3.1.1 VM Host Administrator The VM Host administrator role is an individual responsible for the proper configuration and maintenance of the VM Host for running virtual machines. As such, this person needs complete access to the VM Host to install hardware and software. This person also needs to understand how to do HP-UX system maintenance, how to configure hardware properly, and how to set up and use various software applications and tools. The VM Host administrator uses the following commands to manage virtual machine storage devices: Management Function Integrity VM Command Add, delete,manage, andmodify virtualmachine storage hpvmmodify (see Section 3.5 (page 51)) devices. Display information about the storage devices for a virtual hpvmstatus (see Section 9.1 (page 133)) machine. Once a resource is added or attached to a virtual machine and the virtual machine is powered on, the storage resource is owned by the guest administrator. That is, the guest OS may access that storage resource at any time. A deletion, detachment or modification fails if any guest I/O is active on the resource. Dynamic storage changes on an active virtual machine must be approved by the guest administrator. 7.3.1.2 Guest Administrator The VM Guest Administrator is responsible for the proper maintenance of a guest OS. As such, this person needs access to the virtual console by the VM Host administrator to control the virtual machine. The guest administrator must understand how to maintain the guest OS, install patches and applications, and set up security for the guest users of the guest OS. Additionally, Integrity VM storage requires you to: • Install any specific guest OS patches required by Integrity VM for proper OS operation on the virtual platform. • Review and understand any Integrity VM storage release notes that are specific to the guest OS. • Work with the VM Host administrator to complete virtual storage changes, including managing attached VM Host devices. The guest administrator uses the virtual console to modify virtual storage. The virtual console is used to change discs of a virtual DVD device type. All modifications are bounded by what the VM Host administrator configures for the virtual machine. The virtual console commands are available from the vMP Main Menu, using the hpvmconsole command or by pressing Ctrl/B if you are already connected . The virtual console commands eject (ej) and insert (in) allow you to control the DVD device. Both commands provide submenus 7.3 Using Integrity VM Storage 111 for displaying devices that are removable. Selecting options through the submenus completes the ejection/insertion process. Management Function Integrity VM Command Eject a virtual DVD. vMP> ej Insert a virtual DVD vMP> in 7.3.1.3 Guest User The guest user runs applications on a guest OS. Access is provided and limited by the guest administrator. There are no Integrity VM storage requirements for application users of the guest OS. There are no Integrity VM storage commands for application users in the guest OS. The guest users use Integrity VM storage on the guest OS the same way as they normally use storage on an HP Integrity server. Any required Integrity VM storage changes must be directed to the guest administrator or VM Host administrator. 7.3.2 Integrity VM Storage Use Cases This subsection describes ways to use the Integrity VM storage commands. 7.3.2.1 Adding Virtual Storage Devices A VM Host administrator adds or attaches Integrity VM storage using the hpvmstatus and hpvmmodify commands. Virtual storage devices can be added or attached while the virtual machine is powered on or off. A new virtual storage adapter can be added only when the virtual machine is off. The virtual storage adapter can have up to 30 VIO storage devices or up to 128 AVIO devices total (the number of virtual and attached devices.) The process to add or attach a virtual storage device to a guest is as follows: 1. Based on the all Integrity VM storage considerations, choose a storage device to add. 2. Based on the device type, set up and configure the VM Host to form a valid resource statement. This includes accounting VM Host resources to avoid future storage conflicts. 3. Use the valid resource statement with the hpvmmodify command to add or attach the Integrity VM storage device. The resource statement for adding an Integrity VM storage device does not require virtual hardware addressing. If the PCI bus, slot and SCSI target numbers are not specified, Integrity VM automatically chooses the first position available for the device. For example: # hpvmmodify -P myvmm -a disk:scsi::disk:/dev/rdisk/disk7 # hpvmstatus -P myvmm .. [Storage Interface Details] ... disk scsi 0 1 0 0 0 disk /dev/rdisk/disk5 disk scsi 0 1 0 1 0 disk /dev/rdisk/disk7 To add an AVIO storage device with whole disk as the backing store, specify the following: host# hpvmmodify -P guest1 -a disk:avio_stor:0,5,0:disk:/dev/rdisk/disk11 112 Creating Virtual Storage Devices NOTE: You can achieve higher guests performance for HP-UX 11i v3 guests by configuring as many AVIO storage adapters as the number of virtual CPUs in the guest. The pcibus, pcislot, and scistgt portions need to be explicitly specified for each device. For example, a resource statement for a 4–vCPU guest takes the following form: -a disk:avio_stor:1,0,0:disk:/dev/rdisk/disk1 -a disk:avio_stor:1,1,0:disk:/dev/rdisk/disk2 -a disk:avio_stor:1,2,0:disk:/dev/rdisk/disk3 -a disk:avio_stor:1,4,0:disk:/dev/rdisk/disk4 7.3.2.2 Deleting VM Storage Devices A VM Host administrator deletes or detaches Integrity VM storage using the hpvmstatus and hpvmmodify commands. Integrity VM storage devices can be deleted or detached while the virtual machine is powered on or off. An Integrity VM storage adapter can only be removed when the virtual machine is off. The Integrity VM storage adapter is automatically removed when the last Integrity VM storage device connected to the adapter is removed. The process to delete or detach a virtual storage device from a virtual machine is as follows: 1. Use the hpvmstatus command to locate the resource to verify whether the virtual machine is powered on. If the virtual machine is on, consult with the guest administrator to obtain permission to remove the resource before proceeding. 2. Use the hpvmmodify command to delete or detach the resource. 3. Verify that the VM Host resource is no longer being used by the virtual machine. The resource statement for deleting an Integrity VM storage device does not require virtual hardware addressing. For example: # hpvmstatus -P myvmm ... [Storage Interface Details] ... disk scsi 0 1 0 0 0 disk /dev/rdisk/disk5 disk scsi 0 1 0 1 0 disk /dev/rdisk/disk7 disk scsi 0 1 0 2 0 disk /dev/rdisk/disk9 disk avio_stor 0 5 0 0 0 disk /dev/rdisk/disk11 # hpvmmodify -P myvmm -d disk:scsi::disk:/dev/rdisk/disk7 # hpvmstatus -P myvmm ... [Storage Interface Details] disk scsi 0 1 0 0 0 disk /dev/rdisk/disk5 disk scsi 0 1 0 2 0 disk /dev/rdsk/disk9 To delete an AVIO storage device, specify the following: host# hpvmmodify -P guest1 -d disk:avio_stor:0,5,0:disk:/dev/rdisk/disk11 7.3.2.3 Modifying VM Storage Devices The VM Host administrator or the guest administrator can modify an Integrity VM storage device. The VM Host administrator can use the hpvmstatus and hpvmmodify commands to change the virtual media of virtual devices. The guest administrator uses the virtual console to change the virtual media of virtual DVDs. All attached devices are modified using physical VM Host access. When the VM Host administrator uses the hpvmstatus and hpvmmodify commands to modify the virtual media of a virtual device, the operation is seen by the guest OS as a whole-disk replacement or a DVD removable media event, depending on the device type. The process for modifying the virtual media of a virtual device is as follows: 7.3 Using Integrity VM Storage 113 1. Use the hpvmstatus command to locate the virtual device resource to modify and to see if the virtual machine is powered on. If the virtual machine is on, consult with the guest administrator to before proceeding to replace the virtual media. 2. Based on the Integrity VM storage considerations, choose a new virtual media type to add. 3. Based on the virtual media type, set up and configure the VM Host to form a valid VM Host storage specification. Take into account the other demands on VM Host resources to avoid virtual machine storage conflicts. 4. Use the VM Host storage specification with the hpvmmodify command to modify the virtual device resource. 5. Verify that the old VM Host resource is no longer in use by a virtual machine. 6. When run on an active virtual machine and with a storage device managed by avio_stor HBA, the VM guest needs to run the gvsdmgr command prior to using the modified backing store. For information about the gvsdmgr utility, see the HP-UX gvsdmgr(1M) manpage. The resource statement for modifying a virtual device requires virtual hardware addressing (see Section 7.2.2.1 (page 100)). For example: # hpvmstatus -P myvmm ... [Storage Interface Details] ... disk scsi 0 1 0 0 0 disk /dev/rdisk/disk5 disk scsi 0 1 0 1 0 disk /dev/rdisk/disk7 disk scsi 0 1 0 2 0 disk /dev/rdisk/disk9 # hpvmmodify -P myvmm -m disk:scsi::0,1,1:lv:/dev/rdisk/disk2 # hpvmstatus -P myvmm ... [Storage Interface Details] ... disk scsi 0 1 0 0 0 disk /dev/rdisk/disk7 disk scsi 0 1 0 1 0 lv /dev/rdisk/disk2 disk scsi 0 1 0 2 0 disk /dev/rdisk/disk9 To complete a DVD ejection and insertion, follow the virtual console menus. However, new media selections might require the help of the VM Host administrator. Changes through the virtual console are not saved across guest OS reboots If the VM Host administrator sets up a Virtual DVD for the virtual machine, the virtual console eject and insert command unlock and lock the physical VM Host CD/DVD drive. The eject command changes the Virtual DVD into a Virtual NullDVD in the VM, unlocking the VM Host CD/DVD drive in the process. The physical media in the VM Host CD/DVD drive can then be changed by the VM Host administrator or the guest administrator if access is permitted. Once the media has been changed, the insert command can be used to change the Virtual NullDVD back into a Virtual DVD, locking the VM Host CD/DVD drive and making the newly loaded media now accessible by the virtual machine. For example: # diskinfo /dev/rdisk/disk7 SCSI describe of /dev/rdisk/disk7: vendor: HP product id: Virtual DVD type: CD-ROM size: 665600 Kbytes bytes per sector: 2048 vMP> ej Ejectable Guest Devices Num Hw-path (Bus,Slot,Tgt) Gdev Pstore Path ------------------------------------------------------------------------- [1] 0/0/1/0.7.0 (0,1,7) dvd disk /dev/rdisk/disk7 Enter menu item number or [Q] to Quit: 1 Confirm eject action 114 Creating Virtual Storage Devices G - Go F - Force Enter menu item or [Q] to Quit: G vMP> co # diskinfo /dev/rdisk/disk7 SCSI describe of /dev/rdisk/disk7: vendor: HP product id: Virtual NullDVD type: CD-ROM size: 0 Kbytes bytes per sector: 0 vMP> After inserting a new disk on the VM Host CD/DVD drive, enter the following: vMP> in Insertable Guest Devices Num Hw-path (Bus,Slot,Tgt) Gdev -------------------------------------------- [1] 0/0/1/0.7.0 (0,1,7) dvd Enter menu item number or [Q] to Quit: 1 Insertable File Backing Stores Num File --------------------- [1] /dev/rdisk/disk7 Enter menu item number or [Q] to Quit: 1 Confirm insertion action G - Go F - Force Enter menu item or [Q] to Quit: G vMP> co # diskinfo /dev/rdisk/disk7 SCSI describe of /dev/rdisk/disk7: vendor: HP product id: Virtual DVD type: CD-ROM size: 4300800 Kbytes bytes per sector: 2048 To modify an existing AVIO storage backing store, specify the following: host# hpvmmodify -P guest1 -m disk:avio_stor:0,5,0:disk/dev/rdisk/disk11 In this command, avio_stor indicates the “from” adapter and the “bus,dev” specification indicates the bus and device list of storage targets to convert. To modify all targets on a SCSI storage adapter to be targets on an AVIO storage adapter, specify the following: host# hpvmmodify -P guest1 -m hba:avio_stor:0,5 For information about AVIO support, see the HP Integrity Virtual Machines Version 4.1 Release Notes. This command string modifies an existing SCSI device adapter with some number of device targets to use the AVIO device adapter. The command has the following restrictions: • Each of the backing store devices under the SCSI HBA must be supported AVIO devices and adhere to storage type limitations. • All targets to be converted must list the same device adapter type. • The command can be executed only on a guest that is stopped. • Multiple adapter entries can be placed on the same command line. For example: 7.3 Using Integrity VM Storage 115 hpvmmodify -P guest1 -m disk:avio_stor:0,5 -m hba:avio_stor:0,6 The modification can also be reversed to the original SCSI adapter: hpvmmodify -P guest1 -m disk:scsi:0,5 The following example shows how to convert scsi to avio_stor: # hpvmstatus -P guest1 -d ... [Virtual Machine Devices] [Storage Interface Details] disk:scsi::0,5,0:disk:/dev/rdisk/disk0 disk:scsi::0,5,1:disk:/dev/rdisk/disk1 disk:scsi::0,5,2:disk:/dev/rdisk/disk2 disk:scsi::0,5,3:disk:/dev/rdisk/disk3 disk:scsi::0,5,4:disk:/dev/rdisk/disk4 ... # hpvmmodify -P guest1 -m hba:avio_stor:0,5 # hpvmstatus -P guest1 -d ... [Virtual Machine Devices] [Storage Interface Details] disk:avio_stor:0,5,0:disk:/dev/rdisk/disk0 disk:avio_stor:0,5,1:disk:/dev/rdisk/disk1 disk:avio_stor:0,5,2:disk:/dev/rdisk/disk2 disk:avio_stor:0,5,3:disk:/dev/rdisk/disk3 disk:avio_stor:0,5,4:disk:/dev/rdisk/disk4 ... Prior to running the hpvmmodify command shown previously, devices unsupported by AVIO need to be moved to a new HBA, using the hpvmmodify delete and add operations. NOTE: Guest operating systems, applications, or configuration files sensitive to device names or hardware paths need to be repaired after the move. Because HP-UX 11i v3 supports the agile device naming model, 11i v3 guest applications using agile device names are not affected as long as they are configured with disk backing stores. HP recommends the use of agile device names for guest configurations to avoid problems when VM Hosts are reconfigured. If the VM Host administrator sets up a Virtual FileDVD for the virtual machine, the virtual console options to eject and insert are used to select among the ISO files provided in the file directory for the Virtual FileDVD. The eject command changes the Virtual FileDVD into a Virtual NullDVD device. ISO files can be added to or removed from the file system directory for the Virtual FileDVD by the VM Host administrator. Once this ISO file directory is updated, use an insert command to view all the newly available ISO files in the directory and to choose one to be used for a new Virtual FileDVD. It is not necessary to change the file directory between each eject and insert operation. The guest administrator can change the ISO files provided in the file directory without any VM Host administrator interaction. For example: # diskinfo /dev/rdisk/disk0 SCSI describe of /dev/rdisk/disk0: vendor: HP product id: Virtual FileDVD type: CD-ROM size: 665600 Kbytes bytes per sector: 2048 vMP> ej Ejectable Guest Devices Num Hw-path (Bus,Slot,Tgt) Gdev Pstore Path ------------------------------------------------------------------------- [1] 0/0/1/0.7.0 (0,1,7) dvd file /var/opt/hpvm/ISO-images/hpux/IOTdisc Enter menu item number or [Q] to Quit: 1 116 Creating Virtual Storage Devices Confirm eject action G - Go F - Force Enter menu item or [Q] to Quit: G vMP> co vm # diskinfo /dev/rdisk/disk0 SCSI describe of /dev/rdisk/disk0: vendor: HP product id: Virtual NullDVD type: CD-ROM size: 0 Kbytes bytes per sector: 0 vMP> in Insertable Guest Devices Num Hw-path (Bus,Slot,Tgt) Gdev -------------------------------------------- [1] 0/0/1/0.7.0 (0,1,7) dvd Enter menu item number or [Q] to Quit: 1 Insertable File Backing Stores Num File --------------------- [1] 0505-FOE.iso [2] 0512-FOE.iso [3] 0603-FOE-D1.iso [4] 0603-FOE-D2.iso [5] IOTdisc Enter menu item number or [Q] to Quit: 1 Confirm insertion action G - Go F - Force Enter menu item or [Q] to Quit: G vMP> co # diskinfo /dev/rdisk/disk0 SCSI describe of /dev/rdisk/disk0: vendor: HP product id: Virtual FileDVD type: CD-ROM size: 3686144 Kbytes bytes per sector: 2048 For attached devices, modifications are made physically on the device. The guest OS supplies commands for loading and unloading tapes using media changers. But loading new media into the media changer, changing tapes in standalone drives, and changing discs with CD/DVD burners are accomplished manually. This process requires cooperation between the VM Host administrator and the guest administrator. 7.3 Using Integrity VM Storage 117 118 8 Creating Virtual Networks You can allocate virtual network devices or virtual network interface cards (vNICs) to the guest when you create the guest with the hpvmcreate command or when you modify an existing guest using the hpvmmodify command, as described in Chapter 3. Virtual network interface cards are added using the same option that is used to add storage devices, but the format of the argument to the command option is different. To add a vNIC to a guest, use the following command option: -a network:adaptertype:bus,device,mac-addr:vswitch:vswitch-name:portid:portnumber However, before you can allocate the vswitch to the guest, you must create the virtual switch (vswitch) using the hpvmnet command. This chapter describes how to create and manage vswitches, including the following topics and tasks: • “Introduction to Virtual Network Configuration” • “Creating and Managing vswitches” • “Managing vNICs” • “Configuring VLANs” • Section 8.5: “Troubleshooting Network Problems” (page 130) 8.1 Introduction to Virtual Network Configuration The guest virtual network configuration provides flexibility in network configuration, allowing you to provide high availability, performance, and security to the guests running on the VM Host. The basic virtual network configuration is illustrated in Figure 8-1. Figure 8-1 Virtual Network Configuration VM Host Localnet Vswitch1 Vswitch2 Intranet Guest 1 VNIC 1 VNIC 2 Guest 2 VNIC 1 VNIC 2 Guest 3 VNIC 1 VNIC 2 PNIC 2 PNIC 1 The virtual network configuration consists of the following components: • VM Host physical network interface card (pNIC) — the physical network adapter, which may be configured with Auto Port Aggregation (APA). (For more information about APA, see the HP Auto Port Aggregation (APA) Support Guide.) 8.1 Introduction to Virtual Network Configuration 119 NOTE: Trunking software such as APA is supported only on the VM Host, not on the guest. • Guest virtual network interface card (vNIC) — the virtual network adapter, as recognized by the guest operating system. • Virtual switch (vswitch) — the virtual network switch maintained by the VM Host that is associated with a pNIC and can be allocated to one or more guests. Using redundant pNICs and APA, you can ensure high availability of the guest networks and provide greater capacity for the VM Host system running many guests with network-intensive applications. You can configure HP-UX VLANs for the guests. VLANs isolates broadcast and multicast traffic by determining which targets should receive that traffic, thereby making better use of switch and end-station resources. With VLANs, broadcasts and multicasts go only to the intended nodes in the VLAN. 8.2 Creating and Managing vswitches The following sections describe how to create, modify, delete, and manage vswitches. 8.2.1 Creating vswitches To allow guests to access network devices, you must create vswitches on the VM Host. This section describes how to create a vswitch and verify that it has started. To create vswitches, use the hpvmnet command. The following is the basic format of the hpvmnet command to create a vswitch: hpvmnet -c -S vswitch-name -n nic-id This command format includes the following options: • -c indicates the creation of a vswitch. • -S vswitch-name specifies the name of the vswitch. • -n nic-id specifies the network interface on the VM Host that the new vswitch will use. For example, —n 0 indicates lan0. Network interfaces are displayed by the lanscan command. If you do not include the -n option, a local vswitch is created, as described in Section 8.2.1.1 (page 122). The hpvmnet command also allows you to display and manage the vswitches on the VM Host. Table 8-1 describes the options to the hpvmnet command. Table 8-1 Options to the hpvmnet Command Option Description Boots a vswitch. The vswitch must be booted before it can accept network traffic. All vswitches are booted automatically when Integrity VM is started. -b -c Creates a new vswitch. Halts one or all vswitches. You are asked to confirm this action. -h Omits the confirmation dialog before halting, deleting, or rebooting the vswitch. This option is intended for use by scripts and other noninteractive applications (Force mode). -F Deletes a virtual switch. You are asked to confirm this action. -d 120 Creating Virtual Networks Table 8-1 Options to the hpvmnet Command (continued) Option Description Specifies the network interface on the VM Host that the new vswitch will use. For example, to associate a vswitch to lan0, enter -n 0. -n nic-id Specifies the port number. To display information about all ports, enter —p all. -p n Specifies the command function should proceed without asking for confirmation. By default, the command requires confirmation, and does not proceed without it. -Q -r Restarts the vswitch information. -s Retrieves statistics. Specifies the name of the virtual switch. The vswitch name is limited to 8 characters and must be unique on the VM Host. -S vswitch_name Configures the port portnum on the virtual switch so that it is isolated to the VLAN specified by vlanid. See Section 8.4: “Configuring VLANs” (page 126) for more information. -u portid:portnum:vlanid:[vlanid | none] Enables verbose mode, displaying information detailed information about one or all vswitches. -V Displays the version number of the hpvmnet command in addition to the vswitch information. -v Changes the specified vswitch. If used with the -N option, the changes are made to the cloned vswitch. You must include either the -S or -s option. -C Creates a new vswitch based on the existing vswitch. For new_vswitch_name, specify the unique name of the new virtual switch. The name of the vswitch is limited to eight characters. You must include either the -S or -s option. -N new-vswitch-name The following command creates a virtual switch called clan1 that is associated with lan1. The second hpvmnet command displays information about the clan1 vswitch. # hpvmnet -c -S clan1 -n 1 # hpvmnet Name Number State Mode PPA MAC Address IP Address ======== ====== ======= ========= ====== ============== =============== localnet 1 Up Shared N/A N/A myswitch 2 Up Shared N/A N/A clan1 5 Down Shared lan1 The physical point of attachment (PPA) for clan1 is 1. Two vswitches (localnet and lan0) communicate over the localnet. To boot a vswitch, enter the hpvmnet command with the -b option. For example, to boot the vswitch named clan1, enter the following command: # hpvmnet -S clan1 -b # hpvmnet -v Name Number State Mode PPA MAC Address IP Address ======== ====== ======= ========= ====== ============== =============== localnet 1 Up Shared N/A N/A myswitch 2 Up Shared N/A N/A clan1 5 Up Shared lan1 0x00306e3977ab 8.2 Creating and Managing vswitches 121 Note that clan1 is associated with the network interface on the VM Host that has MAC address 0x00306e3977ab (this is not the MAC address of any virtual machine connected to this vswitch). For information about connecting vswitches to guests, see Chapter 3. For information about modifying virtual networks, see Section 8.3.1: “Adding vNICS” (page 125). You can create multiple vswitches associated with the same host physical NIC. However, you cannot boot (hpvmnet —b) more than one of them at the same time. 8.2.1.1 Local Networks Virtual network communication may be limited to virtual machines on the VM Host system through the use of vswitches that are not connected to a physical NIC. A virtual network such as this is called a local virtual network or simply a local network (localnet). To create a local network, a vswitch must first be created using hpvmnet without the -n option so that it is not connected to the physical network. For example, to create a local network vswitch named clan0, enter the following commands: # hpvmnet -c -S clan0 # hpvmnet -b -S clan0 All vNICs connected to that vswitch will then be on the same local network. The VM Host does not communicate on local networks. If you omit the -n option when you create a vswitch, the default is to use localnet. This command adds a vNIC to the guest host1, which can be used to communicate with any virtual machine connected to the localnet vswitch. 8.2.2 Changing vswitches You can use the -C option to change the physical network interface card (pNIC) the guest has in use. For example, enter the lanscan command, as follows: # lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/0/3/0 0x00306E4A93E6 0 UP lan0 snap0 1 ETHER Yes 119 0/1/2/0 0x00306E4A92EF 1 UP lan1 snap1 2 ETHER Yes 119 # hpvmnet Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== localnet 1 Up Shared N/A N/A hostnet 296 Up Shared lan0 0x00306e4a93e6 If lan0 goes down, enter the following command to swap to use lan1: # hpvmnet -C -S hostnet -n 1 # hpvmnet Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== localnet 1 Up Shared N/A N/A hostnet 296 Up Shared lan1 0x00306e4a92ef 8.2.3 Cloning vswitches Using the -N option with the -C option creates a new vswitch based on the changed vswitch information. For example, the following command sequence displays the current vswitch (vmvlan), modifies the vswitch to specify connection to lan1, and creates a new vswitch named clnvlan. The final command displays information about the new vswitch. # hpvmnet -S vmvlan Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== vmvlan 13 Up Shared lan900 0x00306e4bc7bf 122 Creating Virtual Networks [Port Configuration Details] Port Port Untagged Number of Active VM Number state VLANID Reserved VMs ======= ============ ======== ============ ============ 1 Reserved none 1 2 Reserved 20 1 3 Reserved none 1 # hpvmnet -C -S vmvlan -n 1 -N clnvlan # hpvmnet -S clnvlan Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== clnvlan 320 Down Shared lan1 [Port Configuration Details] Port Port Untagged Number of Active VM Number state VLANID Reserved VMs ======= ============ ======== ============ ============ 2 Available 20 0 Note that only the configured VLAN port identification data is copied to the new vswitch. Use this hpvmnet command option when you have a vswitch with numerous VLAN ports. This process makes it unnecessary to reenter all the port data for each new vswitch. 8.2.4 Deleting vswitches To delete a vswitch, first stop the vswitch using the -h option to the hpvmnet command. Then delete the vswitch using the -d option to the hpvmnet command. For example, the following command shows the error that prevents you from deleting an active vswitch (clan1): # hpvmnet -S clan1 -d hpvmnet: The vswitch is currently active hpvmnet: Unable to continue The following example uses the hpvmnet command to halt the vswitch and then to delete it. Both commands require you to confirm the action. The third command displays the current vswitches (without clan1). # hpvmnet -S clan1 -h hpvmnet: Halt the vswitch 'clan1'? [n/y]: y # hpvmnet -S clan1 -d hpvmnet: Remove the vswitch 'clan1'? [n/y] y The default command function (if you press Enter) is to not perform the function of the command. To perform the command function, enter y. In the case of commands where a confirmation is required, such as the hpvmnet -h command, you can include the —Q option to override the confirmation process. This is useful in scripts and processes that are not interactive. For example, to stop a vswitch (clan1) without requiring confirmation from the user, enter the following commands: # hpvmnet Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== localnet 1 Up Shared N/A N/A clan1 2 Up Shared lan0 0x00306e39f70b # hpvmnet -S clan1 -h -Q # hpvmnet Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== localnet 1 Up Shared N/A N/A clan1 2 Down Shared lan0 8.2 Creating and Managing vswitches 123 When an active vswitch is deleted, the VM Host automatically determines that the vswitch is gone. When the vswitch is recreated, the guest network automatically becomes functional again. 8.2.5 Recreating vswitches To change the vswitch to use another pNIC on the VM Host (for example, to change from lan0 to lan1), follow this procedure: 1. Delete the vswitch that was associated with lan0. For example: # hpvmnet -S myswitch -h -Q # hpvmnet -S myswitch -d 2. Create a new vswitch associated with lan1. For example: # hpvmnet -S myswitch -c -n 1 3. Add a new vNIC to your guest using the new vswitch. For example: # hpvmmodify -P guestname -a network:lan:,,:vswitch:myswitch 8.2.6 Starting vswitches Virtual switches (vswitches) start automatically when the VM Host system is started. You can start the vswitch manually using the —b option to the hpvmnet command. For example, the following command boots the vswitch named clan1: # hpvmnet -S clan1 -b You must restart a vswitch after the following events: • The MAC address corresponding to the LAN number being used by the virtual switch is changed on the VM Host (either by swapping the network adapter associated with the vswitch or associating the vswitch with a different network adapter). • The way the network adapter accepts and passes on packets to the next network layer is changed. This can occur as a result of the using the ifconfig or lanadmin command to set CKO on or off. • If you use the hpvmmodify command to change the adapter type for a virtual NIC (vswitch port). 8.2.7 Halting vswitches Use the hpvmnet -h command to halt a vswitch. For example: # hpvmnet -S clan1 -h hpvmnet: Halt the vswitch 'clan1'? [n]: y Auto Port Aggregation (APA) can be configured on the VM Host to provide a highly available LAN for the vswitch (APA in active/passive mode) or to increase the bandwidth of the vswitch LAN (APA active/active mode). Before you stop APA, halt the vswitches associated with it. If you do not bring down the vswitch first, the hpvmnet command reports an incorrect MAC address for the vswitch. 8.3 Managing vNICs After you create the vswitch, you can allocate it to one or more virtual machines for use by guest operating systems and applications. To create a vNIC for a virtual machine, enter one of the following commands: • To create a new virtual machine with one vswitch: # hpvmcreate -P vm-name -a network:adapter-type:[hardware-address]:vswitch:vswitch-name • To create a new virtual machine based on the configuration of an existing virtual machine: 124 Creating Virtual Networks # hpvmclone –P vm-name —a network:adapter-type:[hardware-address]:vswitch:vswitch-name The vNIC specified with this command is added to the new virtual machine. • To modify an existing virtual machine: # hpvmmodify –P vm-name —a network:adapter-type:[hardware-address]:vswitch:vswitch-name The —a option adds the specified vNIC to the virtual machine. NOTE: If you modify a vNIC from lan to avio_lan, or avio_lan to lan, you must restart the vswitch. As with virtual storage devices, use the -a rsrc option to associate a guest virtual network device with a vswitch. Before you use this option to associate the virtual network device with a vswitch, create the vswitch using the hpvmnet command. The format of the rsrc parameter for network devices is: network:adapter-type:[hardware-address]:vswitch:vswitch-name The guest virtual network device information consists of the following fields, separated by colons: • network • adapter-type, which can be either lan or avio_lan • [hardware-address] (optional), formatted as bus,device,mac-addr. If you do not specify the hardware address, or a portion of it, the information is generated for you. HP recommends allowing Integrity VM to generate the hardware address. The hardware address consists of the following information: — bus (virtual network device PCI bus number) — device (virtual network device PCI slot number) — mac-addr (the virtual network device MAC address) in either of the following formats: 0xaabbcc001122 or aa-bb-cc-00-11-22. The MAC address that you enter is checked to make sure it does not conflict with any of the VM Host’s physical network adapter MAC addresses. • vswitch The virtual switch information is formatted as vswitch:vswitch-name (where vswitch-name is the name assigned to the virtual network switch when you create it using the hpvmnet command) 8.3.1 Adding vNICS You can define a vNIC for a guest using the hpvmmodify command. For example, the following command adds a vNIC to the guest named host1. # hpvmmodify -P host1 -a network:lan:0,0,0x00306E39F70B:vswitch:clan1 The guest configuration file /var/opt/hpvm/guests/guestname/vmm_config.current contains an entry for each guest virtual network device. When the guest is booted (through the hpvmstart or hpvmconsole command), the guest LAN is configured as specified in the LAN entry in the guest configuration file. For example: . . . # Virtual Network Devices # lan(0,0).0x00306E39F70B = switch(clan1).4 . . . 8.3 Managing vNICs 125 The localnet vswitch can be used as a local network ,and vNICs can be specified for a guest. For example: # hpvmmodify -P host1 -a network:lan::vswitch:clan0 NOTE: Never modify the guest configuration files directly. Always use the Integrity VM commands to modify virtual devices and virtual machines. Failure to follow this procedure can result in unexpected problems when guests are started. The virtual network entry in the guest configuration file includes the guest information on the left side of the equal sign (=), and VM Host information on the right. The data about the guest LAN example includes the following information: lan(0,0) Bus 0 and device number 0 indicate the guest LAN hardware path. 0xEEEE4077E7EB Guest virtual MAC address. switch(clan1) The vswitch name is clan1. 4 The VLAN port number is 4. Entering the lanscan command on the guest host1 results in the following: # lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/0/3/0 0xEEEE4077E7EB 0 UP lan0 snap0 1 ETHER Yes 119 0/1/2/0 0x00306E3977AB 1 UP lan1 snap1 2 ETHER Yes 119 0/4/1/0 0x00306E4CE96E 2 UP lan2 snap2 3 ETHER Yes 119 NOTE: Do not include the hardware address (for example, bus, device, mac-addr) with the hpvmmodify command, because Integrity VM picks an available pcibus, pcislot and generates a random MAC address. The hardware path from the output of lanscan on the guest matches the path in the guest configuration file. The Station Address in the lanscan output also matches the guest virtual MAC address in the guest configuration file. 8.3.2 Removing vNICs To remove a vNIC from a virtual machine's configuration, first stop the guest using the hpvmstop command. Then use the -d option to the hpvmmodify command. The -d option allows you to specify the vswitch and the vNIC information. The following is the syntax of the hpvmmodify -d command: hpvmmodify -P vm-name -d network:adapter-type:[hardware-address]:vswitch:vswitch-name After making this change, start the guest using the hpvmstart command. 8.4 Configuring VLANs A local area network (LAN) defines a broadcast domain in which bridges and switches connect all end nodes. Broadcasts are received by every node on the LAN, but not by nodes outside the LAN. A virtual LAN (VLAN) defines logical connectivity instead of the physical connectivity defined by a LAN. A VLAN provides a way to partition a LAN logically such that the broadcast domain for a VLAN is limited to the nodes and switches that are members of the VLAN. VLANs provide the following benefits: 126 Creating Virtual Networks • Enhanced security through traffic isolation within nodes that are VLAN members • Bandwidth preservation, limiting the broadcast domain to a VLAN instead of the entire LAN • Enhanced manageability for node migrations and network topology changes Figure 8-2 illustrates a basic virtual machine VLAN that allows guests on different VM Host systems to communicate. Figure 8-2 Integrity VM VLAN Configuration Example VM Host VM Host VSwitch1 VSwitch2 Guest VM1 Guest VM2 PNIC 1 Internet VLAN1 PNIC 2 VSwitch1 VSwitch2 Guest VM3 Guest VM4 VLAN1 PNIC 2 PNIC 1 A vNIC on a guest is associated with a port on the vswitch and all network communication to and from the guest passes through this vswitch port. You can configure VLAN rules on the individual ports of the vswitch, similar to most physical switches. Each VLAN is identified by a VLAN identifier (VLAN ID). The VLAN ID is a number in the range 0-4094. A port on the vswitch can be assigned a VLAN ID that identifies the VLAN to which the port (and, therefore, the guest vNIC using that port) belongs. Ports on a vswitch that are configured for the same VLAN ID can communicate with each other. Ports on a vswitch that are configured for different VLAN IDs are isolated from each other. Ports on a vswitch that do not have any VLAN ID assigned cannot communicate with ports that have a VLAN ID assigned, but they can communicate with other ports that have no VLAN ID assigned. If the guest has to communicate with the VM Host or outside the VM Host over a VLAN, additional configuration is necessary. For communication to the VM host, configure a VLAN interface on the VM host interface for that vswitch. This VLAN interface should have the same VLAN ID as the guest port. For information about configuring VLANs on the VM Host, see the Using HP-UX VLANs manual. Do not use the hpvmnet command to create a virtual switch that is associated with a VLAN port on the VM Host (that is, a LAN created with lanadmin -V). This “nested VLAN” configuration is not supported. Frames arriving at the vswitch from a guest can be “tagged” by the vswitch. Tagging consists of inserting the VLAN ID information into the MAC header before forwarding the frame on. Tagged frames destined for a guest are always stripped of the tag information in the frame before being forwarded. For Integrity VM, only tag-unaware guests are supported. To configure a VLAN, follow this procedure: 1. Create and start the vswitch. For example, to create and boot vswitch vmlan4 on lan1, enter the following command: 8.4 Configuring VLANs 127 # hpvmnet -c -S vmlan4 -n 1 # hpvmnet -b -S vmlan4 2. Use the hpvmnet command with the —u option to create the port and assign it a VLAN ID. For example, to create ports 1 and 2 for VLAN 100, enter the following command: # hpvmnet -S vmlan4 -u portid:1:vlanid:100 # hpvmnet -S vmlan4 -u portid:2:vlanid:100 3. Add the vswitch ports to the guest configuration using the hpvmmodify command. For example, to add the new VLAN ports to guests vm1 and vm2, enter the following command: # hpvmmodify -P vm1 -a network:lan::vswitch:vmlan4:portid:1 # hpvmmodify -P vm2 -a network:lan::vswitch:vmlan4:portid:2 The following command shows the resulting configuration: # hpvmnet -S vmlan4 Name Number State Mode PPA MAC Address IP Address ======== ====== ======= ========= ====== ============== =============== vmlan4 2 Up Shared lan4 0x00127942fce3 192.1.2.205 [Port Configuration Details] Port Port Untagged Number of Active VM Number state VLANID Reserved VMs ======= ============ ======== ============ ============ 1 Active 100 2 vm1 2 Active 100 1 vm2 3 Active none 2 vm1 4 Active none 1 vm2 The two virtual machines, vm1 and vm2, have access to the virtual switch vmlan4 and are active on VLAN 100. Specifically, port 1 (guest vm1) and port 2 (guest vm2) can communicate with each other. Port 1 (guest vm1) and port 4 (guest vm2) cannot communicate with each other. The hpvmnet command displays the following information about the VLAN ports: • Port number. • State of the port. Table 8-2 describes the possible VLAN port states: Table 8-2 VLAN Port States State Description The port is active and is allocated to a running guest. No other guests with the same vNIC with the same vswitch and port can start Active The port is inactive and is allocated to a running guest. No other guests with the same vNIC with the same vswitch and port can start. Down Reserved At least one guest reserved the port for its vNIC, but no guest that uses the port is running. No guest reserved the port for its vNIC. When a VLAN is configured on the port, that port is displayed as Available. If no VLAN is configured, the port is not displayed at all. Available • The untagged VLAN ID number (if any) • The number of virtual machines that have access to the VLAN • The names of virtual machines that are up and that have access to the VLAN 8.4.1 Cloning Guests with VLAN Information If you use the hpvmclone command to clone guests, the operation automatically assigns new port numbers for new guests. To assign the same port number to the new guest, use the —S option, as follows: # hpvmclone -P vm1 -N vmclone1 -S This command creates a new guest (vmclone1) based on the existing guest vm1, and preserves the vswitch port number so that the new guest will have access to the same VLANs as the existing guest. 128 Creating Virtual Networks 8.4.2 Displaying VLAN Information You can display the vswitches and ports on a vswitch used by a guest using the hpvmstatus command. For example, to display the network information about the guest named vm1, enter the following command: # hpvmstatus -P vm1 . . . [Network Interface Details] Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address ========= ========== ========== ======= === === === ============== vswitch lan localnet 1 0 1 0 de-19-57-23-74-bd vswitch lan localnet 2 0 2 0 7a-fb-4e-68-4f-5f vswitch lan vmlan4 1 0 4 0 16-e8-c6-fa-b5-bc vswitch lan vmlan4 2 0 5 0 fa-18-82-9f-1a-95 vswitch lan vmlan900 1 0 6 0 86-81-0b-6d-52-36 vswitch lan vmlan900 2 0 7 0 6a-b9-cf-06-02-94 . . . The preceding example shows the Network Interface Details portion of the hpvmstatus display. In the list of network interfaces, note that each virtual network connection is associated with either port 1 or port 2 of several vswitches. The vswitch named vmlan4 is associated with Bus/Dev/Ftn 0/4/0 on port 1, and with 0/5/0 on port 2. To disable a VLAN, use the following command: # hpvmnet -S vswitch-name -u portid:portnum:vlanid:none To display information about a specific VLAN port, include the -p option to the hpvmnet command. For example, display VLAN information for port 2 on the vswitch named vmlan4, enter the following command: # hpvmnet -S vmlan4 -p 2 Vswitch Name : vmlan4 Max Number of Ports : 100 Port Number : 2 Port State : Active Active VM : vm1 Untagged VlanId : 100 Reserved VMs : vm1 Adaptor : avio_lan To view the all the VLANs defined on the vswitch named vlan4, enter the following command: # hpvmnet -S vmlan4 -p all Vswitch Name : vmlan4 Max Number of Ports : 100 Configured Ports : 4 Port Number : 1 Port State : Active Active VM : vm1 Untagged VlanId : none Reserved VMs : vm1 Adaptor : avio_lan Port Number : 2 Port State : Active Active VM : vm1 Untagged VlanId : 100 Reserved VMs : vm1 Adaptor : avio_lan Port Number : 3 Port State : Active Active VM : vm2 8.4 Configuring VLANs 129 Untagged VlanId : none Reserved VMs : vm2 Adaptor : avio_lan Port Number : 4 Port State : Active Active VM : vm2 Untagged VlanId : 100 Reserved VMs : vm2 Adaptor : avio_lan 8.4.3 Configuring VLANs on Physical Switches When communicating with a remote VM Host or guest over the network, you might need to configure VLANs on the physical switches. The physical switch ports that are used must be configured specifically to allow the relevant VLANs. If the remote host is VLAN aware, You must configure VLAN interfaces on the host for the relevant VLANs. Use thelanadmin command to configure VLANs on a remote HP-UX host. For example, to configure a VLAN interface with VLAN ID 100 on lan4, enter the following command: # lanadmin -V create vlanid 100 4 Successfully configured lan5000: vlanid 100 name UNNAMED pri 0 tos 0 tos_override IP_HEADER pri_override CONF_PRI ppa 4 8.5 Troubleshooting Network Problems This section describes some commonly encountered problems using virtual networks. • Do not kill hpvmnetd Do not use the kill command to remove the hpvmnetd process. If you do, the following error message indicates that the hpvmnet daemon has been killed: hpvmnetd: Switch 0000564d4c414e31 already exists If the hpvmnetd process is removed, vswitches do not work properly. 8.5.1 Redefining pNICs for HP-UX Guests Changing the hardware address of a vswitch has the same effect as moving a network adapter from one hardware slot to another on an HP Integrity system. Similar to other HP-UX systems, the guest file /etc/rc.config.d/netconf must be modified so that INTERFACE_NAME[0] reflects the new LAN PPA assigned by the HP-UX network driver on the first guest reboot after the modification. At this first reboot, the LAN interfaces configuration fails, as follows: Configure LAN interfaces ............................ . FAIL * When the guest is running, you can use the lanscan command to identify the new LAN PPA and to modify netconf. For example: # lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr# 0/0/5/0 0x02636C6E3030 1 UP lan3 snap3 1 ETHER Yes 119 In the preceding example, before the modification, the LAN PPA was 0. The new LAN PPA on the first boot after the modification is 3. Therefore, you must first bring the guest network down, then you must change the INTERFACE_NAME[0] from lan0 to lan3. You can then use /sbin/ rc2.d/S340net to restart the guest network. For example: # /sbin/rc2.d/S340net stop # ch_rc -a -p "INTERFACE_NAME[0] = "lan3" # /sbin/rc2.d/S340net start The guest network begins to function. 130 Creating Virtual Networks 8.5.2 Troubleshooting VLAN Problems When VLANs are configured on the vswitch, the partitioned LAN must have its own set of network servers to service requests on the VLAN. For example, the VLAN's DNS server or a router setup on the VLAN should be set up on the VLAN. If guests start slowly or hang during starting, determine whether the guest network interface is on a VLAN, and whether the appropriate network services (like DNS) are set up and available on the VLAN. You might need to either set up the appropriate services on the VLAN, or disable some of these network services on the guest before booting up the guest on a VLAN. When VLANs are configured on the vswitch and the guests are required to communicate over a VLAN with a remote node outside the VM Host, you might need to set up the physical network appropriately for the VLAN. For information about configuring VLANs on the switches, see the product documentation for the physical network adapters. If TCP/UDP applications have trouble communicating between a guest and the local VM Host over a VLAN, it is possible that the host interface for the vswitch is checksum-offload capable. To resolve the problem, identify the interface used by the vswitch and run the following command on the VM Host to disable the CKO feature, where 4 is the host interface as shown in the hpvmnet command output. # lanadmin -X send_cko_off 4 Hardware TCP/UDP (IPv4) transmit checksum offload is currently disabled 8.5 Troubleshooting Network Problems 131 132 9 Managing Guests To manage a guest, connect to the guest using a remote connection and use the operating system administration procedures appropriate to the guest OS. Integrity VM provides utilities for managing virtual machines from the VM Host and from inside the guest. This chapter describes how to manage guests using Integrity VM commands and utilities. The following topics are included in this chapter: • “Monitoring Guests” • “Creating Guest Administrators and Operators” • “Installing the Guest Management Software” • “Using the Virtual Console” • “Guest Configuration Files” • “Dynamic Memory” • “Integrity VM Log Files” • “Managing the Device Database” 9.1 Monitoring Guests To display information about all the virtual machines configured on the VM Host, enter the hpvmstatus command. # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ======== ====== ===== ===== ======= ======== config1 1 HPUX Off 1 5 1 512 MB 0 config2 2 HPUX On (OS) 1 7 1 1 GB 0 winguest1 5 WINDOWS Off 1 5 1 1 GB 0 winguest2 9 WINDOWS On (OS) 1 3 1 2 GB 0 The virtual machine status is displayed in the State column and indicates whether the virtual machine is powered off or on. When the virtual machine is on, the status also includes one of the following: • EFI indicates the virtual machine is running normally in EFI. • OS indicates the virtual machine is running normally in the operating system. • ATTN! indicates the guest is not responding to interrupts. Table 9-1 describes the options to the hpvmstatus command. Table 9-1 Options to the hpvmstatus Command Option Description -v Displays the version of the Integrity VM product that is running on the VM Host. Displays detailed information about the specified virtual machine or about all the virtual machines if you do not specify one using either the -p or -P option. -V -M Specifies the display output should be in machine-readable format. -X Specifies the display output should be in XML format. -P vm-name Specifies the name of the virtual machine for which to display information. -p vm-number Specifies the number of the virtual machine for which to display information. Displays the resource allocation of the specified virtual machine. You must include either the -p option or the -P option. -D Displays the event log for the VM Host or the specified virtual machine. The event log records all changes to virtual machine configurations. -e 9.1 Monitoring Guests 133 Table 9-1 Options to the hpvmstatus Command (continued) Option Description Displays the memory and virtual CPU resource allocation for the virtual machines (or for the specified virtual machine if you use the -p option or the -P option). This option displays the entitlement and virtual CPUs parameters configured for the virtual machine and the current usage of those resources. -r Displays the devices allocated to the virtual machine you specify using either the -p option or the -P option. -d Displays the scheduler mode for the VM Host. CAPPED indicates that gWLM is managing the node. NORMAL indicates that the node is not being managed by gWLM. -S -s Displays the current VM Host resources. -m If Serviceguard is installed, displays information about the multiple-server environment. For example, to see detailed information about the host1 virtual machine, enter the following command: # hpvmstatus -V -P host1 [Virtual Machine Details] Virtual Machine Name : host1 Virtual Machine UUID : 43d82eb8-ff27-11d9-a431-00306e39f70b Virtual Machine ID : 2 Virtual Machine Label : VM's Model Name : server Integrity Virtual Machine VM's Serial Number : VM00530001 VM's Config Version : 4.1.0 VM's Config Label : HPVM B.04.10.00 BL02 clearcase opt Wed Jun 04 2008 05h 41m04s PST Operating System : HPUX OS Version Number : State : On (OS) Start type : Manual Console type : vt100-plus Guest's hostname : Guest's IP address : 16.116.11.135 EFI location : /opt/hpvm/guest-images/common/efi Pattern File location : /opt/hpvm/guest-images/common/patterns.vmmpat Guest revision : 1 Running on serverid : 0 Running on pid : 24447 Application controllers : NONE Distributed : 0 [Authorized Administrators] Oper Groups: Admin Groups: Oper Users: Admin Users: [Virtual CPU Details] Number Virtual CPUs : 1 Minimum Virtual CPUs : 1 Maximum Virtual CPUs : 4 Percent Entitlement : 10.0% Maximum Entitlement : 100.0% [Memory Details] Total memory : 2 GB Minimum memory limit : 512 MB Maximum memory limit : 64 GB Reserved memory : 64 MB Minimum reserved limit : 32 MB Maximum reserved limit : 64 GB VHPT Size : 1 MB [Dynamic Memory Information] Type : driver 134 Managing Guests Minimum memory : 1024 MB Target memory : 2039 MB Maximum memory : 2048 MB Current memory : 2039 MB Comfortable minimum : 759 MB Boot memory : 2039 MB Free memory : 1148 MB Available memory : 215 MB Memory pressure : 0 Memory chunksize : 65536 KB Driver Mode(s) : STARTED ENABLED GUESTCTL [Storage Interface Details] Guest Device type : disk Guest Adaptor type : scsi Ioscan format : 0/0/1/0.0.0 Bus : 0 Device : 1 Function : 0 Target : 0 Lun : 0 Physical Storage type : disk Physical Device : /dev/rdisk/disk0 [Network Interface Details] Physical Storage type : vswitch Guest Adaptor type : lan Backing : vswitch1 Vswitch Port : 1 Ioscan format : 0/0/0/0 Bus : 0 Device : 0 Function : 0 Mac Address : f6-92-cf-35-86-78 [Misc Interface Details] Guest Device type : serial Guest Adaptor type : com1 Physical Storage type : tty Physical Device : console To display the VM Host system resource, use the -s option to the hpvmstatus command. For example: # hpvmstatus -s [HPVM Server System Resources] Processor speed = 1400 Mhz Total physical memory = 12276 Mbytes Total number of processors = 2 Available memory = 7367 Mbytes Available swap space = 4707 Mbytes Maximum vcpus for an HP-UX virtual machine = 2 Maximum vcpus for a Windows virtual machine = 2 Available entitlement for a 1 way virtual machine = 1400 Mhz Available entitlement for a 2 way virtual machine = 1260 Mhz 9.2 Creating Guest Administrators and Operators Integrity VM provides secure access to guest machine consoles. When you create the virtual machine, you can specify groups and user accounts to have administration or operator privileges on that guest. These users are allowed to log in to the VM Host under their own user accounts and to use the hpvmconsole command to perform system administration tasks on the guest virtual machine. A captive virtual console account is a special-purpose user account created on the VM Host for each guest administrator or operator. These types of user accounts use the /opt/hpvm/bin/ 9.2 Creating Guest Administrators and Operators 135 hpvmconsole directory for a shell, and the desired guest's per-guest directory for a home directory. For virtual console access, the account also requires a password, and access to its associated guest. Before you create the virtual machine, use the useradd command to create user accounts for virtual console access. For example, the following command adds the user account testme: # useradd -r no -g users -s /opt/hpvm/bin/hpvmconsole \ -c "Console access to guest 'testme'" \ -d /var/opt/hpvm/guests/testme \ testme1 Do not use the hpvmsys group for user accounts. This group is used for security isolation between components of Integrity VM. These types of console users are specified as either admin (guest administrators) or oper (guest operators). Guest operators can access to the virtual machine console, shut down and reboot the guest, display system status, transfer control to another guest operator or administrator, and set system identification. The guest administrator has all these capabilities, as well as the ability to use the virutal console say commands (restricted to use by HP field support specialists). You can specify guest administrators and operators using the hpvmcreate, hpvmmodify, hpvmmigrate, and hpvmclone commands. To assign administrator and operator privileges to a user group, include the -g option. To assign administrator and operator privileges to a specific user, use the -u option. NOTE: Console users cannot use the su command to change from one privilege level to another. Per-user checks are based on login account identifiers, not on UUIDs. The following command creates the virtual machine named testme with the adminstrator named testme1: # hpvmcreate -P testme -u testme1:admin Guest operators and administrators need access to the hpvmconsole command to control the virtual machine. If you do not want the same users to have access to the VM Host, you can restrict use of the hpvmconsole command to guest console access only by creating a restricted account for that purpose. To do so, follow these steps: 1. Using the useradd command, set up an /etc/passwd entry for each guest on the VM Host. The user name of the account must be the same as the guest name and must have no more than 8 characters. For example: # useradd -d /var/opt/hpvm/guests/host1 \ -c 'host1 console' -s /opt/hpvm/bin/hpvmconsole host1 This example uses the following options: • The -d option specifies the home directory for the host1 account. • The -c option specifies a comment text string that describes the account. • The -s option specifies the path for the shell of the new account. 2. Use the passwd command to set a password for the account. For example: # passwd host1 3. Use the hpvmmodify command to provide the user with guest administration privileges: #hpvmmodify -P winguest1 -u host1:admin A guest administrator can now access the host1 virtual console by using the ssh command or telnet command on the VM Host and logging in to the host1 account. The guest administrator cannot use the su command. 136 Managing Guests NOTE: For security reasons, HP strongly recommends that you do not include /opt/hpvm/ bin/hpvmconsole, the virtual console image, in /etc/shells. Doing so opens two security vulnerabilities: • It allows ftp access to the account. • It allows a general user to select the image with the chsh command. The following is an example session of remote access to the host1 virtual console on the VM Host myhost: # telnet host1 Trying 16.xx.yy.zz... Connected to host1.rose.com. Escape character is '^]'. HP-UX host B.11.23 U ia64 (ta) login: guest1 Password: Please wait...checking for disk quotas MP 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 [host1] vMP> The virtual console interface displays raw characters for the CL and CO commands, including the guest's attempts to query the console terminal for its type and characteristics. As a result, the terminal answers those queries, which can cause the terminal setup communication to interfere with the virtual console commands. Interactive users can clear the screen. However, this situation can be a problem for noninteractive or scripted use of the console. 9.3 Installing the Guest Management Software After you install the guest OS, you must install special Integrity VM guest management software. Installing the guest management software on each guest provides patches for performance improvements and allows you to use Integrity VM command on the guest. Without the guest management software, you cannot use guest dynamic memory. And, with the latest guest management software, the guest can be managed by VM Manager and the VSE suite of products. Figure 9-1 illustrates the process. Guest management software is copied onto the VM Host system when you install Integrity VM. When you upgrade to a new version of Integrity VM, the guest management software is also upgraded in the VM Host guest management software repository. You manually install the appropriate guest management software on each guest, depending on the guest OS. 9.3 Installing the Guest Management Software 137 Figure 9-1 Installing Guest Management Software Real VM Host Installation Media HP-UX VM Guest Windows VM Guest HP-UX Software HP-UX Guest Software Windows Guest Software Windows Software Guest Management Software Repository The guest management software is required on each guest. The guest management software ensures that guests have the required patches for optimum performance and managability. It also enables the hpvmmgmt, hpvmcollect, and hpvminfo commands on the guests, as appropriate. (Not all commands run on all types of guests.) The guest management software is stored on the VM Host system in the /opt/hpvm/ guest-images directory. A subdirectory contains the guest management software for each type of guest operating system, as shown in the following example: # cd /opt/hpvm/guest-images # ls common hpux linux windows Each guest management software directory contains a README file that describes how to install the guest management software for that type of guest. For information about any additional software updates that you should also install on your guests, see the HP Integrity Virtual Machines Release Notes. 9.4 Using the Virtual Console Each virtual machine has its own virtual console from which to power on or off the virtual machine, boot the guest operating system or shut it down, and so on. The hpvmconsole command connects to the virtual console of a specified virtual machine. To start the virtual console for the guest named host1, enter the following command: # hpvmconsole -P host1 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 [host1] vMP> To return to the virtual console when the display is in the EFI, press Ctr/B. Use the co command to open the virtual console. For example: [host1] vMP> co 138 Managing Guests You can pass a command to the virtual machine console using the —c option to the hpvmconsole command. For example, to start a virtual machine named host1, enter the following command: # hpvmconsole -P host1 -c "pc -on" Table 9-2 lists the options to the hpvmconsole command. Table 9-2 Options to the hpvmconsole Command Option Description -P vm-name Specifies the name of the virtual machine console to open. -p vm-number Specifies the number of the virtual machine console to open. -c command Specifies a machine console command to run on the virtual machine. -e echar Specifies an alternate interrupt character. The default interrupt character is Ctrl/B. -f Follows the console output after reaching EOF on standard input. Used for scripting. -i Interacts with the console. Used for scripting. -q Makes scripted operations less verbose. To get information about using the virtual console, enter the HE command. For example: [host1] vMP> he ==== vMP Help: Main Menu ================================= (Admin) ============ HPVM B.04.10 clearcase opt Wed Oct 7 2008 07h13m54s PST (C) Copyright 2000 - 2008 Hewlett-Packard Development Company, L.P. Virtual Management Processor (vMP) Help System Enter a command at the help prompt: OVerview - Launch the help overview LIst - Show the list of vMP commands - Enter the command name for help on an individual command TOPics - Show all vMP Help topics and commands HElp - Display this screen Q - Quit help For more information about using the hpvmconsole command, see hpvmconsole(1M). 9.4 Using the Virtual Console 139 9.5 Guest Configuration Files When the guest is created, the VM Host creates the guest configuration file /var/opt/hpvm/guests/guestname. Integrity VM creates up to three guest configuration files: • The vmm_config.current file contains the current guest configuration currently set. • The vmm_config.prev file contains the last known guest configuration settings. • The vmm_config.next file contains the configuration settings that have changed since the guest was started. To initiate these changes, you must reboot the guest. Never modify the guest configuration files manually. Always use the appropriate Integrity VM command (hpvmmodify or hpvmdevmgmt) to modify guest configuration parameters. Directly modifying the guest configuration files can cause guests to fail in unexpected ways. 9.6 Dynamic Memory Dynamic memory is an optional feature of Integrity VM that allows you to change the amount of physical memory in use by a virtual machine without rebooting the virtual machine. In this release of Integrity VM, dynamic memory is available on HP-UX guests only. An example of this feature allows a guest that is a Serviceguard node to be used as a standby server for multiple Serviceguard packages. When a package fails over to the guest, the guest memory can be changed to suit the requirements of the package before, during, and after the failover process. To use dynamic memory, the guest must have the guest management software installed, as described in Section 4.2 (page 64). 9.6.1 Managing Dynamic Memory from the VM Host On the VM Host, the dynamic memory software is included with Integrity VM. Manage dynamic memory on the VM Host using the -x option with the hpvmcreate, hpvmmodify, or hpvmclone command. The -x option associates a variety of configuration parameters with the guest, including dynamic memory and network management for the guests. Table 9-3 provides a complete list of -x keywords used for dynamic memory. 140 Managing Guests Table 9-3 Dynamic Memory Control Command Options Keyword Value Pair Description Specifies whether a sufficiently privileged user on the guest (such as root) can change the dynamic memory values while the guest is running. To disable guest-side dynamic memory control, specify 0 (zero). If the guest is not active, the only effect is the modification of the guest configuration file. On the running guest, the change takes effect immediately. dynamic_memory_control={1|0} Specifies the type of dynamic memory control for the guest. When this configuration parameter is set to none, dynamic memory is disabled. This is the default setting. If your guest is running with dynamic memory enabled and you set this value to none, the guest configuration file is modified to remove all dynamic memory ranges and control information. When this configuration parameter is set to any, the next boot of the guest determines whether or not dynamic memory is enabled on the guest. If the dynamic memory driver is loaded, the value of this parameter is changed to driver. If no drivers are loaded or found, the value is not changed. When this configuration parameter is set to driver, guest dynamic memory controls and ranges are functional. Depending on the current or default settings, messages might be displayed indicating a resetting of the dynamic memory range values to match the current memory range settings. If you change the available guest memory value (using the -r option), the dynamic memory values are validated for range and modified. ram_dyn_type={none|any|driver} Specifies the minimum amount of memory that can be dynamically allocated to the guest. The ram_dyn_min value must be greater than the minimum memory (displayed by the hpvmstatus command) and less than the ram_dyn_max value. ram_dyn_min=amount Specifies the maximum amount of memory that can be dynamically allocated to the guest. The value of ram_dyn_max must be greater than the value ofram_dyn_min. ram_dyn_max=amount Specifies the amount of memory that the dynamic memory driver attempts to access when the guest starts. The value of the ram_dyn_target_start must be greater than the ram_dyn_min parameter and less than or equal to the ram_dyn_max parameter. When the guest starts, it initially has access to the guest memory size (specified by the -r option), then the dynamic memory driver reduces the memory to the value of the ram_dyn_target_start parameter. ram_dyn_target_start=amount Sets the current memory size for the guest. The ram_target keyword is valid on the hpvmmodify and hpvmmgmt commands only. When you specify 0 (zero), the dynamic memory driver reduces the memory on the guest to a comfortable minimum without forcing guest memory to be paged out. This minimum value changes over time as the guest's operating needs change. When you specify start, the guest dynamic memory size grows to the allocated value specified using the -r option. This parameter is dynamic and can be used only on an active guest. ram_target={0|start|amount} 9.6.1.1 Configuring a Virtual Machine to Use Dynamic Memory By default, dynamic memory is not enabled. To configure a virtual machine to use dynamic memory, enter the hpvmcreate, hpvmmodify, or hpvmclone command. Include the following -x option to set initial values: -x ram_dyn_type = any | driver -x ram_dyn_min = minimum size for memory size changes -x ram_dyn_max = maximum size for memory size changes 9.6 Dynamic Memory 141 You can configure a virtual machine to reduce its memory size early in a boot process, making the virtual machine available but maintaining lower memory overhead on the VM Host system. Use the following -x option to enable this feature: -x ram_dyn_target_start = memory size after boot You can supply several dynamic memory keywords on the same command line. For example, to enable dynamic memory and to configure the guest named host1 to reduce its size early in the boot process, enter the following command: # hpvmmodify -P host1 -r 6G \ -x ram_dyn_type=any \ -x ram_dyn_min=1222M \ -x ram_dyn_max=6G \ -x ram_dyn_target_start=2G This command specifies the following values: • The virtual machine memory size is set to 6 GB. • Dynamic memory is enabled using any dynamic memory support available. • The minimum amount of memory that the virtual machine can be reduced to is 1222 MB. • The maximum amount of memory that the virtual machine can be increased to is 6 GB. • The memory size to reduce to after it boots is 2 GB. If the virtual machine is running when the dynamic memory feature is configured for the first time, the virtual machine must be rebooted for the configuration changes to take effect. 9.6.1.2 Viewing Dynamic Memory on the VM Host Dynamic memory parameters and status are displayed for each guest using the standard Integrity VM commands. For example, for the guest named host1, the hpvmstatus command displays the following information about dynamic memory: # hpvmstatus -V -P host1 . . . [Dynamic Memory Information] Type : driver Minimum memory : 1222 MB Target memory : 2103 MB Maximum memory : 6144 MB Current memory : 2103 MB Comfortable minimum : 2167 MB Boot memory : 6135 MB Free memory : 125 MB Available memory : 286 MB Memory pressure : 0 Memory chunksize : 65536 KB Driver Mode(s) : STARTED ENABLED . . . Table 9-4 describes the dynamic memory characteristics displayed by the hpvmstatus and hpvmmgmt commands. Table 9-4 Dynamic Memory Characteristics Characteristic Setting Description Type none No dynamic memory support Dynamic memory is configured on the host, but the dynamic memory subsystem on the guest has not started and reported the implementation type. any 142 Managing Guests Table 9-4 Dynamic Memory Characteristics (continued) Characteristic Setting Description Dynamic memory is implemented in a driver and does not use Guest OS Online Add/Delete features. driver Dynamic memory is implemented using Guest OS Online Add/Delete features. OLAD The lower bounds for ram_target and ram_dyn_target_start. valueM (for megabytes) or valueG (for gigabytes) Minimum memory The target memory size of the guest, set using ram_target or ram_dyn_target_start. valueM (for megabytes) or valueG (for gigabytes) Target memory The upper bounds for ram_target and ram_dyn_target_start. valueM (for megabytes) or valueG (for gigabytes) Maximum memory The current memory size of the guest (normally equal to target memory). valueM (for megabytes) or valueG (for gigabytes) Current memory A value for ram_target which can be used to reduce the guest memory but allow it sufficient memory resources to continue running a minimal workload. valueM (for megabytes) or valueG (for gigabytes) Comfortable minimum Size of physical memory in the virtual machine presented to the guest OS. valueM (for megabytes) or valueG (for gigabytes) Boot memory valueM (for Amount of free memory in the guest. megabytes) or valueG (for gigabytes) Free memory Amount of memory in the guest allocated by user processes but not locked. This memory is available for paging. valueM (for megabytes) or valueG (for gigabytes) Available memory A value between 0 and 100 used as an indicator of memory deficit and paging. The higher the number the longer the system has been in a memory deficit. A memory pressure value approaching 100 usually means the system is hung. Memory pressure value The allocation chunk size used by dynamic memory when increasing and descreasing guest memory (as described in Section 9.6.3.4 (page 146). Memory chunksize value Driver mode(s) started Dynamic memory can change guest memory size. enabled Control that overrides started. guestctl Guest-side control is enabled. 9.6 Dynamic Memory 143 9.6.1.3 Modifying a Virtual Machine's Memory Size on the VM Host Once dynamic memory is configured, a virtual machine's memory size can be changed to any value between the minimum size (ram_dyn_min) and the maximum size (ram_dyn_max) in increments of the chunk size (64 MB). Use the following -x option to the hpvmmodify command to change the memory size: # hpvmmodify -P host1 -x ram_target = new memory size 9.6.2 Managing Dynamic Memory from the Guest Dynamic memory management from the guest is disabled by default and must be enabled from the VM Host. If the feature is not enabled, dynamic memory information can be displayed , but the memory size cannot be changed. Use the hpvmcreate, hpvmmodify, or hpvmclone command and include the -x dynamic_memory_control option. Specify 1 as the argument to the option. For example, on the VM Host system, enter the following command to enable dynamic memory control on the guest named host1: # hpvmmodify -P host1 -x dynamic_memory_control=1 9.6.2.1 Viewing Dynamic Memory Information from the Guest Use the hpvmmgmt command on the HP-UX guest to manage and view the dynamic memory information. This command is installed when you install the guest management software, as described in Section 4.2 (page 64). Table 9-5 describes the options to the hpvmmgmt command. Table 9-5 Options to the hpvmmgmt Command Specifies the type of data to list more information about. For type, enter ram. -l type Allows you to continually watch and check the dynamic ram values. For the interval, specify the number of seconds between fetches of live data. -l type -t interval Allows the hpvmmgmt command to continuously refetch the requested type of data using the value specified for the interval parameter. -t interval -v Displays the version number of the hpvmmgmt command. Displays detailed information (verbose mode) about the virtual machines. -V Displays verbose attribute and resource information in a machine-readable format. -M Displays verbose attribute and resource information in the XML format. -X Specifies the guest RAM target, where: • 0 indicates the guest dynamic memory will be reduced to a comfortable minimum value. • start indicates the guest dynamic memory will be set back to the boot time value. • amount is a specific target memory size for the guest. -x ram_target={0 | start | amount} For example, on the guest, use the hpvmmgmt command to list the dynamic memory information. Enter the following command: # hpvmmgmt -l ram [Dynamic Memory Information] ======================================= 144 Managing Guests Type : driver Current memory : 6135 MB Target memory : 6135 MB Comfortable minimum : 2167 MB To display more information, include the -V option. For example: # hpvmmgmt -V -l ram [Dynamic Memory Information] ======================================= Type : driver Current memory : 2103 MB Target memory : 2103 MB Comfortable minimum : 2423 MB Minimum memory : 1222 MB Maximum memory : 6144 MB Boot memory : 6135 MB Free memory : 124 MB Available memory : 286 MB Memory pressure : 12 Memory chunksize : 65536 KB Driver Mode(s): STARTED ENABLED GUESTCTL 9.6.2.2 Modifying a Virtual Machine's Memory Size from the Guest Once the dynamic memory feature is configured and enabled, a virtual machine's memory size can be changed to any value between the minimum size (ram_dyn_min) and the maximum size (ram_dyn_max) in increments of the chunk size (64 MB). Use the following-x option to the hpvmmgmt command: # hpvmmgmt -x ram_target=memory size For example, to change the guest memory size to 4 GB, enter the following command: # hpvmmgmt -x ram_target=4096M Attempting to increase memory from 2103 MB to 4096 MB. Successfully began to change ram_target to 4096 MB. 9.6.3 Troubleshooting Dynamic Memory Problems This section describes how to solve problems in the use of dynamic memory. 9.6.3.1 Dynamic Memory Restrictions Use of dynamic memory is subject to the following restrictions: • The size of a virtual machine cannot be increased above its original boot size (as specified with the -r option). • If the virtual machine memory has become fragmented , attempting to reduce the size of the virtual machine might fail or might take a very long time. If you cannot reduce the size of the virtual machine to the desired size, abort the operation by setting a new target size. • Increasing the size of a virtual machine requires free memory on the VM Host. If the VM Host memory is insufficient, the operation might take a very long time to complete and might fail. • If the values of ram_target and ram_dyn_target_start are not inside the values of ram_dyn_min and ram_dyn_max, a warning is issued. 9.6.3.2 VM Host Resource Considerations HP-UX supports “large pages, ” a memory management feature used to improve performance. Integrity VM takes advantage of this feature by ensuring that when a virtual machine starts, it allocates the largest size pages that are available. Once these pages are allocated and locked down, they cannot change size. This constraint minimizes fragmentation of large pages. 9.6 Dynamic Memory 145 This feature limits the types of software you can run on a VM Host system. If the VM Host system supports an additional workload beyond the virtual machines, the large pages tend to fragment and performance of the newly started virtual machine might degrade. Dynamic memory increases the possibility of VM Host memory becoming fragmented. The current implementation of dynamic memory releases portions of the memory allocated to a virtual machine. These operations must be performed in large contiguous chunks; otherwise, the act of reducing the size of a virtual machine fragments the VM Host memory allocated to it. This potential fragmentation is prevented by the software, which reduces a virtual machine's size in multiples of a minimum chunk size of 64 MB of physically contiguous memory. For more information, see Section 9.6.3.3 (page 146) and Section 9.6.3.5 (page 147). 9.6.3.3 Guest Resource Considerations During normal operation of a system that has a workload running on it, the large pages might become fragmented over time. This is true on the VM Host as well as a virtual machine running the HP-UX operating system. If the virtual machine's memory is fragmented, the dynamic memory subsystem is unable to reduce the size of guest. This is due to the minimum chunk size used for the reduction. If dynamic memory cannot remove at least 64 MB of physically contiguous guest memory, no reduction in size takes place. 9.6.3.4 Specify Sufficient Guest Memory If you set the value of ram_dyn_target_start too small, the guest operating system might hang or crash while booting. In this case, the guest does not have access to a sufficient amount of memory. As a rule, do not decrease the memory allocated to an HP-UX guest by more than 75% of its allocated memory size. Do not reduce the memory of a virtual machines configured with 2 GB of memory by more than 50%. If the guest crashes while booting on the VM Host , use the hpvmmodify command to increase the value of the ram_dyn_target_start parameter. For example, to increase the memory size for the guest named host1, enter the following command on the VM Host: # hpvmmodify -P host1 -x ram_dyn_target_start=2GB After you set this parameter, reboot the guest. If the guest hangs, on the VM Host, use the hpvmstatus command to check the memory statistics on the guest. For example: # hpvmstatus -V -P host1 . . . [Dynamic Memory Information] Type : driver Minimum memory : 1222 MB Target memory : 2103 MB Maximum memory : 6144 MB Current memory : 2103 MB Comfortable minimum : 2167 MB Boot memory : 6135 MB Free memory : 0 MB Available memory : 286 MB Memory pressure : 100 Memory chunksize : 65536 KB Driver Mode(s) : STARTED ENABLED . . . An indication of this problem is a small or zero amount of free memory and a large memory pressure value (100). If these indicators are present, use the hpvmmodify command on the VM Host to increase the memory size of the guest. The guest then boots normally. 146 Managing Guests 9.6.3.5 Actual Memory Allocations Might Differ If you specify a value for the ram_target or ram_dyn_target_start parameter that results in a change in memory size that is not a multiple of 64 MB, the target value is reset. For example, if you specify 6 GB of memory, the HP-UX guest actually has access to 6135 MB of memory. If you attempt to set the memory size to 2048 MB, the amount of memory actually removed is 4087 MB. This is not a multiple of 64 MB, so the target memory size is reset to 2103 MB. 9.6.3.6 Enable Dynamic Memory on the Guest and on the VM Host The guest management software must be installed on the guest before you can use dynamic memory parameters on the VM Host system. For example, if the guest management software is not installed, the hpvmstatus command displays the following: # hpvmstatus -V -P host1 . . . [Dynamic Memory Information] NOTE: Dynamic data unavailable, configured values only Type : driver Minimum memory : 1024 MB Target memory : 2048 MB Maximum memory : 3072 MB . . . If you attempt to modify the guest's dynamic memory from the VM Host, the following errors are displayed: # hpvmmodify -x ram_target=2048M -P host1 hpvmmodify: ERROR (host1): Query to dynamic memory driver failed: Function is not available. hpvmmodify: Failed to set ram_target. hpvmmodify: Unable to modify the guest. If you attempt to modify the dynamic memory from the guest, the following errors occur: # hpvmmgmt -V -l ram Dynamic memory driver not found on guest. hpvmmgmt: Unable to continue. # hpvmmgmt -x ram_target=2048 Failed to open dynamic memory driver, error: No such device. Failed to set dynamic value error: No such device hpvmmgmt: Unable to continue. For information about installing the guest management software, see Section 4.2 (page 64). 9.6.3.7 Upgrade the Guest Kit When Upgrading Integrity VM The dynamic memory software has two components: the VM Host support and the HP-UX guest support. These two components must be at the same version level for dynamic memory to function. When you upgrade Integrity VM, you must also install the new guest kit on the guest. (You should also upgrade the guest operating system if it is no longer supported.) During this upgrade process, dynamic memory may not function. If there is a version mismatch, a message is written to the VM Host's syslog file (/var/adm/ syslog/syslog.log) when the guest starts. For example: vmunix: (hpvmdvr) Dynamic memory version mismatch Guest 5. Please update the guest kit This example indicates that the guest management software kit on virtual machine number 5 is out of date. To determine which guest is number 5, use the hpvmstatus command. In the following example, guest 5 is named dale: 9.6 Dynamic Memory 147 # hpvmstatus Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== chip 1 HPUX On (OS) 2 1 1 3 GB 0 dale 5 HPUX On (OS) 2 1 1 3 GB 0 For information about installing the HP-UX guest management software, see Section 4.2 (page 64). 9.7 Integrity VM Log Files Each guest has a log file named /var/opt/hpvm/guests/guestname/log on each host. The VM Host log files are stored as /var/opt/hpvm/common/command.log and hpvm_mon_log. 9.8 Managing the Device Database Integrity VM cannot detect all potential backing store conflicts, and does not always prevent misconfigured guests from booting. Conflicts can arise from the following: • Specifying the same backing store for more than one virtual device. If you add disk:scsi::disk:/dev/rdisk/disk2 for guest A, do not add the same device to another guest or to the list of VM Host restricted devices. • Specifying multiple backing store parameters that lead to the same physical storage. If the VM Host has multiple paths to a storage device, like /dev/rdisk/disk0 and / dev/rdisk/disk4, only one path should be specified for a disk:scsi or dvd:scsi in guest A. The other path should not be used as a backing store by guest A or by any other guest or the VM Host. • Overlapping physical storage allocated for different backing store types. If a guest uses a logical volume (for example, rlvol1) as a backing store device, the disks used by the volume group on which the logical volume is made (for example, /dev/vg01) cannot be used as backing stores. You can use the ioscan and sam commands to detect these conflicts. If you force guests configured with these conflicts to start, data corruption might occur. 9.8.1 The Device Database File Integrity VM device management stored Integrity VM device mapping information in the device database file (/var/opt/hpvm/common/hpvm_mgmtdb). This file is divided into three sections: • The header, which states that the file cannot be hand edited. • The restricted device section, which contains a list of host devices that guests are not allowed to access. • The guest devices section, which contains devices, both storage and network, that guests are configured to use. Do not edit the hpvm_mgmtdb file directly unless you are specifically advised to do so. Always use a supported Integrity VM commands (such as hpvmmodify or hpvmdevmgmt) to modify virtual devices. 9.8.2 Using the hpvmdevmgmt Command To list and modify the devices used by the VM Host and the virtual machines, use the hpvmdevmgmt command. Table 9-6 describes the options to the hpvmdevmgmt command. 148 Managing Guests Table 9-6 Options to the hpvmdevmgmt Command Option Description -g gdev_alias:/dev/rdisk/disknn Lists an entry. To list all entries, enter the following command: # hpvmdevmgmt -l all -l {server|rdev|gdev}:entry_name:attr:attr_name=attr_value Displays the version number of the hpvmdevmgmt output format. The version number is followed by the display specified by other options. -v Increases the amount of information displayed (verbose mode). -V Creates a file for use as a virtual device. The size argument must end in either M for megabyte or G for gigabyte. -S size filename Creates passthrough device files (for example, /dev/rscsi). Passthrough devices are used by attached devices, such as tape devices, media changers, and CD/DVD burners. -I Modifies an existing attribute or adds the attribute if it does not already exist. -m {server|rdev|gdev}:entry_name[:attr:attr_name=attr_value] -a Adds an entry. {server|rdev|gdev}:entry_name[:attr:attr_name=attr_value] -d {server|rdev|gdev}:entry_name[:param:arg] Deletes an entry. Deletes one alias if a device has multiple aliases defined. -d gdev_alias:/dev/rdisk/disknn -n Replaces a device. gdev:oldentry_name:newentry_name0[,newentry_name1] For example, to to display a list of the restricted devices, enter the following command: # hpvmdevmgmt -l rdev /dev/rdisk/disk4:CONFIG=rdev,EXIST=YES,DEVTYPE=DISK, SHARE=NO::6005-08b4-0001-15d0-0001-2000-003a-0000 To make a device shareable among guests, enter the following command: # hpvmdevmgmt -m gdev:/data/file.iso:attr:SHARE=YES 9.8.2.1 Sharing Devices With Integrity VM, you can allow devices to be specified as either shared or not shared. By default, vswitches are configured to be shared. Storage devices are configured to not be shared. As administrator, you can configure a storage device to be shared by multiple guests. The SHARE attribute is checked only when booting a guest. If one guest is running with a nonshared device and another guest attempts to boot using that same device, the latter guest is blocked. If multiple guests need to share devices, then the SHARE attribute for those devices must be changed to SHARE=YES using the modify option (-m) with the hpvmdevmgmt command. For example, to make the HP-UX iso.* images shareable so that two virtual machines (host1 and host2) can use them to install at the same time, enter the following commands: # hpvmdevmgmt -m gdev:/var/opt/hpvm/ISO-images/hpux/:attr:SHARE=YES # hpvmmodify -P host1 -a dvd:scsi::null:/var/opt/hpvm/ISO-images/hpux/ # hpvmmodify -P host2 -a dvd:scsi::null:/var/opt/hpvm/ISO-images/hpux/ 9.8 Managing the Device Database 149 Only read-only devices can be shared among guests. Virtual DVDs and virtual network devices can be shared. DVDs are not shareable unless you specify otherwise. Sharing of virtual devices or hardware backing stores must be carefully planned in order to prevent data corruption. To restrict the vswitch named myswitch so that it is no longer shareable, enter the following command: # hpvmdevmgmt -m gdev:myswitch:attr:SHARE=NO This command restricts the vswitch called myswitch to use by one guest only. 9.8.2.2 Replacing Devices If a backing storage device malfunctions, replace it by using the hpvmdevmgmt -n option. The -n option works for only guest devices. It replaces the existing device entry with the new device entry while keeping all the current guest dependents. Thus, each guest dependent is modified to replace the old device with the new one. If the device being replaced is a pNIC, use the hpvmnet command to halt and remove the current vswitches using that pNIC and recreate the same named vswitches using the new pNIC. This method allows guests to use the new pNIC through the old vswitch names without modifying the guests. 9.8.2.3 Deleting Devices A device entry can be deleted only if it has no dependents. If a device has dependents, those dependents must be removed before you delete the device. The hpvmmodify command that removes a device removes that guest as a dependent on that device. If the guest cannot be modified, you can use the hpvmdevmgmt -d command to delete a dependent from a device. However, this command does not modify the guest that is dependent on the device. Use this method only if you can use the hpvmmodify command on the guests that are dependent on the device. The following example shows how to remove a guest as a dependent: # hpvmdevmgmt -d gdev:entry_name:depend:depend_name 9.8.2.4 Restricting VM Host Devices You must set up restricted devices to ensure that no guest uses devices that are reserved for use by the VM Host, including the storage devices that the VM Host uses to boot and run. This can also include a network LAN device to which the host requires exclusive access. If a volume manager is used for host-specific file systems, then the restricted devices should include both the volume devices and the underlying special device files to protect both from guest access. For more information, see Chapter 7 (page 91). You can also allow guests to access certain files while restricting them from accessing the device files that contain those files. You can add or delete restricted device entries to the Integrity VM device database. For example, to add /dev/rdisk/disk0 as a restricted device, enter the following command: # hpvmdevmgmt -a rdev:/dev/rdisk/disk0 To delete the restricted device /dev/rdisk/disk0, enter the following command: # hpvmdevmgmt -d rdev:/dev/rdisk/disk0 To add network lan0 as a restricted device, enter the following command: # hpvmdevmgmt -a rdev:lan0 If a guest's configuration file contains restricted devices, the guest does not start. 9.9 HP AVIO Stor EFI Driver Enumeration Policy The default enumeration policy of the “HP AVIO Stor EFI Driver” is to enumerate all LUNs, — that is, to discover and list all the LUNs under the AVIO storage adapter. Use the drvcfg EFI utility to change the enumeration policy to do the following: 150 Managing Guests • Enumerate boot LUNs only. • Enumerate all LUNs. The following example shows how to change the enumeration policy to enumerate boot LUNs only: Shell> drvcfg -s HP AVIO Stor Driver Configuration ================================== Enumerate only boot LUNs (Y/N)? [N]:Y Drv[2F] Ctrl[ALL] Lang[eng] - Options set. Action Required is None None None Shell> Reset the guest for the change to take effect 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 [g1] vMP> CM (Use Ctrl-B to return to vMP main menu.) [g1] vMP:CM> RS At next boot only boot LUN will be enumerated Use ^ and v to change option(s). Use Enter to select an option Loading.: EFI Shell [Built-in] EFI Shell version 1.10 [14.62]onsole - - - - - - - - - - - - Device mapping table fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part1,SigBEC59C34-E6C8-11DB-8002-D6217B60E588) fs1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part3,SigBEC59C70-E6C8-11DB-8004-D6217B60E588) blk0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0) blk1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part1,SigBEC59C34-E6C8-11DB-8002-D6217B60E588) blk2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part2,SigBEC59C52-E6C8-11DB-8003-D6217B60E588) blk3 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part3,SigBEC59C70-E6C8-11DB-8004-D6217B60E588) startup.nsh> echo -off setting hpux path(\EFI\HPUX)... type 'fs[x]:' where x is your bootdisk (0, 1, 2...) type 'hpux' to start hpux bootloader 9.9 HP AVIO Stor EFI Driver Enumeration Policy 151 152 10 Migrating Virtual Machines There are several different forms of Virtual Machine migration. With the hpvmmigrate command, you can move either an offline virtual machine or a live, online virtual machine running a guest operating system and applications from a source VM Host system to a target VM Host system. For offline migration, the hpvmmigrate command has been available with HP Integrity Virtual Machines Version 1.2 and later. The Online VM Migration feature for online guests is available starting with HP Integrity Virtual Machine Version 4.1. This chapter includes the following topics: • “Introduction to Virtual Machine Migration” • “Command Line Interface for Online and Offline Migration” • “VM Host and Virtual Machine Configuration Considerations” • “Migrating Guests from Physical to Virtual Machines” 10.1 Introduction to Virtual Machine Migration Virtual machines can be moved from one VM Host system to another in a variety of ways. Integrity VM provides the following types of virtual machine migration: • To move the virtual machine from one VM Host system to another, use the hpvmmigrate command. The virtual machine can be either a non-running virtual machine configuration (offline migration) or a running guest (online migration). Online migration enables a running guest and its applications to be moved from one VM Host to another without service interruption. All guest I/O connections to storage and networks remain active throughout the online migration, and the guest and all its applications continue operating without a reboot or application restart. • To migrate a Serviceguard Packaged guest online, use the hpvmsg_move command. For more information, see Section 10.4 (page 169) . • To migrate from a physical machine to a virtual machine, use the p2vassist utility. For example, use this method to move virtual machines from a partition or a system to a VM Host system. Guests must be shut down before the procedure and restarted after the migration. For more information, see Section 10.5 (page 169). Figure 10-1 illustrates the process of moving a guest from Host A to Host B offline. 10.1 Introduction to Virtual Machine Migration 153 Figure 10-1 Symmetric Hosts Configured for Guest Migration L AN a Host A (source) VM1 VM2 HP VM AP I hpvmmigrate OS Authentication transfer configuration via SSH common L AN FC Port x FC Port x L AN a Host B (target) HP VM AP I VM3 hpvmmigrate P ublic Key Authentication VM1 SAN VM1 (shared storage) HP-UX OS VM2 HP-UX OS VM3 HP-UX OS FC Switch Symmetric Hosts Configured for VM Guest Migration The basic virtual machine migration environment includes a source machine and a target machine. Both must be running Integrity VM and must be able to run the guests. Both machines must conform to their operating system requirements and restrictions, and both must be able to provide the allocated resources to the guest. If the guest uses 2 GB of memory on one machine, it must be able to use that amount on the other machine. Similarly, if the source machine can provide a guest with four vCPUS, the target machine must also be able to provide them. To modify the virtual devices or network on the target host, use the hpvmmodify command. To enable migration, all resources used by the guest must be configured symmetrically on both the source and target host. A symmetric configuration includes: • A common local area network (LAN) • Identical subnet and vswitch connectivity • Common access for Storage Area Network (SAN) based storage • Private, high-speed network connection (for Online VM Migration) For guidelines about setting up storage for migrating virtual machines, see Section 10.3 (page 162). If the HP Capacity Advisor is used on the virtual machine, collect utilization information before you migrate the virtual machine. The Capacity Advisor cannot continue to collect the utilization information for the virtual machine during the migration operation. Figure 10–2 illustrates moving a guest online from a source VM Host to a target VM Host. 154 Migrating Virtual Machines Figure 10-2 Online Guest Migration from Source to Target - Guest OS app1 app2 SAN Guest continues to operate on source host while migration begins Guest continues operation on target server after transfer completes Guest is briefly suspended as final resident memory image transfers Guest OS with unique: Kernel Parameters Patch levels Layered software Guest OS app1 app2 Source Host (Intergrity VM and HP-UX) Target Host (Intergrity VM and HP-UX) 10.1.1 Reasons for Migrating an Online Guest There are various reasons why you might want to migrate an online guest. Most can be summarized into three categories: • Vacating a VM Host system • Targeting a particular VM Host • Balancing VM Host workloads • Optimizing physical resource utilization With Online VM Migration, you can migrate all your guests off of a VM Host to one or more other VM Hosts without interrupting the workload activity on the guests. A common reason to do this is for maintenance of the VM Host system: hardware, firmware or software. You can configure the hardware that does not have hot-plug support. You can update the firmware, which requires the system to be shut down. You can also update software components that require a VM Host reboot. A rolling upgrade of VM Host software is possible by moving the running guests to another VM Host, upgrading the VM Host, then migrating the guests back. Being able to move guests while keeping active applications online allows greater flexibility in scheduling maintenance or upgrades, and minimizes the impact of unpredictable maintenance. For example, you can move online guests in response to predictive failure alerts without interrupting your applications. You might also want to migrate an active guest workload to a particular VM Host to take advantage of a particular resource or feature on that target VM Host without losing application availability. If your current VM Host resources become oversubscribed, you can migrate one or more of the guests to other VM Hosts that have remaining capacity. Perhaps a potential target VM Host has a large quantity of RAM, CPUs or I/O adapters, which might facilitate faster processing or greater I/O bandwidth while on that VM Host. Another possibility is that certain VM Hosts have special devices that are needed only temporarily by guest workloads. Because Online VM Migration enables guests to be migrated without interrupting their workloads, it is convenient and practical to migrate guests temporarily to certain VM Hosts to take advantage of their particular resources and features when they are needed. This is especially true for workloads with well-understood cyclic resource requirements (for example, month-end processing). 10.1 Introduction to Virtual Machine Migration 155 You might want to segregate guests to balance the workload on VM Hosts workloads. For example, you might want to separate guests whose workloads peak simultaneously. Or, perhaps you want to group workloads together that have similar special resource requirements. For example, you would usually run your multi-threaded applications on a VM Host that has several CPUs in order to maximize the effectiveness of multi-way virtual machines. Online VM Migration enables a new level of workload-to-resource alignment flexibility and agility -- you can segregate or combine your workloads as you wish, without any interruption in application availability. The Online VM Migration feature enables you to optimize the physical resources being used by running guests. You can conveniently "park" idle, near-idle, or just currently less-critical guest workloads together on a smaller or less powerful machine. You can use the Dynamic Memory feature to reduce the amount of memory in use by the guests and shrink CPU entitlements to more tightly pack guests on a smaller VM Host. 10.1.2 Reasons for Migrating Virtual Machines Offline This sections lists reasons why you might want to migrate a virtual machine offline. For example: • The guest might be stopped, so you need to move the configuration information offline. • Migrating the virtual machine offline does not use the VM Host resources (like memory and CPUs) on the source and target VM Hosts. • The guest might have local storage, logical volumes or file-backed storage, which must be copied to the target VM Host. • The source and target VM Hosts might have different processor types that prevent online migration. • The source VM Host might be running a version of Integrity VM prior to Version 4.1, which does not support Online VM Migration. 10.2 Command Line Interface for Online and Offline Migration To migrate a virtual machine to another VM Host, perform the following steps: 1. Set up SSH keys on both the source and target hosts, as described in Section 10.3.2 (page 166). 2. Present all SAN storage assigned to the virtual machine to the target VM Host (if it is not already there). 3. If using offline migration and the guest is booted, stop the guest on the source host, using the hpvmstop or hpvmconsole command. You can also use the hpvmmigrate -d command to stop the guest during the migration. This has an advantage in that resource checks are made on the target before the guest is stopped on the source. However, for many cases, it is actually best to log into the guest and shut it down before starting an offline migration. This ensures that all guest data is properly flushed to the disks. For information about starting and stopping guests, see Chapter 9 (page 133). 4. On the source host, enter the hpvmmigrate command, as described in Section 10.2.1 (page 157). When migrating an online guest, there are several reasons why the migration might abort, leaving the guest running on the source host. Causes might include: insufficient resources on the target host, excessively busy VM Hosts, a slow network connection, or an extremely busy guest. If conditions like this exist, the attempted migration is aborted so the guest's workload can continue running on the source host. This is not a serious problem, because the migration can be re-attempted when conditions improve. 156 Migrating Virtual Machines 5. If migrating the guest offline, restart the guest on the target host using the hpvmstart or hpvmconsole command. You can also use the hpvmmigrate -b option with an offline migration to automatically restart the guest on the target. 6. If you do not use the hpvmmigrate -D option to remove the virtual machine configuration on the source VM Host, it is marked Not Runnable, and it is configured with all its devices. This protects the storage from unintended use by Integrity VM commands. If you never intend to migrate the guest back to the source VM Host, you can remove the virtual machine configuration with the hpvmremove command. Once the guest is removed from the VM Host, you should unpresent the guest's SAN storage and remove the associated device special files (using the rmsf command). Or, if you cannot unpresent the storage, you should use the hpvmdevmgmt -a rdev:/device command for each device to mark them restricted. The hpvmmigrate command verifies that the target host has sufficient resources (such as memory, network switches and storage devices) for the guest to run. If the resources are insufficient or do not exist, or if other errors occur, the guest is not migrated to the target host. After successfully migrating the guest, the hpvmmigrate command automatically disables the guest on the source host. 10.2.1 Using the hpvmmigrate Command Use the hpvmmigrate command to move an online guest or an offline virtual machine from a source VM Host to a specified target VM Host. Virtual machines can be migrated while OFF, and online guests can be migrated while ON and running. Use the -o option to migrate an online guest, which involves copying all the virtual machine's configuration information and transferring the active guest memory and virtual CPU state. Omit the -o option to migrate just the offline virtual machine's configuration information, and optionally local disk contents, to the target VM Host. The resources that are defined in the virtual machine's configuration information are checked to determine whether the migrated virtual machine can boot on the target VM Host. If there is a problem, it is reported, and the virtual machine is not migrated. You can specify the -F option (force) to suppress the errors and force the virtual machine migration to the target VM Host. CAUTION: Use the -F option with caution, because some errors can prevent a virtual machine from working properly on the target VM Host. By default, Integrity VM retains the virtual machine configuration and marks it Not Runnable (NR) on the source VM Host after it is migrated successfully to the target VM Host. Run the hpvmstatus command to see that the state of the virtual machine is now Off(NR) on the source VM host and the guest is On(OS) on the target VM Host. The guest is running on the target VM Host and is, therefore, considered Runnable. This mechanism allows the same virtual machine to be configured on multiple VM Hosts, while still preventing accidental booting of the same guest on multiple hosts simultaneously. Each virtual machine must be Runnable on only one VM Host at any given time to prevent the possibility of two virtual machines using the same SAN storage at the same time. Use the hpvmmodify command, if necessary, to mark the virtual machine Runnable on only the VM Host, and Not Runnable on all other hosts that know about that virtual machine configuration information. NOTE: Mark a migrated virtual machine as Runnable only in rare circumstances and with great care. Inappropriate use can cause disk corruption. When you invoke the hpvmmigrate command, you must specify the name of the guest to be migrated and the target VM Host system. 10.2 Command Line Interface for Online and Offline Migration 157 Specify the guest using one of the following options: • -P source-vm-name to specify the guest name • -p source-vm_number to specify the virtual machine number Specify the target host by including the –h option and specifying one of the following: • Target host alias for the private, high-speed network connection • Target host IP address of the private, high-speed network connection Table 10-1 lists the options to the hpvmmigrate command. Table 10-1 Options to the hpvmmigrate Command Option Description -A Attempts to abort an online guest migration. For offline migrations, causes hpvmmigrate command to boot the virtual machine on the target automatically after the migration process is complete. If the -b option is specified for an offline migration, all backing stores must be copied. -b For offline migrations, specifies the number of virtual CPUs for which this virtual machine will be configured on the target. -c number-vcpus For offline migrations, physically copies the storage device specified with the -m option to the target VM Host during the migration process. If specified before the first -m option, it applies to all -m options that specify an appropriate type of storage. This might take a long time to complete if a large amount of storage needs to be copied. -C For offline migrations, causes hpvmmigrate to automatically shut down a running guest before migrating the virtual machine configuration to the target VM Host. Consider migrating the guest online by using the -o option instead. -d Deletes the virtual machine from the source VM Host after migrating the virtual machine to the target VM Host system. If not specified, the virtual machine is marked Not Runnable on the source VM Host after migration. -D For offline migrations, specifies the percentage of CPU resources to which each of the virtual machines virtual CPUs is entitled. During peak system CPU load, the entitlement is the guaranteed minimum allocation of CPU resources for this virtual machine. The percent can be set to an integral value between 0 and 100. If the value specified is less than 5, the virtual machine is allocated the minimum percentage of 5%. The default is 10%. Integrity VM reserves processing power for essential system functions such as logging, networking, and file system daemons. The -e and the -E options are mutually exclusive. -e [:max-percent ] For offline migrations, specifies the virtual machine's CPU entitlement in CPU cycles. The cycles are expressed as an integer followed by one of these units: • M (megahertz) • G (gigahertz) If no letter is specified, the default unit is megahertz. The -e and the -E options are mutually exclusive. -E [:max-cycles] 158 Migrating Virtual Machines Table 10-1 Options to the hpvmmigrate Command (continued) Option Description Forces the migration of a virtual machine, whether or not there are resource validation errors (such as resource conflict, resource nonexistence, and so forth). . Use the -F option rarely and with caution. This option ignores all resource validation errors, including oversubscribing of resources. NOTE: These errors can prevent the virtual machine from booting on the target VM Host. Any validation errors are logged in the Integrity VM command log. -F Specifies the host alias or IP address of the target VM Host machine to which the virtual machine is being migrated. The target machine must be a valid VM Host and must be accessible by the source VM Host. Almost all forms of the hpvmmigrate command require the -h option. For online migration, the parameter for the -h option should specify a private, dedicated, high-speed network link to the target VM Host. If you specify a simple non-qualified host name, the hpvmmigrate command appends -hpvm-migr to the name and checks if a host alias has been defined for a private network corresponding to the simple name. Online guest migration does not check to ensure the link is private, but using a private network is important for efficient and secure online migrations and to preserve the bandwidth of the regular site network. -h target-host-alias-or-IP-address -H Displays information about how to use the hpvmmigrate command. Creates the virtual machine configuration on the target VM Host and marks it Not Runnable, but does not change the virtual machine on the source VM Host. This is used primarily to distribute virtual machine configurations for Serviceguard. -k Specifies a descriptive label for the virtual machine, which can be useful in identifying a specific virtual machine in the hpvmstatus command verbose display. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (-), the underscore (_), and the period (.). To specify white space, the label must be quoted (" "). -l new-vm-label For offline migrations, specifies a resource of a virtual machine for copying, translation, and so on. This option can be specified more than once. for information about specifying virtual machine storage and network resources, see hpvmresources(5). -m rsrc-with-absolute-path Quits after starting the migration in the background. If not specified, the hpvmmigrate command continues to run interactively and reports the migration status until the migration is complete. -n Specifies the new name for the virtual machine being migrated. The new-vm-name can be up to 256 alphanumeric characters, including A-Z, a-z, 0–9, the dash (-), the underscore character (_), and the period (.).The virtual machine name must not start with a dash (-). If the virtual machine name exists on the target VM Host, the virtual machine must have the same UUID as the source virtual machine, and the virtual machine on the target must be marked Not Runnable. -N new-vm-name Specifies an online guest migration. To be compatible for online migrations, both the source and the target VM Host must have the same processor family (as reported by the machinfocommand). To maintain online guest network connectivity, a vswitch with the same name and connected to the same subnet must be configured on the target VM Host. Also, only whole disk backing storage consisting of SAN LUNs, and null backing store DVD devices, are supported for online migration guest storage. -o 10.2 Command Line Interface for Online and Offline Migration 159 Table 10-1 Options to the hpvmmigrate Command (continued) Option Description Specifies the unique number of the virtual machine to be migrated. To display the source-vm-number, enter the hpvmstatus command. Most forms of the hpvmmigrate command require either the -p option or the -P option. -p source-vm-number Specifies the unique name of the virtual machine to be migrated. Most forms of the hpvmmigrate command require either the -p option or the -P option. -P source-vm-name Displays fewer informative messages. Some potential error conditions are still reported. -q For online migrations, set non-interactive mode. Assume that the output device is not a terminal. -Q For offline migration, specifies the amount of memory available to this virtual machine. The size is expressed as an integer, optionally followed by one of these letters: • M (megabytes) • G (gigabytes) If the letter is omitted, the default unit is megabytes. -r amount Indicates that the migration should not occur, but the hpvmmigrate command should check whether or not the migration is possible. Because virtual machines and their hosts are dynamic, a successful -s trial does not always guarantee a subsequent successful migration. The hpvmmigrate command with the -o-s and -h options (but without a -p or -P option) checks host connectivity, licensing, and CPU compatibility for online migration. -s For offline migration, translates the storage device names specified with the -m option by comparing WWIDs. To compare WWIDs, the storage resources must be present and available on both the source and the target VM Hosts. If you specify the -t option before the first -m option, the -t option applies to all -m options. The -t option overrides the -T option for storage resources specified with the -m option. Device translation is automatic for online migration. -t -T For offline migration, specifies not to translate devices. -v Displays the version of the hpvmmigrate command . For online migrations, bypasses all vswitch connectivity checks. Use the -w option only if you are certain that the source and target vswitches are connected to the same subnet; otherwise, your online guest will lose network connectivity after migrating. -w 10.2.2 Examples of the hpvmmigrate Command The following example displays the version number of the hpvmmigrate command: # hpvmmigrate -v hpvmmigrate: Version B.04.10 Offline Migration Example The following example shows how to migrate the guest named VM1, residing on the host named HostA, to the target host (HostB). On the system named HostA, enter the following command: # hpvmmigrate –P VM1 –h HostB This example specifies: • The name of the guest (-P VM1) • The name of the target host (-h HostB) 160 Migrating Virtual Machines Online Migration Example The Online VM Migration feature is initiated with the -o option to the hpvmmigrate command. The following example migrates a guest to another VM Host. The guest name is vm3. The target VM Host is called host2, and the target VM Host's private network is called host2–hpvm-migr (that is, host2–hpvm-migr is an alias for the private network defined in /etc/hosts). NOTE: The hpvmmigrate command does not check that you are using a private network to migrate your guest. Using a private network is important for security and to maintain the performance of your site's public network. To migrate guest vm3 to VM Host host2, issue the following command: # hpvmmigrate -o -P vm3 -h host2-hpvm-migr The hpvmmigrate command displays status as various phases of migration complete. Output messages that are indented from the left margin are from the remote, target VM Host. To prevent data corruption on your guest's SAN storage, the Integrity VM software helps to prevent you from accidentally running the same guest on more than one VM Host simultaneously. If the hpvmmigrate —D option is not specified, the guest is marked Not Runnable (NR) on the source VM Host after online migration has finished. This prevents the virtual machine from booting on the original source VM Host while it is running on the target VM Host. If the hpvmmigrate —D option is used, unpresent the guest's SAN storage from the source VM Host as soon as migration completes, thus avoiding accidental usage of the storage on that VM Host. 10.2.3 Using the hpvmstatus Command to See Migration Details Use the hpvmstatus command to see the current state of all virtual machines on this VM Host. Several states are related to Online VM Migration: • On (OS) — The guest is on and running the guest operating system. It is considered Runnable. • Off (NR) — The virtual machine is not booted and is Not Runnable. • On (MGS) — The guest is on and running a guest operating system. It is the source of an online migration to another VM Host. • On (MGT) — The virtual machine is on, but not yet running a guest operating system. It is the target of an online migration from another VM Host. Use the hpvmstatus -P and -V options to get more detailed migration status about a particular virtual machine. If the guest is actively migrating, the hpvmstatus command shows the phase information about Online VM Migration phases. 10.2.4 Options to hpvmmodify Command for Online Migration Use the hpvmmodify —x option to change the online migration phase timeout values. See Section 10.2.4 (page 161) for a list of time-out phases. Use the hpvmmodify —x online_migration=disabled option to prevent a particular virtual machine from migrating online. This is especially important if the guest is running software that is sensitive to external network monitoring with short timing intervals, such as Serviceguard. 10.2 Command Line Interface for Online and Offline Migration 161 NOTE: The Online VM Migration feature is not supported for a guest running as a Serviceguard node. Therefore, disable online migration for all guests that are Serviceguard nodes. For example: # hpvmmodify -P sg_node1 -x online_migration=disabled The Online VM Migration feature is supported with Serviceguard packaged guests. For more details, see Section 10.4 (page 169). 10.2.5 Using the hpvminfo Command in the Guest The hpvminfo command is part of the Integrity VM guest kit and should be installed on all of your guests. Use the hpvminfo —V option to display information about the guest and the current VM Host. The following is a shell script using the hpvminfo -M option (for machine-readable output) that you can run on any Unix guest to show when an online migration has occurred. The script gets the guest name (G), and the current host (H1), and then begins an infinite loop testing and reporting if the host on which it is running has changed. Terminate the shell script with a ^C. G=$(hpvminfo -M | awk -F : '{print $12;}') H1=$(hpvminfo -M | awk -F : '{print $7;}') echo $(date) $G: Current host is $H1 while true do H2=$(hpvminfo -M | awk -F : '{print $7;}') if [ "$H1" != "$H2" ]; then H1=$H2; echo $(date) $G: host is now $H2; fi done The following is a sample output from this script: Tue Aug 26 10:52:39 PDT 2008 vm6: Current host is host2 Tue Aug 26 10:53:36 PDT 2008 vm6: host is now host1 Tue Aug 26 10:54:28 PDT 2008 vm6: host is now host2 Tue Aug 26 10:55:19 PDT 2008 vm6: host is now host1 10.3 VM Host and Virtual Machine Configuration Considerations This section discusses the configuration information you need for a successful migration and how to chose which hosts and guests can participate in Online VM Migration. Effective migration of online guests among VM Hosts depends on proper configuration of the networks and storage connected to the VM Host and used by the online guests. The hpvmmigrate command verifies that the source and target hosts provide the guest with symmetric accessibility to network and storage resources. If you set up the configuration properly on both hosts before you migrate the guest, the migration task is much easier and faster. To migrate guests among a group of VM Host servers, the VM Hosts require common access to storage devices, networks and virtual switch configurations. Pathnames to storage need not be identical, however the same LUNs assigned to a guest must be presented to both the source and the target VM Hosts. There must be equivalent access to guest storage and equivalent network reachability on both the source and the target VM Hosts. The network on the target VM Host must be able to make all the same network connections that can be used by the guest on the source VM Host. A vswitch of the same name, connected to the same network must be available on the source and target VM Host servers. The hpvmmigrate command does connectivity checking before migration. You can use the hpvmmigrate -w option to bypass the vswitch connectivity checks, but only use -w if you are certain that the source and target vswitches are connected to the same subnet. Otherwise, your guest will lose network connectivity after migrating. For online migration, in addition to sharing the same LAN segment for normal guest connectivity, the VM Hosts should be connected with a private 1 GbE (or faster) network for efficient VM Host–to-VM Host communications and for secure guest memory transfer. Using NTP for time 162 Migrating Virtual Machines synchronization is strongly recommended on all VM Hosts and guests to maintain consistent time accuracy. 10.3.1 VM Host Requirements and Setup The VM Hosts must be configured with Integrity VM Version 4.1 or later. As All the latest HP-UX patches required by Integrity VM, as well as any required Integrity VM patches for Integrity VM, should be installed. Consult the most recent HP Integrity Virtual Machines Release Notes, available from http://docs.hp.com/en/vse.html, for general Integrity VM installation details, including supported VM Host operating system versions, patches, and other system requirements. Required patches are available on the http://www.itrc.hp.com website. 10.3.1.1 VM Host Processors for Online Migration VM Hosts can be different Integrity server models with different numbers of processors, different I/O adapters and configurations, different amounts of memory, different firmware revisions, and so on. In particular, guests can migrate between radically different size, capacity, and power VM Hosts. However, for online migration, all the eligible VM Host servers in a group must have equivalent architecture implementations. They must all report the same processor family output for the HP-UX command machinfo -v. Different processor frequencies and cache sizes are supported for Online VM Migration. Table 10-2 lists the recent Itanium processors showing different values for processor family: Table 10-2 Itanium Processor Families Family Model Series Codename 31 0 Itanium 2 McKinley 31 1 Itanium 2 Madison, Deerfield, Hondo 31 2 Itanium 2 Madison 9M, Fanwood 32 0 Itanium 9000 Montecito 32 1 Itanium 9100 Montevale Look for identical processor Family as shown in the following example output from the machinfo -v command. (As more processors families and models are added, more specific capability requirements might be necessary.) The systems host19 and host20 in this example are compatible for migration, because they have the same processor family (32). # hostname host19 # machinfo -v CPU info: 12 Intel(R) Itanium 2 9000 series processors (1.6 GHz, 24 MB) 533 MT/s bus, CPU version C2 24 logical processors (2 per socket) Vendor identification: GenuineIntel Processor version info: 0x0000000020000704 Family 32, model 0, stepping 7 Processor capabilities: 0x0000000000000005 Implements long branch Implements 16-byte atomic operations . . . # hostname host20 # machinfo -v CPU info: 4 Intel(R) Itanium 2 9000 series processors (1.6 GHz, 24 MB) 533 MT/s bus, CPU version C2 10.3 VM Host and Virtual Machine Configuration Considerations 163 8 logical processors (2 per socket) Vendor identification: GenuineIntel Processor version info: 0x0000000020000704 Family 32, model 0, stepping 7 Processor capabilities: 0x0000000000000005 Implements long branch Implements 16-byte atomic operations . . . 10.3.1.2 Private Network Setup Source and target VM Host systems should be connected with a dedicated, high-speed private network. To use the private network during a migration, specify the name of the private network connection in the hpvmmigrate -h option. As a helpful convention, if you specify a simple non-qualified host name, the hpvmmigratecommand appends -hpvm-migr to the name and checks if a host alias has been defined for a private network corresponding to the simple name. If so, that host-alias is used (that is, host-hpvm-migr is used instead of host.). To set up a private network between two systems, identify which physical network interfaces are to be used for the private network. Then connect those ports to the same network switch, or cable them directly to each other with a cross-over cable if these two VM Host systems are the only two systems that will migrate guests. Also, BladeSystems in the same enclosure can be connected directly together without an external switch or cable. Assign private network IP addresses to those interfaces by editing /etc/hosts, /etc/ nsswitch.conf and /etc/rc.config.d/netconf on each host. Private (non-routable) IP addresses in the range of 10.0.0.0 to 10.255.255.255 are good choices to use. (See the chapter on "Network Addressing in the current version of the HP-UX LAN Administrator’s Guide for assistance with subnetworking configuration: http://docs.hp.com/en/5991-7412/5991-7412.pdf). In the following example, VM Host system host2 is using network interface lan3 as its private network to connect to VM Host host1: Address aliases from/etc/hosts on the host1 and host2 systems: 127.0.0.1 localhost loopback 16.17.81.141 host1 host1.alg.hp.com 16.17.81.142 host2 host2.alg.hp.com 10.3.81.141 host1-hpvm-migr 10.3.81.142 host2-hpvm-migr Excerpt from /etc/nsswitch.confon the VM Host systems: hosts: files dns ipnodes: files dns Excerpt from /etc/rc.config.d/netconf on the host2 system: INTERFACE_NAME[3]=lan3 IP_ADDRESS[3]=10.3.81.142 SUBNET_MASK[3]=255.255.252.0 BROADCAST_ADDRESS[3]="" INTERFACE_STATE[3]="" DHCP_ENABLE[3]=0 INTERFACE_MODULES[3]="" Example output from netstat on the host2 VM Host system: # netstat -in Name Mtu Network Address Ipkts ... lan3 1500 10.3.80.0 10.3.81.142 1022313379 ... lan0 1500 16.17.80.0 16.17.81.142 2420913 ... lo0 32808 127.0.0.0 127.0.0.1 123762 ... The hpvmmigrate command does not encrypt the guest's memory and state during the transfer and does not check that a private network connection is being used between the source and target VM Hosts. Because the data is not encrypted, using a private network is important for 164 Migrating Virtual Machines security. Also, a high-speed, private network helps ensure efficient online migrations and preserves the bandwidth and performance of the site network. You can also use the nwmgr command to help verify the connection. The following example uses the nwmgr command on host1 to get the Station Address (MAC): # nwmgr Name/ Interface Station Sub- Interface Related ClassInstance State Address system Type Interface ============== ========= ============== ======== ============== ========= lan2 UP 0x001E0B5C0572 igelan 1000Base-SX lan0 UP 0x001E0B5C05C0 igelan 1000Base-SX lan1 DOWN 0x001E0B5C05C1 igelan 1000Base-SX lan3 UP 0x001E0B5C0573 igelan 1000Base-SX lan900 DOWN 0x000000000000 hp_apa hp_apa lan901 DOWN 0x000000000000 hp_apa hp_apa lan902 DOWN 0x000000000000 hp_apa hp_apa lan903 DOWN 0x000000000000 hp_apa hp_apa lan904 DOWN 0x000000000000 hp_apa hp_apa The following example on host2 tests the connection to host1's Station Address 0x001E0B5CO573: # nwmgr --diag -A dest=0x001E0B5C0573 -c lan3 lan3: Link check succeeded. Use the ssh and the env commands to check that the private network connection is working properly between two VM Host systems, and that you are actually using the correct network interfaces. For example: # ssh host1-hpvm-migr env | grep -i connection SSH_CONNECTION=10.3.81.142 52215 10.3.81.141 22 10.3.1.3 Conventions for Using target-hpvm-migr Names for Private Networks If the name specified for the hpvmmigrate -h option is a simple basename, the hpvmmigrate command concatenates its conventional private network suffix -hpvm-migr to the basename and first checks if that name can be resolved. A simple basename is a reasonably short string with no specified domain hierarchy (for example, period (.) in the name). The simple basename cannot already contain the conventional suffix —hpvm-migr either. You should add the alias target-hpvm-migr to /etc/hosts that maps to the private IP network address for VM Host target and modify /etc/nsswitch.conf, so lookups reference /etc/host before using DNS. (The resolution check is done by looking up the modified name with the gethostbyname function, so DNS is used if there is no alias in /etc/hosts.) Because this is just a convention implemented local to each host, administrators can use it or not.. If this convention is configured correctly, both target and target-hpvm-migr resolve to the proper address. For example: • hpvmmigrate -h host39 — Look up host39-hpvm-migr first, and if not found, look up host39. • hpvmmigrate -h host39-hpvm-migr — Look up host39–hpvm-migr. • hpvmmigrate -h host39.atl — Look up host39.atl. Of course, target.fully.qualified.domain-name will not be modified. By following this convention, defining an alias with suffix —hpvm-migr for the private network connections, you block use of the site network for online migrations in case someone accidentally specifies the target VM Host's hostname for the hpvmmigrate -h option. 10.3 VM Host and Virtual Machine Configuration Considerations 165 10.3.1.4 Using NTP on VM Hosts Using NTP to synchronize clocks is strongly recommended for Online VM Migration environments. In addition to a typical NTP configuration, all the potential VM Hosts should use each other as mutual peer NTP servers to help maintain time consistency between hosts. 10.3.2 SSH Setup Between the VM Hosts Only superusers can execute the hpvmmigrate command. The migration of a guest is controlled by a set of secure remote operations that must be enabled on both systems. The hpvmmigrate command requires HP-UX Secure Shell (SSH) to be set up on both the source and target host systems to provide a secure communication path between VM Hosts. SSH is installed on HP-UX systems by default. Passwords-based and host-based authentication are not supported. SSH security must be set up, so that superusers can use ssh commands between the source and target VM Hosts without requiring interactive passwords. The hpvmmigrate command uses SSH public-key based authentication between the source and destination hosts. To enable secure communication between the source and target hosts, you must generate SSH keys on both systems. You need root privileges to generate and set up the SSH keys required for guest migration. The easiest way to do this is to use the secsetup script provided by Integrity VM. Execute the following command on both the source and target hosts: # /opt/hpvm/bin/secsetup -r otherhost Instead of using secsetup, SSH keys can be generated manually on the systems by using the ssh-keygen command. The ssh-keygen command generates, manages, and converts authentication keys for SSH. For information about manual SSH key generation, see the ssh-keygen command HP-UX manpage. 10.3.2.1 Troubleshooting SSH Key Setup If SSH is installed on both the source and the target system, you can run the ssh command on the source host to establish a connection to the target host without providing a password. This ability ensures that SSH keys are set up between the two hosts. If SSH keys are not set up properly, the hpvmmigrate command produces an error message indicating that the SSH setup needs to be checked. If running the secsetup script does not work correctly, check the permissions on / to ensure that superusers have write permissions. For example, # 11 -d / drwxr-xr-x 20 root root 8192 Apr 29 06:25 / If your VM Host's root directory has different permissions than displayed in the previous example, use the chmod command to correct them. # chmod 755 / If a VM Host is reinstalled at some point after using the secsetup script to configure SSH keys, you might receive warning messages from ssh commands about keys changed, or bad keys in your known_hosts file. In this case, use the ssh-keygen -R hostname command to remove obsolete keys from the known_hosts file, and then use the secsetup command again to configure new keys. 10.3.2.2 Using a Third-Party SSH The HP-UX native SSH is assumed. To use an incompatible SSH command with the hpvmmigrate command, make sure your version of SSH is set up for host-based authentication without requiring interactive passwords. Then set the SSHEXECPATH environment variable (in /etc/rc.config.d/hpvmconf) to invoke a command or shell script similar to the one provided in alt_ssh_example. 166 Migrating Virtual Machines Customize alt_ssh_example script for use in your environment with your version of SSH to translate all the HP-UX SSH specific options to execute your alternate SSH command and to achieve similar behavior. The command, or shell script, must have permissions similar to a real ssh executable -- it should be writable only by the file owner. The hpvmmigrate command expects to use the HP-UX ssh command as in the following: ssh -e none -o BatchMode=yes -T -x target-host-alias exec exec hpvmmigrate -# See the alt_ssh_example comments for explanations of the -e, -o, -T, and -x options. With an alternate version of SSH, you might not need some of the HP-UX specific options; or, there may be different options that achieve the same effect; or, perhaps some alternate SSH configuration mechanism can be used eliminating the need for some of the HP-UX specific SSH options. 10.3.3 Virtual Machine Requirements and Setup Online VM Migration is supported for all guest OS types supported by Integrity VM V4.1. All memory sizes and virtual CPU configurations for the current version of Integrity VM are supported. As with all guest OS installations, the guest kit should be installed. You can migrate guests that use both the virtual I/O (VIO) and the accelerated virtual I/O (AVIO) drivers for storage and LAN, although only whole disk SAN storage and ejected file-backed DVDs can be migrated while the guest is online. All storage and network configuration limits supported by Integrity VM are supported by Online VM Migration. 10.3.3.1 Setting Online Migration Phase Time-Out Values Various things can cause and online migration to abort: insufficient resources on the target host, busy source or target hosts a slow private network connection, an excessively busy guest, and so on. When a migration aborts, the guest continues to run, unaffected, on the source VM Host. Therefore, these are not serious errors. You can attempt the online migration again when the blocking conditions improve. To protect the guest's workload, the online migration software limits the amount of time spent in each migration phase. The phases of an online migration are: • Initialization phase — Establishes connections, various checks, starts the target guest, and so forth. • Copy phase — Tracks writes to guest memory and copies all of guest memory. • I/O quiesce phase — Queues new I/O requests and waits for outstanding I/O to complete. • Frozen phase — Stops the virtual CPUs and copies modified memory and guest state. For example, if a guest stops I/O to storage for too long, it could experience I/O errors and applications could fail or the operating system could crash. If a guest is frozen for too long, external network connections to the guest can time out and network connections can be dropped. Network time-outs are especially troublesome for certain UDP applications that are not resilient enough to tolerate packets being delayed and dropped. If you run UDP applications that assume fast network packet turnaround, you might need to reduce the frozen phase time-out value, which might cause online migrations to abort more often. However, it will preserve the integrity of the network connections to the guest. The trade-off is that your migration might abort if conditions are not right for fast and efficient migrations. If necessary, you can carefully adjust the following migration time outs with the hpvmmodify -x command: • migrate_init_phase_timeout — Specifies the maximum number of seconds the online migration spends during the initialize phase of the migration. The default is 10 seconds. • migrate_copy_phase_timeout — Specifies the maximum number of seconds the online migration spends during the full-copy phase. The default is infinite. 10.3 VM Host and Virtual Machine Configuration Considerations 167 • migrate_io_quiesce_phase_timeout — Specifies the maximum number of seconds the migration spends during the quiesce phase. The default is 15 seconds. • migrate_frozen_phase_timeout — Specifies the maximum number of seconds the migration spends during the freezing phase. The default is 60 seconds. 10.3.3.2 Using NTP on the VM Guests Using NTP is strongly recommended for Online VM Migration environments. Each guest should include all potential VM Hosts as servers in its ntp.conf file so the current local VM Host can be used as a time source. Whether migrating or not, guests should not be used as time servers. To maintain reliable time synchronization on a guest, it might be necessary to reduce the NTP polling interval, so the guest checks the time more frequently with the NTP server. 10.3.3.3 Marking a Guest Not Runnable On all VM Hosts that have a virtual machine configured, the virtual machine should be marked Runnable on only one VM Host at a time. While migrating online guests, unexpected errors or guest resets or aborts should not cause your guest to be marked Runnable or Not Runnable incorrectly. To verify the Runnable state of a virtual machine, use the hpvmstatus command to see that the guest is Runnable on only one VM Host and Not Runnable on all other VM Hosts. If the Runnable state of a virtual machine is not correct on a VM Host, use the hpvmmodify command to correct it. For information about the hpvmmodify command and how to mark a guest Runnable or Not Runnable, see Section 10.2.4 (page 161). To mark a guest Not Runnable, use the following command: # hpvmmodify -P guestname -x runnable_status=disabled To mark a guest Runnable, use the following command: #hpvmmodify -P guestname -x runnable_status=enabled WARNING! Be very careful when marking a guest Runnable when it was previously Not Runnable. Make sure this guest is Not Runnable and definitely not actually running on any other VM Host 10.3.4 Restrictions and Limitations of Online VM Migration Administrators should carefully configure certain aspects of VM Hosts and guests for online migration capability. Integration with automated workload placement, management and load balancing tools are not supported in this release. Only Integrity VM command-line interfaces are available in V4.1. More automated and more convenient management of distributed Integrity VM guests might follow in subsequent Integrity VM releases. A dedicated high-speed network should not be on the data center, work site, company, or “public” LAN. Because online migration does not encrypt the data, using a private connection ensures secure transfer of guest memory and state. Online migration can also swamp the network while a migration is in progress. Using the site's network for migration traffic would also create peaks of network activity that might affect network performance. Using a high-speed network is desirable to minimize guest memory transfer time and allows your guest to migrate smoothly. Only whole disk backing storage consisting of SAN LUNs, and ejected file-backed DVDs, are supported for guest storage if you plan to migrate the guest online. File and logical volume backing storage are not supported for online guest migration. Only one online migration to or from a VM Host can be performed at a time. Also, be aware of the state of the guest while migrating it online. If the guest is in the On (EFI) state and no guest operating system is booted, the online migration fails with an error. If the guest is shutting down, 168 Migrating Virtual Machines restarting or crashing while migrating, the online migration aborts when the hpvmmigrate command can no longer communicate with the guest. 10.4 Migrating Serviceguard Packaged Guests and Serviceguard Cluster Nodes In a Serviceguard cluster, you can use hpvmsg_move to migrate a packaged guest online. For example, to migrate the packaged guest ogmlin to node2, use the hpvmsg_move command as follows: # hpvmsg_move -n node2 ogmlin The Integrity VM V4.1 hpvmsg_move command disables the package before migrating the guest and re-runs the package after migration is finished. Therefore, the packaged guest is not protected by Serviceguard while migration is in progress. A guest configured as a Serviceguard package is not protected by Serviceguard while the migration is in progress. The hpvmsg_move command temporarily disables package failover prior to the migration and re-enables package failover after migration has completed. If a failure occurs during the migration process, you must re-enable package failover manually and restart the guest by running it on one of the Serviceguard cluster nodes. For example, to disable the guest sgnode, run the hpvmmodify command as follows: # hpvmmodify -P sgnode -x online_migration=disabled Disabling online migration for the guest ensures that you do not accidentally attempt to migrate a Serviceguard node. 10.5 Migrating Guests from Physical to Virtual Machines The P2V assistant is a menu driven utility that helps you consolidate or migrate between systems. The source and target systems can actually be either virtual systems or physical systems, as the feature is implemented as a general purpose utility. To use the P2V assistant, enter the p2vassist command on the VM Host. 10.5.1 Requirements for Migrating a Workload The Integrity VM software must be installed on the source system. The source system and target system must have SSH connectivity. You can connect from the VM Host system to the target server without a password (host-based authentication). The P2V assistant migrates only applications that have Software Depot (SD) packages. Applications that are not SD compliant cannot be migrated with the P2V assistant. 10.5.2 Using the p2vassist Utility The p2vassist utility is structured as a tree of menus, each of which can execute a function or give access to a deeper-level menu. Use the p2vassist command on the VM Host system. For example: # p2vassist P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit 1 - General Configurations ====================================== 1 ) Set Source Depot 10.4 Migrating Serviceguard Packaged Guests and Serviceguard Cluster Nodes 169 ----- 0 ) Return 2 - Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return 3 - Manage O.S. Images ====================================== Function not implemented yet To migrate a workload, follow these steps: 1. Set the location of the depots to use in installing the application. Select menu 1, option 1 and then enter the fully qualified depot path in either the form accepted by the SD products or as alocal directory. The location must be a registered depot source. For example, to specify depsrv.hp.com:/release/1123.0706/ic054, enter the location on the screen: P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit Enter Option Number: 1 General Configurations ====================================== 1 ) Set Source Depot ----- 0 ) Return Enter Option Number: 1 In this option you can set the location of the depots of the application to be installed on the target system. It can be a hostname or a local directory. Depots source currently configured: NONE Depots source (type 'q' to return): depsrv.hp.com:/release/1123.0706/ic054 2. List the applications available in the source host. Select menu 2, option 1 (Manage Applications - List Applications). Note the names of the products to be selected. For example: P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit Enter Option Number: 2 Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 170 Migrating Virtual Machines 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 1 ACXX C.06.00 HP aC++ AudioDevKit B.11.23.10 HP-UX Audio Desktop Developer Kit Auxiliary-Opt B.11.23.11 Auxiliary Optimizer for HP Languages. BullseyeCoverIA 7.5.61 HP-UX IA C-ANSI-C C.06.10 HP C/ANSI C Compiler C-Dev-Tools B.11.23.11 C Language Development Tools gcc 4.1.0 gcc gdbm 1.8.3 gdbm . . . hpuxwsAPACHE B.2.0.55.03 HP-UX Apache-based Web Server hpuxwsTOMCAT B.5.5.9.04 HP-UX Tomcat-based Servlet Engine hpuxwsWEBMIN A.1.070.07 HP-UX Webmin-based Admin hpuxwsXML A.2.00 HP-UX XML Web Server Tools . . . vim 7.0 vim xpm 3.4k xpm zlib 1.2.3 zlib 3. Enter the applications to be migrated. Select menu 2, option 2 (Manage Applications - Select Applications). Enter the application names noted in the previous step, as a space-separated list. For example:: • hpuxwsAPACHE • hpuxwsTOMCAT • hpuxwsWEBMIN • hpuxwsXML P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit Enter Option Number: 2 Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 2 Select Applications ============================== Please enter the list of depots to be installed on the target system, separated by spaces. You can list the applications using the first option of this menu. Depots list (type 'q' to return): hpuxwsAPACHE hpuxwsTOMCAT hpuxwsWEBMIN hpuxwsXML 4. Specify application data transfer. To define directories or files, select menu 2, option 3 (Manage Applications - Add Data Directories/Files). Otherwise, proceed to step 5. The p2vassist utility suggests directories to set to transfer. For example: 10.5 Migrating Guests from Physical to Virtual Machines 171 P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit Enter Option Number: 2 Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 3 Please enter the list of directories/files to be transferred to the target system, separated by spaces. The following directories are obtained by examining the depot configuration, you may copy them to the prompt below in order to be used: /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin List (press to return): /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin 5. Transfer the application and data to the new host. Select menu 2, option 4 (Manage Applications - Consolidate Applications). The target host name or IP address are verified for connectivity. Disk space is verified. When you press Enter, the data is transferred to the target host. For example: P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit Enter Option Number: 2 Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 4 Consolidate Applications ============================== This option will consolidate application(s) installed on the current system and then migrate into another a suitable target system. The target system is the machine which will host the consolidated application(s). This wizard requires that non-interactive Secure Shell (ssh) access be set up between this system and the target server. 172 Migrating Virtual Machines Depots source currently configured: depsrv.hp.com:/release/1123.0706/ic054 Depots to be installed: hpuxwsAPACHE hpuxwsTOMCAT hpuxwsWEBMIN hpuxwsXML Dirs/Files to be transferred: /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin Please enter the hostname/IP of the target system (type 'q' to return): vmp2v Querying the system vmp2v for current status, this may take a few moments... Installing depots... Press ENTER to continue and begin transferring files. Transferring Configuration files... Checking application disk space... Transferring /opt/hpws/apache directory to vmp2v, please wait... Transferring /opt/hpws/tomcat directory to vmp2v, please wait... Transferring /opt/hpws/webmin directory to vmp2v, please wait... Application Sucessfully consolidated on host: vmp2v Press to return to menu: 10.5.3 Troubleshooting P2V Problems If the application was already installed on the target host, the P2V assistant interrupts the installation process with the following message: ---------------------- [ Attention ] ---------------------- One or more of selected application (s) are already installed on target system garopaba. The applications are listed below: Application - Target Version - Repository Version FIREFOXsrc - 1.5.0.00.01 - 1.5.0.00.01 It's strongly recommended to stop that all applications listed above (or any other using them) before continuing with the installation. All selected applications already installed on target host will be removed. Notice that any patchs and/or other updates may be lost if older versions are installed. Type below if you would like to continue ---------------------------------------------------------- The P2V assistant prompts you either to continue or to stop the installation. If you choose to continue, the P2V assistant first uninstalls the application on the target host, then installs the selected one. Do not continue the installation if older versions can break dependencies on another applications. In addition, install older versions of applications might overwrite updated libraries that were installed by patches. 10.5 Migrating Guests from Physical to Virtual Machines 173 174 11 Using HP Serviceguard with Integrity VM After you install Integrity VM and create the guest, you can install HP Serviceguard on either the VM Host system (to provide failover for the guest), or on the guest (to provide failover for applications running on the guest). This chapter describes how to configure Serviceguard with Integrity VM, including the following topics: • “Introduction to HP Serviceguard with Integrity VM” • “VMs as Serviceguard Nodes Configurations” • “Serviceguard in VM Host Configuration” • “Upgrading from the Integrity VM A.01.20 Toolkit” • “Troubleshooting Serviceguard with Integrity VM” This chapter assumes you are familiar with HP Serviceguard. The procedures in this chapter use the HP Serviceguard commands to accomplish Serviceguard tasks. You can use Serviceguard Manager instead. For more information, see the Managing Serviceguard manual. 11.1 Introduction to HP Serviceguard with Integrity VM After you set up Integrity VM, you can install HP Serviceguard on either the VM Host or the HP-UX guest. Do not use Serviceguard on both the VM Host and the guest at the same time. For information about supported Serviceguard versions, see the HP Integrity Virtual Machines Version V4.1 Release Notes. The Serviceguard version must be appropriate to the version of HP-UX. For more information about Serviceguard, see the Managing Serviceguard manual. • To protect guest applications, install Serviceguard on the HP-UX guest. Applications on a guest can fail over to any of the following: — Another guest configured as a Serviceguard node that is running on the same VM Host system (see Section 11.2.1 (page 177)) — Another guest configured as a Serviceguard node running on a different VM Host system (see Section 11.2.2 (page 177)) — Another server or partition that is not running Integrity VM (see Section 11.2.3 (page 178)) Windows guests do not support HP Serviceguard; therefore, Serviceguard cannot be installed on Windows guests applications or configured into a Serviceguard cluster. • To protect guests, install HP Serviceguard on the VM Host system. Guests configured as Serviceguard packages (guests) are subsequently managed using HP Serviceguard commands. If the VM Host system fails, the distributed guest automatically fails over to another node in the Integrity VM multiserver environment. Integrity VM guests which can be relocated between Integrity VM Hosts are configured into an Integrity VM multiserver environment that contains the same set of servers as is in the Serviceguard cluster. (For more information, see Section 11.3 (page 179)). Guests of any operating system (HP-UX, Linux, and Windows) can be configured as Serviceguard packages. Each Serviceguard configuration provides a level of protection against failure. Choose the configuration that best meets your needs, and keep the following requirements in mind: • Storage requirements To make sure the Serviceguard configuration is manageable, use identical backing stores on both the primary node and alternate nodes. To use VMs as Serviceguard Nodes configurations, the backing storage units must be whole disks. Integrity VM does not support using other types of backing stores on primary and alternate nodes for applications that are configured as Serviceguard packages. 11.1 Introduction to HP Serviceguard with Integrity VM 175 The VM Host system storage configurations must comply with both Integrity VM and Serviceguard product requirements. For information about the Integrity VM storage subsystem, see Chapter 7 (page 91). • Network requirements To make sure network communication with guests is always available, provide identical network devices on both the primary and alternate nodes. Physical NICs (pNICs) and vswitches must be the same on both the original and adoptive nodes for virtual NICs (vNICs) to function after the failover. For more information about the Integrity VM networking subsystem, see Chapter 8 (page 119). In the Serviceguard with Integrity VM environment, you can use the following network configurations: — Heartbeat LANs Serviceguard nodes use heartbeat LANs to maintain communication with one another. Whether Serviceguard is installed on the VM Host system or on the guest, HP recommends that you configure every LAN as a heartbeat LAN. — Primary and standby LANs For local LAN failover, a Serviceguard node must have both a primary and standby LAN. In both VMs as Serviceguard Nodes and VMs as Serviceguard Packages configurations, use vswitches or hubs to connect two pNICs to the same network broadcast domain. For VMs as Serviceguard Packages configurations, Serviceguard monitors the physical connections and the vswitch monitor moves the vswitch between pNICs automatically. In a VMs as Serviceguard Nodes configuration, the pNICs are connected to vswitches, which are configured as vNICs in the guest. In this configuration, Serviceguard running in the guest determines the primary and standby LANs and performs the failover in the guest. — Autoport Aggregation (APA) You can use HP-UX APA in the Serviceguard configuration on the VM Host systems. Use APA in MANUAL or AUTO-FEC modes when running on the VM Host system. Do not use LACP_AUTO mode link aggregates. For more information about APA, see the HP Auto Port Aggregation (APA) Support Guide. — Virtual LANs (VLANs) Virtual LANs can be configured on the vswitches or the physical switches. You can use VLANs on the VM Host system (as described in the Using HP-UX VLANS manual). You can configure the VLAN on vswitches used by guests (as described in Section 8.4 (page 126)). The following sections describe the configuration procedures and the specific requirements for each of the Serviceguard configurations. 11.2 VMs as Serviceguard Nodes Configurations You can install Serviceguard on an HP-UX guest to provide high availability for the applications running on the guest. In this type of configuration, the guest is configured as a node in a Serviceguard cluster. Depending on the configuration of the cluster, the application configured as a Serviceguard package can fail over: • From one guest to another guest in the same VM Host system • From one guest to another guest in another VM Host system • From the guest on a VM Host system to a separate physical server or nPar 176 Using HP Serviceguard with Integrity VM You can even mix and match VMs as Serviceguard Nodes configurations to meet your specific requirements. The following sections describe the VMs as Serviceguard Nodes configurations. 11.2.1 Cluster in a Box Figure 11-1 shows the configuration of an application package that can fail over to another guest on the same VM Host system. Figure 11-1 Guest Application Failover to Another Guest on the Same VM Host VM Host 1 Serviceguard Cluster Serviceguard Package Failover Guest VM2 Guest VM1 Physical Node 1 In this configuration, the primary node and the adoptive node are guests running on the same VM Host system. This cluster does not provide protection against single point of failure (SPOF), because both the primary cluster member and the adoptive cluster member are guests on the same physical machine. However, this configuration is useful in testing environments. If you are running more than one guest on the VM Host system, and you need to share the same storage among the guests, you must change the SHARE attribute of the shared disk to YES using the hpvmdevmgmt command. For example: # hpvmdevmgmt -m gdev:/dev/rdisk/disk1:attr:SHARE=YES For more information about using the hpvmdevmgmt command, see Section 9.8 (page 148). 11.2.2 Application Failover from Virtual Machine to Virtual Machine Figure 11-2 shows the configuration of an application package that can fail over to a guest running on a different VM Host system. 11.2 VMs as Serviceguard Nodes Configurations 177 Figure 11-2 Guest Application Failover to a Guest on a Different VM Host Serviceguard Cluster VM Host VM Host Guest VM1 Guest VM2 Serviceguard Package Failover Physical Node 1 Physical Node 2 In this configuration, the Serviceguard nodes are guests running on either separate hard partitions (nPars) or HP Integrity servers. Note that Integrity VM does not run on soft partitions (vPars). 11.2.3 Application Failover from Virtual Machine to Physical Machine Figure 11-3 shows the configuration of an application package that can fail over to a physical node or partition that is not running Integrity VM software. In this case, the physical node may be a discreet physical system, a hard partition (nPar), or a soft partition (vPar). Figure 11-3 Guest Application Failover to an HP Integrity Server Serviceguard Package Failover VM Host Physical Node Guest VM Serviceguard Cluster The Serviceguard cluster consists of a VM Host system and a Serviceguard node that is not running Integrity VM. The application configured as a Serviceguard package can fail over to the physical node. Alternatively, you can run the application on the physical node and configure the guest on the VM Host system as the adoptive node. 11.2.4 Configuring VMs as Serviceguard Nodes To configure a Serviceguard cluster that allows an application to fail over from one guest to another, perform the following procedure: 1. Install Serviceguard on the HP-UX guests that will run the application. 2. For the virtual machine and physical node cluster, install Serviceguard on the physical node. 178 Using HP Serviceguard with Integrity VM 3. Ensure that each guest has access to a quorum server or cluster lock disk. 4. Use the hpvmstatus command to make sure the guest is running and to verify the guest name. 5. Use the cmquerycl command to specify the nodes to be included in the cluster and to generate a template for the cluster configuration file. For example, to set up a cluster named gcluster that includes nodes host1 and host2, enter the following command: # cmquerycl -v -C /etc/cmcluster/gcluster.config -n host1 -n host2 -q quorum-server-host Include the -q option if a quorum server is used on the cluster. 6. Edit the /etc/cmcluster/cluster-name.config file (where cluster-name is the name of the cluster specified in the cmquerycl command). For details about modifying the information in the cluster configuration file, see the Managing Serviceguard manual. 7. Use the following command to verify the contents of the file: # cmcheckconf -k -v -C /etc/cmcluster/gcluster.config This command ensures that the cluster is configured properly. 8. Generate the binary configuration file and distribute it using the following command: # cmapplyconf -k -v -C /etc/cmcluster/gcluster.config 9. Start the cluster using the following command: # cmruncl This procedure provides a simple example of creating guest application packages. For information about how to set up your Serviceguard configuration, see the Managing Serviceguard manual. 11.3 Serviceguard in VM Host Configuration The following sections describe how to configure a VM Host as a Serviceguard node. In this configuration, if any of the resources used by a guest fail on the primary VM Host system, the guest fails over to an adoptive VM Host system, as illustrated in Figure 11-4. Figure 11-4 Virtual Machine Failover to Another Cluster Member Run Atnt . Fault Remoet Power Run Atnt . Fault Remoet Power Serviceguard Package Failover VM Host 1 VM Host 2 Virtual Machine Serviceguard Cluster To configure VMs as Serviceguard Packages: 1. Create the Serviceguard package, as described in Section 11.3.1 (page 180). 2. Modify the Serviceguard package configuration files to match your guest environment, as described in Section 11.3.2 (page 182). 3. Start the Serviceguard package as described in Section 11.3.3 (page 183). 11.3 Serviceguard in VM Host Configuration 179 NOTE: When using AVIO networking devices for guests that are configured as Serviceguard Packages, be sure that all Serviceguard standby LANs are configured using PPA devices supported by AVIO. 11.3.1 Creating Guests as Packages Serviceguard A.11.18 provides a new process for configuring packages called modular packages. This new process is simpler and more efficient, because it allows you to build packages from smaller modules and eliminates the separate package control script and the need to distribute it. Packages created using Serviceguard A.11.17 or earlier are referred to as legacy packages. If you need to reconfigure a legacy package or create a new one, see the Managing Serviceguard manual. The hpvmsg_package script can repackage your virtual machine as either a legacy or modular package. On the VM Host, use the following procedure to create a package configuration file and control script for the guest: 1. Install Integrity VM and create the guest with all necessary virtual storage devices and vswitches. Repeat this procedure on each node in the multiserver environment. 2. Install, configure, and run Serviceguard on every node in the multiserver environment. 3. Because Serviceguard can be bundled with the OE, bring up the virtual machines and manually remove the Serviceguard product. 4. Start the guest on the primary node using the hpvmstart command. Use the hpvmstatus command to verify the guest name and to make sure that it is running. 5. Create a Serviceguard package by running the hpvmsg_package script from the HP Serviceguard for Integrity VM Toolkit, which is installed in the /opt/cmcluster/toolkit/ hpvm/ directory when you install Integrity VM. NOTE: The default KILLTIME of 10 seconds may be too aggressive in some environments and can result in a file system corruption on Linux guests. HP recommends that you tune this value so that the file systems on the guests are successfully unmounted before the guest is powered off. Use the following command to create a package: # /opt/cmcluster/toolkit/hpvm/hpvmsg_package [-VQLs] [-m {0|1}] [-P] vm_name Where: • -P vm_name — Indicates the virtual machine name • -m — Specifies whether maintenance mode is enabled or disabled. 1 — Enabled, 0 — Disabled • -L — Creates a legacy package. — Default is modular. • -V — Verbose • -Q — Quietly performs command taking default actions without additional prompts. • -s — Sanity checks the specific command, but does perform the requested action. The following command creates a modular package for the virtual machine named host1: # /opt/cmcluster/toolkit/hpvm/hpvmsg_package host1 This is the HP Virtual Machine Serviceguard Toolkit Package Template Creation script. This script will assist the user develop and distribute a set of Serviceguard package configuration template files and associated start, stop and monitor scripts. The templates generated by these scripts will handle many guest configurations, but it is only a template and may not be appropriate for your particular configuration needs. You are encouraged to review and modify these template files as needed for your particular environment. Do you wish to continue? (y/n):y 180 Using HP Serviceguard with Integrity VM [Virtual Machine Details] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== host1 1 HPUX Off 1 5 1 512 MB 0 [Storage Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ====== ========== === === === === === ========= ========================= disk scsi 0 0 0 0 0 disk /dev/rdisk/disk0 disk scsi 0 0 0 1 0 lv /dev/vgsglvm/rlvol1 disk scsi 0 0 0 2 0 file /hpvm/g1lvm/hpvmnet2 disk scsi 0 0 0 3 0 lv /dev/vx/rdisk/sgvxvm/sgvxvms disk scsi 0 0 0 4 0 file /hpvm/g1vxvm/hpvmnet2 disk scsi 0 0 0 5 0 disk /dev/rdisk/disk5 [Network Interface Details] Interface Adaptor Name/Num Bus Dev Ftn Mac Address ========= ========== ========== === === === ================= vswitch lan vswitch2 0 1 0 ea-5c-08-d3-70-f2 vswitch lan vswitch5 0 2 0 f2-c7-0d-09-ac-8f vswitch lan vswitch6 0 4 0 92-35-ed-1f-6c-67 Would you like to create a failover package for this Virtual Machine summarized above? (y/n):y Would you like to distribute the package to each cluster member? (y/n):y The failover package template files for the Virtual Machine were successfully created. The script asks you to confirm the following actions: • Creating a failover package • Distributing the package to all the cluster nodes Respond to both prompts by entering y. The hpvmsg_package script creates the virtual machine package template files in the /etc/cmcluster/guest-name/ directory. If the package is a modular package, it creates the following templates files: • guest-name.conf • hpvmsg_ext • hpvmsg_mon If the package is a legacy package, it create the following template files: • guest-name.config • guest-name • hpvmsg_ctrl • hpvmsg_mon • hpvmsg_start • hpvmsg_stop The hpvmsg_package is a utility that you can use to configure a guest as a Serviceguard package. The utility uses the guest name that you supply as an argument to create and populate the /etc/cmcluster/guest-name/ directory with a set of template files that contain basic Serviceguard parameter settings. HP recommends that you review and modify these template files as needed for your specific multiserver environment. For more information, see Section 11.3.2 (page 182) and the Managing Serviceguard manual. 6. Stop the guest by entering the appropriate operating system command, or use the hpvmstop -F command on the VM Host system. (Because the guest has been configured as a Serviceguard package, the -F option is necessary.) For example:Enter the following command on the guest: # /usr/sbin/shutdown -g now # hpvmstop -P guest-name -F -g Unmount all file backing stores and deactivate any LVM logical volumes or deport VxVM volumes used as backing stores for the guests. 7. Verify that the package is set up correctly by entering the following command: # cmcheckconf -v -C /etc/cmcluster/cluster-name.config \ -P /etc/cmcluster/guest-name/guest-name.config where: 11.3 Serviceguard in VM Host Configuration 181 • cluster-name is the name of the Serviceguard cluster. • guest-name is the name of the guest. 8. Update and redistributed the binary configuration files to the /etc/cmcluster/guest-name/ directory on all cluster nodes: # cmapplyconf -v -C /etc/cmcluster/cluster-name.config -P /etc/cmcluster/guest-name/guest-name.config At the prompt that asks whether to modify the cluster configuration, enter y. For example: # cmapplyconf -v -C /etc/cmcluster/cluster1.config \ -P /etc/cmcluster/host1/host1.config Checking cluster file: /etc/cmcluster/cluster.config Checking nodes ... Done Checking existing configuration ... Done Gathering configuration information ... Done Gathering configuration information ... Done Gathering configuration information .. Gathering storage information .. Found 10 devices on node host1 Found 10 devices on node host2 Analysis of 20 devices should take approximately 3 seconds 0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100% Found 7 volume groups on node charm Found 7 volume groups on node clowder Analysis of 14 volume groups should take approximately 1 seconds 0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100% ..... Gathering Network Configuration ......... Done Cluster cluster1 is an existing cluster Parsing package file: /etc/cmcluster/host1/host1.config. Package hpvmnet2 already exists. It will be modified. Checking for inconsistencies .. Done Cluster cluster1 is an existing cluster Maximum configured packages parameter is 10. Configuring 3 package(s). 7 package(s) can be added to this cluster. 200 access policies can be added to this cluster. Modifying configuration on node host1 Modifying configuration on node host2 Modify the cluster configuration ([y]/n)? y Marking/unmarking volume groups for use in the cluster 0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100% Modifying the cluster configuration for cluster cluster1. Modifying node host1 in cluster cluster1. Modifying node host2 in cluster cluster1. Modifying the package configuration for package host1. Completed the cluster creation. If the package configuration file contains the appropriate settings, start the Serviceguard service as described in Section 11.3.3 (page 183). 11.3.2 Modifying the Package Configuration Files The Serviceguard for Integrity VM toolkit creates templates that supply basic arguments to Serviceguard parameters. Review and modify the Serviceguard parameters based on the information for your Serviceguard cluster and the information supplied in the Managing Serviceguard manual. Make the appropriate changes to the guest-name.config and guest-name files. Edit the package configuration file to add any LVM volume groups that are used by the distributed guest. Include a separate VOLUME_GROUP parameter for each cluster-aware volume group. These volume groups will be initialized with the cluster ID when the cmapplyconf command is used. 182 Using HP Serviceguard with Integrity VM 11.3.3 Starting the Distributed Guest To start the distributed guest:, enter the following command: # cmrunpkg -v guest-name For example, to start the guest named host1, enter the following command: # cmrunpkg -v host1 Running package host1 on node host1. cmrunpkg : Successfully started package host1. cmrunpkg : Completed successfully on all packages specified. Verify that the guest is on and running. Use both the Integrity VM hpvmstatus command and the Serviceguard cmviewcl command to verify the status. For example: # hpvmstatus -P host1 [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== host1 1 HPUX On 1 5 1 512 MB 0 # cmviewcl -v host1 CLUSTER STATUS cluster1 up NODE STATUS STATE host1 up running Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY up 0/2/1/0/4/1 lan7 PRIMARY up 0/2/1/0/6/1 lan9 PRIMARY up 0/5/1/0/7/0 lan6 STANDBY up 0/1/2/0 lan1 STANDBY up 0/2/1/0/4/0 lan2 STANDBY up 0/2/1/0/6/0 lan8 STANDBY up LinkAgg0 lan900 STANDBY up 0/0/3/0 lan0 PACKAGE STATUS STATE AUTO_RUN NODE host1 up running disabled host1 Policy_Parameters: POLICY_NAME CONFIGURED_VALUE Failover configured_node Failback manual Script_Parameters: ITEM STATUS MAX_RESTARTS RESTARTS NAME Service up 0 0 host1 Node_Switching_Parameters: NODE_TYPE STATUS SWITCHING NAME Primary up enabled host1 (current) Alternate up enabled host2 NODE STATUS STATE host 2 up running Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY up 0/2/1/0/4/1 lan7 STANDBY up 0/1/2/0 lan1 STANDBY up 0/2/1/0/4/0 lan2 STANDBY up 0/2/1/0/6/0 lan8 STANDBY up LinkAgg0 lan900 PRIMARY up 0/5/1/0/7/0 lan6 11.3 Serviceguard in VM Host Configuration 183 PRIMARY up 0/2/1/0/6/1 lan9 STANDBY up 0/0/3/0 lan0 To enable autorun and failover, enter the cmmodpkg command. 11.3.4 Starting the vswitch Monitor The vswitch monitor monitors the activities of the Serviceguard network monitor and, when appropriate, moves the vswitch configuration between primary and standby network interfaces. The vswitch monitor does not require user configuration and is installed as part of the Integrity VM product. If Serviceguard is running and distributed guests are configured, the vswitch monitor automatically starts on the VM Host system when the VM Host system boots. To start the vswitch monitor manually, enter the following command: # /sbin/init.d/vswitchmon start To verify that the vswitch monitor is running, enter the following command: # ps -ef | grep vswitchmon 11.3.5 Verifying That Distributed Guests Can Fail Over To verify that the guests configured as Serviceguard packages and the multiserver environment are working properly, use the following commands to perform a manual failover: 1. On the original node (host1), verify that the package named host1 is running: host1# cmviewcl -v -p host1 2. Halt the host1 package on host1: host1# cmhaltpkg host1 Halting package host1. 3. Start the package on the other VM Host system (host2): host2# cmrunpkg -n host2 host1 4. Enable the package: host2# cmmodpkg -e host1 5. On the adoptive node, verify that the host1 package has started: host2# cmviewcl -v -p host1 6. On the adoptive node, verify that the guest named host1 is on: host2# hpvmstatus -P host1 11.3.6 Managing Distributed Guests To start, stop, or monitor distributed guests, use the Serviceguard commands described in this section. Do not use the Integrity VM commands (hpvmstart, hpvmstop, and hpvmmigrate) to manage distributed guests. 11.3.6.1 Starting Distributed Guests To start a distributed guest, enter the following command: # cmrunpkg guest-name 11.3.6.2 Stopping Distributed Guests To stop a distributed guest, enter the following command: # cmhaltpkg guest-name 11.3.6.3 Monitoring Distributed Guests To monitor the distributed guest, enter the following command: # cmviewcl -v -p guest-name 184 Using HP Serviceguard with Integrity VM 11.3.6.4 Modifying Distributed Guests You can modify the resources for the distributed guest using the hpvmmodify command. However, if you modify the guest on one VM Host, you must make the same changes on the other nodes in the multiserver environment. After you modify vswitches, logical volumes, or file backing stores used by distributed guests, make sure that Serviceguard can continue to monitor the guests. To update the Serviceguard information, run the hpvmsg_package script and restart the guest packages. 11.3.7 Monitoring Network Connections The vswitch monitor runs the vswitchmon script on the VM Hosts in the multiserver environment and monitors the Serviceguard Network Manager by monitoring the syslog.log file. When it detects that Serviceguard is failing over a primary network to a standby network, the vswitch monitor halts, deletes, creates, and boots the vswitch associated with the primary network onto the the standby network. When the primary network is restored, Serviceguard and the vswitch monitor move the network and associated vswitch back to the primary network. 11.4 Upgrading from the Integrity VM A.01.20 Toolkit If the Integrity VM A.01.20 Serviceguard for Integrity VM Toolkit is installed, remove the Integrity VM A.01.20 toolkit before installing the current version of Integrity VM. After you install Integrity VM, repackage the distributed guests, as described in this section. To upgrade to the current version of Integrity VM, perform the following sequence of steps on each VM Host node in the multiserver environment: 1. Move the distributed guest to the adoptive node by entering the cmhaltpkg and cmrunpkg commands. 2. Remove the toolkit from the VM Host system as described in Section 11.4.1 (page 185). 3. Install the Integrity VM product as described in Chapter 2 (page 23). 4. Move the distributed guest back to the VM Host system using the cmhaltpkg and cmrunpkg commands. 5. Log in to the distributed guest and remove the toolkit as described in Section 11.4.2 (page 186). 6. Repackage the guest by using the procedure described in Section 11.4.3 (page 186). 11.4.1 Removing the Serviceguard for Integrity VM Toolkit To remove the Serviceguard for Integrity VM toolkit, perform the following steps on the VM Host system: 1. Remove the toolkit package template files and scripts. Remove the toolkit files from every VM Host in the multiserver environment. Distributed guests and required resources are not affected by removing the toolkit. Remove the toolkit by removing the toolkit installation directory using the rm command. For example: # rm -rf /var/opt/hpvm/cluster 2. Remove the vswitch monitor script and files. The vswitch monitor script consists of three files: the actual vswitchmon script and the symbolic links used to start and stop the script during system boot and shut down. Distributed guests and required resources are not affected when you remove these files. If a reboot occurs during the interval between the removal of vswitchmon scripts and the Integrity VM installation, vswitch monitoring is temporarily interrupted. To delete the vswitch monitor, delete the associated files using the rm command. For example: 11.4 Upgrading from the Integrity VM A.01.20 Toolkit 185 # rm /sbin/init.d/vswitchmon /sbin/rc2.d/K004vswitchmon /sbin/rc3.d/S802vswitchmon 3. Remove the sepd tunable in every distributed guest configuration. Optionally, you can remove the sepd tunable. The sepd tunable is specific to Integrity VM A.01.20; it is not used in later versions of Integrity VM. To remove the sepd tunable, remove the sepd entry in the guest configuration file in the /var/opt/hpvm/guestname/ directory, where guestname is the name of the guest that was packaged under Integrity VM A.01.20. 11.4.2 Guest Toolkit Removal To remove the Integrity VM A.01.20 guest toolkit, remove the hpvmsgping script from guests that were created with the toolkit. The hpvmsgping monitor script consists of the hpvmsgping script, a configuration file, and the links used to start and stop the script during system boot and shutdown. Removal of these files does not affect the currently running guests or the availability of the system. Delete the associated files using the rm command. For example: # rm /sbin/init.d/hpvmsgping /sbin/rc2.d/K003hpvmsgping /sbin/rc3.d/S801hpvmsgping /etc/hpvmsgping.conf 11.4.3 Repackaging Guests After you upgrade all the nodes in the multiserver environment to the current version of Integrity VM, repackage the guests. To repackage a guest: 1. On the original node where the guest is running, run the hpvmsg_package command. 2. Apply the package configuration using the cmapplyconf command. 3. To provide Serviceguard protection immediately, restart the guest package after repackaging it. For more information about using these commands, see Section 11.3.1 (page 180). 11.5 Troubleshooting Serviceguard with Integrity VM This section describes how to solve some of the problems that can occur using Serviceguard and Integrity VM. 11.5.1 Troubleshooting VMs as Serviceguard Packages If the distributed guest does not start or failover, check both the /var/adm/syslog/syslog.log file and the package log file (/etc/cmcluster/guest—name/guest—name.log). If a package fails to start, Serviceguard performs a package halt. The log files include a Halting package section after the Starting package section that contains the actual starting failure messages. When you view package log files after a package start failure, look at the Halting package section as well as the Starting package section. If the distributed guest does not fail over, take the package down using the cmhaltpkg command. Make sure the guest has the resources it needs to run on the adoptive node by manually starting the package on the adoptive node with the same workload using the cmrunpkg command. If the package does not start under manual control, stop the cluster and test the guest named host1. 1. Use the hpvmmodify command to set the guest to not be distributed. For example: # hpvmmodify -P host1 -i NONE # hpvmmodify -P host1 -j 0 2. Use the hpvmstart command to start the guest with the same VM Host system and workload. Use the virtual console (hpvmconsole) to make sure the the guest OS is installed and that applications are running properly. After testing the guest, create the Serviceguard package again. 186 Using HP Serviceguard with Integrity VM If the guest does not start and displays errors about storage problems, and you are using logical volumes, the storage units might not be available to the VM Host. To make the storage units available , enter the appropriate commands, as follows: • For LVM logical volumes, enter the following commands: # vgchange -c n /dev/vgxx # vgchange -a y /dev/vgxx • For VxVM logical volumes, enter the following commands: # vxdg import diskgroup-name # vxvol -g diskgroup-name startall • If you are using files on a logical volume, also enter the following command: # mount /dev/vgxx /mount-point After making sure the backing storage devices are available, restore them to their original state. Some problems that arise from improper storage configuration include: • Whole disks — Verify that the VM Host has access to the disks. If not, the problem might be a hardware or storage subsystem issue. • LVM - Before starting a package, Serviceguard requires that all volume groups associated with the package are inactive. For details about deactivating LVMs, see the Managing Serviceguard manual. • VxVm — Before starting a package, Serviceguard requires that all disk groups associated with the package are deported. For details, see the Managing Serviceguard manual. • Files — Before starting a package, Serviceguard requires that file systems of file backing stores associated with the package are unmounted. If the guest has problems accessing network, make sure the network devices are available on the VM Host system. Packages do not start if any of their defined subnets are unavailable. This causes multiple failures if no standby LANs are available, or when one or more switches, hubs, interfaces or cables fail. A common issue when starting a package is the lack of available memory. For more information about providing the required memory resources, see Chapter 3 . 11.5.2 Creating Distributed Guests This section describes how to use the hpvmsg_package script to help you configure guests as Serviceguard packages. If you create the Serviceguard package configuration and control scripts manually instead, use the following options to the hpvmcreate , hpvmmodify, or hpvmclone command to identify the Serviceguard package name and to mark the guest as a distributed guest: • Use the -i option to specify the Serviceguard package. (For example, -i SG_package_name.) • Use the -j 1 option to specify that the guest is a distributed guest. For more information, see the hpvmsg_package file. 11.5.3 Networking If the guest has network problems after failover: • Make sure the vswitches are configured configured on the adoptive node. If you are using the VLAN feature of Integrity VM vswitches, make sure that appropriate VLAN IDs are assigned to each port. • Adjust the values of the following Serviceguard parameters in the cluster configuration file. The correct settings for the HEARTBEAT_INTERVAL and the NODE_TIMEOUT parameter are system- and load-dependent. 11.5 Troubleshooting Serviceguard with Integrity VM 187 — The HEARTBEAT_INTERVAL parameter specifies the normal interval between the transmission of heartbeat messages from one node to the other in the cluster. The value of the HEARTBEAT_INTERVAL parameter is entered in microseconds; the default value is 1,000,000 microseconds. Setting the value of this parameter to less than the default is not recommended. The default should be used where possible. The maximum value recommended is 15 seconds, and the maximum value supported is 30 seconds. This value should be at least half the value of the NODE_TIMEOUT parameter. — The NODE_TIMEOUT parameter specifies the amount of time after which the Serviceguard node can determine that the other node is unavailable and can initiate cluster reformation. This parameter is entered in microseconds; the default value is 2,000,000.The minimum is two times the value of the HEARTBEAT_INTERVAL parameter. The maximum recommended value for this parameter is 30,000,000. The default setting yields the fastest cluster reformations. However, using the default value increases the potential for spurious reformations because of momentary system hangs or network-load spikes. For many installations, a setting of 5,000,000 to 8,000,000 (5 to 8 seconds) is more appropriate. The maximum value recommended is 30 seconds and the maximum value supported is 60 seconds. 188 Using HP Serviceguard with Integrity VM 12 Reporting Problems with Integrity VM Report Integrity VM defects through your support channel. Follow these instructions to collect data to submit with your problem report. 1. Run the hpvmcollect command to gather information about the guest before modifying any guest. Preserve the state of the VM Host and Integrity VM to best match the environment when the VM Host failed. If multiple guests are running, run the hpvmcollect command for guest that was running at the time. 2. After the hpvmcollect archive is stored on the VM Host, reboot the guest that caused the VM Host to crash. 3. Run the hpvmcollect command on the guest again. Include this information in the hpvmcollect archive from the VM Host. 4. Report the information through your support channel. This chapter describes how to use the hpvmcollect command and how to investigate Integrity VM log files for information, including the following topics: • “Collecting Integrity VM Data” • “Managing the Size of the VMM Driver Log File” 12.1 Collecting Integrity VM Data You can use the hpvmcollect command on the VM Host or on the guest to collect Integrity VM information that is useful in analyzing system problems. The options available for the hpvmcollect command on the VM Host are different from those available on guests. For information about using the hpvmcollect command, see one of the following sections: • Using the hpvmcollect command the VM Host: see Section 12.1.1 (page 189). • Using the hpvmcollect command on guests: see Section 12.1.2 (page 191). 12.1.1 Using the hpvmcollect Command on the VM Host Table 12-1 describes the options to the hpvmcollect command on the VM Host: Table 12-1 Options to the hpvmcollect Command on the VM Host Option Description Specifies the virtual machine name, where vm-name is the name of the virtual machine. -P vm-name Specifies the virtual machine number, where vm-number is the number of the virtual machine. -p vm-number Specifies a host name to receive the archive, which is copied using the scp command. Verify that you can log in to the host without a password. -s host Specifies the number of crash dumps to copy to the archive. By default, the hpvmcollect command copies the latest crash dump directory (based on the bounds file). This option can be used only with the -c option. -n crash-dump Specifies a target directory in which to create the hpvmcollect_archive directory. -d dir Specifies the archive name with the specified label. If an archive with the same name exists, it is renamed by appending a time stamp to the original name before the new archive is created. -b report-number Includes the latest crash dump directory in the archive. This option is used if the guest or the VM Host fails or hangs. -c 12.1 Collecting Integrity VM Data 189 Table 12-1 Options to the hpvmcollect Command on the VM Host (continued) Option Description Forces an archive to be overwritten, if it exists, rather than renamed with an appended time stamp. -f -h Displays the help message for the hpvmcollect command. Leaves the collected information in a directory rather than in an archive file. The directory name follows the same naming convention as the archive name. -l -g Deletes old guest memory dump data as part of data collection. If the VM Host hangs, generate a crash dump using the TC command on the VM Host console. When the VM Host crashes, it tries to dump a predefined set of memory pages into the crash dump area, including those that belong to Integrity VM. This is crucial to collecting a successful crash dump to analyze Integrity VM problems. The hpvmcollect command is a shell script that can be run on either the VM Host or the guest to gather system information, log files, Integrity VM logs, and configuration files for later analysis. Because the hpvmcollect command collects generic Integrity VM and HP-UX operating system and system information, it may not collect all the information needed to analyze the source of the problem. Make sure that all the relevant information is included in the collection. For example, if the guest is running an Oracle® application, include the Oracle application log files and configuration. By default, the hpvmcollect command creates a directory called hpvmcollect_archive in your current directory, and copies and collects all the Integrity VM and VM Host information. For example, to gather information for a guest named host1 on the VM Host, enter the following command: # hpvmcollect -P host1 This command creates a directory called hpvmcollect_archive in your current directory (if it does not already exist) and then collects information about the VM Host crash dump. The information is then put into a tar file format (if there is a crash dump) or tar.gz file format (if there is no crash dump). Do not modify the guest configuration before running the hpvmcollect command. If you do not want to archive the collection into tar.gz but simply want to examine the contents of the collection, use the -l option to leave the contents as they are. If the VM Host failed, use the -c option to collect crash dump files as well. Because the -c option collects the latest crash dump, use the -n option to specify a crash dump number. Use the -d option to specify a different directory in which to store the hpvmcollect_archive. For example, to collect information about host1, enter the following command: # hpvmcollect -c -n 21 -d /tmp/hpvm_collect_archive -P host1 This command collects information about the guest called host1 using crash dump number 21. The final archive is under /tmp/hpvm_collect_archive directory. The following is an example of hpvmcollect output on the VM Host: # hpvmcollect -P host1 HPVM host crash/log collection tool version 0.8 Gathering info for post-mortem analysis of guest 'host1' on host Collecting I/O configuration info ................................... OK Collecting filesystem info .......................................... OK Collecting system info .............................................. OK Collecting lan info ................................................. OK Running lanshow ..................................................... NO Collecting installed sw info ........................................ OK 190 Reporting Problems with Integrity VM Collecting command logs ............................................. OK Collecting messages from vmm ........................................ OK Collecting lv info .................................................. N/A Collecting vgdisplay info ........................................... OK Collecting vxprint info ............................................. OK Collecting disk info ................................................ N/A Collecting passthru disk info ....................................... N/A Collecting file backing store info .................................. N/A Copying guest's log file ............................................ OK Copying guest's tombstone file ...................................... N/A Copying guest's console log file .................................... OK Copying hpvm configuration .......................................... OK Copying hpvm control script ......................................... OK Copying guest's config file ......................................... OK Getting status of the guest ......................................... OK Getting detailed status of the guest ................................ OK Getting guest's entitlement ......................................... OK Copying guest's config file change log .............................. OK Copying guest VM crash image ........................................ OK Copying host vmunix image ........................................... OK Copying host hpvmmkimage image ...................................... N/A Copying VMM image ................................................... OK Copying hpvmdvr image ............................................... OK Copying hpvmntdvr image ............................................. OK Copying NVRAM image ................................................. OK Collecting IPMI logs ................................................ OK Collecting crash dump ............................................... NO Running crashinfo ................................................... NO Collecting tombstone ................................................ NO Collecting system message buffer .................................... OK Collecting system syslogs ........................................... OK Collecting measureware logs .......................................... OK Finished with the collection Tar archiving and compressing ....................................... TGZ Remote copying the archive ......................................... NO The collection is "/tmp/host1/hpvmcollect/hpvmcollect_archive/test_Sep.28.06_095249EDT.tar.gz" If the command results in an error message like the following, you are out of disk space in the current directory or in the directory you specified with the -d option: msgcnt 10 vxfs: mesg 001: vx_nospace - /dev/vg00/lvol5 file system full(1 block extent) Tar: end of tape Tar: to continue, enter device/file name when ready or null string to quit. Use a file system with enough free space for the archive, especially when you use the -c option. Additional data collected by the hpvmcollect command includes log files (guest, Integrity VM, and VM Host) as well as VM Host system information, including output from the ioscan, lanscan, and swlist commands. The hpvmcollect command also collects information about devices used by the guest. Output from the crashinfo and lanshowcommands are included, if available. The hpvmcollect command records device information in the following files: config/ host.diskinfo host.fsinfo host.ioscan host.laninfo host.sysinfo 12.1.2 Using the hpvmcollect Command on Guests To use the hpvmcollect command on the guest, you must first install the guest management software on the guest as described in Section 9.3 (page 137). Table 12-2 describes the options to the hpvmcollect command on the guest. 12.1 Collecting Integrity VM Data 191 Table 12-2 Options to the hpvmcollect Command on Guests Option Description Includes the latest crash dump directory in the archive. This option is used if the guest or the VM Host fails or hangs. -c Forces an archive to be overwritten, if it exists, rather than renamed with an appended time stamp. -f -g Deletes old guest memory dump data as part of data collection. -h Displays the help message for the hpvmcollect command. Leaves the collected information in a directory rather than in an archive file. The directory name follows the same naming convention as the archive name. -l Specifies the archive name with the specified label. If an archive with the same name exists, it is renamed by appending a time stamp to the original name before the new archive is created. -b report-number Specifies a target directory in which to create the hpvmcollect_archive directory. -d dir Specifies the number of crash dumps to copy to the archive. By default, the hpvmcollect command copies the latest crash dump directory (based on the bounds file). This option can be used only with the -c option. -n crash-dump Specifies a host name to receive the archive, which is copied using the scp command. Verify that you can log in to the host without a password. -s host When you use the hpvmcollect command on the guest, do not specify the guest name. By default, the guest name is used as an archive directory name. You can use the -d option to specify the archive name. The following is an example of the hpvmcollect when it is run on the guest host1: host1# hpvmcollect -c HPVM guest crash/log collection tool version 0.8 Gathering info for post-mortem analysis on guest (hostname 'host1') Collecting I/O configuration info ................................... OK Collecting filesystem info .......................................... OK Collecting system info .............................................. OK Collecting lan info ................................................. OK Running lanshow ..................................................... NO Collecting installed sw info ........................................ OK Collecting crash dump 1 ............................................ OK Running crashinfo ................................................... NO Collecting tombstone ................................................ N/A Collecting system message buffer .................................... OK Collecting system syslogs ........................................... OK Collecting measureware log .......................................... N/A Finished with the collection Tar archiving and compressing ....................................... TAR Remote copying the archive ......................................... NO The collection is "//hpvmcollect_archive/host1_Sep.29.05_122453PST.tar" 12.2 Managing the Size of the VMM Driver Log File The monitor log file (/var/opt/hpvm/common/hpvm_mon_log) is limited in size to 1024 KB. When the log file grows larger than this, it is copied to a new file (hpvm_mon_log.$time), and 192 Reporting Problems with Integrity VM an empty one is created for the new log. To allow this log file to increase to 102400 KB, include the following line in the /etc/rc.config.d/hpvmconf file: VMMLOGSIZE=102400 After you make this change to the hpvmconf file, enter the following commands to determine the PID for the monitor log daemon and to kill it: # cat /var/run/hpvmmonlogd.pid 5052 # kill -HUP 5052 12.2 Managing the Size of the VMM Driver Log File 193 194 Integrity VM Manpages 195 hpvm(5) NAME hpvm -- HP Integrity Virtual Machines (Integrity VM). SYNOPSIS Virtualization technology DESCRIPTION HP Integrity Virtual Machines allows the creation and management of virtual machines, in which unmodified operating systems designed for HP Integrity servers can run. Integrity VM provides a VM Host, which manages the physical machine and allocates system resources, such as memory, CPU time, and I/O devices to virtual machines. The VM Host is the HP-UX operating system installed on the physical machine and running the Integrity Virtual Machines product. Virtual machines run on the same physical machine as the VM Host and appear to be ordinary HP-UX processes. Each virtual machine emulates a real Integrity machine, including firmware. A virtual machine is sometimes referred to as a guest. The operating system running in a virtual machine is referred to as the guest operating system, or guest OS. Following are the Integrity VM commands: • hpvmclone: Creates a cloned copy of a virtual machine. Runs on the VM Host. • hpvmcollect: Collects crash dumps, logs, system status, and configuration on host and guest. Runs on the VM Host and on guests. • hpvmconsole: Connects to the console of a virtual machine. Runs on the VM Host. • hpvmcreate: Creates a new virtual machine. Runs on the VM Host. • hpvmdevmgmt: Manages the device database. Runs on the VM Host. • hpvmdevtranslate: Translates Integrity VM guests to agile devices. • hpvmhostrdev: Manages virtual machine access to devices used by the Integrity VM Host system. • hpvminfo: Displays information about the Integrity VM environment. Runs on the VM Host and on guests. • hpvmmgmt: Manages the guest memory allocation. Runs on guests only. • hpvmmigrate: Moves a virtual machine from one VM Host to another. Runs on the VM Host. • hpvmmodify: Renames or modifies the attributes of a virtual machine. Runs on the VM Host. • hpvmnet: Configures virtual network devices. Runs on the VM Host. • hpvmremove: Removes a virtual machine. Runs on the VM Host. • hpvmsar: Displays performance information about one or several guests on the same host. • hpvmstart: Starts a virtual machine. Runs on the VM Host. • hpvmstatus: Displays status of one or more virtual machines. Runs on the VM Host. • hpvmstop: Stops a virtual machine. Runs on the VM Host. • hpvmupgrade: Assists an Integrity VM upgrade. • p2vassist: Moves a system workload from a discreet server to a virtual machine. Runs on the VM Host. All commands except hpvmconsole require superuser privileges. To use Integrity VM commands on the guest, install the guests management software as described in HP Integrity Virtual Machines Installation, Configuration, and Administration. 196 AUTHORS HP Integrity Virtual Machines was developed by HP. SEE ALSO On the VM Host: hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), hpvmstart(1M), hpvmsar(1M)hpvmstatus(1M), hpvmstop(1M), hpvmupgrade(1M)p2vassist(1M) On the Integrity VM guest: hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3) 197 hpvmclone(1M) NAME hpvmclone -- Create a new virtual machine that is a copy of an existing virtual machine. SYNOPSIS hpvmclone { -P vm_name | -p vm_number } -N clone_VM_name [ -F | -s ] [-l vm_label] [-B start_attr] [-O os-type [:version]] [-c number_vcpus] [ -e percent[:max_percent] | -E cycles[:max_cycles] ] [-r amount] [-S] [-g -group] [-g [+]group[: {admin |oper}]] [-u user] [-u [+]user[: {admin| oper}]] [-a rsrc]... [-m rsrc]... [-d rsrc]... [-b rsrc] [[-x name=value [:name=value]]] DESCRIPTION The hpvmclone command creates a copy of an existing virtual machine and its configuration information. This command copies the configuration files of the existing guest. The clone_vm_name must not already exist on this host. The new virtual machine's configuration information can be modified from the original configuration file by using command options. If no options are specified, all original parameters are retained. Note that resource conflicts could occur if both the original and clone virtual machines are booted together. Resources are checked to determine whether the virtual machine can boot by itself on the server. Any problems are reported as WARNINGS. These warnings do not prevent the new virtual machine from being created. NOTE: Cloning is not allowed during Online VM Migration. Only superusers can execute the hpvmclone command. Options To print the warnings without creating a new virtual machine, use the -s option. Because there is no guarantee that other virtual machines are running at the same time as the new virtual machine is running, use the following command to verify whether a device has dependents: hpvmdevmgmt -l gdev:entry_name where entry_name is the device name in the device-management database. If you omit an option, the associated attribute remains unchanged. -P vm_name Specifies the name of the existing virtual machine to be cloned. You must specify either the -P or the -p option. -p vm_number Specifies the number of the existing virtual machine to be cloned. You can obtain the value of vm_number using the hpvmstatus command. You must specify either the -P or the -p option. -N clone_vm_name Specifies the name to be assigned to the new virtual machine. The name can be composed of up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). The virtual machine name cannot start with a dash (—). You must specify the -N option. 198 -e percent[:max_percent] Specifies the percentage of CPU resources to which each of the new guest's virtual CPUs is entitled. If the entitlement is not specified with this option or the -E option, the new virtual machine's entitlement is that of the existing virtual machine. The percentage can be set to an integral value between 0 and 100. If the value specified is less than 5, then the virtual machine is allocated the minimum percentage of 5%. The default is 10%. The maximum entitlement cannot exceed 100 percent and cannot be less than the minimum. Each group has a default maximum setting of 100 percent. The entitled CPU resources inherited from the existing virtual machine, specified in cycles or percentages, are replaced in the new virtual machine by this percentage. The -e and the -E options are mutually exclusive. -E cycles[:max_cycles] Specifies the virtual machine's CPU entitlement in number of CPU clock cycles. If the cycles are not specified with this option and the -e option is not specified, the new virtual machine's entitled CPU resources is that of the existing virtual machine. The cycles are expressed as an integer, followed by one of these units: • M (megahertz) • G (gigahertz) If no letter is specified, the default unit is megahertz. The value of entitlement inherited from the existing virtual machine (specified in either cycles or percentages) is replaced in the new virtual machine by the new value in CPU clock cycles. The -e and the -E options are mutually exclusive. -l vm_label Specifies a descriptive text string for the new virtual machine. This option can be useful in identifying a specific virtual machine in the hpvmstatus -V display. The label can be up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). To specify white space, the label must be quoted (" "). -B start_attr Specifies the startup behavior of the virtual machine. The start_attr attribute can have the following (case-insensitive) values: • auto: Automatically start the virtual machine when Integrity VM is initialized on the host. • manual: Manually start the virtual machine. (This is the default.) If the start_attr attribute is set to auto, the virtual machine starts when Integrity VM is initialized. This occurs when the VM Host system is booted, and when the Integrity VM software is stopped and restarted on a running VM Host. For example, when you upgrade Integrity VM to a new 199 version on a running system, the software is started automatically. The VM Host attempts to start all virtual machines for which the attribute is set to auto. If insufficient resources exist, some virtual machines might fail to start. If the attribute is set to manual, the virtual machine does not start automatically when Integrity VM is initialized on the VM Host. This is the default. The virtual machine can then be started manually with the hpvmstart command or through its virtual console. This option does not set the virtual machine's console to enable booting when the virtual machine is started. This function must be set with the virtual machine's console. -O os_type[:version] Specifies the type and version of the operating system running on the virtual machine. The response affects the default selection of certain virtual machine attributes, such as amount of memory and CPU power. The os_type is one of the following: HP-UX, WINDOWS, or LINUX. This parameter is not case sensitive. The version is specific to the operating system type. The version specifies a descriptive text string of the version of the operating system. The version string can consist of up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore r (_), and the period (.). To specify white space, then “version” must be quoted. -a rsrc Adds an I/O resource to the new virtual machine. The resource specification (rsrc) is described in hpvmresources(5). This option can be specified more than once. -d rsrc Deletes an I/O resource from the new virtual machine. The resource specification (rsrc) is described in hpvmresources(5). This option can be specified more than once. -m rsrc Modifies an I/O resource on the cloned virtual machine. This option can be specified more than once. Integrity VM recognizes the following types of guest virtual devices: • Virtual disks, which can be backed by files in a VM Host file system, by logical volumes or by whole disks. • Virtual DVDs, which can be backed by files in a VM Host file system or by the physical DVD drive. • Virtual network switches (vswitches), which are created using the hpvmnet(1M) command and backed by physical LAN cards. For more information about vswitches, see the hpvmnet manpage. For information about specifying storage and network resources for guests, see hpvmresources(5). 200 -b rsrc Specifies the boot device for the cloned virtual machine. To specify the rsrc parameter to the -b, option, you must specify the virtual device hardware address. The virtual device hardware address specifies the address of the boot disk being cloned from. The physical device specifies the boot disk being cloned to. For more information about specifying storage and network resources for guests, see hpvmresources(5). -F Ignores all virtual machine configuration warnings, including oversubscribing of resources (Force mode). This option is primarily intended for use by scripts and other noninteractive applications. -c number_vcpus Specifies the number of virtual CPUs visible to the new virtual machine. If unspecified, the number defaults to that of the existing virtual machine. -r amount Specifies the amount of memory available to the new virtual machine at boot time. The sizes are expressed as integers, optionally followed by one of these units: • M (megabytes) • G (gigabytes) If the letter is left off, the unit type defaults to megabytes. If the -r option is omitted, the amount of memory is that of the existing virtual machine. -S Specifies that the cloned guest must share the same virtual LAN (VLAN) ports as the source guest. By default, the hpvmclone command allocates VLAN ports that are different from those allocated to the guest that is the source of the clone operation. [-g [+]group { :admin| oper} Specifies group authorization. Use the -g [+]group:{admin | oper}syntax to add a group, where + is optional. When adding a group authorization, the default authorization type is oper. To remove a group authorization, specify the -g -group syntax. This option can be specified more than once. [-u [+]username{:admin | oper}] Specifies user authorization. Remove user authorization by using the -u user syntax. The virtual machine user account specified here can use the hpvmconsole command to manage the virtual machine. Add user authorization using the -u [+]user{:admin |oper } syntax, where + is optional. When adding a group authorization, the default authorization type is oper. -s Verifies the new virtual machine configuration and returns warnings or errors but does not create the virtual machine. 201 -x Specifies whether the new virtual machine uses dynamic memory and the values associated with it by including the following keywords: • -x dynamic_memory_control={0|1} • -x ram_dyn_type={none|any|driver} • -x ram_dyn_min=amount • -x ram_dyn_max=amount • -x ram_dyn_target_start=amount • -x mac_address={new|same} • -x serial_number={new|same} • -x sched_preference={none|cell|ilm} where: — none — The default preference. If your application is predominantly CPU bound, specifying either ilm or cell will perform the same. — cell — The cell with the most CPU and memory space is chosen. When that guest is active, the scheduler then optimizes where the guest runs, so that it can be closest to its memory. — ilm — Indicates that guests that are larger than any single cell and contain highly threaded applications. • -x graceful_stop_timeout={0|amount} To specify the MAC address of the new virtual machine, enter the following: -x mac_address={new|same} To specify the serial number of the new virtual machine, enter the following: -x serial_number={new|same} RETURN VALUES The hpvmclone command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmclone command displays error messages on stderr 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. • One or more options other than -a, -m, -d, -g, or -u have been specified more than once. • The clone_vm_name attribute already exists. • The vm_name or vm_number attribute does not exist, cannot be accessed, is not a virtual machine, or is corrupt. • The hpvmclone command and Integrity VM are at different revision levels. • The same resource was allocated more than once. • A resource allocated to another virtual machine was specified, and the force flag (-F) was not used. 202 EXAMPLES Clone the virtual machine named host2, to create a new virtual machine named host5. # hpvmclone -P host2 -N host5 Following are sample warning messages returned when hpvmclone is executed with various configuration problems on the guest host5: HPVM guest host5 configuration problems: Warning 1: Guest needs more vcpus than server supports. Warning 2: Insufficient free memory for guest. Warning 3: Insufficient swap resource for guest. Warning 4: Insufficient cpu resource for guest. Warning 5 on item /dev/rdisk/disk0: Device file '/dev/rdsk/disk0' in use by another guest. Warning 6 on item /dev/vg00/rswap: Device file '/dev/vg00/rswap' in use by server. Warning 7 on item /dev/rdisk/disk3 backing device does not exist. Warning 8 on item /dev/rdisk/disk4: Device file '/dev/rdisk/disk4' in use by another guest. Warning 9 on item hostnet: MAC address in use for switch hostnet. Warning 10 on item offnet: Vswitch offnet is not active. Warning 11 on item badnet: 'badnet' backing device does not exist. These problems will prevent HPVM guest host5 from booting. The following example shows how to use the hpvmclone command to create a guest named vmclone1 that uses the same ports as the existing guest (vm1). The hpvmnet command shows that two guests are sharing ports 1 and 2 on the virtual switch vmlan4. Only the active virtual machine (vm1) can use the port. # hpvmclone -P vm1 -N vmclone1 -S # hpvmnet -S vmlan4 Name Number State Mode PPA MAC Address IP Address ======== ====== ======= ========= ====== ============== =============== vmlan4 2 Up Shared lan4 0x00127942fce3 192.1.2.205 [Port Configuration Details] Port Port Port Untagged Number of Active VM Number state Adaptor VLANID Reserved VMs ======= ============ ======== ============ ============ 1 Active lan none 2 vm1 2 Active lan 100 2 vm1 3 Active avio_lan none 1 vm2 4 Active lan 100 1 vm2 The following example shows how to use the hpvmclone command to create a new Linux guest named linux2 based on the existing guest named linux1. The boot disk is specified. # hpvmclone -P linux1 -N linux2 -b disk:scsi::0,0,0:disk:/dev/rdisk/disk100 Be sure that the backing devices are the same, The copy of data succeeds but the new virtual machine fails to boot if the backing devices are different. For example, if the source virtual machine boots from an lvol, and you boot the cloned virtual machine from a disk, it fails. AUTHORS The hpvmclone command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(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) 203 hpvmcollect(1M) NAME hpvmcollect -- Collects crash dumps, logs, system status, and configuration on the VM Host and guests for post-mortem analysis. SYNOPSIS On the VM Host: hpvmcollect { -P vm-name | -p vm-number } [-f] [-g] [-h] [-b bug-report-number] [-d directory] [-c [-n #]] [-l | -s hostname [-r directory]] On the Guest: hpvmcollect [-f] [-h] [-b bug-report-number] [-d directory] [-c [-n #]] [-l | -s hostname [-r directory]] DESCRIPTION The hpvmcollect command collects log files, system status, device information, system and Integrity Virtual Machines configuration, guest information, and crash dumps. When run on a VM Host, this command collects systemwide information as well as information for a specified guest. In this case, you can specify a guest using the virtual machine name or the virtual machine number. When run in a guest, the hpvmcollect command collects information associated only with the guest. The hpvmcollect command creates a directory and produces a tar archive or a compressed tar archive containing the collected information and places it in your current directory. By default, the archive name is constructed by appending a timestamp to the guest name. Only superusers can execute the hpvmcollect command. Options The following options can be specified only once. The hpvmcollect command recognizes the following command-line options and arguments: -b bug-report-number Overrides the default archive name with bug-report-number plus the specified label. If an archive with the same name exists, it is renamed by appending a timestamp to the original name before the new archive is created. Valid on both the VM Host and the guest. -c Includes the latest crash dump directory in the archive. This option is used if the guest or the VM Host crashes or hangs. Valid on both the VM Host and the guest. -d directory Specifies a target directory in which to create the hpvmcollect_archive directory. Valid on both the VM Host and the guest. -f Forces an archive to be overwritten, if it exists, rather than renamed with an appended timestamp. Valid on both the VM Host and the guest. -g Cleans up a guest debug memory dump directory after a memory dump has been collected into the hpvmcollect archive. Valid on the VM Host only. -n # Specifies the number of crash dumps to copy to the archive. Valid on both the VM Host and the guest. By default, the 204 hpvmcollect command copies the latest crash dump directory (based on the bounds file). This option can be used only with the -c option. -l Leaves the collected information in the directory rather than an archiving it. Valid on both the VM Host and the guest. The -l option and the -s option are mutually exclusive. -s hostname Specifies a host name to receive the archive, which is copied using scp. Verify that you can login to the host without a password. Valid on both the VM Host and the guest. Note that the -l option and the -s option are mutually exclusive. -h Displays the help message. Valid on both the VM Host and the guest. -P vm_name Specifies the unique name of the virtual machine to be archived. Valid on the VM Host only. The -P and -p options are mutually exclusive. -p vm_number Specifies the unique number of the virtual machine to be archived. The vm_number is displayed by the hpvmstatus command. Valid on the VM Host only. The -P and -p options are mutually exclusive. -r directory Specifies a remote target directory in which to store the collected archive, overriding the default of /crashes. Valid on both the VM Host and the guest. The -r option is valid only with the -s option. RETURN VALUES The hpvmcollect command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmcollect command displays the status of each collection line by line: • OK: The item collection was successful. NO: The option was not used to collect the item. N/A: hpvmcollect was supposed to collect the item but failed. Possible reasons include: The command is not available (for example, it may not be in $PATH). The command exited with an error; thus, there was no collection. The condition that triggers the log file generation did not occur. EXAMPLES On a VM Host, collect VM Host and guest myguest information: # hpvmcollect -P myguest HPVM host crash/log collection tool version 3.0 Gathering info for post-mortem analysis of guest 'myguest' on host Copying host's device database ...................................... N/A Collecting I/O configuration info ................................... OK Collecting filesystem info .......................................... OK Collecting system info .............................................. OK Collecting lan info ................................................. OK Running lanshow ..................................................... NO 205 Collecting installed sw info ........................................ OK Collecting command logs ............................................. OK Collecting messages from vmm ........................................ OK Collecting lv info .................................................. N/A Collecting vgdisplay info ........................................... OK Collecting vxprint info ............................................. OK Collecting disk info ................................................ OK Collecting passthru disk info ....................................... N/A Collecting file backing store info .................................. OK Copying guest's log file ............................................ OK Copying guest's tombstone file ...................................... N/A Copying guest's console log file .................................... OK Copying hpvm configuration .......................................... OK Copying hpvm control script ......................................... OK Copying guest's config file ......................................... OK Getting status of the guest ......................................... OK Getting detailed status of the guest ................................ OK Getting guest's entitlement ......................................... OK Copying guest's config file change log .............................. OK Copying guest VM crash image ........................................ N/A Copying VMM image ................................................... OK Copying hpvmdvr image ............................................... OK Copying hpvmntdvr image ............................................. OK Copying NVRAM image ................................................. OK Collecting IPMI logs ................................................ OK Copying guest debug memory file ..................................... N/A Garbage collect guest debug memory files ............................ N/A Collecting crash dump ............................................... NO Running crashinfo ................................................... NO Collecting tombstone ................................................ NO Collecting system message buffer .................................... OK Collecting system syslogs ........................................... OK Collecting measureware logs ......................................... OK Finished with the collection Tar archiving and compressing ....................................... TGZ Remote copying the archive ......................................... NO The collection is "/tmp/sornson/hpvmcollect_archive/myguest_Dec.08.06_171639EST.tar.gz" On the VM Host, include crash dump 23 and write the archive directory in /tmp: # hpvmcollect -d /tmp -c -n 23 -P myguest On the VM Host, leave collected information in an archive directory rather than creating the tar archive: # hpvmcollect -P myguest -l On the guest, collect guest information along with the latest guest crash dump: # hpvmcollect -c HPVM guest crash/log collection tool version 3.0 Gathering info for post-mortem analysis on guest (hostname 'guest1') Copying host's device database ...................................... N/A Collecting I/O configuration info ................................... OK Collecting filesystem info .......................................... OK Collecting system info .............................................. OK Collecting lan info ................................................. OK Running lanshow ..................................................... NO Collecting installed sw info ........................................ OK Collecting crash dump ............................................... NO Running crashinfo ................................................... NO Collecting tombstone ................................................ NO Collecting system message buffer .................................... OK 206 Collecting system syslogs ........................................... OK Collecting measureware logs ......................................... N/A Finished with the collection Tar archiving and compressing ....................................... TGZ Remote copying the archive ......................................... NO The collection is "//hpvmcollect_archive/guest1_Jan.10.07_182804EST.tar.gz" AUTHORS The hpvmcollect command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(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: hpvmmgmt(1M), hpvminfo(1M), hpvmpubapi(3) 207 hpvmconsole(1M) NAME hpvmconsole -- Connect to the console of a virtual machine. SYNOPSIS hpvmconsole { -P vm-name | -p vm-number } [-c command] [-e echar] [-f] [-i] [-q] DESCRIPTION An Integrity VM virtual machine console is similar in appearance to the maintenance processor of an Integrity system. Each virtual machine has its own virtual console from which you can manage the virtual machine and the guest operating system. The hpvmconsole command connects to the virtual console of a specified virtual machine. If you have logged into the physical console of a VM Host and then run hpvmconsole interactively. To return to the physical console, press Ctrl/B. To return to the virtual console main menu, press Ctrl/X. Options The hpvmconsole command recognizes the following standard Integrity VM options and attributes: -P vm-name Specifies the name of the virtual machine to be booted. You can specify either the -P or the -p option, but not both. -p vm-number Specifies the number of the virtual machine to be booted. The vm-number is displayed by the hpvmstatus command. You can specify either the -P or the -p option, but not both. -c command Provides a console command to be performed before reading from standard input. The -c option is provided for scripting and logging purposes. You can enter multiple -c options; they are processed from left to right. In this mode, you cannot use Ctrl/B to get back to command mode. This mode is primarily useful in combination with the -f option to enter console mode and watch the OS console output. Even so, the console commands so given will assume a trailing -nc option, if they support one, to prevent the reading of standard input unless the -i option is also specified. -e echar Overrides the standard Ctrl/B escape (or attention) character. The character can be given as a literal control character, or as a caret (^) followed by another character. -f Continues following the console output after reaching EOF on standard input. (This option exists for scripting and logging purposes.) -i Interacts with the console (reads from standard input), despite the use of the -c and -f options. -q Makes scripted operations less verbose. RETURN VALUES The hpvmconsole command exits with one of the following values: 0: Successful program execution. 1: Invalid option or invalid argument to an option (usage error). 208 2: All other program failures (operational error). DIAGNOSTICS The hpvmconsole command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • The hpvmconsole command and Integrity VM are at different revision levels. • An operational error occurred. EXAMPLES To use the console interactively: # hpvmconsole -p guestname To collect the guest console log in the correct order: # hpvmconsole -P "$GUEST" -q -c cl > $GUEST.conslog Similarly, to collect the guest operation log: # hpvmconsole -P "$GUEST" -q -c 'rec -view' > $GUEST.applog To override the default attention character (Ctrl/B) and use Ctrl/t instead: # hpvmconsole -e ^t -P guestname AUTHORS The hpvmconsole command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmcreate(1M), hpvmdevmgmt(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) 209 hpvmcreate(1M) NAME hpvmcreate -- Create a new Integrity VM virtual machine. SYNOPSIS hpvmcreate -P vm-name [ -F | -s ] [-l vm-label] [-B start-attr] [-O os-type [:version]] [-c number-vcpus ] [ -e percent[:max_percent] | -E cycles[:max_cycles] ] [-r amount] [-g group [ {:admin |oper}]] [-u user[ {:admin |oper}]] [-a rsrc] [-i { SG | SG-pkgname | GWLM | SG-pkgname , GWLM | NONE }] [-j { 0 | 1 }] [[-x name=value [:name=value]]] DESCRIPTION The hpvmcreate command creates a new virtual machine (a guest) and assigns the specified attributes and resources to it. This command creates an association between the virtual devices seen by the guest and the physical devices managed by the VM Host. Only superusers can execute the hpvmcreate command. Virtual machine creation is designed for flexibility and assumes that not all created virtual machines are necessarily running at the same time or on the current VM Host. Therefore, the hpvmcreate command allows the creation of virtual machines that cannot boot on the current system. A guest configuration receives a warning at creation and an error at start time for any issues that might prevent it from starting on the current VM Host. To verify a particular configuration for the current VM Host without actually creating the guest, use the -s option. Options -P vm-name Specifies the name of the virtual machine. This name must be unique on the VM Host. This virtual machine name is used in other Integrity VM commands to specify which virtual machine the command affects. If you plan to allow remote access to the virtual machine's console, the virtual machine name must be a legal UNIX account name. The name can consist of up to 256 alphanumeric characters including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). The virtual machine name cannot start with a dash (—). The -P option is required. -e percent[:max_percent] Specifies the percentage of CPU resources to which each of the guest's virtual CPUs is entitled. During peak system CPU load, the entitlement is the guaranteed minimum allocation of CPU resources for this virtual machine. The percent can be set to an integral value between 0 and 100. If the value specified is less than 5, then the virtual machine is allocated the minimum percentage of 5%. The default entitlement is 10%. The maximum entitlement may not exceed 100 percent, and may not be less than the minimum. Each group has a default maximum setting of 100 percent. You can view the current settings by using the hpvmstatus -r command. In addition to the guest calculation, Integrity VM reserves processing power for essential system functions like logging, networking, and file system daemons. The -e and -E options are mutually exclusive. 210 -E cycles[:max_cycles] Specifies the virtual machine's CPU entitlement in CPU cycles. The cycles are expressed as an integer, followed by one of these units: • M (megahertz) • G (gigahertz) If no letter is specified, the default unit is megahertz. The -e and -E options are mutually exclusive. -F Suppresses all resource conflict checks and associated warning messages (force mode). This option is primarily intended for use by scripts and other noninteractive applications. Note that you will receive no notification of potential resource problems for a virtual machine created with the -F option. The -F and -s options are mutually exclusive. -a Specifies the mapping of a guest virtual device to a VM Host backing store. A virtual device is instantiated on physical entities that are managed by the VM Host. These physical entities (for example, network cards, files, logical volumes, and so forth) are collectively referred to as "backing stores." Integrity VM recognizes the following types of guest virtual devices: • Virtual DVDs, which can be backed by filess in a VM Host file system or by physical DVD drives. • Virtual disks, which can be backed by files in a VM Host file system, by logical volumes or by whole disks. • Attached I/O devices (DVD, tape, media changer, and other peripheral device types). • Virtual network devices, which are created using the hpvmnet command and backed by physical LAN cards. See the hpvmnet manpage for more information about virtual network devices. For information about specifying storage and network resources for guests, see hpvmresources(5). -i package-name Specifies whether the virtual machine is managed by Serviceguard or gWLM (or both). For the argument, specify the Serviceguard package name, GWLM, both, or NONE. This option is used by Integrity VM software; do not use this option without express instruction by HP. -j {0|1} Specifies whether the virtual machine is a distributed guest (that is, managed by Serviceguard and can be failed over to another cluster member). This option is used by Integrity VM software; do not use this option without express instruction by HP. -l vm-label Specifies a descriptive label for this virtual machine. This can be useful in identifying a specific virtual machine in the hpvmstatus -V display. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the 211 dash (—), the underscore (_), and the period (.). If white space is desired, the label must be quoted (""). -B start-attr Specifies the startup behavior of the virtual machine. The start_attr attribute can have the following (case-insensitive) values: • auto: Automatically start the virtual machine when Integrity VM is initialized on the host. • manual: Manually start the virtual machine. If the start-attr attribute is set to auto, the virtual machine is started when Integrity VM is initialized. This occurs when the VM Host system is booted, and when the Integrity VM software is stopped and restarted on a running VM Host. For example, when you upgrade Integrity VM to a new version on a running system, the software is started automatically. The VM Host attempts to start all virtual machines for which the attribute is set to auto. If insufficient resources exist, some virtual machines may fail to start. If the attribute is set to manual, the virtual machine will not be started automatically when Integrity VM is initialized on the VM Host. This is the default behavior. The virtual machine can then be started manually with the hpvmstart command or through its virtual console. This option does not set the virtual machine's console to enable booting when the virtual machine is started. This function must be set with the virtual machine's console. -O os-type[:version] Specifies the type and version of the operating system running on the virtual machine. The response will affect the default selection of certain virtual machine attributes, such as amount of memory and CPU power. The os_type is one of the following: HPUX, WINDOWS, or LINUX. This parameter is not case-sensitive. The version is specific to the operating system type. The version specifies a descriptive text string of the version of the operating system. The version string can consist of up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). If white space is desired then version must be quoted. -c number-vcpus Specifies the number of virtual CPUs this virtual machine sees at boot time. If unspecified, the number defaults to one. The maximum number of virtual CPUs that can be allocated to a guest is eight. -r amount Specifies the amount of memory available to this virtual machine. The size is expressed as an integer, optionally followed by one of these units: • M (megabytes) • G (gigabytes) 212 If unspecified, the unit defaults to megabytes. If the -r option is omitted, the size defaults to 2 GB. -g group[:{admin | oper}] Specifies the group authorization. A VM Host user account that is a member of this group can use the hpvmconsole command to manage this guest. The group attribute specifies the name of the group. The argument specifies the privilege level available at the virtual console: either admin or oper (the default). This option can be specified more than once. -u user[:{admin | oper}] Specifies the user authorization. A VM Host user account specified here can use the hpvmconsole command to manage this guest.The user attribute specifies the user name. The argument specifies the privilege level available at the virtual console: either admin or oper (the default). This option can be specified more than once. -s Verifies the virtual machine configuration and returns warnings or errors but does not create the virtual machine. This option is used to start the hpvmcreate command's resource checking for a virtual machine configuration without actually creating the virtual machine. If the -s option is not specified, the virtual machine is created even if resource warnings occur. The -F and -s options are mutually exclusive. -x Specifies whether the new virtual machine uses dynamic memory and the values associated with it by including the following keywords: • -x dynamic_memory_control={0|1} • -x ram_dyn_type={none|any|driver} • -x ram_dyn_min=amount • -x ram_dyn_max=amount • -x ram_dyn_target_start=amount • -x sched_preference={none|cell|ilm} where: — none — The default preference. If your application is predominantly CPU bound, specifying either ilm or cell will perform the same. — cell — The cell with the most CPU and memory space is chosen. When that guest is active, the scheduler then optimizes where the guest runs, so that it can be closest to its memory. — ilm — Indicates that guests that are larger than any single cell and contain highly threaded applications. • -x graceful_stop_timeout={0 | number} Specifies the amount of time in seconds to allow a graceful stop when hpvmstop —g is specified. The default is 30 seconds. 213 NOTE: If the graceful stop does not finish within the time frame specified, a hard stop is then executed. This parameter does not apply to Windows guests. RETURN VALUES The hpvmcreate command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmcreate displays error messages on stderr for any of the following conditions: • An invalid option is specified. • An invalid value is specified for an option or a value is omitted. • The specified vm-name already exists. Use the hpvmmodify command to modify an existing guest. • One or more options other than -a, -g or -u were specified more than once or the same resource was allocated more than once. • An unavailable resource (allocated to another virtual machine, or exceeding the available resource limit) was specified. • A value was omitted for an argument that requires one, or a value was supplied for an argument that does not take one. • The hpvmcreate command and the Integrity VM software are at different version levels. EXAMPLES The following example creates a virtual machine named myguest1, specifying 4 virtual CPUs, and 2 GB of memory, and /dev/rdisk/disk0 as a SCSI disk device: # hpvmcreate -P myguest1 -c 4 -r 2G -a disk:scsi::disk:/dev/rdisk/disk0 The following example creates a virtual machine named myguest2, specifying 2 virtual CPUs and a virtual switch named vswitch1. Each virtual CPU has a 50% entitlement. # hpvmcreate -P myguest2 -c 2 -e 50 -a disk:scsi::disk:/dev/rdisk/disk0 \ -a network:avio_lan::vswitch:vswitch1 The following example creates a virtual machine named cougar with 2 virtual CPUs, 2 GB memory, a virtual disk backed by a whole disk, a virtual disk backed by a partition, a virtual disk backed by an LVM volume, a virtual DVD backed by an ISO file, a virtual network interface backed by virtual switch localnet, and an accelerated virtual network interface backed by virtual switch hostnet: # hpvmcreate -P cougar -c 2 -r 2G \ -a disk:scsi::disk:/dev/rdisk/disk0 \ -a disk:scsi::disk:/dev/rdisk/disk1 \ -a disk:scsi::lv:/dev/vg00/rguestvol1 \ -a dvd:scsi::file:/var/opt/hpvm/ISO-images/hpux/1123505GOLD.ISO \ -a network:lan::vswitch:localnet \ -a network:avio_lan::vswitch:hostnet The following are sample warning messages that are returned when the hpvmcreate command is executed with various configuration problems on the guest myguest3: HPVM guest myguest3 configuration problems: Warning 1: Guest needs more vcpus than server supports. Warning 2: Insufficient free memory for guest. Warning 3: Insufficient swap resource for guest. Warning 4: Insufficient cpu resource for guest. Warning 5 on item /dev/rdisk/disk0: Device file '/dev/rdisk/disk0' in use by another guest. 214 Warning 6 on item /dev/vg00/rswap: Device file '/dev/vg00/rswap' in use by server. Warning 7 on item /dev/rdisk/disk3 backing device does not exist. Warning 8 on item /dev/rdisk/disk3: Device file '/dev/rdisk/disk3' in use by another guest. Warning 9 on item hostnet: MAC address in use for switch hostnet. Warning 10 on item offnet: Vswitch offnet is not active. Warning 11 on item badnet: 'badnet' backing device does not exist. These problems will prevent HPVM guest myguest3 from booting. The following example shows how to create the guest myguest1 and specify dynamic memory control. # hpvmcreate -P myguest1 -c 4 -r 2G -a disk:scsi::disk:/dev/rdisk/disk0 -x dynamic_memory_control=1 The following example creates a guest named testguest with a 100 Mhz minimum and a cap of 250 Mhz. # hpvmcreate -P testguest -E 100:250 AUTHORS The hpvmcreate command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmdevmgmt(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) 215 hpvmdevmgmt(1M) 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 -d gdev_alias:/dev/rdisk/disknn 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: 216 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 217 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 218 -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 • Delete one alias if a device has multiple aliases defined. -d gdev_alias:/dev/rdisk/disknn The following limitations apply: — Valid to delete only guest device aliases. — More than one alias must be defined, so that the alias delete does not attempt to delete the only alias. If there is only one alias, use the following command to delete the entire entry: # hpvmdevmgmt -d gdev:/device — The alias must not be in used by any guest. If the alias to be deleted is in use by a guest, you must remove the dependency with the following command: 219 # hpvmmodify -P guest -d Note that the aliases for the device can be used by any guest. 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: 220 # 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) 221 hpvmdevtranslate(1M) NAME hpvmdevtranslate -- Translate Integrity VM guest devices into HP-UX 11i v3 agile devices. SYNOPSIS hpvmdevtranslate [-v] -a hpvm_mgmtdb hpvmdevtranslate [-v] -a hpvmdevtranslate [-v] -P guestname hpvmdevtranslate [-v] -u hpvmdevtranslate [-v] DESCRIPTION The primary purpose of this program is to help Integrity VM administrators upgrade an Integrity VM host from HP-UX 11i v2 to HP-UX 11i v3. This program produces a script, /var/opt/hpvm/ common/hpvm_dev_convert, which can be executed to convert existing guest devices into 11i v3 agile devices. This program is most useful if the upgrade from 11i v2 to 11i v3 was accomplished using a cold-install of 11i v3, rather than update-ux. The cold-install can map storage devices to different device names, which prevents guests from running. The cold-install changes legacy device names to agile device names, and that is why you need to run this script if you do a cold-install. Use this program to change the guest backing storage devices to the new 11i v3 agile devices by following these steps: 1. Back up the /var/opt/hpvm directory from your 11i v2 system. 2. Shut down the 11i v2 system. 3. Cold-install 11i v3. 4. Install Integrity VM Version 4.1, if it is not already installed by the OE. 5. Stop Integrity VM with the following command /sbin/init.d/hpvm stop. 6. Remove /var/opt/hpvm/common/hpvm_mgmtdb_pre1131 if it exists at this time. A new hpvm_mgmtdb_pre1131 file is created when Integrity VM is started in step 8. 7. Recover or restore the 11i v2 /var/opt/hpvm contents. 8. Start Integrity VM with the following command: /sbin/init.d/hpvm start. 9. Run the following command: # hpvmdevtranslate -a /var/opt/hpvm/common/hpvm_mgmtdb_pre1131 10. Edit the script, /var/opt/hpvm/common/hpvm_dev_convert, taking note of ERROR lines and commenting out the exit line that prevents the running of the script. 11. Continue with the remaining 11i v3 Integrity VM Host configuration until the host is functionally equivalent to the former 11i v2 VM Host. You can use the hpvmdevtranslate command to convert all existing guests or a single guest to use the 11i v3 agile devices. For example, to convert all existing guests, use the following: # /opt/hpvm/bin/hpvmdevtranslate -a To convert a single guest, use the following command: # hpvmdevtranslate -P guestname You can use the hpvmdevtranslate command to undo the previous translation if the translation is not more than five days old. The undo operation is run with the following command: # hpvmdevtranslate -u Options The following options can be specified only once. 222 The hpvmdevtranslate command recognizes the following command-line options and arguments: -v Displays the version number of the hpvmdevtranslate command. The version number is displayed first, followed by the information specified by the other options. -a Translates all existing guests. If an hpvm_mgmtdb file is specified, the translation uses this file. -P guestname Translates the specific guest. -u If the translation is not more than five days old, the -u option, performs and undo operation. RETURN VALUES The hpvmdevtranslate command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. NOTE: An error exit occurs only if the program was unable to complete its processing. However, if the program finds guest devices that cannot be translated, the output script will have comment lines indicating the error with “ERROR:” DIAGNOSTICS The hpvmdevtranslate command displays error messages for any of the following conditions: A legacy device has no agile device translation. EXAMPLES The following example lists the version of the hpvmdevtranslate command: # hpvmdevtranslate -v The following example translates the devices using an 11i v2 hpvm_mgmtdb file: # hpvmdevtranslate [-v] -a /var/opt/hpvm/common/hpvm_mgmtdb_pre1131 The following example translates all existing guests: # hpvmdevtranslate [-v] -a The following example translates a specific guest: # hpvmdevtranslate [-v] -P guestname The following examples performs an undo operation if the translation is not older than 5 days: # hpvmdevtranslate [-v] -u AUTHORS The hpvmdevtranslate command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(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) 223 hpvmhostrdev(1M) NAME hpvmhostrdev -- Manages virtual machine access to devices used by the Integrity VM Host system. SYNOPSIS hpvmhostrdev [-D | -E | -d | -h | -r | -u] DESCRIPTION The hpvmhostrdev command manages virtual machine access to devices — disks and volumes — used by the VM host system. The Integrity VM device-management database (hpvmdevmgmt (1M) provides the capability to restrict virtual machine access to devices used by the VM Host. The hpvmhostrdev command can automatically identify storage used by the VM Host physical system and restrict that storage from being used by virtual machines. This identification is consistent with that of system management tools such as the HP System Management Homepage (HP SMH) and the HP System Administration Manager (HP SAM). When executed without any options or with the -u option, the hpvmhostrdev command operates as follows: • Any devices previously identified and restricted by the hpvmhostrdev command are removed from the Integrity VM device database if they are no longer used by the VM Host system. Subsequently, such devices become available for use by virtual machines. All device currently used by the VM Host system are identified and restricted by the hpvmhostrdev command. • To restrict a device from use by virtual machines, hpvmhostrdev inserts an entry for that device into the Integrity VM device database as a restricted device with the attribute AUTODEV set to YES (see the hpvmdevmgmt (1M) command). • By default, hpvmhostrdev -u is executed during startup of the Integrity VM software. This startup execution can be enabled or disabled with the -E or -D options, respectively. • Execution of the hpvmhostrdev command without any option causes the VM Host system to rescan its storage devices and might take some time to execute. NOTE: Do not use the -u option immediately after hardware has been added online (that is, without rebooting the VM Host system to add the hardware). • The hpvmhostrdev command restricts only the user of disks and logical volumes used by the VM Host system for its swap space, file systems, or (in the case of disks), logical volume groups. Any unused devices are ignored (that is, not restricted) by hpvmhostrdev. • When hpvmhostrdev is executed with the -u, the -d, or without any options, it creaets a backup copy of the Integrity VM Host device database. This copy can be recovered using the -r option. NOTE: Only a superuser may execute the hpvmhostrdev command. Options The hpvmhostrdev command recognizes the following command-line options: -D Disables execution of hpvmhostrdev during startup of the Integrity VM software. Subsequent startup of the Integrity VM system (that is, /sbin/init.d/hpvm start), does not automatically identify, update, and restrict use of the VM Host system's storage devices. Note that this option does not remove restricted device entries form the Integrity VM device database. 224 -E Enables automatic execution of hpvmhostrdev during startup of the Integrity VM software. Subsequent startup of the Integrity VM system (that is, /sbin/init.d/hpvm start), automatically identifies, updates, and restricts use of the VM Host system's storage devices. Note that execution of hpvmhostrdev -E does not — by itself — add restricted device entries to the Integrity VM device database. -d Removes restricted device entries from the Integrity VM device database that were previously added by execution of the hpvmhostrdev command. Such devices are no longer restricted from use by virtual machines. NOTE: Any devices explicitly restricted through use of the hpvmdevmgmt -a rdev command are not removed by execution of the hpvmhostrdev command. -h Displays a brief overview of the hpvmhostrdev command. -r Restores the Integrity VM device database to the state previous to the last execution of the hpvmhostrdev command without any options or executed with the -u or -d options. -u Prevents the rescan and update of the VM Host system's I/O system. Do not use this option immediately after I/O devices are added to the VM Host system online without a reboot. This option provides the best performance. RETURN VALUES The hpvmhostrdev command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmhostrdev command displays error messages for any of the following conditions: An invalid option is specified. Multiple options are specified simultaneously. EXTERNAL INFLUENCES hpvmdevmgmt (1M) The hpvmhostrdev command attaches a special attribute, AUTORDEV, to the entries it makes in the Integrity VM device database. Do not use the hpvmdevmgmt command to add or modify the AUTORDEV attribute of a restricted device entry in the device database. This might cause unexpected results, such as the entry being inadvertently removed or undisturbed by hpvmhostrdev. EXAMPLES The following example disables execution of hpvmhostrdev (and restriction of VM Host storage devices from use by virtual machines) at startup of the Integrity VM system. # hpvmhostrdev -D The following example removes all restricted devices added by previous execution of the hpvmhostrdev command: # hpvmdevrdev -d AUTHORS The hpvmhostrdev command was developed by HP. SEE ALSO On the VM Host: 225 hpvm(5), hpvmclone(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmresources(5), hpvmsar(1M), hpvmstart(1M), hpvmstatus(1M), hpvmstop(1M) On the Integrity VM guest: hpvmcollect(1M), hpvmmgmt(1M), hpvmpubapi(3) 226 hpvminfo(1M) NAME hpvminfo -- Display information about the Integrity VM environment. SYNOPSIS hpvminfo [ -V | -M | -X ] [ -v | -S ] DESCRIPTION Allows you to determine whether you are running in a guest or on the VM Host. When run in a guest, this command returns information to identify the VM Host as well as the guest. Information can be presented in several formats. The -M option displays in a machine-readable format, while the -X option displays in the XML format. Only superusers can execute the hpvminfo command. Options The following options can be specified only once. The hpvminfo command recognizes the following command-line options and arguments: -v Displays the version number of the hpvminfo command. The version number is displayed first, followed by the information specified by other options. -V Displays detailed information about the VM Host and guests (verbose mode). For whole disks used by guests, the SCSI timeout information is displayed. The -V, -M, and -X options are mutually exclusive. -M Displays verbose information in a machine-readable format. Individual fields are separated by one of three delimiters: • The colon (:) separates each field and resource type. • The semicolon (;) separates subfields of a resource type. • The comma (,) separates individual items in a list of similar items. The -V, -M, and -X options are mutually exclusive. -X Displays verbose information in the XML format. The -V, -M, and -X options are mutually exclusive. -S Displays all information accessible through the supported interfaces defined in hpvm_api_public.h. RETURN VALUES The hpvminfo command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvminfo command displays error messages on stderr for any of the following conditions: An invalid option is specified. The hpvminfo command and Integrity VM are at different revision levels. EXAMPLES The following example demonstrates the command running on the VM Host. 227 # hpvminfo hpvminfo: Running on an HPVM host. The following example demonstrates the command running inside a guest. # hpvminfo hpvminfo: Running inside an HPVM guest. The following example shows detailed information about the VM Host from within a guest. # hpvminfo -V hpvminfo: Running inside an HPVM guest. Configured guest name: vm0512 Host chassis information Host model string : ia64 hp server rx5670 Host serial number : USR4319L4J Host partition ident : a7d6d186-9f74-11d7-867a-636e2282571a Host machine ident : a7d6d186-9f74-11d7-867a-636e2282571a Host physical serial number : USE4346Y5T Host physical ident : a7d6d186-9f74-11d7-867a-636e2282571a Host Inet information Hostname : rake Number of host IPv6 Addresses : 0 Number of host IPv4 Addresses : 1 IP Address : 1.2.3.4 Host SCSI information Timeout : 40000 AUTHORS The hpvminfo command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(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), hpvmmgmt(1M), hpvmpubapi(3) 228 hpvmmigrate(1M) NAME hpvmmigrate -- Migrate an active guest or an offline virtual machine to a specified VM Host. SYNOPSIS hpvmmigrate { -P vm-name | -p vm-number } -h target-host-alias-or-IP-addr [-l new-vm-label ] [-N new-vm-name] [-D] [-n] [-s] [-F] [-q] [ -e percent [:max_percent] | -E cycles[:max_cycles] ] [-c number-vcpus ] [-r amount] [-m storage-resource [-C] [-t]]... [-T] [-b] [-d] hpvmmigrate -o { -P vm-name | -p vm-number } -h target-host-alias-or-IP-addr [-l new-vm-label ] [-N new-vm-name] [-D] [-n] [-s] [-F] [-q] [-Q] [-w] hpvmmigrate -o -s -h target-host-alias-or-IP-addr hpvmmigrate -k { -P vm-name | -p vm-number } -h target-host-alias-or-IP-addr hpvmmigrate -A { -P vm-name | -p vm-number } hpvmmigrate -v hpvmmigrate -H DESCRIPTION The hpvmmigrate command moves an online guest or an offline virtual machine from a source VM Host to a specified target VM Host. Virtual machine can be migrated while OFF, and active guests can be migrated while ON and running. Use the -o option to migrate running guests online, which involves moving the virtual machine, memory and active state for a running guest. To move a guest from a source VM Host to a target VM Host, both hosts must be configured to allow common access to all of the required resources of the migrating guest. The guest can be either a non-running virtual machine, offline migration, or a running guest, online migration. Online migration enables a running guest and its applications to be moved from one VM Host to another without service interruption. SAN storage is assumed for Online VM Migration. The resources that are defined in the virtual machine's configuration are checked to determine whether the migrated guest can boot on the target VM Host. If there is a problem, it is reported, and the guest is not migrated. You can specify the -F option (force) to suppress the errors and force the guest migration to the target VM Host. CAUTION: Use the -F option with caution, because some errors can prevent a virtual machine from working properly on the target VM Host. Only superusers can execute the hpvmmigrate command. In addition, the migration of a guest is controlled by a set of secure remote operations that must be enabled on both systems. SSH security must be set up so that root can use the equivalent of the ssh and scp commands between the source and the target VM Hosts without requiring passwords. The easiest way to do this is to use the secsetup script provided by Integrity VM. Otherwise, see the HP-UX ssh-keygen command. If you specify the -D option, the virtual machine is deleted from the source VM Host system after it is successfully migrated to the target VM Host. By default, however, Integrity VM retains the virtual machine and marks it Not Runnable (NR) on the source VM Host after it is migrated successfully to the target VM Host. Specifying a subsequent hpvmstatus command on the source VM Host after you have migrated the virtual machine will show the state of the virtual machine as Off (NR), that is Not Runnable on the source VM Host, because the virtual machine is now runnable on the target VM Host. This mechanism allows the same virtual machine to exist on multiple VM Hosts, while still preventing accidental booting of the same virtual machine on multiple hosts simultaneously. Each virtual machine must be runnable on only one VM Host at any given time to prevent the possibility of two virtual machines using the same resources at the same time. Use the 229 hpvmmodify command, if necessary, to mark the guest Runnable on only one single VM Host, and Not Runnable on all other VM Hosts that have the virtual machine configured. NOTE: Mark a migrated guest as Runnable only in rare circumstances and with great care. Inappropriate use can cause disk corruption if a guest is booted on more than one host at the same time. Cloning or modifying a guest during online migration is not allowed. Options The hpvmmigrate command recognizes the following command-line options and arguments: -A Aborts an active guest migration. -b For offline migrations, causes the hpvmmigrate command to boot the virtual machine on the target automatically after the migration process is complete. If the -b option is specified for an offline migration, all backing stores must exist or must be copied. -c number-vcpus For offline migrations, specifies the number of virtual CPUs this virtual machine sees at boot time. -C For offline migrations, physically copies the single storage device specified with the -m option to the target VM Host during the migration process. If specified before the first -m option, it applies to all -m options that specify an appropriate type of storage. This might take a long time to complete if a large amount of storage needs to be copied. -d For offline migrations, causes hpvmmigrate to automatically shut down a running guest before migrating the guest to the target VM Host. Consider migrating the guest online by using the -o option. -D Deletes the virtual machine from the source VM host after migrating the virtual machine to the target VM Host. If not specified, the virtual machine is marked Not Runnable on the source VM Host after migration. -e percent[:max-percent] For offline migrations, specifies the percentage of CPU resources to which each of the virtual machine's virtual CPUs is entitled. During peak system CPU load, the entitlement is the guaranteed minimum allocation of CPU resources for this virtual machine. The percent can be set to an integral value between 0 and 100. If the value specified is less than 5, the virtual machine is allocated the minimum percentage of 5%. The default is 10%. Integrity VM reserves processing power for essential system functions such as logging, networking, and file system daemons. The -e and the -E options are mutually exclusive. 230 -E cycles[:max-cycles] For offline migration, specifies the virtual machine's CPU entitlement in CPU cycles. The cycles are expressed as an integer, followed by one of these units: • M (megahertz) • G (gigahertz) If no letter is specified, the default unit is megahertz. The -e and the -E options are mutually exclusive. -F Forces the migration of a guest, whether or not there are resource validation errors (such as resource conflict, resource nonexistence, and so forth). Use the -F option only rarely and with caution. This option ignores all resource validation errors, including oversubscribing of resources. It is important to note that these errors can prevent the virtual machine from booting on the target VM Host. Any validation errors are logged in the Integrity VM command log. -h target-host-alisas-or-IP-addr Specifies the host alias or IP address of a network connection to the target VM Host machine to which the virtual machine is being migrated. The target machine must be a valid VM Host and must be accessible by the source VM Host. Almost all forms of the hpvmmigrate command require the -h option. For online migration, the parameter for the -h option should specify a private, dedicated, high-speed network link to the target VM Host. If you specify a simple non-qualified host name, the hpvmmigrate command appends —hpvm-migr to the name and checks if a host alias has been defined for a private network corresponding to the simple name. Online VM Migration does not check to ensure that the link is private, but using a private network is important for efficient and secure online migrations and to preserve the bandwidth of the regular site network. -H Displays the usage of the hpvmmigrate command. -k Creates the virtual machine on the target VM Host and marks it Not Runnable, but does not change the virtual machine on the source VM Host. -l new-vm-label Specifies a descriptive label for the virtual machine, which can be useful in identifying a specific virtual machine in the hpvmstatus verbose display. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). To specify white space, the label must be quoted (" "). -m rsrc-with-absolute-path For offline migration, specifies a resource of a virtual machine for copying, translation, and so on. This option can be specified more than once. For information about specifying virtual machine storage and network resources for guests, see hpvmresources(5). 231 -n Quits after starting the migration in the background. If not specified, the hpvmmigrate command continues to run interactively and reports the migration status until the migration is complete. -N new-vm-name Specifies the new name for the virtual machine being migrated. The name can consist of up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and period (.). The virtual machine name cannot start with a dash (—). If the virtual machine name exists on the target VM Host, the virtual machine must have the same UUID as the source virtual machine, and the virtual machine on the target must be marked Not Runnable.. -o Specifies an Online VM Migration of an active guest. To be compatible for online migrations, both the source and the target host must have the same processor family (as reported by the machinfo command). To maintain active guest network connectivity, a vswitch with the same name and connected to the same subnet must be configured on the target VM Host. Also, only whole disk backing storage consisting of SAN LUNs and null backing store DVD devices are supported for online guest migration storage. -p source-vm-number Specifies the unique number of the virtual machine to be migrated. The vm-number is reported with the hpvmstatus command. Most forms of the hpvmmigrate command require either the -P option or the -p option. -P source-vm-name Specifies the unique name of the virtual machine to be migrated. Most forms of the hpvmmigrate command require either the -P option or the -p option. -q Displays fewer informative messages. Some potential error conditions are still reported. -Q For online migrations, set non-interactive mode. Assume that the output device is not a terminal. -r amount For offline migration, specifies the amount of memory available to this virtual machine. The size is expressed as integers, optionally followed by one of these letter: • M (megabytes) • G (gigabytes) If the letter is omitted, the default unit is megabytes. -s Indicates that the migration should not occur, but the hpvmmigrate command should check whether or not the migration is possible. Because guests and their VM Hosts are dynamic, a successful -s trial does not always guarantee a subsequent successful migration. The hpvmmigrate command with the -o, -s, and -h options 232 (but without a -p or -P option) checks host connectivity and CPU compatibility for online migration. -t For offline migration, translates the storage device names specified with the -m option by comparing WWIDs. To compare WWIDs, the storage resources must be present and available on both the source and the target VM Hosts. If you specify the -t option before the first -m option, the -t option applies to all -m options. The -t option overrides the -T option for storage resources specified with the -m option. Device translation is automatic for online migration. -T For offline migration, specifies not to translate devices. -v Displays the version number of the hpvmmigrate command. -w For online migrations, bypasses all vswitch connectivity checks. Use the -w option only of you are certain that the source and target vswitches are connected to the same subnet; otherwise, your active guest will lose network connectivity after migrating. RETURN VALUES The hpvmmigrate command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. 2: One or more operational failures occurred. DIAGNOSTICS The hpvmmigrate command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • An invalid value is specified for an option. • A value is omitted for an argument that requires one, or a value is supplied for an argument that does not take one. • The source-vm-name or source-vm-number attribute does not exist, cannot be accessed, is not a virtual machine, or is corrupt. • SSH does not seem to be properly configured between the source and the target VM Hosts. • The hpvmmigrate command and Integrity Virtual Machines are at different revision levels. • The virtual machine already exists on the target VM Host and is Runnable, or the virtual machine name exists on the target but the configuration has a different UUID. • The guest is running, and online migration is not being used. Or, the virtual machine is not running, and online migration is attempted. • Invalid virtual machine configuration. • Remote execution error. • Virtual machine resource validation error. • A remote vswitch is not present or not active. • The version of the hpvmmigrate command is incompatible with the version on the target VM Host. 233 EXAMPLES Display the version number of the hpvmmigrate command. # hpvmmigrate -v hpvmmigrate: Version B.04.10 Migrate the offline virtual machine named host1, to the host abc.def.com. # hpvmmigrate -P host1 -h abc.def.com Migrate the active guest named drop to the VM Host named bucket through the private network alias bucket-hpvm-migr. # hpvmmigrate -o -P drop -h bucket-hpvm-migr AUTHORS The hpvmmigrate command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(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) 234 hpvmmgmt(1M) NAME hpvmmgmt -- Manage dynamic data within the Integrity VM guest environment. SYNOPSIS hpvmmgmt [-l type] [ -V | -M | -X ] [-v] hpvmmgmt [-l type] [-t interval] [-V] [-v] hpvmmgmt [-v] [-x keyword=value ] | [-x keyword=value:keyword=value] DESCRIPTION The hpvmmgmt command allows you to view and potentially manage dynamic guest data. To manage the data, the VM Host must have configured the guest to do so. To obtain a display in machine-readable or XML format, use the -M or -X option. The hpvmmgmt command without options displays a summary of types of Integrity VM management data that the guest can view and, if appropriate, change. Only superusers can execute the hpvmmgmt command. Options Only the -x option can be specified more than once. The hpvmmgmt command recognizes the following options and attributes: -l type Specifies the type of data to list more information about. For the type parameter, enter ram. -t interval Used in conjunction with the -l option, this option allows the hpvmmgmt command to continuously refetch the requested type of data using the value specified for the interval attribute (specified in seconds) between updates. If the -t option is not specified, the data is only fetched once. The hpvmmgmt command forces the value to a maximum interval. -v Displays the version number of the hpvmmgmt command. The version number is displayed first, followed by information specified by other options. -V Displays detailed information (verbose mode) about the virtual machines. When the hpvmmgmt command is run with only this option, the output displays the valid name value pairs for each type of modifiable dynamic data type known. The -V, -M, and -X options are mutually exclusive. -M Displays verbose attribute and resource information in machine-readable format. Individual fields are separated by one of three delimiters: • The colon (:) separates each field and resource type. • The semicolon (;) separates subfields of a resource type. • The comma (,) separates individual items in a list of similar items. The -V, -M, and -X options are mutually exclusive. -X Displays verbose attribute and resource information in the XML format. The -V, -M, and -X options are mutually exclusive. 235 -x keyword=value Specifies virtual machine characteristics. Use the following keywords: • -x ram_target={0 | start | amount} Specifies the guest RAM target, where the values are as follows: — 0 indicates the dynamic memory driver reduces the memory on the guest to what it determines is a comfortable minimum that does not result in guest memory being paged out. — start indicates that the guest dynamic memory size is set back to the boot time value. — amount is a specific target memory size for the guest. RETURN VALUES The hpvmmgmt command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmmgmt command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • The hpvmmgmt command and Integrity VM are at different revision levels. EXAMPLES The following example lists all the types of data that can be managed, as well as the name value pairs: # hpvmmgmt Type Guest Control ====== ============= ram yes The following example shows the detailed information about the manageable data: # hpvmmgmt -l ram -V [Dynamic Memory Information] ======================================= Type : driver Current memory : 2103 MB Target memory : 2103 MB Comfortable minimum : 2423 MB Minimum memory : 1222 MB Maximum memory : 6144 MB Boot memory : 6135 MB Free memory : 124 MB Available memory : 286 MB Memory pressure : 12 Memory chunksize : 65536 KB Driver Mode(s): STARTED ENABLED GUESTCTL The following example sets the dynamic RAM target to the original boot amount: # hpvmmgmt -x ram_target=0 Attempting to decrease memory from 2039 MB to 745 MB. Successfully began to change ram_target to 745 MB. # hpvmmgmt -x ram_target=start Attempting to increase memory from 929 MB to 2039 MB. Successfully began to change ram_target to 2039 MB. AUTHORS The hpvmmgmt command was developed by HP. 236 SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(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), hpvmpubapi(3) 237 hpvmmodify(1M) NAME hpvmmodify -- Rename a virtual machine or modify the attributes of a virtual machine. SYNOPSIS hpvmmodify { -P vm-name | -p vm-number } [ -F | -s ] [-N new-vm-name] [-l vm-label] [-B start-attr] [-O os-type [:version]] [-c number-vcpus | -c number-vcpus:minimum:maximum] [ -e percent[:maximum_percent] | -E cycles[:maximum_cycles] ] [-r amount] [-g -group]... [-g [+]group[: {admin | oper}]]... [-u -user] [-u [+]user:[ {admin | oper}]] [-a rsrc] [-m rsrc] [-d rsrc] [-i { SG | SG-pkgname | GWLM | SG-pkgname , GWLM | NONE }] [{-j 0 | 1 }] [-r amount [-x name=value [:name=value]]] hpvmmodify -A { -P vm-name | -p vm-number } [-F] [-l vm-label] [-B start-attr] [ -e percent | -E cycles [-a rsrc]... [-m rsrc]... [-d rsrc] ] [[-x name=value [:name=value]] hpvmmodify -P guest -m rsrc DESCRIPTION The hpvmmodify command modifies the attributes and resources of the specified virtual machine. All attributes and resources can be changed statically, so that changes take effect when the virtual machine is next restarted. Some attributes and resources can also be changed dynamically. Dynamic changes take effect immediately and remain in effect when the virtual machine is next started, unless you explicitly specify otherwise with the -A option. Only specified attributes or resources are changed. All others retain their original values. When changing from -E cycles to -e percent on a guest that previously had a maximum configured, if you do not specify a new maximum, then the default maximum value is chosen. This same action occurs when changing from -e percent to -E cycles. Virtual machine modification is designed for flexibility and assumes that all existing virtual machines are not necessarily running at the same time or on the current VM Host. Therefore, the hpvmmodify command allows virtual machines to be modified in such a way that they cannot boot on the current system. A guest configuration receives a warning at modification and an error at start time, for any issues that might prevent it from starting on the current VM Host. To verify a particular configuration for the current VM Host without actually modifying the guest, use the -s option. NOTE: Modifications are not allowed during online VM migration. When a new device is added to a guest without specifying the bus/target/lun in the resource parameter, a default order of bus/target/lun allocation is followed. This ordering fills 0-14 targets on the lowest numbered bus before proceeding to the next higher-numbered bus. This default ordering is the same for both AVIO and VIO guest adapters. NOTE: Targets higher than 14 are supported only on AVIO adapters. Only a superuser can execute the hpvmmodify command. Options The hpvmmodify command recognizes the following command-line options and arguments. 238 -P vm-name Specifies the name of the virtual machine to be modified. You must specify either the -P or the -p option. -p vm-number Specifies the number of the virtual machine to be modified. The vm-number is displayed by the hpvmstatus command. You must specify either the -P or the -p option. -A Specifies that the addition, modification, or deletion of resources is done to an active virtual machine's configuration file. These modifications will be effective until the virtual machine is rebooted. Not all modifications can be done to an active virtual machine; in this case, an error message indicates the changes that require the virtual machine to be rebooted. -e percent[:maximum_percent] Specifies the percentage of CPU resources to which each of the guest's virtual CPUs is entitled and optionally specific the maximum percent or entitlement cap. The default cap is 100%. During peak system CPU load, the entitlement is the guaranteed minimum allocation of CPU resources for this virtual machine. The percent can be set to an integral value between 0 and 100. If the value specified is less than 5, the virtual machine will be allocated the minimum percentage of 5%. The default is 10%. The maximum entitlement may not exceed 100 percent, and may not be less than the minimum. Each group has a default maximum setting of 100 percent. In addition to the guest calculation, Integrity VM reserves processing power for essential system functions such as logging, networking, and file system daemons. The -e and the -E options are mutually exclusive. NOTE: If you change from -e percent to -E cycles on a guest that previously had a maximum configured and do not specify a maximum, then the default maximum value is chosen. -E cycles[:maximum_cycles] Specifies the virtual machine's CPU entitlement in CPU cycles and optionally specifies the maximum cycles or entitlement cap. The default entitlement cap is the total maximum cycles supported by the physical CPU. The cycles are expressed as an integer, followed by one of the following letters to specify units: • M (megahertz) • G (gigahertz) If no letter is specified, the default unit is megahertz. The -e and the -E options are mutually exclusive. 239 NOTE: If you change from -E cycles to -e percent on a guest that previously had a maximum configured and do not specify a maximum, then the default maximum value is chosen. -F Suppresses all resource conflict checks and associated warning messages (force mode). Force mode is provided for scripts and other noninteractive applications. Note that you will receive no notification of potential resource problems for a virtual machine modified with the -F option. The -F and -s options are mutually exclusive. -i package-name Specifies whether the virtual machine is managed by Serviceguard or gWLM (or both). For the argument, specify the Serviceguard package name or gWLM, both, or NONE. This option is used by Integrity VM software; do not use this option without explicit instruction from HP. -j {0 | 1} Specifies whether the virtual machine is a distributed guest (that is, managed by Serviceguard and can be failed over to another cluster member). This option is used by Integrity VM software; do not use this option without explicit instruction from HP. -l vm-label Specifies a descriptive label for the virtual machine, which can be useful in identifying a specific virtual machine in the hpvmstatus verbose display. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). To specifiy white space, the label must be quoted (" "). -B start-attr Specifies the startup behavior of the virtual machine. The start_attr argument can have the following (case-insensitive) values: • auto: Automatically start the virtual machine when Integrity VM is initialized on the host. • manual: Manually start the virtual machine. If the start_attr attribute is set to auto, the virtual machine is started when Integrity VM is initialized. This is the default. This occurs when the VM Host system is booted, and when the Integrity VM software is stopped and restarted on a running VM Host. For example, when you upgrade Integrity VM to a new version on a running system, the software is started automatically. The VM Host attempts to start all virtual machines for which the attribute is set to auto. If insufficient resources exist, some virtual machines might fail to start. If the attribute is set to manual, the virtual machine does not start automatically when Integrity VM is initialized on the VM Host. The virtual machine can then be started manually with the hpvmstart command or through its virtual console. 240 This option does not set the virtual machine's console to enable booting when the virtual machine is started. This function must be set with the virtual machine's console. [-O os-type:[version]] Specifies the type and version of the operating system running on the virtual machine. The response affects the default selection of certain virtual machine attributes, such as amount of memory and CPU power. The os_type is one of the following: HPUX, WINDOWS, or LINUX. This parameter is not case sensitive. The version is specific to the operating system type. The version specifies a descriptive text string of the version of the operating system. The version string can consist of up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). To specify white space, version must be quoted (" "). -a rsrc Adds an I/O resource to a virtual machine. NOTE: When assigning a null device to a resource on a virtual machine, the file name serves as a placeholder. Therefore, if the file does not exist, you do not receive an error. For example, in the following command, if the file XXX.iso does not exist, no error is given. # hpvmmodify -P vm1 -a disk:scsi::null:/opt/XXX.iso The resource is specified as described in hpvmresources(5). This option can be specified more than once. -d rsrc Deletes an I/O resource from a virtual machine. The resource is specified as described in hpvmresources(5). The physical device portion of the rsrc is optional. This option can be specified more than once. -m rsrc Modifies an existing I/O resource for a virtual machine. The resource is specified as described in hpvmresources(5). You must specify the hardware address of the device to modify. The physical device portion of the rsrc specifies a new physical device to replace the one in use. To move from VIO to AVIO, use the following command: # hpvmmodify -P guest1 -m hba:avio_lan:0,5 This option can be specified more than once. The rsrc specifies the mapping of a guest virtual device to a VM Host backing store. Integrity VM guests access virtual devices that are instantiated on physical entities managed by the VM Host. These physical entities (for example, network cards, files, logical volumes, and so forth) are collectively referred to as backing stores. 241 Integrity VM recognizes the following types of guest virtual devices: • Virtual disks, which can be backed by files in a VM Host file system, by logical volumes or by whole disks. • Virtual DVDs, which can be backed by files in a VM Host file system or by the physical DVD drive. • Virtual network devices, which are created through the hpvmnet command and backed by physical LAN cards. For more information about virtual network devices, see hpvmnet(1M). For information about specifying storage and network resources for guests, see the hpvmresources manpage. Integrity VM Version 4.1 supports the usage of both legacy and agile devices in guest configurations. Over time, you should migrate from using legacy device names to agile device names to simplify the management of devices. You can use the hpvmmodify -P guest -m rsrc command to change the existing legacy device to its agile device equivalent. The ioscan -m dsk command displays the mapping of the agile devices to legacy devices for the specific device special file, dsf. NOTE: The rmsf -L command should not be executed on an Integrity VM server until all guest devices names have been changed to agile device names. The following commands are helpful for reconfiguring guests to use agile device names: • insf By default, creates both persistent and legacy DSFs for new devices. • insf -L Restores legacy DSFs and legacy configuration information. • rmsf -L Aids in migration by removing all legacy DSFs and legacy configuration information. • ioscan —m dsf Maps persistent DSFs to their equivalent legacy DSFs and vice versa. • ioscan -N Prints persistent DSFs when used with the -n option to list DSFs. • io_redirect_dsf Associates a new disk with an existing set of DSFs. Used when replacing an internal disk or a disk in a JBOD. • hpvmmodify -P guest —m rsrc Used to modify backing devices for guest devices. 242 -N new-vm-name Specifies the new name for the virtual machine being modified, assuming no virtual machine with that name already exists. The name can consist of up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and period (.). The virtual machine name cannot start with a dash (-). The virtual machine name can only be changed by using the -N option. The name change takes effect immediately. -c number-vcpus | -c number-vcpus:minimum:maximum Specifies the number of virtual CPUs and vCPUs his virtual machine sees at boot time along with the range that the vCPUs must be within. The specification of the range is optional. When the range is not specified, a default range is used consisting of a minimum of one vCPU and a maximum equal to the maximum vCPUs supported for the specific guest operating system type. Integrity VM Version 4.1 supports up to 8 vCPUS for all guest types. For example, to set a guest with four vCPUs with no range, use the following command: # hpvmmodify -P guestname -c 4 To set a quest with four vCPUs with a range of two to six vCPUs, use the following command: #hpvmmodify -P guestname -c 4:2:6 -r amount Specifies the amount of memory available to this virtual machine. The size is expressed as an integer, optionally followed by one of these units: • M (megabytes) • G (gigabytes) If the letter is omitted, the default unit is megabytes. -g [+]group[:{admin | oper}] Adds (+ or unspecified) or removes (-) a group authorization. A VM Host user account that is a member of an authorized group can use the hpvmconsole command to manage this guest. The {admin|oper} argument specifies the privilege level available at the hpvmconsole — either admin or oper (the default). Do not specify the privilege level when you are removing a group. This option can be specified more than once. -u [+]user[:{admin | oper}] Adds (+ or unspecified) or removes (-) a user authorization. An authorized VM Host user account can use the hpvmconsole command to manage this guest. The {admin|oper} argument specifies the privilege level available at the hpvmconsole, either admin or oper (the default). Do not specify the privilege level when you are removing a user. This option can be specified more than once. 243 -s Verifies the virtual machine configuration and returns warnings or errors, but suppresses the action that the command would normally perform. This option starts resource checking for the specified virtual machine configuration without actually modifying the virtual machine. In typical cases, where -s is not specified, the virtual machine is modified even if resource warnings occur. The -F and -s options are mutually exclusive. -x name=value Specifies whether the virtual machine uses dynamic memory and the values associated with it by including the following keywords: • -x dynamic_memory_control={0|1} • -x ram_dyn_type={none|any|driver} • -x ram_dyn_min=amount • -x ram_dyn_max=amount • -x ram_dyn_target_start=amount • -x ram_target={0 | start | amount} Specifies the guest RAM target, where the values are: — 0 indicates the dynamic memory driver reduces the memory on the guest to what it determines is a comfortable minimum that does not result in guest memory being paged out. — start indicates the guest dynamic memory size set back to the boot time value. — amount is a specific target memory size for the guest. • -x runnable_status={disabled|enabled} Specifying runnable_status=disabled prevents the guest from being started. It also prevents other guests from booting if they share devices with a disabled guest whose devices are marked SHARE=NO. Specifying enabled allows guest to be started again. Set -x runnable_status=disabled only with the hpvmmodify command. An error message is printed if it is specified with the hpvmcreate or the hpvmclone commands. In addition, specify -x runnable_status=disabled only if the guest is not being managed by Serviceguard. If the hpvmcreate, hpvmmodify, or the hpvmclone command specifies -i SG, -i GWLM,SG, or I SG_packagename, an error message is printed if an attempt is made to disable the guest. • -x not_runnable_reason="string" Displays the specified string in a message printed by the hpvmstatus -V command when the guest is disabled, or when —F is specified. If no reason is given for disabling the guest, a default string is used. This parameter is ignored when -x runnable=enabled 244 is specified on the command line. An error message is displayed if this parameter is specified by itself and the guest is enabled. • -x graceful_stop_timeout={0 | number} Specifies the amount of time in seconds to allow a graceful stop when hpvmstop —g is specified. The default is 30 seconds. NOTE: If the graceful stop does not finish within the time frame specified, a hard stop is then executed. This parameter does not apply to Windows guests. • -x sched_preference={none|cell|ilm} where: — none — The default preference. If your application is predominantly CPU bound, specifying either ilm or cell will perform the same. — cell — The cell with the most CPU and memory space is chosen. When that guest is active, the scheduler then optimizes where the guest runs, so that it can be closest to its memory. — ilm — Indicates that guests that are larger than any single cell and contain highly threaded applications. • -x migrate_init_phase_timeout={number of seconds} — Specifies the maximum number of seconds the online migration spends during the initialize phase of the migration. The default is 10 seconds. • —x migrate_copy_phase_timeout= {number of seconds} — Specifies the maximum number of seconds the online migration spends during the full-copy stage. The default is 0 seconds. • -x migrate_io_quiesce_phase_timeout= {number of seconds} — Specifies the maximum number of seconds the migration spends during the quiesce stage. The default is 15 seconds. • -x migrate_frozen_phase_timeout= {number of seconds} — Specifies the maximum number of seconds the migration spends during the freezing stage. The default is 60 seconds. • -x online_migration= {enabled | disabled} RETURN VALUES The hpvmmodify command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. 245 DIAGNOSTICS The hpvmmodify command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • An invalid value is specified for an option, or a value is omitted. • The vm_name or vm_number does not exist, cannot be accessed, is not a virtual machine, or is corrupt. • The new_vm_name already exists. • One or more options other than -a, -m, -d, -g or -u have been specified more than once. • The same resource was allocated more than once. • A resource allocated to another virtual machine was specified, and the force flag (-F) was not used. • A resource exceeded an available resource limit, and the force flag (-F) was not used. • A value was omitted for an argument that requires one, or a value was supplied for an argument that does not take one. • For the modified (-m) or delete (-d) options, the specified resource is not presently assigned to the vm_name. • The hpvmmodify command and Integrity VM are at different revision levels. Using a colon (:), semicolon (;), or comma (,) when entering device names causes the machine-readable format of hpvmstatus to be misaligned. EXAMPLES Change the name of the virtual machine called myguest1 to myguest2: # hpvmmodify -P myguest1 -N myguest2 Set the autoboot attribute for the virtual machine myguest1: # hpvmmodify -P myguest1 -B auto Add a new virtual DVD backed by a file to virtual machine myguest2: # hpvmmodify -P myguest2 -a dvd:scsi::file:/var/opt/myguest.file Change the virtual disk with hardware address 0,0,4 to a different physical device, /dev/rdisk/ disk1: # hpvmmodify -P myguest2x -m disk:scsi:0,0,4:disk:/dev/rdisk/disk1 Change the network device at hardware address 0,2 to a different vswitch, (called myswitch), thereby preserving its original virtual MAC address: # hpvmmodify -P myguest2 -m network:avio_lan:0,2,1a-01-5a-8e-99-fa:vswitch:myswitch Delete the virtual disk at hardware address 0,0,2 from the virtual machine myguest2: # hpvmmodify -P myguest2 -d disk:scsi:0,0,2 Delete the network device at hardware address 0,1 from the virtual machine myguest2: # hpvmmodify -P myguest2 -d network:avio_lan:0,1 Cap myguest2 with a the CPU entitlement of 20% with a minimum of 10%: # hpvmmodify -P myguest2 -e 10:20 Temporarily change the CPU entitlement to 50% until virtual machine myguest2 is rebooted: # hpvmmodify -A -P myguest2 -e 50 The following are sample warning messages returned when the hpvmmodify command is executed with various configuration problems on the guest myguest1: HPVM guest myguest1 configuration problems: Warning 1: Guest needs more vcpus than server supports. Warning 2: Insufficient free memory for guest. Warning 3: Insufficient swap resource for guest. Warning 4: Insufficient cpu resource for guest. Warning 5 on item /dev/rdisk/disk0: Device file '/dev/rdisk/disk0' in use by another guest. Warning 6 on item /dev/vg00/rswap: Device file '/dev/vg00/rswap' in use by server. 246 Warning 7 on item /dev/rdisk/disk3 backing device does not exist. Warning 8 on item /dev/rdisk/disk4: Device file '/dev/rdisk/disk4' in use by another guest. Warning 9 on item hostnet: MAC address in use for switch hostnet. Warning 10 on item offnet: Vswitch offnet is not active. Warning 11 on item badnet: 'badnet' backing device does not exist. These problems will prevent HPVM guest myguest1 from booting. The following example shows how to enable dynamic memory control for the guest myguest1: # hpvmmodify -P myguest1 -x dynamic_memory_control=1 AUTHORS The hpvmmodify command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(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) 247 hpvmnet(1M) NAME hpvmnet -- Create and control an Integrity Virtual Machines virtual network switch (vswitch). SYNOPSIS hpvmnet [ -S vswitch-name | -s vswitch-number ] [ -X | -M | -V ] [-v] hpvmnet -c -S vswitch-name [-n nic-id] hpvmnet -C [ -S vswitch-name | -s vswitch-number ] -n nic-id [-N new-vswitch-name] hpvmnet -d [ -S vswitch-name | -s vswitch-number ] [-F] [-Q] hpvmnet -b [ -S vswitch-name | -s vswitch_number ] hpvmnet -h [ -S vswitch-name | -s vswitch_number ] [-F] [-Q] hpvmnet -r [ -S vswitch-name | -s vswitch-number ] [-F] [-Q] hpvmnet { -S vswitch_name | -s vswitch-number } -u portid:portid[,...]:vlanid: {vlanid| | none } hpvmnet { -S vswitch-name | -s vswitch-number } [ -p {all | portid} ] [-A] [ -M | -X ] [-Z] [-v] DESCRIPTION A virtual machine accesses its network through a virtual network interface (vNIC) connected to a virtual network switch (vswitch). The virtual network switch is connected in turn to a single physical network interface (pNIC) on the VM Host. Use the hpvmnet command to create and manage vswitches. A vswitch works like an actual network switch. It accepts outbound network traffic from all guests configured to use it and transmits the traffic over the physical interface. It accepts inbound network traffic for all guests configured to use it and directs the traffic to the appropriate guest. A virtual switch can be associated with at most one physical network interface. The VM Host's physical network interface must be attached to a network with connectivity to the desired subnets. The network interface can be configured on the VM Host with an IP address or multiple IP alias addresses, but this is only necessary if the VM Host shares the interface with the vswitch and directs its own network traffic over the card. If you alter any characteristics of a network interface associated with a running vswitch, for instance, through the ifconfig commands on the VM Host, you must stop and restart the vswitch. Otherwise, any guests using that vswitch experience intermittent network failures. Stopping and restarting a vswitch can occur while its guests are running; guest shutdown is not required. You must reboot the vswitch (using the -r option) when: • You replace the physical network card associated with the vswitch. • You change a VM Host IP address associated with the vswitch's network interface card. • You change network interface characteristics, for example, by using the lanadmin command to change checksum offloading (CKO). • You notice that there is no communication from an avio_lan interface to a lan interface after booting the guests while the vswitch is down. You do not need to restart the guests that are using the vswitch. After you restart the vswitch, restart communication from the guest side. For example, on the guest, ping the VM Host. By default, Integrity VM creates a vswitch named localnet that is not associated with a physical interface. It is used only for communication between the guests running on the same VM Host; the VM Host itself does not participate in a localnet. There is no nameserver or router configured on a localnet, unless one of the guests performs this function. Only superusers can execute the hpvmnet command. 248 Two classes of virtual network interface are supported in Integrity VM: lan and avio_lan. The lan interface is supported on all underlying HP-UX network interface cards. The avio_lan interface is supported on selected HP-UX network interface cards and provides accelerated performance. For examples of using the lan and avio_lan keywords, see hpvmcreate and hpvmmodify. Options The following options can be specified only once. The hpvmnet command without options displays summary information about all vswitches configured on the VM host. The hpvmnet command recognizes the following command-line options and arguments: -S vswitch-name Specifies the unique name of the virtual switch. The name of the vswitch is limited to eight characters. The -S and -s options are mutually exclusive. -s vswitch-number Specifies the unique number of the virtual switch. The vswitch number is reported using the hpvmnet command. The -S and -s options are mutually exclusive. -v Displays the version number of the hpvmnet output format. The version number is displayed first, followed by the display specified by the other options. In addition, it also displays VLAN information. -V Displays information about vswitches in verbose mode. If you specify the vswitch using either the -S or -s options, network counters are included in the display. Network counters are cleared each time statistics are reported; the display reports the counts since the previous display. Use the -S or -s option to specify the vswitch for which to display network counters. The -V, -M , and -X options are mutually exclusive. -A Displays statistics for the avio_lan virtual network interfaces in the following format: Vswitch Name : hostnet Max Number of Ports : 100 Port Number : 3 Port State : Reserved Active VM : Untagged VlanId : none Reserved VMs : aviotest Adaptor : avio_lan Inbound Octets : 961698882 Inbound Unicast Pkts (wire) : 20000 Inbound Unicast Pkts (local) : 40000 Inbound Non-Unicast Pkts (wire) : 10000 Inbound Non-Unicast Pkts (local) : 30000 Inbound Discards : 36 Outbound Octets : 3557451342b Outbound Unicast Pkts (wire) : 20000 249 Outbound Unicast Pkts (local) : 300000 Outbound Non-Unicast Pkts : 400000 Outbound Discards : 0 -M Displays verbose resource information in a machine-readable format. Individual fields are separated by one of the following delimiters: • The colon (:) separates each field and resource type. • The semicolon (;) separates subfields of a resource type. • The comma (,) separates individual items in a list of similar items. The -V, -M and -X options are mutually exclusive. -X Displays verbose resource information in the XML format. The -V, -M, and -X options are mutually exclusive. -Z Used with to the -A option, clears statistics after retrieving them. -F Omits the confirmation dialog before halting, deleting, or rebooting the vswitch. This option is intended for use by scripts and other noninteractive applications (Force mode). -Q Quietly performs the command. The default is to prompt for confirmation of the command before performing it. -c Creates a new vswitch. -d Deletes an existing vswitch. -b Starts an existing vswitch. Vswitches must be started before they accept guest traffic. Note that Integrity VM attempts to automatically start all existing vswitches when Integrity VM is started. -h Stops a vswitch. -r Stops and restarts a vswitch. -n nic-id Designates the network interface on the VM Host that this vswitch uses. Network interfaces are displayed by the lanscan command. If -n is not specified when creating a vswitch, a local vswitch is created. -u portid:portnumber:vlanid:{vlanid | none} Specifies the VLAN identifier for the specific vswitch and port. Configure VLANs by specifying the number of the port on the vswitch (portnumber) to use for VLAN communication, and the VLAN identifier (vlanid). Virtual machines that are configured to use the VLAN can communicate with one another. To disable a VLAN, specify none for the VLAN identifier. Only virtual machines that are configured with the same VLAN identifier on their ports can communicate with one another. To disable VLANs on a port , specify none for the VLAN identifier. Virtual machines that do not have any VLANs configured on their vswitch port (which is the default) cannot communicate over that port with virtual 250 machines that have a VLAN configured on their vswitch port. The port number is used to reserve a specific port for a particular virtual machine's network resource. This port number can be used later in the hpvmnet command to configure VLAN rules on the port. You can also first set up VLAN rules on the virtual switch and later create virtual machines referencing the specific port numbers. -p {all | portid} Specifies the port number on the vswitch. To specify all the ports on the vswitch, enter all. This command displays information about VLAN ports configured for the specified vswitch. Do not use the -p option with the -V option. -C Changes the specified vswitch. If used with the -N option, the changes are made to the cloned vswitch. You must include either the -S or the -s option. Only those ports with tagged VLAN are cloned. -N new-vswitch-name Creates a new vswitch based on the existing vswitch. For new-vswitch-name, specify the unique name of the new virtual switch. The name of the vswitch is limited to eight characters. You must include either the -S or the -s option. RETURN VALUES The hpvmnet command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmnet command displays error messages for any of the following conditions: • An invalid option is specified. • An invalid value is specified for an option. • The vswitch-name or vswitch-number argument does not exist, cannot be accessed, is not a vswitch, or is corrupt. • A value was omitted for an argument that requires one, or a value was supplied for an argument that does not take one. • The hpvmnet command and Integrity Virtual Machines are at different revision levels. EXAMPLES Create the vswitch switch2 on lan0: # hpvmnet -c -S switch2 -n 0 Display all the vswitches on this VM Host: # hpvmnet Name Number State Mode NamePPA MAC Address IP Address ======== ====== ======= ========= ======== ============== =============== localnet 1 Up Shared N/A N/A hostnet 296 Up Shared lan1 0x00306e4a92ef 16.116.8.99 vmvlan 13 Up Shared lan900 0x00306e4bc7bf myswitch 241 Up Shared lan0 0x00306e4a93e6 Display the verbose attributes of vswitch hostnet: # hpvmnet -S hostnet -V Name : hostnet 251 number : 296 PID : 1672 State : Up Mode : Shared NamePPA : lan1 Host MAC Address : 0x00306e4a92ef Host IPv4 Address : 16.116.8.99 Host IPv6 Address : fe80::230:6eff:fe4a:92ef Number of guests : 5 Guest's Name : armyvm1 MAC Address : 0xEE8D40584D28 IPv4 Address : Guest halted Vswitch Port : 4 Guest's Name : armyvm1 MAC Address : 0x8A0F12DD5B48 IPv4 Address : Guest halted Vswitch Port : 3 Guest's Name : armyvm2 MAC Address : 0x42F86E004C5D IPv4 Address : Guest halted Vswitch Port : 5 Guest's Name : armyvm4 MAC Address : 0x762704ACBC4D IPv4 Address : 106.16.5.24 IPv6 Address : fe80::ee8d:40ff:fe58:4d28 Vswitch Port : 1 Guest's Name : armyvm3 MAC Address : 0xD2E856A02638 IPv4 Address : armyvm3.mycom.com Vswitch Port : 2 Packets in : 37934 Packets out to stream : 967 Packets out to guest : 31381 Packets dropped : 4686 Broadcasts : 31029 Counter 0 : 0 Counter 1 : 0 Counter 2 : 0 Counter 3 : 0 Cycles in : 7728 Cycles out to stream : 27387 Cycles out to guest : 5509 Cycles switch packet : 2345 Delete the vswitch named switch2: # hpvmnet -d -S switch2 hpvmnet: Remove the vswitch 'switch2'? [n/y]: y Delete the vswitch with the vswitch ID of 6, and omit the confirmation dialog: # hpvmnet -d -s 6 -F Start the vswitch named switch1: # hpvmnet -b -S switch1 Stop the vswitch named switch1: # hpvmnet -h -S switch1 hpvmnet: Halt the vswitch 'switch1'? [n/y]: y Configure port 2 on vswitch switch1 with VLAN identifier 100: # hpvmnet -S switch1 -u portid:2:vlanid:100 Display information about VLAN ports configured for the vswitch named myswitch: # hpvmnet -S myswitch Name Number State Mode NumberPPA MAC Address IPv4 Address ======== ====== ======= ========= ====== ============== =============== 252 myswitch 2 Up Shared lan1 0x00306ef3120c 1.2.3.4 [Port Configuration Details] Port Port Port Untagged Number of Active VM Number state Adaptor VLANID Reserved VMs ======= ============ ======== ======== ============ ============ 1 Reserved lan none 1 2 Active lan none 1 config2 3 Reserved avio_lan none 1 4 Active lan none 1 winguest2 [Configured IP Address(es)] 106.16.4.12 fe80::230:6eff:fe4a:92ef # hpvmnet -S myswitch -p 4 Vswitch Name : myswitch Max Number of Ports : 100 Port Number : 4 Port State : Active Active VM : winguest2 Untagged VlanId : none Reserved VMs : winguest2 Adaptor : avio_lan To switch over the lan1 from lan0: # hpvmnet -C -S hostnet -n 0 # hpvmnet -S hostnet Name Number State Mode NamePPA MAC Address IPv4 Address ======== ====== ======= ========= ======== ============== =============== hostnet 296 Up Shared lan0 0x00306e4a93e6 To clone the vswitch, enter the following command: # hpvmnet -C -n 1 -S vmvlan -N clone # hpvmnet -S clone Name Number State Mode NamePPA MAC Address IPv4 Address ======== ====== ======= ========= ======== ============== =============== clone 297 Down Shared lan1 [Port Configuration Details] Port Port Port Untagged Number of Active VM Number state Adaptor VLANID Reserved VMs ======= ============ ======== ======== ============ ============ 2 Available avio_lan 20 0 AUTHORS The hpvmnet command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M)hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(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) 253 hpvmpubapi(3) NAME hpvmpubapi -- Integrity VM public application interface descriptions. SYNOPSIS #include HPVM_boolean hpvm_api_server_check() HPVM_boolean hpvm_api_virtmach_check() HPVM_int hpvm_api_version_get(HPVM_str version) HPVM_int hpvm_api_my_uuid_get(HPVM_str uuid) HPVM_int hpvm_api_server_uuid_get(HPVM_str uuid) HPVM_int hpvm_api_server_hostname_get(HPVM_str hostname) DESCRIPTION The hpvmpubapi command contains the following public APIs: • hpvm_api_server_check — returns the HPVM_boolean type. If this API is run on an operational Integrity VM server, it returns HPVM_TRUE; otherwise it returns HPVM_FALSE as defined in hpvm_api_public.h. • hpvm_api_virtmach — returns the HPVM_boolean type. If this API is run on a virtual machine that has the appropriate guest kit installed, it returns HPVM_TRUE; otherwise it returns HPVM_FALSE as defined in hpvm_api_public.h. • hpvm_api_version_get — returns the HPVM_int type as an error code and, if successful, the Integrity VM version string. This API copies the Integrity VM version string into the buffer referenced by the version parameter. The version pointer must be a preallocated buffer that is at least HPVMAPIDEFMEMSIZ bytes long. If an error occurs, a nonzero error code is returned. • hpvm_api_my_uuid_get — returns the HPVM_int type as an error code and, if successful, the Integrity VM version string. This API copies the uuid string into the buffer referenced by the uuid parameter. The uuid pointer must be a preallocated buffer that is at least HPVMAPIDEFMEMSIZ bytes long. If an error code occurs, a nonzero error code is returned. • hpvm_api_server_uuid_get — returns the HPVM_int type as an error code and, if successful, the Integrity VM version string. This API copies the uuid string of the Integrity VM server into the buffer referenced by the uuid parameter. The uuid pointer must be a preallocated buffer that is at least HPVMAPIDEFMEMSIZ bytes long. If an error occurs, a nonzero error code is returned. This routine returns an error if run on an Integrity VM server. • hpvm_api_server_hostname_get — returns the HPVM_int type as an error code and, if successful, the Integrity VM version string. This API copies the uuid string of the HPVM server into the buffer referenced by the hostname parameter. The hostname pointer must be a preallocated buffer that is at least HPVMAPIDEFMEMSIZ bytes long. If an error occurs, a nonzero error code is returned. This routine returns an error if run on an Integrity VM server. RETURN VALUES If run on an operational Integrity VM server, the hpvm_api_server_check routine returns HPVM_TRUE; otherwise returns HPVM_FALSE. If run on an Integrity VM virtual machine, the hpvm_api_virtmach_check routine returns HPVM_TRUE; otherwise returns HPVM_FALSE. If successful, the hpvm_api_version_get, hpvm_api_my_uuid_get, hpvm_api_server_uuid_get, and hpvm_api_server_hostname_get routines return 0. 254 DIAGNOSTICS There are no error returns for the hpvm_api_server_check and hpvm_api_virtmach_check routines. If an error occurs on the hpvm_api_version_get, hpvm_api_my_uuid_get, hpvm_api_server_uuid_get, or hpvm_api_server_hostname_get routine, one of the following error codes defined in hpvm_api_public.h is returned: • HPVMAPINOMEMORY — Inadequate memory resources. • HPVMAPIINVALARG — Invalid argument. • HPVMAPIBADFORMAT — Retrieved uuid was formatted badly. • HPVMNOTVM — Not being run on an HPVM virtual machine. • HPVMAPINOTSUP — Not supported. AUTHORS The hpvmpubapi public APIs were developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), hpvmsar(1M), hpvmstart(1M), hpvmstatus(1M), hpvmstop(1M), hpmvupgrade(1M), p2vassist(1M) On the Integrity VM guest: hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3) 255 hpvmremove(1M) NAME hpvmremove -- Remove an Integrity VM virtual machine. SYNOPSIS hpvmremove { -P vm_name | -p vm_number } [-F] [-Q] DESCRIPTION The hpvmremove command deletes a virtual machine's configuration information and frees any resources associated with it. Once the virtual machine has been removed all resources associated with the virtual machine become available for allocation to other virtual machines. Unintentional use of this command has serious consequences; therefore, the user is prompted to confirm this operation unless the -F (force) option is specified. The virtual machine must be in the Off state to be removed: It is an error to remove a running virtual machine. Only superusers can execute the hpvmremove command. Options The following options can be specified only once. The hpvmremove command recognizes the following command-line options and arguments: -P vm_name Specifies the unique name of the virtual machine to be removed. You must specify either the -P or the -p option. -p vm_number Specifies the unique number of the virtual machine to be removed. The vm_number is reported by the hpvmstatus command. You must specify either the -P or the -p option. -F Omits the confirmation dialog before removing the virtual machine. This option is intended for use by scripts and other noninteractive applications (Force mode). -Q Quietly performs the command. The default is to prompt for confirmation of the command before performing it. RETURN VALUES The hpvmremove command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmremove command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • An invalid value is specified for an option or value is omitted. • A value was omitted for an argument that requires one, or a value was supplied for an argument that does not take one. • The vm_name or vm_number argument does not exist, cannot be accessed, is not a virtual machine, or is corrupt. • The vm_name argument is in some state other than Off. • The hpvmremove command and Integrity VM are at different revision levels. 256 EXAMPLES Delete the virtual machine myguest: # hpvmremove -P myguest hpvmremove: Remove the virtual machine myguest? [n/y]: y Delete a virtual machine using its unique identifier using the force option: # hpvmremove -F -p 333 Remove a running guest: # hpvmremove -P hpux1 hpvmremove: The guest is currently running, not able to remove. hpvmremove: Unable to continue. AUTHORS The hpvmremove command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), 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) 257 hpvmresources(5) NAME hpvmresources -- Specifying virtual storage and virtual network devices. SYNOPSIS Virtual resource specification DESCRIPTION Use the hpvmcreate, hpvmclone, and hpvmmodify commands to specify storage devices and vswitches for guests. To specify the name of the storage device or vswitch, use the syntax described here. The resource specification contains the virtual device information and the backing store information, separated by a colon (:). The resource specification can be used to define a virtual storage device or a virtual network device. Specifying Storage Devices For storage devices, enter the resource specification in the following format: devicetype:adaptertype:bus,device,target:storage:device If you omit any part of the resource specification, you must include the colon (:) character as the field delimiter. The guest virtual device information consists of the following fields, separated by colons: • devicetype (virtual device type): — disk — dvd — tape — changer — burner • adaptertype (virtual device adapter type): scsi or avio_stor. NOTE: You can specify avio_stor only with disk or dvd device types. • bus, device, target (virtual device hardware address) (optional): The virtual device hardware address consists of three fields, separated by commas: — bus (the virtual device PCI bus number) — device (the virtual device PCI slot number) — target (the virtual device SCSI target number) If you do not specify the virtual device hardware address, it is generated automatically. If you specify a portion of the virtual device hardware address (for example, just the target), you must include the commas (for example, to specify just target 2, enter ,,2). The physical device information consists of two fields, separated by a colon: • storage (physical storage type) • device (physical device) The physical storage type and device specification can be one of the following: • disk. For the physical device, specify a disk device file (for example, /dev/rdisk/disk1). • lv. For the physical device, specify the LVM or VxVM character logical device file (for example, /dev/vg01/rlv0l2). 258 • file. For the physical device, specify a locally mounted, non-NFS VxFS file (for example, /guestfiles/diskfile1). • null. Specify an empty storage unit. Do not specify a world-writable directory such as tmp. (This is useful for removable media, such as DVDs.) NOTE: When assigning a null device to a resource on a virtual machine, the file name serves as a placeholder. Therefore, you do not receive an error if the file does not exist. For example, in the following command, if the file XXX.iso does not exist, no error is given. # hpvmmodify -P vm1 -a disk:scsi::null:/opt/XXX.iso • attach. Specify an attached device, such as a tape device, media changer, or CD/DVD burner. The physical device names must not contain the following characters: colon (:), semicolon (;), and comma (,). The following example associates a guest virtual disk device with a physical disk device: # disk:scsi::0,1,0:disk:/dev/rdisk/disk1 • The virtual device type is disk. • The virtual device adapter type is scsi. • The virtual device PCI bus number is 0. • The virtual device PCI slot number is 1. • The virtual device SCSI target number is 0. • The physical storage type is disk. • The physical device is /dev/rdisk/disk1. The following example associates an empty guest virtual DVD with multiple future choices of ISO files: dvd:scsi::null:/docs • The virtual device type is dvd. • The virtual device adapter type is scsi. • The virtual device hardware address is automatically generated. • The physical storage type is null. • The physical device is /docs. The following example specifies a tape device: tape:scsi::attach:/dev/rscsi/c6t5d0 Specifying Network Devices To associate a guest virtual network device with a virtual network switch (vswitch), use the following syntax. (Before you can associate the virtual network device to a virtual switch, you must create the vswitch using the hpvmnet command.) The format of the rsrc parameter for network devices is: network:adaptertype:bus,device,mac-addr:vswitch:vswitch-name:portid:portnumber If you omit any portion of the network resource specification, use the colon character (:) as a field delimiter. 259 The guest virtual network information consists of the following fields, separated by colons: • network • adaptertype (virtual device adapter type): lan , avio_lan • :bus,device,mac-addr (virtual network device hardware address) (optional) The virtual network device hardware address consists of three fields, separated by commas: — bus (the virtual network device PCI bus number) — device (the virtual network device PCI slot number) — mac-addr (the virtual network device MAC address, in either of the following formats: 0xaabbcc001122 or aa-bb-cc-00-11-22) The MAC address that you enter is checked to verify that it is unique, because the address cannot conflict with any of the VM Host's physical network adapter MAC addresses, and to verify that the proper bits are set. You can specify either the bus and device with the MAC address or the MAC address without the bus and device, or you can omit the entire hardware address. If you do not specify the virtual network device hardware address, or a portion of it, the missing information is generated automatically. If you specify only a portion of the virtual network device hardware address (for example, just the MAC address), include the commas (for example ,,aa-bb-cc-00-11-22). The virtual switch information consists of the following fields, separated by a colon: • vswitch • vswitch-name (the name assigned to the virtual network switch) • portnumber (the number of the port on the vswitch) The following example associates a guest virtual network device with a vswitch: network:avio_lan:0,1,02-02-03-04-05-06:vswitch:net1 • The guest virtual network device type is network. • The virtual adapter type is avio_lan. • The virtual PCI bus number is 0. • The virtual PCI slot number is 1. • The virtual MAC address is 02-02-03-04-05-06. • The physical network device type is vswitch. • The vswitch name is net1. AUTHORS The hpvmresources command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), 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) 260 hpvmsar(1M) NAME hpvmsar -- Display statistics about running virtual machines. SYNOPSIS hpvmsar [-s rate ] [-n count ] [-h rate] [-M] [-m mode] [ -a | -A | vm-name ... ] DESCRIPTION The hpvmsar command displays statistics, such as CPU utilization, for running virtual machines. The command displays the statistics graphically using X11 when the DISPLAY environment is defined; otherwise it displays them as text. With the -a option, the hpvmsar command displays information about all running guests. The display is reformatted as guests are started or stopped. With the -A option, the hpvmsar command displays information about all guests, whether they are running or not. Guests that are not running display as blank entries. Without these options, the hpvmsar command displays information about the specified virtual machines. In graphical mode, the hpvmsar command displays information using the following conventions: • Blue: Busy time — which counts whenever the guest runs. It includes the time necessary to run the guest operating system, guest applications, and virtual machine monitor on behalf of the guest. • Green: Idle time — which counts when the guest has no activity and the CPU was returned to the host. The same time may be counted as idle in multiple guest simultaneously, therefore, the sum of idle times may exceed 100%. • Orange: Wait time — which counts when the guest was pre-empted but had some activity pending. It indicates that the guest could have used the time, but was prevented, because it was pre-empted. • Grey: Host time — which counts when the host is running, as seen from the guest's point of view. Under normal conditions, host time is approximately the sum of idle time and wait time. Differences may arise when context switch time or interrupt time becomes significant. Options The hpvmsar command recognizes the following command-line options and arguments: -s rate Collects and displays data every rate seconds. The default is 1 second. -n count Counts how many samples are taken, with zero (0) indicating to sample forever. The default is 5 samples in text mode and 0 (infinity) in graphical mode. -h rate In text mode, sets how frequently the header is displayed. Header information indicates that each column of text represents. The default is to display the header every 8th sample -M Displays separate information for each virtual CPU (vCPU) individually. By default, it is displayed per guest, as an average of all vCPUs. -m mode When displaying information graphically, hpvmsar offers multiple viewing modes. The initial mode is selected using the -m option, with the default being mode 0, stacked up. This option has no effect if DISPLAY is not set. The display mode can be changed by pressing any key and cycles 261 through all available modes. The following modes are provided: • 0: Stacked up values — Stacks up busy time, idle time, and wait time vertically. Busy time is on the bottom and wait time is on the top of the column. • 1: Cumulative view — Stacks the busy time of multiple guests from the left of the window and the wait time of multiple guests from the right of the window. This mode makes it possible to see how multiple guest share the total available host time. • 2: History — Displays a graph of historical values for busy and wait time, showing the evolution of these values over time. • 3: Raw data — Displays one bar for each individual value. [-a | -A | vm-name ...] The -a option displays only running guests. The -A option displays all guests, including those that are not running. If you specify a virutal machine name, hpvmsar displays information about the specified virtual machine. RETURN VALUES The hpvmsar command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmsar command displays the following messages: • Invalid display mode x (max y): The display mode is not supported by this version of hpvmsar. • Missing argument to option (followed by usage): A required argument was not provided. • Missing option (followed by usage): An option was not recognized. • Nothing to display, exiting: No -a specified and no guest either. • Unable to find guest X: The guest name is not spelled correctly. • Unable to allocate memory for history: Really low memory on the VM Host. EXAMPLES The following examples displays data about all running guests at the rate of every 5 seconds: # hpvmsar -s 5 -a The following example displays data for all guests, even those not running, in the cumulative view: # hpvmsar -m 1 -A AUTHORS The hpvmsar command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M)hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), 262 hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), hpvmstatus(1M), hpvmstop(1M), hpvmupgrade(1M),p2vassist(1M) On the Integrity VM guest: hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3) 263 hpvmstart(1M) NAME hpvmstart -- Start a virtual machine. SYNOPSIS hpvmstart { -P vm-name | -p vm-number } [ -F | -s ] [-Q] DESCRIPTION The hpvmstart command causes the specified virtual machine to start. The virtual machine must exist and be in the off state. The hpvmstart command verifies that the starting virtual machine can be allocated all of the required resources defined by its configuration file. If not, the virtual machine is not started. Any of the following conditions can prevent the virtual machine from starting: • The server has fewer CPUs than the virtual machine requires. • The server has insufficient free memory. • The server has insufficient CPU resources. • The server has insufficient swap resources. • Another virtual machine is using a specified nonshared backing device. • The server is using a specified backing device. • A specified backing device does not exist. • A specified vswitch is not available. The vswitch must be created using the hpvmnet command before the guests using it can be started. • The specified MAC address is in use. • The specified guest is a distributed guest. Only superusers can execute the hpvmstart command. Options The following options can be specified only once. The hpvmstart command recognizes the following command-line options and arguments: -P vm-name Specifies the name of the virtual machine to be started. You must specify either the -P or the -p option. -p vm-number Specifies the number of the virtual machine to be booted. The vm-number is displayed by the hpvmstatus command. You must specify either the -P or the -p option. -F Forces the virtual machine to skip all the resource checks. No warnings are issued. CAUTION: HP does not recommend using the -F option because it can result in poor virtual machine performance, oversubscription, or data corruption, or it can cause the virtual machine to hang. -s Examines the specified guest configuration and reports any errors or warnings that can prevent it from starting. The guest is not started. -Q Quietly performs the command. The default is to prompt for confirmation of the command before executing it. RETURN VALUES The command exits with one of the following values: 264 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmstart command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • The vm-name or vm-number does not exist, cannot be accessed, is not a virtual machine, or is corrupt. • The virtual machine is in a state other than off and cannot be started. Use the hpvmstop command to stop the virtual machine. • The virtual machine cannot boot at this time because of detected resource complaints. • The hpvmstart command and the Integrity VM software are at different version levels. EXAMPLES Start the virtual machine called myguest: # hpvmstart -P myguest The following are sample warning messages returned when hpvmstart is executed with various configuration problems on guest myguest: Warning 1: Guest needs more vcpus than server supports. Warning 2: Insufficient free memory for guest. Warning 3: Insufficient swap resource for guest. Warning 4: Insufficient cpu resource for guest. Warning 5 on item /dev/rdisk/disk0: Device file '/dev/rdisk/disk0' in use by another guest. Warning 6 on item /dev/vg00/rswap: Device file '/dev/vg00/rswap' in use by server. Warning 7 on item /dev/rdisk/disk3 backing device does not exist. Warning 8 on item /dev/rdisk/disk4: Device file '/dev/rdisk/disk4:' in use by another guest. Warning 9 on item hostnet: MAC address in use for switch hostnet. Warning 10 on item offnet: Vswitch offnet is not active. Warning 11 on item badnet: 'badnet' backing device does not exist. These problems will prevent HPVM guest myguest from booting. AUTHORS The hpvmstart command was developed by HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), hpvmsar(1M), hpvmstatus(1M), hpvmstop(1M), hpvmupgrade(1M)p2vassist(1M) On the Integrity VM guest: hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3) 265 hpvmstatus(1M) NAME hpvmstatus -- Display status information about one or more virtual machines. SYNOPSIS hpvmstatus [ -V | -X | -M ] [-v] hpvmstatus { -P vm-name | -p vm-number } -D -L [ -V | -X | -M ] [-v] hpvmstatus -e { -P vm-name | -p vm-number } [ -V | -X | -M ] [-v] hpvmstatus -i { -P vm-name | -p vm-number } [ -V | -X | -M ] [-v] hpvmstatus -r { -P vm-name | -p vm-number } [ -V | -X | -M ] [-v] hpvmstatus -d { -P vm-name | -p vm-number } [ -V | -X | -M ] [-v] hpvmstatus -m [ -M | -X ] hpvmstatus -S [ -M | -X ] hpvmstatus -s [ -M | -X ] hpvmstatus -C { -P vm-name | -p vm-number } [ -V | -X | -M ] [-v] [-D] hpvmstatus -A { -P vm-name | -p vm-number } DESCRIPTION The hpvmstatus command displays information about the operational state and virtual hardware configuration of the virtual machines on the VM Host. Information displayed by the hpvmstatus command includes the following: • Version of the command (if you specify the -v option). • Name of the virtual machine (limited to 20 characters in summary format). • State of the virtual machine. The machine will be in one of the following states: — On: The virtual machine is "powered on." It may be at its console prompt, or it may have booted its operating system and be fully functional. This is the normal state of a running virtual machine. — Off: The virtual machine is fully halted. — Invalid: The virtual machine configuration file is corrupted or invalid. The configuration file must be corrected before this virtual machine can be started. • Running condition of the guest. The machine can be in one of the following conditions: — EFI: — The virtual machines is running normally in Extensible Firmware Interface (EFI). — OS: — The virtual machine is running normally in the operating system. — ATTN! — The virtual machine may need attention because it is not responding to interrupts. • Resources attached to this virtual machine. • Attributes assigned to this virtual machine. • Dynamic memory information, if dynamic memory is enabled for this virtual machine. The hpvmstatus command displays the active configuration for guests that are on, including the resource assignments that are currently in effect. For guests with a status of off, the command displays the configuration to be used when the guest in next booted. The hpvmstatus command displays variety of information: • To list all the virtual machines that are on the VM Host, enter the hpvmstatus command without the -P, -p, -e, or -r option. • To display detailed information about a virtual machine, use the -P or -p option (without the -e, -r, or -d option) to specify the virtual machine. • To display devices in the same format used on the command line, use the -d option. 266 • To display a virtual machine's log file, for either the VM Host or the specified virtual machine, include the -e option. • To display the virtual machine's resource scheduling information, use the -r option. • To display the mode the scheduler is in, use the -S option. To obtain a display in machine-readable format, use the -M or -X option. Only superusers can execute the hpvmstatus command. Integrity VM allows the guest to have two configurations, one for the last started configuration and one for the next start configuration or deferred configuration. If the guest is running, the last started configuration is the one that the guest is currently using and the next start configuration is the one that will be used the next time the guest is started. Having two configurations allows the administrator to set up a different configuration for the next start while the guest is running. To view the next start configuration, the use the -D option specifying a deferred start configuration. To view the last start configuration, use the -L option specifying the last start configuration. The hpvmmodify -U option can be used to remove the next start or deferred configuration, effectively undoing those changes. Options The following options can be specified only once. The hpvmstatus command recognizes the following options and arguments: -v Displays the version number of the hpvmstatus command. The version number is displayed first, followed by information specified by other options. -V Displays detailed information (verbose mode) about the virtual machines, including the status of migrating virtual machines. For migrating virtual machines, the verbose status displays in which stage the migration is and percent completed for that stage. The verbose status also displays the source and target VM Host aliases and IP addresses. The -V, -M, and -X options are mutually exclusive. -M Displays verbose attribute and resource information in machine- readable format, including information on migrating virtual machines. Individual fields are separated by one of three delimiters: • The colon (:) separates each field and resource type. • The semicolon (;) separates subfields of a resource type. • The comma (,) separates individual items in a list of similar items. The -V, -M, and -X options are mutually exclusive. -X Displays verbose information about attribute and resource in XML format, including information on migrating virtual machines. The -V, -M, and -X options are mutually exclusive. -P vm-name Specifies the name of the virtual machine for which information is to be displayed. The -P and -p options are mutually exclusive. -p vm-number Specifies the number of the virtual machine for which information is to be displayed. The vm_number is assigned when a virtual machine is created and is displayed by the hpvmstatus command. The -P and -p options are mutually exclusive. -D Displays resource assignments that takes effect the next time the virtual machine is started (deferred mode). 267 -L Displays the changes from the current configuration. -e Displays the event log for the VM Host or the specified virtual machine. The event log records all changes to virtual machine configurations. -i This option, when used with the -P option, prints statistics collected by the monitor. Currently, these include vCPU percentage and durations over the lifetime of the guest. -r Displays the CPU entitlement information for the virtual machines, including: • #vCPUs: The number of virtual CPUs in this virtual machine. • Entitlement: The amount of CPU entitlement this virtual machine can use per virtual CPU. Note that the displayed value may be slightly different than what was specified. For example, the value can be rounded down to the nearest whole percentage of CPU entitlement. • Maximum: The maximum amount of CPU entitlement this virtual machine can use. Note that the displayed value may be slightly different than what was specified. For example, the value may be rounded up to the nearest whole percentage of CPU entitlement. If no maximum is set, the default is 100% or all the CPU cycles. For example, a 1500Mhz CPU displays 1500Mhz. • Percent Usage: The percentage of the VM Host physical CPUs this virtual machine has used during the last interval period. • Cumulative Usage: The number of VM Host CPU ticks this virtual machine has consumed since the virtual machine was booted. When you specify a virtual machine, the hpvmstatus command displays the following information for each virtual CPU: • Cumulative Usage: The number of ticks this virtual CPU has consumed since the virtual machine was booted. • Guest percent: The CPU percentage that the guest has consumed. • Host percent: The CPU percentage that the VM Host uses on behalf of the guest. • Cycles achieved (in MHz). • Sampling Interval: The time between samples. -d Displays the devices on the specified virtual machine in the same format used on the command line. -S Reports the VM Host scheduler mode (CAPPED or NORMAL). If CAPPED, displays information about the controller process. -s Displays the current VM Host resources. -m Displays information about the multiserver environment, including the Serviceguard identifier, state, IP address, and host name. If the VM Host is not a Serviceguard server, the following message is displayed: No HPVM multi-server environment configured. -C Displays the type of memory each guest and VM Host is using: cell local memory, interleaved memory, or none. If no guest name/number is specified, all are printed. -A Displays the guest configuration differences between the next start and the last start guest configurations. If there are no differences, the following messages is printed and the next start configuration replaces the current configuration: No differences were found. Copy has been removed. If only the last configuration is present, the following message is returned: 268 No next start configuration is found. RETURN VALUES The hpvmstatus command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmstatus command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • An invalid value is specified for an option. • The vm-name or vm-number does not exist, cannot be accessed, is not a virtual machine, or is corrupt. • A value was omitted for an argument that requires one, or a value was supplied for an argument that does not take one. • The hpvmstatus command and the Integrity VM software are not at the same version levels. EXAMPLES Summarize information about all the virtual machines on the VM Host: # hpvmstatus [Virtual Machines] Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid ==================== ===== ======= ========= ====== ===== ===== ======= ======== config1 1 HPUX Off (NR) 1 5 1 512 MB 0 config2 2 HPUX Off 1 7 1 1 GB 0 winguest1 5 WINDOWS On (OS) 1 5 1 1 GB 0 winguest2 9 WINDOWS Off 1 3 1 2 GB 0 Display detailed information about a virtual machine named guest1. # hpvmstatus -P guest1 -V [Virtual Machine Details] Virtual Machine Name : guest1 Virtual Machine UUID : bf4c3714-df65-11da-bd4e-00306e4a93e6 Virtual Machine ID : 5 Virtual Machine Label : VM's Model Name : server Integrity Virtual Machine VM's Serial Number : VM00619004 VM's Config Version : 4.1.0 VM's Config Label : HPVM B.04.10 13h00m11s EST Operating system : HPUX OS Version Number : State : On (OS) Start type : Manual Console type : vt100-plus Guest's hostname : Guest's IPv4 address : 106.16.5.24 Guest's IPv6 address : fe80::ee8d:40ff:fe58:4d28 EFI Location : /opt/hpvm/guest-images/common/efi Pattern File location : /opt/hpvm/guest-images/common/patterns.vmmpat ... Display the attributes and resources attached to the virtual machine config2: # hpvmstatus -P config2 [Virtual Machine Details] Virtual Machine Name VM # OS Type State ==================== ===== ======= ======== 269 config2 2 HPUX On (OS) [Authorized Administrators] Oper Groups: Admin Groups: Oper Users: Admin Users: [Virtual CPU Details] #vCPUs Entitlement Maximum ====== =========== ======= 1 10.0% 100.0% [Memory Details] Total Reserved Memory Memory ======= ======== [Dynamic Memory Information] Minimum Target Maximum Memory Memory Memory =========== =========== =========== 1024 MB 2039 MB 2048 MB [Storage Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= disk scsi 0 1 0 0 0 disk /dev/rdisk/disk00 [Network Interface Details] Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address ========= ========== ========== ======= === === === ================= vswitch avio_lan 192net 1 0 1 0 de-ad-be-ef-17-67 vswitch lan 15net 1 0 2 0 66-c7-a6-2d-d6-01 vswitch lan 192net 3 0 3 0 be-ef-de-ad-17-67 vswitch lan localnet 1 0 4 0 be-ef-17-67-de-ad [Misc Interface Details] Guest Physical Device Adaptor Bus Dev Ftn Tgt Lun Storage Device ======= ========== === === === === === ========= ========================= serial com1 tty console Display information about a gWLM managed VM Host: # hpvmstatus -S HPVM scheduler is running in CAPPED mode. Controller process information: PID=13456,NAME=gWLM,HOST=acms.work.com,URL=http://acms.work.com:280 NONVM group entitlement information: Percent Cumulative #VCPUs Entitlement Maximum Usage Usage ====== =========== ======= ======= ================ 0 108MHz 1300MHz 1.9% 469302 Startable virtual machines: vm1,vm2,vm3,vm4,vm5,vm6 Display the system resources on the VM Host system: # hpvmstatus -s [HPVM Server System Resources] Processor speed = 900 Mhz Total physical memory = 6132 Mbytes 270 Total number of processors = 2 Available memory = 2557 Mbytes Available swap space = 1541 Mbytes Maximum vcpus for an HP-UX virtual machine = 2 Maximum vcpus for a Windows virtual machine = 2 Maximum vcpus for a Linux virtual machine = 2 Available entitlement for a 1 way virtual machine = 900 Mhz Available entitlement for a 2 way virtual machine = 810 Mhz Display the Serviceguard server information on the VM Host system: # hpvmstatus -m HPVM Multi-server environment Server group name : HPVM-SG-hpvm_sg_1131 Server group uuid : 45e2a680-af14-11dc-9e00-00306e4a831c This server's identifier: 2 Server_id : 2 Server_state : 1 Server_ipaddr : 10.0.128.116 Server_hostname : troop Server_uuid : 12345678-abcd-1234-abcd-123456789012 Server_physical_uuid : 58d03f5d-79ed-11d9-b720-17c097e9e0d0 Server_id : 1 Server_state : 1 Server_ipaddr : 10.0.128.159 Server_hostname : company Server_uuid : 23456789-abcd-5678-efgh-123456789012 Server_physical_uuid : 560ef4fb-7e16-11d7-86df-c7749ef083ae Display the devices on the specified virtual machine in the same format used on the command line: # hpvmstatus -P hpvm0014 -d [Virtual Machine Devices] [Storage Interface Details] disk:scsi::0,0,1:lv:/dev/vg01/rlv2 [Network Interface Details] network:lan:0,1,0x56A3E9D74099:vswitch:myswitch [Misc Interface Details] serial:com1::tty:console Displays whether the guests are cell local memory, interleaved memory or none. Note that "none" or "cell" only appear in guests that have not been booted yet. Once booted, they must either choose interleaved memory "ilm", or pick a home cell number. The Other column is the sum of all other cell local memory outside the home cell (ideally 0). #hpvmstatus -C # hpvmstatus -c [Guest Cell Local Memory Usage] Cell MB MB MB Virtual Machine Name VM # Prefer Interleave Home Cell Other Cell ==================== ===== ====== ========== ========== ========== lp0 8 0 2067 0 0 lp1 9 cell 0 0 0 lp2 11 none 0 0 0 AUTHORS The hpvmstatus command was developed by the HP. SEE ALSO On the VM Host: 271 hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), hpvmsar(1M), hpvmstart(1M), hpvmstop(1M), hpvmupgrade(1M), p2vassist(1M) On the Integrity VM guest: hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3) 272 hpvmstop(1M) NAME hpvmstop -- Stop a virtual machine. SYNOPSIS hpvmstop { -P vm-name | -p vm-number | -a } [ -h | -g ] [-F] [-q] [-Q] DESCRIPTION The hpvmstop command stops a running virtual machine by simulating the operations performed at the system console on a physical system. The command can perform a hard stop, which functions like a power failure, or a graceful stop, in which the guest operating system receives notification and time to perform cleanup operations before the stop. If the hpvmstop command returns an error message, the specified virtual machine is shut down. The hpvmstop command does not create a crash dump, and automatic restart is not performed. Unintentional use of the hpvmstop command has serious consequences; therefore, the user is prompted to confirm the operation unless the -F (force) option is specified. Only superusers can execute the hpvmstop command. Options The following options can be specified only once. The hpvmstop command recognizes the following command-line option and argument: -P vm-name Specifies the unique name of the virtual machine to be stopped. You must specify the -P , -p, or -a option. -p vm-number Specifies the unique number of the virtual machine to be stopped. The vm_number is displayed by the hpvmstatus command. You must specify the -P , -p, or -a option. -a Stops all active guests. You must specify the -P , -p, or -a option. When you specify the -a option, you must also specify the -F option. -g Specifies that a graceful shutdown be performed within the specified or default graceful_stop_timeout period. If the timeout period expires before the graceful shutdown is complete, a hard stop is performed. The guest operating system is notified of an imminent power failure, which gives it time to perform cleanup operations. HP recommends stopping virtual machines using their native operating system commands. NOTE: To set a graceful shutdown, use the hpvmmodify —x graceful_stop_timeout={0|number} command. See hpvmmodify(1) for more information. The -h and -g options are mutually exclusive. -h Performs a hard stop, which is equivalent to a power failure. This is the default action. The guest operating system receives no notice and thus no opportunity to clean up. In these circumstances, the guest operating system does not create a crash dump, and automatic restart is not performed. HP recommends that you stop virtual machines by using their native operating system commands. 273 NOTE: If neither -g nor -h are specified, a hard stop is performed. The -h and -g options are mutually exclusive. -F Specifies the force option. Omits the confirmation dialog before resetting the virtual machine. This option is intended for use by scripts and other noninteractive applications. -q Makes certain scripted operations less verbose (quiet mode). -Q Quietly performs the command. The default is to prompt for confirmation of the command before performing it. NOTE: When stopping a guest that is running a heavy I/O load, the hpvmstop command can exhaust its timeout allotted for the stop and exit. When this happens, the SIGKILL has been sent to the running hpvmapp process and will be received by that process when pending I/Os complete. The SIGKILL then terminates the guest. This is expected behavior for an I/O intensive process receiving a SIGKILL. This behavior is not specific to Integrity VM, but is how the signal-delivery mechanism works in the HP-UX operating system. RETURN VALUES The hpvmstop command exits with one of the following values: 0: Successful completion. 1: One or more error conditions occurred. DIAGNOSTICS The hpvmstop command displays error messages on stderr for any of the following conditions: • An invalid option is specified. • An invalid value is specified for an option. • The vm-name or vm-number does not exist, cannot be accessed, is not a virtual machine, or is corrupt. • A value was omitted for an argument that requires one, or a value was supplied for an argument that does not take one. • The hpvmstop command and Integrity VM software are at different revision levels. • The specified guest is a distributed guest. EXAMPLES Perform a graceful shutdown of the virtual machine called host1: # hpvmstop -P host1 -g AUTHORS The hpvmstop command was developed by the HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), hpvminfo(5), hpvmmigrate(1M), hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), hpvmstart(1M), hpvmstatus(1M), p2vassist(1M) On the Integrity VM guest: hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3) 274 hpvmupgrade(1M) NAME hpvmupgrade -- Assist an Integrity VM upgrade. SYNOPSIS hpvmupgrade -e [-v] DESCRIPTION The hpvmupgrade command performs operations specific to an Integrity VM version upgrade. The -e option examines the current Integrity VM server system to determine whether any virtual machines will have difficulty booting after the upgrade to the next Integrity VM version. The hpvmupgrade command produces the following log file: /var/opt/hpvm/common/hpvmupgrade.current_date_and_time. This utility was created for the HP-UX 11i v2 to HP-UX 11i v3 Integrity VM upgrade and is designed to run on Integrity VM servers that are at Version 3.0 or later. To determine the version of the utility, use the -v option. If the utility is at Version 4.1, it can assist server upgrades up to Integrity VM version 4.1. New versions of hpvmupgrade will be available in the future. Options The following options can be specified only once. The hpvmupgrade command recognizes the following command-line options: -e Examines the system for an upgrade. -v Displays the version of the utility. RETURN VALUES The hpvmupgrade command exits with one of the following values: 0: Successful completion. 1: An error occurred during the processing of the command. DIAGNOSTICS hpvmupgrade outputs all error and warning messages to the log file /var/opt/hpvm/common/hpvmupgrade.current_date_and_time. AUTHORS The hpvmupgrade command was developed by the HP. SEE ALSO On the VM Host: hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), hpvmmodify(1M), hpvmremove(1M), hpvmresources(5), hpvmstart(1M)hpvmstatus(1M), hpvmstop(1M), p2vassist(1M) 275 p2vassist(1M) NAME p2vassist -- Physical to virtual migration assistant. SYNOPSIS p2vassist function-number DESCRIPTION The p2vassist command is a menu-driven application that helps migrate applications from a running physical or virtual machine to another. To start the script, enter the p2vassist command: # p2vassist P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit Enter Option Number: The choose from the following menu options: 1 General Configurations This function sets the server from where the installation depot will be obtained. The format accepted is the same as option -s to the swinstall command. The following example configures a server called server.abc.com and a depot location on /release/1123.0706/ic054 as the depot server: General Configurations ====================================== 1 ) Set Source Depot ----- 0 ) Return Enter Option Number: 1 In this option you can set the location of the depots of the application to be installed on the target system. It can be a hostname or a local directory. Depots source currently configured: NONE Depots source (type 'q' to return) Enter the full path for the depot location. For example: server.abc.com:/release/1123.0706/ic054 2 Manage Applications Use this menu to list the depots installed on the server, and to select the depots to consolidate and the directories with the application data. Entering this option displays the following menu: Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications 276 ----- 0 ) Return • List Applications This option lists the products installed on the server. You can obtain the names of the depots to consolidate from this listing. The list returned does not contain Operational Environment related packages. The list of packages to exclude is stored in a configuration file (see the Add Data Directories/Files item in this list). For example: Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 1 ACXX C.06.00 HP aC++ BullseyeCoverIA 7.5.61 HP-UX IA C-ANSI-C C.06.10 HP C/ANSI C Compiler C-Dev-Tools B.11.23.11 C Language Development Tools gcc 4.1.0 gcc gdbm 1.8.3 gdbm . . vim 7.0 vim xpm 3.4k xpm zlib 1.2.3 zlib The listing shown on your system might differ from this example. • Select Applications A list of depots (space separated) is the input to this option. The script verifies whether the depots displayed belong to the list of installed software. The following example shows the addition of four depots (belonging to the web server suite): Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 2 Select Applications ============================== Please enter the list of depots to be installed on the target system, separated by spaces. You can list the applications using the first option of this menu. Depots list (type 'q' to return): Enter the names of the depots. For example: hpuxwsAPACHE hpuxwsTOMCAT hpuxwsWEBMIN hpuxwsXML • Add Data Directories/Files Specifies the directories or files that contain the application configuration and data. Enter absolute paths that refer to directories and files that already exist. Some known, 277 system-level directories are rejected by default (such as ./, /var, and /usr). If you specify a software depot, p2vassist reads the data directories from the depot definition. These directories appear as a suggestion to the user. Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 3 Please enter the list of directories/files to be transferred to the target system, separated by spaces. The following directories are obtained by examining the depot configuration, you may copy them to the prompt below in order to be used: /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin List (type ENTER to return): For example: List (type to return): /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin • Consolidate Applications Consolidates the selected applications, along with their directories and files, to the specified server. For example: Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 4 Consolidate Applications ============================== This option will consolidate application(s) installed on the current system and then migrate into another a suitable target system. The target system is the machine which will host the consolidated application(s). This wizard requires that non-interactive Secure Shell (ssh) access be set up between this system and the target server. Depots source currently configured: depsrv.hp.com:/release/1123.0706/ic054 Depots to be installed: hpuxwsAPACHE hpuxwsTOMCAT hpuxwsWEBMIN hpuxwsXML Dirs/Files to be transferred: /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin Please enter the hostname/IP of the target system (type 'q' to return): vmp2V After you press Enter, the process continues: Querying the system vmp2v for current status, this may take a few moments... Installing depots... Press to continue and begin transferring files. Transferring Configuration files... Checking application disk space... Application disk space Ok. Transferring /opt/hpws/apache directory to vmp2v, please wait... Transferring /opt/hpws/tomcat directory to vmp2v, please wait... Transferring /opt/hpws/webmin directory to vmp2v, please wait... Application Sucessfully consolidated on host: vmp2v Press to return to menu: 278 3 Manage Operating System Images This option is not supported in the current version of Integrity VM. RETURN VALUES Upon completion, the p2vassist command returns with one of the following values: 0: Successful completion. The application was successfully consolidated. 1: An error occurred. EXAMPLES The following example shows how to consolidate applications: # p2vassist P2V Assistant Manager ====================================== 1 ) General Configurations 2 ) Manage Applications 3 ) Manage O.S. Images ----- 0 ) Exit Enter Option Number: _1_ General Configurations ====================================== 1 ) Set Source Depot ----- 0 ) Return Enter Option Number: 1 In this option you can set the location of the depots of the application to be installed on the target system. It can be a hostname or a local directory. Depots source currently configured: NONE Depots source (type 'q' to return): server.abc.com:/release/1123/ic054 After the depot source is defined, select the application depots to be installed. To obtain the correct name of the depots, list the installed applications: Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 1 ACXX C.06.00 HP aC++ AudioDevKit B.11.23.10 HP-UX Audio Desktop Developer Kit C-ANSI-C C.06.10 HP C/ANSI C Compiler C-Dev-Tools B.11.23.11 C Language Development Tools gcc 4.1.0 gcc 279 gdbm 1.8.3 gdbm . . hpuxwsAPACHE B.2.0.55.03 HP-UX Apache-based Web Server hpuxwsTOMCAT B.5.5.9.04 HP-UX Tomcat-based Servlet Engine hpuxwsWEBMIN A.1.070.07 HP-UX Webmin-based Admin hpuxwsXML A.2.00 HP-UX XML Web Server Tools . . vim 7.0 vim xpm 3.4k xpm zlib 1.2.3 zlib This example shows the correct names of the depots that can be obtained. In this example, consolidates the web server suite (hpuxwsAPACHE, hpuxwsTOMCAT, hpuxwsWEBMIN and hpuxwsXML). To enter these names, choose Option 2 from the Manage Applications menu. Then type the depot names at the prompt. For example: Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 2 Select Applications ============================== Please enter the list of depots to be installed on the target system, separated by spaces. You can list the applications using the first option of this menu. Depots list (type 'q' to return): hpuxwsAPACHE hpuxwsTOMCAT hpuxwsWEBMIN hpuxwsXML After setting the depots, choose the directories to be transferred, along with the installed product. The p2vassist utility scans the configuration of the depots to make a list of the directories. To specify a directory, copy the string to the prompt. For example: Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 3 Please enter the list of directories/files to be transferred to the target system, separated by spaces. The following directories are obtained by examining the depot configuration, you may copy them to the prompt below in order to be used: /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin Please enter directories or files: /opt/hpws/apache /opt/hpws/tomcat /opt/hpws/webmin Finally, consolidate the application on the new host: Manage Applications ====================================== 1 ) List Applications 2 ) Select Applications 3 ) Add Data Directories/Files 280 4 ) Consolidate Applications ----- 0 ) Return Enter Option Number: 4 Consolidate Applications ============================== This option will consolidate application(s) installed on the current system and then migrate into another a suitable target system. The target system is the machine which will host the consolidated application(s). This wizard requires that non-interactive Secure Shell (ssh) access be set up between this system and the target server. Depots to be installed: Firefox Dirs/Files list not defined. Please enter the hostname/IP of the target system: vmp2v Querying the system vmp2v for current status, this may take a few moments... Installing depots... Transferring Configuration files... Checking application disk space... Application successfully consolidated on host: vmp2v Press to return to menu: AUTHORS The p2vassist command was developed by the HP. SEE ALSO On the VM Host: hpvm(5), hpvmclone(1M), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(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) On the Integrity VM guest: hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3) 281 282 Glossary This glossary defines the terms and abbreviations as they are used in the Integrity VM product documentation. Accelerated Virtual Input/Output See AVIO adoptive node The cluster member where the package starts after it fails over. APA Auto Port Aggregation. An HP-UX software product that creates link aggregates, often called “trunks,” which provide a logical grouping of two or more physical ports into a single “fat pipe”. This port arrangement provides more data bandwidth and higher reliability than would otherwise be available. application A collection of processes that perform a specific function. In the context of virtual machine clusters, an application is any software running on the guest. asymmetric Serviceguard configuration A cluster configuration in which the cluster nodes do not have access to the same physical storage and network devices. autoboot A characteristic of a virtual machine whereby it is set to start whenever Integrity VM starts. Virtual machines can be set to either auto or manual boot using the -b option to the hpvmcreate, hpvmmodify, hpvmmigrate, or hpvmclone commands. available resources Processors, memory, and I/O resources that are not assigned to a virtual machine. These resources are available to be used in new partitions or can be added to existing partitions. AVIO Accelerated Virtual Input/Output. An I/O protocol that improves virtual I/O performance for network and storage devices used within the Integrity VM environment. The protocol also enables support for a greater number of virtual I/O devices per guest. Special drivers are required on both the VM host and guests. Participating guests must include a virtual I/O device configured to use the AVIO protocol. backing store The physical device on the VM Host that is allocated to guests, such as a network adapter, disk, or file. BMC Baseboard Management Controller. The Management Processor (MP) console for Intel® Itanium systems. boot virtual machines To load a virtual machine's operating system and start it. Once a virtual machine has been configured with an operating system, it is considered a guest, and is started automatically when Integrity VM starts, or manually using the hpvmstart command. See also start virtual machines. captive virtual console account A special-purpose user account created on the VM Host for each guest administrator or operator. cluster Two or more systems configured together to host workloads. Users are unaware that more than one system is hosting the workload. cluster member A cluster node that is actively participating in the Serviceguard cluster. cluster node A system (VM Host or guest) configured to be a part of a Serviceguard cluster. dedicated device A pNIC or storage unit that is dedicated to a specific virtual machine. A dedicated device cannot be used by multiple virtual machines. distributed guests Guests that has been configured as a Serviceguard package. EFI Extensible Firmware Interface. The boot firmware for all HP Integrity systems. entitlement The amount of a system resource (for example, a processor) that is guaranteed to a virtual machine. The actual allocation of resources to the virtual machine can be greater or less than its entitlement, depending on the virtual machine's demand for processor resources and the overall system processor load. event log Information about system events. An event log indicates what event has occurred, when and where it happened, and its severity (alert level). Event logs do not rely on normal I/O operation. 283 extensible firmware interface See EFI. failover The operation that takes place when a primary service (network, storage, or CPU) fails, and the application continues operation on a secondary unit. In the case of Serviceguard virtual machines, the virtual machine can fail over to another cluster member. In case of a network failure, on a properly configured system the virtual machine can fail over to another LAN on the same cluster node. guest The virtual machine running the guest OS and guest applications. guest administrator The administrator of a virtual machine. A guest administrator can operate the virtual machine using the hpvmconsole command with action that can affect the specific guest only. guest application A software application that runs on a guest. guest application package A guest application that has been configured as a Serviceguard package. guest console The virtual machine console that is started by the hpvmconsole command. guest management software Software that is provided with Integrity VM that you install on the guest to ensure the guest is manageable by Integrity VM and other components of the Virtual Server Environment and HP Integrity Virtual Machines Manager. guest operator The administrator of the guest OS. This level of privilege gives complete control of the virtual machine but does not allow control of the other guests, the VM Host, or the backing stores. guest OS Guest operating system. guest package A Serviceguard package that is an Integrity VM guest. host 1. A system or partition that is running an instance of an operating system. 2. The physical machine that is the VM Host for one or more virtual machines. host administrator The system administrator. This level of privilege provides control of the VM Host system and its resources, as well as creating and managing guests. host name The name of a system or partition that is running an OS instance. host OS The operating system that is running on the host machine. Ignite-UX The HP-UX Ignite server product. Used as a core build image to create or reload HP-UX servers. Integrity Virtual Machines The HP Integrity Virtual Machines product, which allows you to install and run multiple systems (virtual machines) on the same physical host system. Integrity VM See Integrity Virtual Machines.. ISSE HP Instant Support Enterprise Edition. A secure remote support platform for business servers and storage devices. localnet A virtual switch created by default when Integrity VM is installed on a VM Host. The local network created by this vswitch can be used for communications among guests but not for communication between the VM Host and any guest or between any external system and a VM guest. migration The operation of stopping a Serviceguard package on one cluster member and then starting it on another cluster member. Migrating the package (for example, a virtual machine), can be useful in system management procedures and workload balancing. See also virtual machine migration.. multiserver environment A Serviceguard cluster consisting of VM Host systems. NIC Network Interface Card. Also called “network adapter.” NSPOF No single point of failure. A configuration imperative that implies the use of redundancy and high availability to ensure that the failure of a single component does not impact the operations of the machine. online VM migration Enables a running guest and its applications to be moved from one VM Host to another without service interruption. OVMM Online VM migration. See online VM migration. 284 Glossary package configuration script A script that is customized for each virtual machine Serviceguard package and that contains specific variables and parameters, including logical volume definitions, for that virtual machine. package control script A script containing parameters that control how Serviceguard operates. PMAN Platform Manager. See VM Host. pNIC Physical network interface card. primary node The cluster member on which a failed-over package was originally running. redundancy A method of providing high availability that uses mltiple copies of storage or network units to ensure services are always available (for example, disk mirroring). restricted device A physical device that can be accessed only by the VM Host system. For example, the VM Host boot device should be a restricted device. Serviceguard Serviceguard allows you to create high-availability clusters of HP 9000 or HP Integrity servers. Serviceguard can be used to manage virtual machines as Serviceguard packages. A Serviceguard package groups application services (individual HP-UX processes) together and maintains them on multiple nodes in the cluster, making them available for failover. SGeRAC Serviceguard extension for real application clusters. SGeSAP Serviceguard extension for SAP. shared device A virtual device that can be used by more than one virtual machine. start virtual machines To start a virtual machine that has been booted before. See also boot virtual machines. storage unit A file, DVD, disk, or logical volume on the VM Host that is used by the virtual machines running on the VM Host. symmetric Serviceguard configuration A cluster configuration in which the nodes share access to the same storage and network devices. virtual console The virtualized console of a virtual machine that emulates the functionality of the Management Processor interface for HP Integrity servers. Each virtual machine has its own virtual console from which the virtual machine can be powered on or off and booted or shut down, and from which the guest OS can be selected. virtual device An emulation of a physical device. This emulation, used as a device by a virtual machine, effectively maps a virtual device to an entity (for example, s a DVD) on the VM Host. virtual machine Virtual hardware system. Also called VM. virtual machine application The executable program on the VM Host that manifests the individual virtual machine. The program communicates with the loadable drivers based on information in the guest-specific configuration file, and it instantiates the virtual machine. virtual machine console The user-mode application that provides console emulation for virtual machines. Each instance of the virtual machine console represents one console session for its associated virtual machine. virtual machine host See VM Host. Virtual Machine Manager (VMM) The management application responsible for managing and configuring HP Integrity Virtual Machines. virtual machine migration Migration of a virtual machine from one VM Host system to another by using the Integrity VM command hpvmmigrate. Do not use this command for virtual machine packages. virtual machine package A virtual machine that is configured as a Serviceguard package. virtual network A LAN that is shared by the virtual machines running on the same VM Host or in the same Serviceguard cluster. virtual switch See vswitch. VM See Virtual machine. VM Host The virtual machine host system. 285 vNIC Virtual network interface card (NIC). The network interface that is accessed by guest applications. vswitch Virtual switch. A component in the guest virtual network. By associating the vswitch with a physical working LAN on the VM Host, you provide the guest with the capability of communicating outside the localnet. WBEM Web-Based Enterprise Management. A set of Web-based information services standards developed by the Distributed Management Task Force, Inc. A WBEM provider offers access to a resource. WBEM clients send requests to providers to get information about and access to the registered resources. workload The collection of processes in a virtual machine. 286 Glossary Index A adapters virtual storage, 93 adding virtual storage, 112 admin privileges, 136 Administrator guest, 111 VM Host, 111 Agile device names, 39 APA, using, 120 applications running on guests, 19 running on VM Host, 19 attachable devices specifying, 109 attached devices, 94 attached I/O, 93 Auto Port Aggregation (see APA) Automatic cell balancing, 43 AVIO using, 17 B bundle names, 24 C CD/DVD burner, virtual, 93 characteristics of virtual machines, 40 cloning guests VLAN information, 128 cloning virtual machines, 54 cluster in a box configuration, 177 Cold-install, 32 configuration files for guests, 140 configuring virtual networks , 125 configuring virtual storage, 94 creating HP-UX guests, 61 troubleshooting, 64 creating Linux guests, 79 creating Serviceguard packages, 180 creating virtual machines, 39 example of, 49 troubleshooting, 59 creating virtual networks, 119 creating virtual storage devices, 91 creating VLANs, 127 creating vswitches, 120 creating Windows guests, 65 D deleting devices, 150 deleting virtual storage, 113 deleting vswitches, 123 device database, 148 managing, 148 devices deleting, 150 replacing, 150 restricting, 150 sharing, 149 virtual storage, 93 disk space VM Host requirements, 24 distributed guests, 184 managing, 184 monitoring, 184 starting, 184 stopping, 184 documentation, 21 dynamic memory, 140 E entitlement, 41 F failover (see cluster failover) G guest administrator, 111 commands, 111 guest configuration changing, 51 guest configuration files, 140 guest console providing access to, 135 guest CPU allocation, 41 guest management software installing, 137 guest networks setting up, 124 guest operating system, 41 guest packages failover, 184 troubleshooting, 186 guest user, 112 guests, 15 local networks for, 122 log files, 148 managing, 133 monitoring, 133 removing, 58 running applications on, 19 guests as packages creating, 180 H hardware requirements, 23 HP Reinstall media for Windows guests, 67 HP-UX guests creating, 61 287 installing, 61 installing guest management software, 64 hpvmclone command, 54 options, 54 hpvmcollect command, 189, 191 options, 189, 191 hpvmconsole command, 125 options, 136, 139 using, 135 hpvmcreate command, 48 options, 49 hpvmdevmgmt command, 148 hpvminfo command, 36 hpvmmigrate command, 157 hpvmmodify command, 51 hpvmnet command, 120 hpvmremove command using, 58 hpvmstart command options, 49 hpvmstatus command, 133 displaying VLANs with, 129 hpvmstop command, 57 I installing guest management software , 137 installing HP-UX guest management software, 64 installing HP-UX guests, 61 installing Integrity VM, 23, 25 installing Linux guest management software, 89 installing Linux guests, 79 installing Red Hat Linux guests from a boot disk, 84 from ISO images, 80 installing SUSE Linux Guest from ISO images, 86 installing Windows from OPK, 67 installing Windows guests, 65 Integrity Virtual Machines (see Integrity VM) Integrity VM installation requirements, 23 installing, 23 problems installing, 37 removing, 36 verifying installation, 36 Integrity VM commands hpvmclone, 54 hpvmcollect, 189, 191 hpvmconsole, 139 hpvmcreate, 48 hpvmdevmgmt, 148 hpvminfo, 36 hpvmmigrate, 157 hpvmmodify, 51 hpvmnet, 120 hpvmremove, 58 hpvmstart, 49 hpvmstatus, 133 hpvmstop, 57 Integrity VM installation procedure, 25 K kernel parameters modified by Integrity VM installation, 26 L Legacy device names, 39 Linux guests creating, 79 managing, 89 requirements, 80 localnet, 122 log files, 148 M managing device databases, 148 managing guests, 133 managing Linux guests, 89 managing size of VMM driver log file, 192 managing vNICs, 124 managing Windows guests, 74 manpages, 21 media changer, virtual, 93 memory planning, 42 VM Host requirements, 24 migrating virtual machines from physical server to virtual machine, 169 modifying distributed guests, 185 modifying virtual storage, 113 monitoring distributed guests, 184 monitoring guests, 133 multipath solutions, 97 O oper privileges, 136 OPK media, 67 overdriving storage devices, 97 P P2V (see Physical-to-Virtual) physical NICs (see pNICs) planning guest memory, 42 virtual devices, 43 virtual networks, 43 virtual storage devices, 44 pNICs, 119 ports VLAN, 128 privileges guest console, 136 problems reporting, 189 processing power allocating, 41 providing access to virtual consoles, 135 288 Index R re-creating vswitches, 124 redefining pNICs, 130 removing guests, 58 removing Integrity VM, 36 removing vNICs, 126 replacing devices, 150 reporting problems, 189 requirements for installing Integrity VM, 23 restricting devices, 150 S Serviceguard using with Integrity VM, 175 setting up virtual storage, 100 shared I/O, 92 sharing devices, 149 specifying virtual storage, 100 specifying VM Host virtual storage, 101 starting distributed guests, 184 starting virtual machines, 49 starting vswitches, 124 stopping distributed guests, 184 stopping guests, 57 storage, virtual, 91 switch ports configuring, 130 symmetric configuration for virtual machine migration, 154 system requirements (see Hardware requirements) T tagged frames, 127 tape, virtual, 93 troubleshooting dynamic memory problems, 145 guest packages, 186 HP-UX guest creation problems, 64 Integrity VM installation problems, 37 network problems, 130 P2V problems, 173 virtual machine creation, 59 VLAN problems, 131 Windows guests, 77 U Update-UX, 32 upgrading guests, 30 Integrity VM, 26 user guest, 112 Using virtual console, 138 using virtual storage, 110 examples of, 112 V verifying Integrity VM installation, 36 virtual consoles help, 22 providing access to, 135 using, 138 virtual CPUs, 41 virtual devices planning, 43 Virtual Disk specifying, 102 virtual disks, 94 Virtual DVD specifying, 106 virtual DVDs, 94 Virtual FileDisk specifying, 105 Virtual FileDVD specifying, 107 virtual LANs (see VLANs) Virtual LvDisk specifying, 103 virtual machine name, 41 virtual machines, 15 cloning, 54 creating, 39 migrating, 153 introduction to, 153 procedure for, 156 starting, 49 virtual network devices allocating, 124 virtual networks configuration, 125 creating, 119 planning, 43 virtual NICs (see vNICs) Virtual NullDVD specifying, 107 virtual storage adding, 112 architectures, 92 attachable devices, 109 attached, 93 configuring, 94 deleting, 113 formulating resource statements, 102 I/O stack, 96 implementations, 93 introduction, 91 making changes to, 99 management, 98 modifying, 113 multipath solutions, 97 performance, 95 setting up, 100 shared, 92 specifying, 100 289 specifying FileDisk, 105 specifying Virtual Disk, 102 specifying Virtual DVD, 106 specifying Virtual FileDVD, 107 specifying Virtual LvDisk, 103 specifying Virtual NullDVD, 107 specifying VM Host, 101 supportability, 95 time associated with setting up, 99 using, 110 virtual storage devices creating, 91 planning, 44 virtual switches (see vswitches) virtual-to-physical cluster configuration, 178 virtual-to-virtual cluster configuration, 177 VLANS displaying information about, 129 VLANs, 126 configuring on physical switches, 130 creating, 127 port states, 128 troubleshooting, 131 VM Host, 15 log files, 148 running applications in, 19 VM Host administrator, 111 commands, 111 VM Manager requirements for using, 25 VMM driver log file, 192 VMs as Serviceguard Nodes configuring, 176 VMs as Serviceguard Nodes configuration procedure, 178 VMs as Serviceguard Packages configuration, 179 vNICs, 120 managing, 124 removing, 126 VSE enabling, 75 vswitches creating, 120 deleting, 123 re-creating, 124 starting, 124 W WBEM Services, 25 Windows guests creating, 65 installing from HP Reinstall (OPK) media, 67 installing from Windows media, 70 managing, 74 requirements, 65 troubleshooting, 77 290 Index