VERSION 2.
VMware, Inc. Please note that you will always find the most up-to-date technical documentation on our Web site at http://www.vmware.com/support/. The VMwre Web site also provides the latest product updates. 3145 Porter Drive Palo Alto, CA 94304 www.vmware.com Copyright © 1998–2004 VMware, Inc. All rights reserved. Protected by one or more of U.S. Patent Nos. 6,397,242 and 6,496,847; patents pending.
Table of Contents Introduction to VMware ESX Server ______________________________ 21 VMware ESX Server System Architecture _____________________________22 Virtualization ________________________________________________22 Service Console ______________________________________________27 Using VMware ESX Server _________________________________________29 Familiarizing Yourself with ESX Server _____________________________29 Working With ESX Server _______________________________________33 Creating and Configu
Third Party Software Compatibility __________________________________76 Configuring a Virtual Machine for Use with Citrix MetaFrame XP ________76 Executing Scripts When the Virtual Machine’s Power State Changes ________77 Issues to Consider ____________________________________________78 Configuring Virtual Machines ______________________________________79 Recommended Configuration Options ____________________________80 Modifying the SMBIOS UUID ____________________________________81 Enabling the Physical Ha
Configuring a Virtual Machine’s Disk Usage ________________________113 Configuring a Virtual Machine’s Networking Settings ________________114 Configuring a Virtual Machine’s Hardware _________________________116 Setting Standard Virtual Machine Configuration Options _____________138 Setting Startup and Shutdown Options for a Virtual Machine __________139 Viewing a List of Connected Users _______________________________144 Viewing a Log of a Virtual Machine’s Events _______________________145 Modifying Virt
Using Network-based Replication Tools __________________________ 176 Using the VMware Remote Console _____________________________ 179 Using the Remote Console _______________________________________ 180 Starting the Remote Console on Windows ________________________ 180 Starting the Remote Console on Linux ___________________________ 180 Running a Virtual Machine Using the Remote Console _______________ 181 Special Power Options for Virtual Machines _______________________ 182 VMware Tools Settings _______
Configuring the SNMP Agent __________________________________231 Viewing the License and Changing Serial Numbers _________________232 Configuring Storage Area Networks _____________________________232 Adapter Bindings ____________________________________________238 Viewing Failover Paths Connections _____________________________239 __________________________________________________________241 Configuring a Swap File _______________________________________241 Changing Advanced Settings ______________________
Controlling VMkernel Module Loading During Bootup _________________ 288 Customizing Parameters of VMkernel Device Driver Modules on Bootup _________________________________________________ 288 Customizing Loading of VMkernel Device Driver Modules on Bootup _________________________________________________ 289 Storage and File Systems ______________________________________ 291 File System Management on SCSI Disks and RAID _____________________292 Viewing and Manipulating Files in the /vmfs Directory ________
Viewing the Current Multipathing State __________________________324 Setting Your Multipathing Policy for a LUN ________________________326 Specifying Paths _____________________________________________326 Saving Your Multipathing Settings ______________________________327 In Case of Failover ___________________________________________327 Configuration for Clustering ___________________________________ 329 What Is Clustering? _____________________________________________330 Applications that Can Use Cluster
Using Virtual Switches __________________________________________ 373 Choosing a Network Label _____________________________________ 373 Binding Physical Adapters _____________________________________ 373 Creating a Virtual Switch ______________________________________ 374 Choosing a Load Balancing Mode _______________________________375 Configuring the Bond Failure Mode ______________________________ 375 Using Beacon Monitoring _____________________________________ 376 Configuring External Network Switches
Automatic NUMA Optimizations ________________________________420 Manual NUMA Optimizations __________________________________420 Sizing Memory on the Server _____________________________________424 Server Memory _____________________________________________424 Service Console Memory ______________________________________424 Virtual Machine Memory Pool __________________________________424 Virtual Machine Memory ______________________________________425 Memory Sharing ________________________________________
www.vmware.
CHAPTER Introduction to VMware ESX Server 1 This VMware ESX Server Administration Guide provides information on how to use VMware ESX ServerTM once it has been installed. For information on installing ESX Server, refer to the VMware ESX Server Installation Guide.
VMware ESX Server Administration Guide VMware ESX Server System Architecture VMware ESX Server incorporates a resource manager and a service console that provides bootstrapping, management and other services. The design of the ESX Server core architecture implements the abstractions that allow hardware resources to be allocated to multiple workloads in fully isolated environments.
C H A P T E R 1 Introduction to VMware ESX Server inside a virtual machine) can never directly determine which specific underlying physical resources they are accessing, such as which CPU they are running on in a multiprocessor system or which physical memory is mapped to their pages. The virtualization of the CPU incorporates direct execution: non-privileged instructions are executed by the hardware CPU without overheads introduced by emulation.
VMware ESX Server Administration Guide Disk Virtualization Support of disk devices in ESX Server is an example of the product’s hardware independence. Each virtual disk is presented as a SCSI drive connected to a SCSI adapter. This device is the only disk storage controller used by the guest operating system, despite the wide variety of SCSI, RAID and Fibre Channel adapters that might actually be used in the system. This abstraction makes virtual machines at once more robust and more transportable.
C H A P T E R 1 Introduction to VMware ESX Server Private Virtual Ethernet Networks (VMnets) VMnet connections may be used for high-speed networking between virtual machines, allowing private, cost-effective connections between virtual machines. The isolation inherent in their design makes them especially useful for supporting network topologies that normally depend on the use of additional hardware to provide security and isolation.
VMware ESX Server Administration Guide Virtualization at a Glance ESX Server virtualizes the resources of the physical system for use by the virtual machines.
C H A P T E R 1 Introduction to VMware ESX Server Service Console Service Console Functions The ESX Server system management functions and interfaces are implemented in the service console. These include the HTTP, SNMP and API interfaces described above, as well as other support functions such as authentication and low-performance device access.
VMware ESX Server Administration Guide • Authentication daemon (vmauthd) — Authenticates remote users of the management interface and remote consoles using the username/password database. Any other authentication store that can be accessed using the Pluggable Authentication Module (PAM) capabilities present in the service console may also be used.
C H A P T E R 1 Introduction to VMware ESX Server Using VMware ESX Server VMware ESX Server contains many features to help you manage your virtual machines’ resources. In this section, we attempt to highlight some of these features, by listing tasks that you should perform on your ESX Server system. The information contained in this table presumes that you have successfully installed and configured ESX Server on your hardware. To get help, refer to the VMware ESX Server Installation Guide.
VMware ESX Server Administration Guide Task Description Decide how to organize your The default location for these files is the home directory of the user virtual machine that created the virtual machine. However, in production configuration files. environments, most virtual machines belong to teams rather than to individuals. Setting up some kind of central directory structure is a good idea. Upgrade any existing virtual machines from a previous version of ESX Server or another VMware product.
C H A P T E R 1 Introduction to VMware ESX Server Task Description Set user and group permissions for the owner of a virtual machine. Log into the management interface and click Manage Files. Navigate to the configuration file (.vmx) of the virtual machine. Click the check box next to the virtual machine’s configuration file, and click Edit Properties.
VMware ESX Server Administration Guide The following table includes tasks from the VMware Management Interface for a virtual machine user, who creates and modifies virtual machines. Task Description Log into the VMware Management Interface and download the remote console package.
C H A P T E R 1 Introduction to VMware ESX Server Task Description Install guest operating system and VMware Tools. VMware Tools is a software package installed in the guest operating system that gives you device drivers specific to VMware virtual devices where necessary, and it also includes several communication channels between the virtual machine and the ESX Server virtualization layer. See Installing a Guest Operating System and VMware Tools on page 45.
VMware ESX Server Administration Guide The following table includes ESX Server performance-related tasks for an Administrator (root user). Task Description Enhance performance on virtual machines, based on its application(s). ESX Server applies a proportional share mechanism to CPU, memory allocation, and disk bandwidth. Typically, the more shares a virtual machine has, the more CPU, memory or disk bandwidth it has.
C H A P T E R 1 Introduction to VMware ESX Server Task Description Be sure there is sufficient swap space for your guest operating system. For resource management purposes, ESX Server may increase the memory utilization within a guest operating system. Therefore, it is important to ensure that the guest operating system has sufficient swap space. Add additional swap space in the guest operating system, equal to the difference between the virtual machine's maximum and minimum memory sizes.
VMware ESX Server Administration Guide Problem Suggestions Can’t connect to the VMware Remote Console. Check to see if there has been a loss in IP connectivity. Check that the NIC duplex or speed matches with the Ethernet switch. Check that the service console is not swapping. Check that the root file system has available disk space. 36 www.vmware.
CHAPTER 2 Creating and Configuring Virtual Machines The following sections describe how to create and configure virtual machines and install the VMware Remote Console: • Creating a New Virtual Machine on page 38 • Installing a Guest Operating System and VMware Tools on page 45 • Using PXE with Virtual Machines on page 57 • Configuring a Virtual Machine to Use the LSI Logic SCSI Adapter on page 59 • Importing, Upgrading and Exporting Virtual Machines on page 64 • Preparing to Use the Remote Management Sof
VMware ESX Server Administration Guide Creating a New Virtual Machine You can create new virtual machines from within the VMware Management Interface. The process sets up a new configuration for each virtual machine you create this way. Note: You can only use ASCII characters in the entry fields when creating a virtual machine with the management interface. Thus, the virtual machine’s display name and path cannot contain non-ASCII characters.
C H A P T E R 2 Creating and Configuring Virtual Machines 2. Click Add Virtual Machine. The Add Virtual Machine wizard starts. 3. Choose the guest operating system for your virtual machine. Corresponding default entries appear for the name of the virtual machine and the name of its configuration file. You can change these settings. The name you enter in the Display Name field is the name that is listed in the VMware Management Interface.
VMware ESX Server Administration Guide When you are ready to proceed, click Next. 4. In the Processors list, choose the number of virtual CPUs in your virtual machine. You may choose 1 or 2 virtual CPUs, but they must be less than or equal to the number of physical CPUs on your server. Note: Some guest operating systems, such as Windows NT, can be configured with a single processor only. If you are configuring such a virtual machine, a note indicates this and you cannot select more than one virtual CPU.
C H A P T E R 2 Creating and Configuring Virtual Machines When you are ready to proceed, click Next. 5. Choose the type of virtual disk you want to add to the virtual machine. The setup process allows you to create one virtual disk for your virtual machine. You can add more virtual disks later, using the virtual machine’s Hardware in the management interface. See Configuring a Virtual Machine’s Virtual Disks on page 123. • Click Blank to create a new virtual disk. Then specify the following.
VMware ESX Server Administration Guide a. Choose the location for the new virtual disk. In the VMFS Volume list, choose the volume on which to locate the virtual disk. The amount of free space is listed next to the volume name, so you know how large you can make the virtual disk. b. Give the virtual disk a name. In the VMware Disk Image entry field, specify the disk name, making sure the file has a .dsk extension. c. Specify the size of the virtual disk.
C H A P T E R 2 Creating and Configuring Virtual Machines • Click Existing to add an existing virtual disk to the virtual machine. Then specify the following. a. Choose the location of the virtual disk you want to use. In the VMFS Volume list, choose the volume on which the virtual disk is located. b. In the VMware Disk Image list, select the virtual disk you want. The size of the virtual disk appears in the Capacity field; you cannot change this value. c. Specify the virtual device node.
VMware ESX Server Administration Guide • Click System LUN/Disk to allow the virtual machine to access a physical disk stored on a LUN. Then specify the following. a. Choose the LUN you want to use in the Storage Controller LUN list. b. Specify the virtual device node. Select the appropriate SCSI ID in the Virtual SCSI Node list. 6. When you are finished configuring the virtual disk, click Next. The Hardware tab for this virtual machine appears.
C H A P T E R 2 Creating and Configuring Virtual Machines Installing a Guest Operating System and VMware Tools This section describes the following: • Installing a Guest Operating System in a Virtual Machine on page 45 • Installing VMware Tools in the Guest Operating System on page 46 • About the VMware Guest Operating System Service on page 51 In most cases, you configure your virtual machine with a blank (unformatted) SCSI virtual disk.
VMware ESX Server Administration Guide If you are using image files, you should connect the virtual machine’s CD-ROM or floppy drives to the appropriate image files before you begin installing the guest operating system. Note: When you are installing a guest operating system on a new virtual disk, you may see a message warning you that the disk is corrupted and asking if you want to place a partition table on the disk. This does not mean there is any problem with your physical hard disk.
C H A P T E R 2 Creating and Configuring Virtual Machines • Prepare your virtual machine to install VMware Tools. Choose Settings > VMware Tools Install. This option prepares the CD-ROM drive in the virtual machine to use an ISO image file containing the VMware Tools packages. This image, which appears as a regular CD-ROM disk in the virtual machine, was placed on your server machine when you installed VMware ESX Server. Installing VMware Tools in a Windows Server 2003 Guest 1.
VMware ESX Server Administration Guide 2. During the installation, two Hardware Installation messages appear, stating that the VMware SVGA and VMware Pointing Device drivers have not passed Windows Logo testing. Accept these messages and continue. 3. Reboot the guest operating system when prompted. When the installation completes, ESX Server disconnects the ISO image file and returns the virtual machine’s CD-ROM drive to its original configuration. Installing VMware Tools in a Windows 2000 Guest 1.
C H A P T E R 2 Creating and Configuring Virtual Machines • If you configured this virtual machine to use the vmxnet network driver, choose Start > Control Panel > Network > Adapters and click Add. 3. Click Have Disk and enter D:\vmnet\winnt in the Insert Disk dialog (where D: is the first CD-ROM drive in your virtual machine). Click OK when VMware Virtual Ethernet Adapter is displayed in the Select OEM Option dialog. The VMware network driver is installed. 4.
VMware ESX Server Administration Guide 3. Untar the VMware Tools tar file in /tmp and install it. cd /tmp tar zxf vmware-linux-tools.tar.gz cd vmware-tools-distrib ./vmware-install.pl Note: When installing VMware Tools in some versions of Linux, the installer will need to recompile VMware Tools. For this to work, you need to have a C compiler installed in the guest. In some cases you may get compiler warning messages during the VMware Tools installation.
C H A P T E R 2 Creating and Configuring Virtual Machines 5. When the installation finishes, the message VMware Tools for NetWare are now running appears in the Logger Screen (NetWare 6.5 guests) or the Console Screen (NetWare 5.1 guests). 6. Restart the guest operating system. In the system console, type: restart server After you install VMware Tools, make sure the VMware Tools virtual CD-ROM image (netware.iso) is not attached to the virtual machine. If it is, disconnect it.
VMware ESX Server Administration Guide • Execute commands in the virtual machine when it is requested to halt or reboot the guest operating system. See Executing Commands When ESX Server Requests the Guest Service to Halt or Reboot a Virtual Machine on page 54. • Pass a string from the service console to the guest operating system. See Passing a String from the Service Console to the Guest Operating System on page 54.
C H A P T E R 2 Creating and Configuring Virtual Machines Shutting Down and Restarting a Virtual Machine ESX Server can signal the guest service to shut down or restart a virtual machine. After the guest service receives a request to shut down or restart, it sends an acknowledgment back to ESX Server. You can send these requests from the VMware Management Interface or the service console’s command line.
VMware ESX Server Administration Guide where hard, soft or trysoft specifies the behavior of the power operation . If is not specified, the default behavior is soft. For more information, see the VMware Scripting API User’s Manual.
C H A P T E R 2 Creating and Configuring Virtual Machines scsi0:1.mode = "persistent" machine.id = "the_id_for_my_first_vm" .vmx contains: scsi0:1.present = TRUE scsi0:1.name = "my_common_virtual_hard_drive.dsk" scsi0:1.mode = "persistent" machine.id = "the_id_for_my_second_vm" Using machine.id, you may pass such strings as the Windows system ID (SID), a machine name or an IP address.
VMware ESX Server Administration Guide isolation.tools.machine.id.get.disable = TRUE 56 www.vmware.
C H A P T E R 2 Creating and Configuring Virtual Machines Using PXE with Virtual Machines You can use a preboot execution environment (commonly known as PXE) to boot a virtual machine over a network. When you use PXE with a virtual machine, you can: • Remotely install a guest operating system over a network without the need for the operating system installation media. • Deploy an image of a virtual disk to the virtual machine. • Boot a Linux virtual machine over the network and run it diskless.
VMware ESX Server Administration Guide • Remote installation of a supported guest operating system from a Ghost image using Windows 2000 and Ghost RIS Boot package • Remote installation of a supported guest operating system from an Altiris image using a Windows 2000 Altiris server • Network booting a Linux virtual machine by connecting with the Linux Diskless option to a Red Hat Enterprise Linux 3.0 AS server Note: ESX Server does not support installation of a Windows XP guest operating system using PXE.
C H A P T E R 2 Creating and Configuring Virtual Machines Configuring a Virtual Machine to Use the LSI Logic SCSI Adapter ESX Server virtual machines can use virtual BusLogic and virtual LSI Logic SCSI adapters. By default, virtual machines use the BusLogic adapter. However, new Windows Server 2003 virtual machines are configured to use the LSI Logic adapter by default. You can add the LSI Logic SCSI adapter to any virtual machine by modifying its configuration file.
VMware ESX Server Administration Guide 2. Do one of the following: • If you are adding the LSI Logic adapter to a new virtual machine that is configured for a BusLogic adapter (which has a guest operating system other than Windows Server 2003), switch the original BusLogic adapter to the LSI Logic adapter by changing this line: scsi.virtualDev = "vmxbuslogic" to scsi.
C H A P T E R 2 Creating and Configuring Virtual Machines Configuring the LSI Logic SCSI Adapter in a Windows Guest Operating System Before you begin configuring your Windows guest, download the LSI Logic driver from the LSI Logic Web site, as mentioned above. For a new virtual machine, unzip the driver files to a floppy disk. This floppy disk is needed while installing the guest operating system.
VMware ESX Server Administration Guide 5. Remove the LSI Logic adapter you added previously by removing these lines: scsi1.present = "TRUE" scsi1.virtualDev = "vmxlsilogic" 6. Save your changes to the configuration file and boot the virtual machine again. After the virtual machine boots, verify in the Device Manager that the guest is using the LSI Logic driver only. Note: Since the driver has been installed, the guest should find it automatically.
C H A P T E R 2 Creating and Configuring Virtual Machines 2. Create a new initial RAM disk for the running kernel. mkinitrd --preload mptbase /boot/initrd--lsi.img Where is the version of the guest’s kernel; such as 2.4.18-3. The modules.conf modification you made in the previous step allows mkinitrd to provide the LSI Logic SCSI driver to the kernel when booting. 3. Edit /etc/lilo.conf or /boot/grub/grub.conf (depending on which is in use in the guest).
VMware ESX Server Administration Guide Importing, Upgrading and Exporting Virtual Machines Importing, upgrading and exporting virtual machines involves the following activities: • Configuring a Virtual Machine to Use More than One Virtual Processor • Migrating Older ESX Server Virtual Machines on page 66 • Migrating VMware Workstation and VMware GSX Server Virtual Machines on page 67 • Importing a GSX Server or Workstation Virtual Machine on page 70 • Exporting Virtual Machines on page 72 Configuring a Vi
C H A P T E R 2 Creating and Configuring Virtual Machines First you must configure the virtual machine to use more than one virtual processor. Use the management interface. For instructions, see Configuring a Virtual Machine’s Memory and Virtual Processors on page 120. Then follow the steps appropriate to the guest operating system below. Windows Server 2003 Guest Operating Systems Windows Server 2003 upgrades the HAL automatically.
VMware ESX Server Administration Guide Migrating Older ESX Server Virtual Machines You can use virtual machines created with versions of ESX Server older than 2.1. Virtual machines created in ESX Server 1.5 can work as is; however, to take advantage of the new features of ESX Server 2.0, there are steps you need to take to upgrade your virtual machines. If you created the virtual machine under ESX Server 1.5 and do not want to upgrade the virtual machine, you can run it in legacy mode.
C H A P T E R 2 Creating and Configuring Virtual Machines • winNetStandard (Windows Server 2003 Standard Edition) • winNetEnterprise (Windows Server 2003 Enterprise Edition) 5. Click OK to save your changes. Running ESX Server 1.5 Virtual Machines in Legacy Mode You can choose to not upgrade an ESX Server 1.5 virtual machine and run it in legacy mode. This allows you to use the virtual disk as is. Changes can be written to the virtual disk file.
VMware ESX Server Administration Guide First you need to import the virtual disks and any redo logs to the server and create a new virtual machine configuration. See Importing a GSX Server or Workstation Virtual Machine on page 70. On the VMFS partition where you store your virtual machines, make sure you have enough space to hold the full capacity of the source virtual disk.
C H A P T E R 2 Creating and Configuring Virtual Machines Disk Geometry Failures When Importing GSX Server Virtual Machines If you used vmkfstools to import a virtual machine created under GSX Server to ESX Server, after you import the virtual machine, you may see the following message: “Disk geometry mismatch. To power on the virtual machine you should specify scsi:.biosGeometry="/ /" in the configuration file.
VMware ESX Server Administration Guide Path Name Failures When Importing GSX Server Virtual Machines Plain disks used with virtual machines created in GSX Server may contain disk file names that ESX Server cannot translate. Versions 2.5 and earlier of GSX Server used absolute path names to identify disk files when creating plain disks. Not all plain disks created with earlier versions of GSX Server contain path names preventing ESX Server from importing them.
C H A P T E R 2 Creating and Configuring Virtual Machines On a Linux host, expand the SCSI Drives tree and click the name of the drive you want to migrate. Click Choose to see the location information. 2. Using a Web browser, log in to the ESX Server machine as root and click Manage Files. Use the file manager in the VMware Management Interface to perform all the file copy steps described below. For information on using the file manager, see Using the VMware Management Interface File Manager on page 163.
VMware ESX Server Administration Guide 9. If you imported the virtual machine from ESX Server 1.5.2, GSX Server 2.5.1 or Workstation 3.2 or earlier, upgrade the virtual hardware. Make sure the virtual machine is powered off. On the Status Monitor page, click the arrow to the right of the terminal icon ( ) and choose Configure Hardware. On the Hardware tab, click Upgrade Virtual Hardware, then click OK to upgrade the hardware. 10.
C H A P T E R 2 Creating and Configuring Virtual Machines You can find an example of how to use the -exportfile option in Examples Using vmkfstools on page 305.
VMware ESX Server Administration Guide Preparing to Use the Remote Management Software You can manage VMware ESX Server from a remote workstation using the VMware Remote Console and the VMware Management Interface. Remote console software is available for Windows and Linux workstations. The remote console lets you attach directly to a virtual machine. You can start and stop programs, change the configuration of the guest operating system and do other tasks as if you were working at a physical computer.
C H A P T E R 2 Creating and Configuring Virtual Machines Installing the Remote Console Software Use the package that corresponds to the operating system running on your management workstation and follow the installation steps below. Installer files are available on the distribution CD-ROM. You may also download the appropriate installer from the Status Monitor page of the management interface. Windows Clients 1. Find the installer file — VMware-console-1.v.v-xxxx.
VMware ESX Server Administration Guide Third Party Software Compatibility This section includes any special instructions for using a virtual machine with third-party middleware and management software. Configuring a Virtual Machine for Use with Citrix MetaFrame XP If you are using a Windows 2000 virtual machine as a MetaFrame XP server, be sure you are using FR1 or FR2, then complete the following steps to configure the virtual machine.
C H A P T E R 2 Creating and Configuring Virtual Machines Executing Scripts When the Virtual Machine’s Power State Changes You can run scripts in the guest operating system when you change the power state of a virtual machine; that is, when you power on, power off, suspend or resume the virtual machine. Scripts can help automate guest operating system operations when you change the virtual machine’s power state. Note: There are no scripts for FreeBSD guest operating systems.
VMware ESX Server Administration Guide 2. The version of VMware Tools must be updated to the current version. If you are using a virtual machine created with an older version of VMware ESX Server or another older VMware product, update VMware Tools to the version included in this release. 3. Depending upon the operation the script performs, the virtual machine must have a virtual network adapter connected, otherwise the power operation fails.
C H A P T E R 2 Creating and Configuring Virtual Machines Configuring Virtual Machines Key configuration settings for an existing virtual machine can be changed from the VMware Management Interface. The virtual machine must be powered off when you change the configuration. 1. Log in to the server from the management interface (http://) as a user who has rights to change the configuration file. 2. Click the name of the virtual machine you want to reconfigure. 3.
VMware ESX Server Administration Guide Recommended Configuration Options This section details options that can influence the performance of your virtual machines. These settings are not required to run VMware ESX Server correctly. SleepWhenIdle The configuration file option monitor.SleepWhenIdle determines whether the VMkernel deschedules an idle virtual machine. By default, this option is enabled, a setting that ensures much better performance when running multiple virtual machines.
C H A P T E R 2 Creating and Configuring Virtual Machines unless they detect a discrete failure to access a primary disk. Reporting that a targeted disk is busy, rather than unavailable, may cause mirroring programs to repeat the connection attempt instead of selecting a duplicate disk. ESX Server does not automatically include an explicit returnBusyOnNoConnectStatus option definition for each SCSI disk in a virtual machine.
VMware ESX Server Administration Guide In some circumstances — for example, if you are moving the virtual machine but want to keep the same UUID — you may want to assign a specific UUID to the virtual machine. In that case, you need to override the automatically generated UUID value. To do so, edit the virtual machine’s configuration file as described in this section to set the value of the parameter uuid.bios.
C H A P T E R 2 Creating and Configuring Virtual Machines After adding this option to the configuration file, restart the virtual machine. The new UUID is used when the virtual machine restarts. Setting the UUID for a Virtual Machine that Is Being Moved If you plan to move a virtual machine and want it to have the same UUID it did before the move, you must note the UUID being used before the move and add that UUID to the configuration file after the move. Follow these steps: 1.
VMware ESX Server Administration Guide Enabling the Physical Hardware’s OEM ID to Be Seen by the Virtual Machine Each virtual machine is automatically assigned an Original Equipment Manufacturer ID (OEMID), comprising the Manufacturer and Product Name, which is stored in the SMBIOS system information descriptor.
CHAPTER 3 Using the VMware Management Interface to Manage Your Virtual Machines The following sections describe various aspects of using the VMware Management Interface: • Running the VMware Management Interface on page 87 • Configuring the Statistics Period for the VMware Management Interface on page 89 • Using Internet Explorer 6.
VMware ESX Server Administration Guide • Logging Out of the VMware Management Interface on page 157 • Using the Apache Web Server with the Management Interface on page 158 • Setting a MIME Type to Launch the VMware Remote Console on page 159 • Editing a Virtual Machine’s Configuration File Directly on page 161 • Using the VMware Management Interface File Manager on page 163 • Registering and Unregistering Virtual Machines on page 168 • Running Many Virtual Machines on ESX Server on page 170 • Backing Up Vi
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Running the VMware Management Interface VMware ESX Server provides the VMware Management Interface, a Web-based management tool that allows you to • Monitor the state of virtual machines and the VMware ESX Server machine on which they are running. • Control (power on, suspend, resume, reset and power off) the virtual machines on the server.
VMware ESX Server Administration Guide recent events. In addition, you can create and delete virtual machines from your browser. These pages refresh or reload automatically, refreshing every 90 seconds.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Configuring the Statistics Period for the VMware Management Interface By default, the VMware Management Interface provides statistics about the server and virtual machines that reflect the past five minutes of activity. The statistics get updated every 20 seconds.
VMware ESX Server Administration Guide Using Internet Explorer 6.0 to Access the VMware Management Interface If you intend to run the VMware Management Interface in Internet Explorer 6.0 on a Windows management workstation, you must take certain steps to configure Internet Explorer properly.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Connecting to the Management Interface On a Proxy Server If your network is protected behind a proxy server, there are certain steps you must take in order to use the management interface in Internet Explorer 6.0 on a Windows system. Follow the steps for the appropriate Windows operating system. Windows Server 2003 Systems 1. Launch Internet Explorer 6.0. 2. Choose Tools > Internet Options, then click the Security tab. 3.
VMware ESX Server Administration Guide Logging Into the VMware Management Interface To use the VMware Management Interface, you should be running: • Internet Explorer 5.5 (Internet Explorer 6.0 or higher is strongly recommended) • Netscape Navigator 7.0 or higher • Mozilla 1.x. or higher You need to know the server name or IP address of the server you want to manage. You must have a valid user name and password on that server.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Using the Status Monitor The Status Monitor page contains a high-level view of VMware ESX Server including a server system summary and list of all registered virtual machines.
VMware ESX Server Administration Guide Viewing Summary Information about Virtual Machines on VMware ESX Server Under Virtual Machines, you can view a list of all registered virtual machines on the host. When a virtual machine is running, the Status Monitor page displays its ID number after the power status of the virtual machine. Note: Virtual machines may not appear in the list, if their configuration files are stored on an NFS-mounted drive.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines The terminal icon appears slightly differently, depending upon the guest operating system installed in the virtual machine. This visual cue helps to identify the virtual machine, for example, when the display name does not indicate the guest operating system. Below are the different ways the terminal icon appears in the management interface. — indicates a Windows guest operating system.
VMware ESX Server Administration Guide and the location of the suspended state file. With the exception of the display name, you can edit these options only when the virtual machine is powered off. For more information, see Setting Standard Virtual Machine Configuration Options on page 138. • Shut Down Guest — shuts down the guest operating system, powers off the virtual machine then runs the script associated with this power state change. This is the same as clicking in the power state popup.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines To change the virtual machine’s power state, click the button that indicates the virtual machine’s current power state. A popup menu appears, displaying the following buttons: Button Description Shuts down the guest operating system and powers off the virtual machine. VMware ESX Server closes any open applications and shuts down the guest operating system before powering off the virtual machine.
VMware ESX Server Administration Guide • You can suspend a virtual machine at any desired point in its operation, then lock in the suspended state at that chosen point. Any time you restart the virtual machine, it resumes in the same state — the state it was in when you first suspended it. Note: You should not change a configuration file after you suspend a virtual machine, since the virtual machine does not resume properly if the configuration file is inconsistent with the suspended virtual machine.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines The Options page for this virtual machine appears in a new browser window. 2. Click Edit. The Edit Options page appears. For fastest suspend and restore operations, select the appropriate VMFS volume from the Suspend File Location list. ESX Server automatically adds a suffix to the name of the suspended state file to ensure that one virtual machine does not overwrite the suspended state file of another. 3.
VMware ESX Server Administration Guide with a .vmss extension. This file contains the entire state of the virtual machine. When the virtual machine is resumed, its state is restored from the .vmss file. The .vmss file is then modified while the virtual machine is running. This means that, in normal operation, the .vmss file cannot be used to resume a virtual machine again from the original suspended state.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 2. Next to Virtual Disk, click Edit. 3. Click Nonpersistent, then click OK to save your change.
VMware ESX Server Administration Guide 4. Click the Options tab, then under Verbose Options, click the link. The configuration file opens in an editor. 102 www.vmware.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 5. Click Add, then create an option called resume.repeatable and set its value to TRUE. 6. Click OK to save and close the configuration file. 7. Power on the virtual machine. 8. Using the remote console, take the steps necessary to reach the state in which you want to suspend the virtual machine. 9. Click Suspend to activate repeatable resume. 10.
VMware ESX Server Administration Guide minute before the page was last updated. More detailed processor information is available on the Status Monitor page. • The value in the RAM column indicates the amount of memory allocated to the virtual machine. For more information about memory usage, see Configuring a Virtual Machine’s Memory Usage on page 110. For general information on memory, see Virtual Machine Memory on page 425.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Using Common Controls In addition, the following links appear on most or all of the pages in the management interface. Refresh — This link refreshes or reloads the current page.
VMware ESX Server Administration Guide Configuring a Virtual Machine To see more information about a particular virtual machine and to modify its configuration, click the link to the virtual machine in the Display Name column on the Status Monitor page. The Status Monitor page appears in a new browser window. The Status Monitor page contains the following information: • The current power state of the virtual machine — whether it is powered on, powered off or suspended.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Note: The period of time these statistics cover can be modified. See Configuring the Statistics Period for the VMware Management Interface on page 89. • How long the virtual machine has been running. • VMware Tools status; whether VMware Tools is installed and running. • The average percentage of heartbeats received by a virtual machine during the previous minute.
VMware ESX Server Administration Guide • Configuring a Virtual Machine’s Hardware on page 116 • Setting Standard Virtual Machine Configuration Options on page 138 • Viewing a List of Connected Users on page 144 • Viewing a Log of a Virtual Machine’s Events on page 145 • Connecting to a Virtual Machine with the VMware Remote Console on page 94 • Using the Virtual Machine Menu on page 95 • Changing the Power State of a Virtual Machine on page 96 • Using Common Controls on page 105 Editing a Virtual Machine’
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines The CPU page shows how much of the server processor or processors each virtual processor is utilizing, how CPU resources are allocated to the virtual machine, whether Hyper-Threading is enabled and if there is any scheduling affinity to any specified processors on the server. Understanding Performance Values The values under Performance are based on the past five minutes.
VMware ESX Server Administration Guide Modifying CPU Values These values can be modified. Click Edit. For information on changing CPU settings, see Allocating CPU Resources on page 388.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines • Used Memory — value which represents the amount of memory allocated to the virtual machine when it was configured, how much memory has been used recently by the virtual machine and how much memory has been shared between all running virtual machines on the server and within the virtual machine itself.
VMware ESX Server Administration Guide Understanding Resource Values The values under Resources indicate a range of system memory to which the virtual machine is entitled. Resource information displayed includes: • Minimum — represents the minimum amount of memory that must be available in order to power on the virtual machine • Maximum — represents the amount of memory allocated to the virtual machine when it was configured.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Configuring a Virtual Machine’s Disk Usage To review and configure the virtual machine’s disk settings, click the Disk tab. The Disk page appears. The Disk page shows virtual disk performance information and resources allocated to the virtual disk. Disk bandwidth represents the amount of data that is written to or read from the server’s physical disks.
VMware ESX Server Administration Guide • Memory Affinity — if displayed, represent the NUMA nodes on the ESX Server system to which the virtual machine can be bound, when the ESX Server system a NUMA system. For information about NUMA systems, see Using Your NUMA System on page 418. Modifying Disk Values To modify disk values, click Edit. For information on changing disk settings, see Managing Disk Bandwidth on page 432.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines The Network page also indicates whether traffic shaping is enabled. This setting can be changed.
VMware ESX Server Administration Guide 3. Specify the average bandwidth. In the Average Bandwidth field, specify the average value for network bandwidth, then specify whether that amount is in Megabits per second (Mbps), Kilobits per second (Kbps) or bits per second (bps). 4. Specify the peak bandwidth. In the Peak Bandwidth field, specify the peak value for network bandwidth, then specify whether that amount is in Megabits per second (Mbps), Kilobits per second (Kbps) or bits per second (bps). 5.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Most hardware can be configured only when the virtual machine is powered off.
VMware ESX Server Administration Guide • Connecting to a Virtual Machine with the VMware Remote Console on page 94 • Using the Virtual Machine Menu on page 95 • Changing the Power State of a Virtual Machine on page 96 • Using Common Controls on page 105 Click the tabs at the top of the page to view more information about the virtual machine. Configuring a Virtual Machine’s Floppy Drive Each virtual machine can access a physical floppy drive on the server or a floppy image file.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 5. Enter the location of the drive or floppy image in the Location field. For example, the server’s floppy drive could be /dev/fd0. 6. Click OK to save your changes and close the window. Configuring a Virtual Machine’s DVD-ROM or CD-ROM Drive Each virtual machine can access a physical DVD-ROM or CD-ROM drive on the server or an ISO image file.
VMware ESX Server Administration Guide Configuring a Virtual Machine’s Memory and Virtual Processors You can change how much memory to allocate to a virtual machine. You can also review the amount of memory recommended by ESX Server, the maximum amount of memory that can be allocated to the virtual machine and the maximum amount of memory for smooth running of the virtual machine, given the number of virtual processors.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 1. In the Hardware page, under Processors and Memory, click Edit. The Processors and Memory page appears. 2. Depending upon the guest operating system and the number of processors with which it is configured, a message appears under Edit Processor Configuration.
VMware ESX Server Administration Guide Note: If you use vmxnet in a Windows or Linux virtual machine, the virtual network device is not visible to the guest operating system until you install VMware Tools (see Installing VMware Tools in a Linux Guest on page 49). After the virtual machine is created, you can use this tab to assign additional network adapters to the virtual machine.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 1. In the Hardware page, under SCSI Controller, click Edit. The SCSI Controller page appears. 2. In the Virtual Device list, select the SCSI controller driver which you want the virtual machine to use. Choose vmxbuslogic or vmxlsilogic. Caution: Before you select a different driver, make sure you installed the driver in the guest operating system first; otherwise, the guest cannot boot.
VMware ESX Server Administration Guide • Undoable: When you use undoable mode, you have the option later of keeping or discarding changes you have made during a working session when you power off the virtual machine. Until you decide, the changes are saved in a redolog file. • Append: Append mode also stores changes in a redo log. It continually adds changes to the redo log until you remove the redo-log file or commit the changes using the commit command in vmkfstools (see Using vmkfstools on page 229).
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines If the virtual disk is a physical disk on a LUN, the following window appears instead. 2. Do one of the following: • For an existing virtual disk that is not a physical disk on a LUN, you can change its disk mode. Under Disk Mode, click Persistent, Nonpersistent, Undoable or Append. • To select a different virtual disk, do the following. a. Choose the location of the virtual disk you want to use.
VMware ESX Server Administration Guide d. Choose the disk mode. Under Disk Mode, click Persistent, Nonpersistent, Undoable or Append. • If the virtual disk is a physical disk on a LUN, you can do the following. a. To select a different physical disk on a LUN to use, select it in the System LUN/ Disk list. b. Change the virtual device node. Select the appropriate SCSI ID in the Virtual SCSI Node list.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Configuring a Virtual Machine’s Generic SCSI Device You can configure any generic SCSI devices in a virtual machine. Make sure the virtual machine is powered off, then complete the following steps. 1. To configure an existing generic SCSI device, on the Hardware page, under Generic SCSI Device, click Edit. The Generic Device (SCSI ) page appears. 2.
VMware ESX Server Administration Guide Adding a Virtual Disk to a Virtual Machine To add a new virtual disk to a virtual machine, make sure the virtual machine is powered off, then complete the following steps. 1. On the Hardware page, click Add Device. The Add Device Wizard starts. 2. Click Hard Disk. The Virtual Disk Type page appears. 3. Create one of the following virtual disks: 128 www.vmware.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines • Click Blank to create a new virtual disk. Then specify the following. a. Choose the location for the new virtual disk. In the VMFS Volume list, choose the volume on which to locate the virtual disk. The amount of free space is listed next to the volume name, so you know how large you can make the virtual disk. b. Give the virtual disk a name.
VMware ESX Server Administration Guide • Click Existing to add an existing virtual disk to the virtual machine. Then specify the following. a. Choose the location of the virtual disk you want to use. In the VMFS Volume list, choose the volume on which the virtual disk is located. b. In the VMware Disk Image list, select the virtual disk you want. The size of the virtual disk appears in the Capacity field. c. Specify the virtual device node. Select the appropriate SCSI ID in the Virtual SCSI Node list. d.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines • Click System LUN/Disk to allow the virtual machine to access a physical disk stored on a LUN. Then specify the following. a. Choose the LUN you want to use in the Storage Controller LUN list. b. Specify the virtual device node. Select the appropriate SCSI ID in the Virtual SCSI Node list. 4. Click OK to add the disk.
VMware ESX Server Administration Guide 2. Click Network Adapter. The Network Adapter page appears. 3. In the Device Binding list, select the virtual network device which you want the virtual machine to use. 4. In the Virtual Device list, select the network driver you want the virtual machine to use. Choose either the vlance or vmxnet driver. 5. Click OK to add the network adapter.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 2. Click DVD/CD-ROM. The cdrom page appears. 3. To connect this virtual machine to the server’s DVD/CD-ROM drive when the virtual machine is powered on, check Connect at Power On. 4. Specify whether to connect to the server’s DVD/CD-ROM drive or to an ISO image. In the Device list, select System DVD/CD-ROM Drive or ISO Image. 5. Enter the location of the drive or ISO image in the Location field.
VMware ESX Server Administration Guide Adding a Virtual Floppy Drive to a Virtual Machine If your server contains a floppy drive, you can add a virtual floppy drive to the virtual machine. You can point the floppy drive to a floppy disk image file. A device can be connected to only one virtual machine on a server at a time. To add a new virtual floppy drive to a virtual machine, make sure the virtual machine is powered off, then complete the following steps. 1. On the Hardware page, click Add Device.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 5. Enter the location of the drive or floppy image in the Location field. For example, the server’s floppy drive could be /dev/fd0. 6. Click OK to add the drive. Adding a Generic SCSI Device to a Virtual Machine To add a new generic SCSI device to a virtual machine, make sure the virtual machine is powered off, then complete the following steps. 1. On the Hardware page, click Add Device. The Add Device Wizard starts. 2.
VMware ESX Server Administration Guide 5. Specify the virtual device node. Select the appropriate SCSI ID in the Virtual SCSI Node list. 6. Click OK to add the device. Adding a Tape Drive to a Virtual Machine To add a new tape drive to a virtual machine, make sure the virtual machine is powered off, then complete the following steps. 1.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 3. Click Generic SCSI Device. The SCSI Device page appears. 4. To connect this virtual machine to the server’s SCSI device when the virtual machine is powered on, check Connect at Power On. 5. In the Virtual SCSI Node field, select : as determined in step 1. 6. In the Device entry field, type: vmhba:::0 7. Click OK to add the device.
VMware ESX Server Administration Guide Setting Standard Virtual Machine Configuration Options To review and modify basic information about a virtual machine, or to access the configuration file directly, click the Options tab. The Options page appears. The Options page shows standard virtual machine information: • Display Name — identifies the virtual machine in a more descriptive way. • Guest Operating System — the guest operating system installed on the virtual disk.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines information to VMware support to help troubleshoot any problems you are experiencing. • System Startup Options — the startup options for this virtual machine when the server starts. • System Shutdown Options — the shutdown options for this virtual machine when the server shuts down. To change the startup and shutdown options, see Setting Startup and Shutdown Options for a Virtual Machine on page 25.
VMware ESX Server Administration Guide • Continue Stopping Other Virtual Machines After — the amount of time to wait after stopping the virtual machine before stopping another virtual machine. Settings for stopping virtual machines include: the system default, no wait or wait for a certain number of minutes. Configuring a Virtual Machine’s Startup and Shutdown Options Complete the following steps. 1. Power off the virtual machine and click Edit under System Startup Options or System Shutdown Options.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Changing Configuration Options To change any of these options: 1. Power off the virtual machine and click Edit. The Options Configuration page appears. Note: You can change the display name when the virtual machine is powered on. 2. Make your changes, then click OK to save them. 3. Close the window.
VMware ESX Server Administration Guide 1. Under Verbose Options, click the link. The Options window appears. 2. Click Add. 3. A prompt appears. Enter a name for the option, then click OK. For example, if you want to enable repeatable resume in the virtual machine, create an option called resume.repeatable. 4. Another prompt appears. Enter a value for option you specified, then click OK. For example, set the value of resume.repeatable to TRUE. 142 www.vmware.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 5. Click OK in the Options window to save the change to the configuration file. To change an option in the configuration file (.vmx), complete the following steps. 1. Under Verbose Options, click the link. The Options window appears. 2. Locate the option, then change the value for the option in the entry field to the right of the option. 3. Click OK to save your change and close the Options window.
VMware ESX Server Administration Guide Viewing a List of Connected Users To see a list of users that are connected to a virtual machine with a remote console, click the Users and Events tab. The Users and Events page appears. The list under Remote Console Connections identifies any users connected to the virtual machine with a remote console. The list includes the time and IP address from which the user connected to the virtual machine.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines • Changing the Power State of a Virtual Machine on page 96 • Using Common Controls on page 105 Click the tabs at the top of the page to view more information about the virtual machine. Viewing a Log of a Virtual Machine’s Events A log of the 15 most recent virtual machine events is available. Click the Users and Events tab. The Users and Events page appears.
VMware ESX Server Administration Guide When you perform an action within the management interface that prompts the virtual machine to generate a message needing your response before it can proceed, a waiting for input message appears in the Display Name column. When you click that link, a popup window appears, prompting you for a response. After you provide your answer, the popup window closes. The log shows the date and time the event occurred and an explanation of the event.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Modifying Virtual Machine Peripherals A virtual machine’s peripheral devices can be viewed and modified through the management interface. This section provides an overview of the configuration modification options.
VMware ESX Server Administration Guide 1. On the Options tab for the virtual machine, click the link under Verbose Options. 2. Click Add. Create an option called scsi0:8.present and set its value to true. 3. Click Add. Create an option called scsi0:8.name and set its value to :.dsk. In these entries, scsi0 refers to the first SCSI controller and 8 is the device ID. 4. Click OK to save your changes and close the configuration file.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Using Parallel Ports in a Virtual Machine To connect the virtual machine's first parallel port (LPT1) to the physical computer's first parallel port, take the following steps: 1. Reboot the physical computer and enter the BIOS setup. Typically, you do so by pressing F2 or Delete while the machine is booting. Find the parallel port mode setting and set it to PS/2. (The typical choices are AT and PS/2.
VMware ESX Server Administration Guide starts, the guest operating system may detect new virtual hardware and install drivers for it. Respond to any messages as you would if upgrading the hardware on a physical computer. 5. Start the virtual machine using the remote console. As it starts to boot, click inside the remote console window, then press F2 to enter the virtual machine's BIOS setup.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines To reconfigure the virtual machine so it starts with the first serial port disconnected, either change the value for the serial0.startConnected option to false. Note: Only one operating system can be connected to the serial port at one time. You cannot configure more than one virtual machine to use a particular serial port at a given time.
VMware ESX Server Administration Guide log. You can also commit the changes to the main virtual disk file using the commit option in vmkfstools. See Using vmkfstools on page 229 for details. To change the disk mode for a virtual disk, see Configuring a Virtual Machine’s Virtual Disks on page 123. 152 www.vmware.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Deleting a Virtual Machine Using the VMware Management Interface You can delete a virtual machine only if you are the root user, the owner of the configuration file, or if you have the correct permissions to the configuration file or the directory where the configuration file is located. When you delete a virtual machine, the files associated with it — that is, located in the same directory — are deleted.
VMware ESX Server Administration Guide 4. All the files that are to be deleted are listed. For each disk file not associated with another registered virtual machine on this host, choose one of the following: • To save a virtual disk file, select the Save option. • To delete a virtual disk file, select the Delete option. Note: Any virtual disk files associated with another registered virtual machine do not appear in this window. 5.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Managing ESX Server Resources For information on managing server resources, see VMware ESX Server Resource Management on page 381.
VMware ESX Server Administration Guide Configuring VMware ESX Server To configure certain VMware ESX Server settings, on the Status Monitor page, click the Options tab. The Options page appears. Note: Only a user with administrator privileges (root user) can access this tab On this page are options that allow you to configure ESX Server. For detailed information on each of these links, see Administering ESX Server on page 215. Click the Status Monitor tab to return to the Status Monitor page. 156 www.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Logging Out of the VMware Management Interface When you are ready to log out of the VMware Management Interface, click Logout on the Status Monitor or Options page. You are prompted to confirm that you want to log out. Logging out does not affect the virtual machines on the host or any remote consoles you opened from the management interface.
VMware ESX Server Administration Guide Using the Apache Web Server with the Management Interface On VMware ESX Server, an Apache server is installed with the VMware Management Interface. These are the commands to start, stop or restart the Apache server. In order to use these commands, you must first log in as root (su -). To start the Apache server, type /etc/init.d/httpd.vmware start To stop the Apache server, type /etc/init.d/httpd.vmware stop To restart the Apache server, type /etc/init.d/httpd.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Setting a MIME Type to Launch the VMware Remote Console From a browser, you can connect to a virtual machine from a remote console by clicking the terminal icon ( ) for that virtual machine. Before doing so, Netscape and Mozilla users need to define a MIME type of x-vmware-console and associate it with the remote console program file. Internet Explorer is automatically configured when you install the console.
VMware ESX Server Administration Guide chmod +x vmware-console-helper.sh 3. Use the browser to connect to the server you want to manage. 4. Click the terminal icon ( console. ) for the virtual machine you want to view in a remote 5. A dialog box asks what you want to do with the file. Click Advanced. 6. In the New Type dialog box, in the Description of type field, type VMware Remote Console. 7. In the File extension field, type xvm. 8. In the MIME type field, type application/x-vmware-console. 9.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Editing a Virtual Machine’s Configuration File Directly There are two ways in which you can edit specific configuration options for a virtual machine. • On the Options tab for a specific virtual machine, you can add and change configuration options. For more information, see Modifying the Configuration File Directly (Advanced Users Only) on page 141. • You can also edit a virtual machine’s configuration file (.
VMware ESX Server Administration Guide If, however, you change the guest operating system on a virtual machine with a BusLogic or LSI Logic SCSI virtual adapter, the virtual SCSI adapter is updated to the default for the new guest operating system. For example, if you have a virtual machine with a Linux operating system and change the guest operating system to Windows 2003 Server, then the virtual SCSI adapter is LSI Logic, the default virtual SCSI adapter for a Windows 2003 Server guest operating systems.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Using the VMware Management Interface File Manager Using the VMware Management Interface, you can manage the file system of your VMware ESX Server machine remotely. Use the file manager to change the permissions of any file on the physical machine, create new directories on the physical machine or cut, copy, paste and delete files as you would if you were working directly on the file system itself.
VMware ESX Server Administration Guide Some file and folder icons have special meanings. Item Description This icon identifies a virtual machine configuration file. If you click the filename or icon for a configuration file, the Edit Configuration page for the corresponding virtual machine opens in a browser window. This icon identifies a virtual disk file on a VMFS file system.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines this means a virtual disk larger than 2GB will be split into multiple files when it is moved from a VMFS disk or array to the service console’s file system. Note: The file manager in the management interface may display incorrect information or no information at all for files larger than 2GB. This means that you cannot use the file manager to import certain virtual disk files created under VMware Workstation 4.
VMware ESX Server Administration Guide • A letter, corresponding to the letter at the top of the column (read, write or execute), indicates that the setting is the same for all files and it does grant the permission indicated by the letter. • A hyphen (-) indicates that the setting is the same for all files and it does not grant permission. • A blank space indicates that the setting is not the same for all files.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines For example, if a configuration file is /home/foo/vms/win2k/win2k.vmx, the user needed to have execute (x) privileges on /home, /home/foo, /home/foo/ vms, /home/foo/vms/win2k and appropriate privileges on win2k.vmx. Note: The remote console still requires that the user has execute (x) permission on all parent directories.
VMware ESX Server Administration Guide Registering and Unregistering Virtual Machines ESX Server requires that each virtual machine's configuration file be registered before it can be accessed by VMware Remote Consoles and the VMware Management Interface. When you create a new configuration file with the management interface, whether for a new or an existing virtual machine, the configuration file is registered automatically with ESX Server.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines 2. On the Status Monitor page, click Manage Files. The file manager appears. 3. Browse to the directory containing the configuration file (the file with the .vmx extension) and click the configuration file icon. The Virtual Machine Registration Status window appears, indicating the virtual machine is not registered. 4. Click the register link in the window. The window indicates the virtual machine is registered. 5.
VMware ESX Server Administration Guide Running Many Virtual Machines on ESX Server If you plan to run or register more than 60 virtual machines, you must change a few settings in the service console. By changing these settings, you provide additional CPU and memory resources to the service console, allowing ESX Server to operate more efficiently under this higher load.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines renice -15 -p 5. Verify that you can log into the VMware Management Interface and view correct information about the virtual machines. Once this occurs, then continue with the next step. 6. Change the vmware-serverd process priority back to the default of zero (0). renice 0 -p 7. Change the httpd process priority back to the default of zero (0).
VMware ESX Server Administration Guide Increasing Memory for the vmware-serverd Process As root, use a text editor and add the following configuration parameter to the /etc/vmware/config file: vmserverd.limits.memory = “49152” vmserverd.limits.memhard = “65536” These changes raise the soft memory limit for the vmware-serverd process to 48 MB (48 multiplied by 1024) and the hard memory limit to 64 MB (64 multiplied by 1024).
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Avoiding Management Interface Failures when Many Virtual Machines Are Registered If you have a very large number of virtual machines registered on a single ESX Server machine, the VMware Management Interface may shut down and a Panic out of memory message may be recorded in /usr/lib/vmware-mui/apache/ logs/error_log.
VMware ESX Server Administration Guide Backing Up Virtual Machines Your backup strategy depends on how you want to protect your data and recover from problems. There are two main goals. • Recover individual files on the virtual machine (for example, if a user accidentally removes a file) • Recover from catastrophic failures in which your entire virtual machine is damaged VMware ESX Server provides several possible approaches for backing up your data, whether to tape or to another system over the network.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines Note: You can also use a virtual machine to run the server component of a clientserver backup product, provided you give it access to one or more tape drives. Backing up from within a virtual machine has the benefit of allowing fine-grained recovery of your data. • You can restore file data by the individual file. • You can restore database data via the normal database-specific method.
VMware ESX Server Administration Guide servers, consider using some level of application integration so you can be sure your backups have the desired level of data integrity. You can combine these approaches with the ESX Server redo log API (described in Providing Optimum Data Integrity In Virtual Machine Backups Without Downtime on page 175) to keep the interval during which an extra log is used to a minimum. To do this, take the following general steps: • Add the new redo log.
C H A P T E R 3 Using the VMware Management Interface to Manage Your Virtual Machines network I/O level and the CPU requirements to service that network I/O, and are more common on Windows and Unix operating systems than on Linux.
VMware ESX Server Administration Guide 178 www.vmware.
CHAPTER Using the VMware Remote Console 4 The following sections describe various aspects of using the VMware Management Interface: • Starting the Remote Console on Windows on page 180 • Starting the Remote Console on Linux on page 180 • Running a Virtual Machine Using the Remote Console on page 181 • Special Power Options for Virtual Machines on page 182 • VMware Tools Settings on page 184 • Installing New Software Inside the Virtual Machine on page 188 • Cutting, Copying and Pasting on page 189 • Suspe
VMware ESX Server Administration Guide Using the Remote Console The remote console gives you a direct window into an individual virtual machine running under VMware ESX Server. Remote console software is available for Windows XP, Windows 2000, Windows NT and Linux management workstations. For instructions on installing the software, see Installing the Remote Console Software on page 75.
C H A P T E R 4 Using the VMware Remote Console 3. When the connection is made, a dialog box displays the paths to the configuration files of virtual machines registered on the server. Select the virtual machine you want to connect to, then click OK. Running a Virtual Machine Using the Remote Console When you view your virtual machine through a remote console, it behaves much like a separate computer that runs in a window on your computer’s desktop.
VMware ESX Server Administration Guide management workstation, the appearance of the toolbar is somewhat different, but the same functions are available. When VMware Tools for Windows is running, the VMware Tools icon appears in the system tray Special Power Options for Virtual Machines When VMware Tools is running, you can run scripts when you change the power state of a virtual machine; that is, when you power on, power off, suspend or resume the virtual machine.
C H A P T E R 4 Using the VMware Remote Console From a remote console, you can choose from the following options when powering on a virtual machine: • Power On Virtual Machine — powers on the virtual machine in the remote console. This is the same as clicking the Power On button on the toolbar. • Power On Then Run Script — powers on the virtual machine in a remote console, then executes the associated script.
VMware ESX Server Administration Guide virtual machine may be adversely affected. Clicking the Reset button on the toolbar resets the virtual machine. • Restart Guest Operating System — gracefully restarts the virtual machine. If there is a script associated with shutting down the guest operating system, it executes after the guest operating system restarts. This is the same as choosing Start > Shut Down > Restart in a Windows operating system or issuing a reboot command in a Linux operating system.
C H A P T E R 4 Using the VMware Remote Console • VMware Tools icon display in the taskbar — If you choose not to display the VMware Tools icon in the system tray, you can launch the control panel from the Start menu (Start > Settings > Control Panel > VMware Tools). Connecting Devices with VMware Tools You can enable or disable removable devices in the Devices tab.
VMware ESX Server Administration Guide Choosing Scripts for VMware Tools to Run During Power State Changes Through VMware Tools, you can run scripts that execute when you power on, power off, suspend or resume the virtual machine. A default script for each power state is included in VMware Tools. These scripts are located in the guest operating system in C:\Program Files\VMware. When You … This Default Script Runs Suspend the guest operating system suspend-vm-default.
C H A P T E R 4 Using the VMware Remote Console • To disable the running of a script, uncheck the Use Script check box. 3. Click Apply to save your settings. Shrinking Virtual Disks with VMware Tools The Shrink tab lets you prepare to export a virtual disk to VMware GSX Server using the smallest possible disk files. This step is an optional part of the export process. Virtual disks on ESX Server take up the full amount of disk space indicated by the virtual disk’s size. In other words, the .
VMware ESX Server Administration Guide Viewing Information About VMware Tools On the About tab, you see general information about VMware Tools installed in the virtual machine. This tab contains the following information: • The VMware Tools build number, which lets you verify your VMware Tools version matches the VMware ESX Server version you are running and is useful when you request support. • An indication as to whether the VMware guest operating system service is running.
C H A P T E R 4 Using the VMware Remote Console 1. Be sure you have started the virtual machine and, if necessary, logged on. Check the Devices menu to be sure the virtual machine has access to the CD-ROM and floppy drives. 2. Insert the installation CD-ROM or floppy disk into the proper drive. If you are installing from a CD-ROM, the installation program may start automatically. 3.
VMware ESX Server Administration Guide • With a remote console connected to that virtual machine, click Suspend on the toolbar. • With the VMware Management Interface connected to the virtual machine’s server, click the pause button ( ) on the row for that virtual machine. There are two ways to restore a virtual machine that you have suspended: • With a remote console connected to that virtual machine, click Resume on the toolbar.
C H A P T E R 4 Using the VMware Remote Console Shutting Down a Virtual Machine The following steps are based on using a Windows 2000 or Windows NT guest operating system. If you are using a Linux guest operating system, follow the usual steps to shut down the guest operating system inside your virtual machine. 1. Select Shut Down from the Start menu of the guest operating system (inside the virtual machine). 2. Select Shut Down, then click OK.
VMware ESX Server Administration Guide 192 www.vmware.
CHAPTER 5 Using the VMware Service Console The following sections describe various aspects of using the VMware Service Console: • Characteristics of the VMware Service Console on page 194 • Managing the Service Console on page 195 • Authentication and Security Features on page 207 • Using Devices With ESX Server on page 211 • Enabling Users to View Virtual Machines Through the VMware Remote Console on page 213 193
VMware ESX Server Administration Guide Characteristics of the VMware Service Console The purpose of the VMware service console is to start up and administer your virtual machines. It is a customized version of Linux based on the Red Hat 7.2 distribution. It has been modified so it can be managed by the VMkernel. The service console has been customized to disable unneeded services. In particular, most network services have been disabled, except for auth.
C H A P T E R 5 Using the VMware Service Console Managing the Service Console The command summary in this section provides an introduction to the commands you are most likely to use at the service console. Some are specific to ESX Server. Most are commands that are the same as those you would use at a Linux command line. Connecting to the Service Console If you have direct access to the computer where ESX Server is running, you can log in to the physical console on that computer.
VMware ESX Server Administration Guide Managing a VMware ESX Server File System The vmkfstools command lets you create and manipulate files on SCSI disks managed by ESX Server. Note: You must be logged in as the root user to run the vmkfstools command.
C H A P T E R 5 Using the VMware Service Console Common Linux Commands Used on the Service Console The service console runs a modified version of Linux, and many of the commands available on Linux or Unix are also available on the service console. This section summarizes the most commonly used commands. For more detailed information, see Getting Help for Service Console Commands on page 206 or consult a Linux reference book.
VMware ESX Server Administration Guide Command Example and Explanation ls List the files in the current directory. ls -al List all (-a) the files in the current directory in long (-l) format. ls *.html List files in the current directory that end with .html. The * is a wild-card character that represents any number of characters. The ? is a wild-card character that represents a single character. ls /home/user List the files in the directory /home/user. mkdir Make a new directory.
C H A P T E R 5 Using the VMware Service Console Finding and Viewing Files Command Example and Explanation cat Concatenate the contents of files and display the content on the screen. cat /proc/vmware/mem Display the contents of the file /proc/vmware/mem. find Find files under a specified directory that match conditions you specify. find / -name myfil* Find files in the root directory and all directories under it that have file names beginning with myfil.
VMware ESX Server Administration Guide Command Example and Explanation more Display the contents of a specified file one screen at a time. Use the spacebar to move forward through the file a screen at a time; use the Enter key to move forward through the file one line at a time. more myfile Display the contents of the file myfile.
C H A P T E R 5 Using the VMware Service Console Command Example and Explanation groupadd Add a new group. groupadd newgroup Add a group named newgroup to the system. hostname Display the system’s host name. ifconfig Display the network interface configuration information for devices used by the service console. insmod Install a loadable module into the running kernel. insmod parport Install the loadable module named parport into the running kernel. kill Kill a specified process.
VMware ESX Server Administration Guide Command Example and Explanation shutdown Shut down the computer. shutdown -h 5 Completely halt (-h) the computer in 5 minutes. shutdown -r now Shut down and restart (-r) the computer immediately. umount Unmount a specified device. umount /mount/floppy Unmount the device currently mounted at /mount/floppy. useradd Add a new user to the system. useradd newuser Add a new user with a user name of newuser to the system.
C H A P T E R 5 Using the VMware Service Console named User. The word User in the fourth column indicates the file’s owner is a member of a group named User. Permissions for the owner, the specified group and all other users are indicated in the first column: -rwxr-xr--. The owner’s permissions are specified first: rwx (read, write and execute). Permissions for other members of the group User are r-x (read and execute).
VMware ESX Server Administration Guide Command Example and Explanation chgrp Change the group for a specified file. chgrp VMUsers win2000.vmx Change the group for the file win2000.vmx to VMUsers. Switching User Names Command Example and Explanation su Switch user. By default, this allows you to log in as the root user if you know the root user’s password. You can also use the command to log in as any other user if you know the appropriate user name and password.
C H A P T E R 5 Using the VMware Service Console Note: The contents and format of the /proc/vmware directory may change between releases of ESX Server. /proc/vmware Entry Description chipset State of interrupt controllers. config Advanced ESX Server parameters available through the VMware Management Interface. debug Debugging information. filters Network traffic shaping. See Traffic Shaping with nfshaper on page 430.
VMware ESX Server Administration Guide Getting Help for Service Console Commands Detailed usage notes for most service console commands are available as manual — or man — files. To view the manual file — or man page — for a particular command, use the man command followed by the name of the command for which you want to see information. Command Example and Explanation man Displays the manual page for a specified command. Press the spacebar to go to the next screen of text.
C H A P T E R 5 Using the VMware Service Console Authentication and Security Features This section contains the following: • Authenticating Users on page 207 • Default Permissions on page 209 • TCP/IP Ports for Management Access on page 209 There are three key aspects to security with VMware ESX Server. • VMware ESX Server authenticates all remote users who connect to a server using the VMware Management Interface or the VMware Remote Console.
VMware ESX Server Administration Guide • The user must have read access to the configuration file to use the local console on the service console or to connect to the virtual machine with the VMware Perl API. • The user must have read and execute access to the configuration file to connect to and control (start, stop, reset or suspend) a virtual machine in a remote console, with the VMware Perl API or with the management interface.
C H A P T E R 5 Using the VMware Service Console itself (mui.crt) and the private key file (mui.key). The private key file should be readable only by the root user. When you upgrade the management interface, the certificate remains in place and, in case you removed the management interface, the directory is not removed from the service console.
VMware ESX Server Administration Guide • 111 – portmap, used by the NFS client when mounting a drive on a remote machine Low Security • 80 – HTTP, used by the VMware Management Interface • 902 – vmware-authd, used when you connect with the remote console • 22 – SSH, used for a secure shell connection to the service console • 23 – Telnet, used for an insecure shell connection to the service console • 21 – FTP, used for transferring files to and from other machines • 111 – portmap, used by the NFS client whe
C H A P T E R 5 Using the VMware Service Console Using Devices With ESX Server In this section, we discuss any considerations in using devices with ESX Server. Supporting Generic Tape and Media Changers In order for the guest operating system to see and control the media changer directly, you must be sure that the SCSI ID in the target raw device’s configuration file matches with the SCSI ID that ESX Server sees for that device.
VMware ESX Server Administration Guide The -query option of vmkpcidivy reports various ESX Server configuration details.
C H A P T E R 5 Using the VMware Service Console Enabling Users to View Virtual Machines Through the VMware Remote Console The default security setting for ESX Server is that users must have read (r) and execute (x) access permissions to connect a remote console to a virtual machine. However, if you want to allow access to users with only read permissions, you can do so with the following global configuration setting: authd.policy.
VMware ESX Server Administration Guide 214 www.vmware.
CHAPTER Administering ESX Server 6 ESX Server configuration can be viewed and modified through the VMware Management Interface. This section provides an overview of the configuration modification options.
VMware ESX Server Administration Guide Modifying VMware ESX Server To modify the ESX Server configuration: 1. Log in to the VMware Management Interface as root. The Status Monitor page appears. 2. Click the Options tab. The Options page appears. Click the link for the desired server setting. 3. Make your changes. Click through the links and options displayed on the screen.
C H A P T E R 6 Administering ESX Server • Configuring Storage Area Networks on page 232 • Adapter Bindings on page 238 • Viewing Failover Paths Connections on page 239 • Configuring a Swap File on page 241 • Changing Advanced Settings on page 242 • Configuring the Service Console on page 243 • Viewing System Logs and Reports on page 246 Refer to the VMware ESX Server Installation Guide for additional information about server configuration during installation.
VMware ESX Server Administration Guide Updating the Startup Profile Use the Startup Profiles option to create and modify ESX Server boot configurations. For each configuration, you can specify how you wish to allocate your devices: to the virtual machines, to the service console or shared between them. For information about changing the startup profile, see the VMware ESX Server Installation Guide.
C H A P T E R 6 Administering ESX Server enable this feature. For more information on Hyper-Threading, see Using HyperThreading on page 393. If you make any changes to the startup profile, you must reboot the server in order for your changes to take effect. Changing Network Connections Use the Network Connections option to configure the network connections. This option allows you to create new virtual switches or edit existing switches. Creating a New Virtual Switch 1.
VMware ESX Server Administration Guide 5. Other Outbound Adapters lists the adapters currently assigned to other switches. Select an adapter to reassign it to the new switch. 6. When you are finished selecting physical adapters, click Create Switch. This creates the new virtual switch and closes the window. Editing an Existing Virtual Switch 1. To edit an existing virtual switch and its adapters, click Edit.
C H A P T E R 6 Administering ESX Server 2. Click the Options tab, then click the Network Connections tab. The Virtual Switches window opens. 3. To create a port group for a switch, click Add next to Port Groups. The Create Port Groups window opens and displays configuration options for a port group. 4. Enter a name for the port group in the Port Group Label field. 5. In the VLAN ID field, enter a number between 1 and 4095. 6. Click Create Port Group. This creates the new port group and closes the window.
VMware ESX Server Administration Guide Configuring Physical Adapters Use the Network Connections option to view and configure the physical adapters assigned to the virtual machines. This option allows you to change the speed and duplex settings of the adapters. Configuring Network Speed and Duplex Settings When you use the VMware Management Interface to configure network settings for the Ethernet adapters assigned to virtual machines, you see the actual speed and duplex settings for each adapter.
C H A P T E R 6 Administering ESX Server From the Physical Adapters details page, choose the settings you want from the Configured Speed, Duplex pull-down list. Click OK to save the updated configured speed.
VMware ESX Server Administration Guide Changing Users and Groups Use the Users and Groups option to add, modify and remove ESX Server users and groups. This dialog box lists each user, the groups to which the user belongs, each group and the users that are part of each group. 224 www.vmware.
C H A P T E R 6 Administering ESX Server Adding Users and Groups To add a new user, complete the following steps. 1. Expand the Users list. Click the + (plus) sign next to Users, then click Add. The Edit Users and Groups page appears. 2. In the User Name field, type the name of the new user. 3. In the Home Directory field, type the name of the default directory for the user in the service console. 4. In the New Password field, type the password for the user’s account. 5.
VMware ESX Server Administration Guide 1. Expand the Groups list. Click the + (plus) sign next to Groups, then click Add. The Edit Users and Groups page appears. 2. In the Group Name field, type the name of the new group. 3. To add one or more users to the group, click Add, then select a user from the list. Repeat this step for each user you want to add to the group. Note: If you want to remove a user from the group, click Remove next to the user name. 4.
C H A P T E R 6 Administering ESX Server Editing and Removing Users and Groups To change information for or remove a user, complete the following steps. 1. Expand the Users list. Click the + (plus) sign next to Users, then click the user you want to edit or remove. The Edit Users and Groups page appears. 2. Do any of the following: • To change the user’s home directory, in the Home Directory field, type the name of the default directory for the user in the service console.
VMware ESX Server Administration Guide 1. Expand the Groups list. Click the + (plus) sign next to Groups, then click the group you want to edit or remove. The Edit Users and Groups page appears. 2. Do any of the following: • To add one or more users to the group, click Add, then select a user from the list. Repeat this step for each user you want to add to the group. • To remove any user from the group, click Remove next to the user name.
C H A P T E R 6 Administering ESX Server Configuring Security Settings Use the Security Settings option to configure ESX Server security properties. You can set up unencrypted Web access and enable SSH, telnet and FTP access to the server and enable NFS file sharing. By default, the server is set to High security, which does not allow unencrypted VMware Management Interface and Remote Console sessions.
VMware ESX Server Administration Guide Using Custom Security Settings By customizing your security settings, you can enable or disable various settings that provide access to the server, such as unencrypted Web access, SSH, telnet, FTP and NFS file sharing. To customize your security settings, click Custom. The Security Settings dialog box changes to allow you to choose specific security settings. Check the appropriate boxes for items you want to enable, then click OK. 230 www.vmware.
C H A P T E R 6 Administering ESX Server Configuring the SNMP Agent Use the SNMP Configuration option to configure the ESX Server SNMP agent and sub-agent, allowing you to monitor the health of the server and of virtual machines running on the server. To configure the SNMP agents, see Configuring the ESX Server Agent through the VMware Management Interface on page 234. For more complete information about SNMP, see Using SNMP with ESX Server on page 230.
VMware ESX Server Administration Guide Viewing the License and Changing Serial Numbers Use the Licensing and Serial Numbers option to view the current license information for this product. If you have a new serial number for either ESX Server or VMware Virtual SMP for ESX Server, you may enter them here. Note: If you enter a new serial number for a license that changes the maximum number of processors allowed on the server, you are prompted to reboot the server for the new license to take effect.
C H A P T E R 6 Administering ESX Server Note: Be sure that only one ESX Server system has access to the SAN while you are using the VMware Management Interface to configure it by formatting the VMFS-2 volumes. After you have finished the configuration, be sure that all partitions on the shared disk are set for public or shared access for access by multiple ESX Servers (see VMFS Accessibility on page 257).
VMware ESX Server Administration Guide Creating a Disk Partition You can use any existing free space on your VMFS volumes to create new disk partitions. For background on how SCSI devices are identified, see Determining SCSI Target IDs on page 273. Note: You cannot change any partitions set up when you installed ESX Server. These include any volumes with a Linux file system or that are used for Linux swap space. If a core dump file does not exist on the disk, you are offered to create one.
C H A P T E R 6 Administering ESX Server If it does not exist, you are asked if you want to create a core dump partition. The core dump partition stores information generated if the VMkernel crashes. The core dump information is important in debugging any problems with the VMkernel. The rest of the disk or array is used as a VMFS partition, where you store virtual machine disk files.
VMware ESX Server Administration Guide Editing a Disk Partition Select a partition to edit and click Edit. ESX Server 2.1 includes a new file system, VMFS version 2 (VMFS-2). If this partition is formatted for VMFS-1, you can convert it to VMFS-2. See File System Management on SCSI Disks and RAID on page 255 for detailed information on this file system. The changes you can make to the partition may include (certain partitions do not allow you to change all of the following): • Setting the volume’s type.
C H A P T E R 6 Administering ESX Server With a public VMFS version 2 (VMFS-2) volume, multiple ESX Server computers can access the VMware ESX Server file system concurrently. VMware ESX Server file systems with a public mode have automatic locking to ensure file system consistency. • Shared mode is used for a VMFS volume that is used for failover-based clustering among virtual machines on the same or different ESX Servers.
VMware ESX Server Administration Guide For more information, see File System Management on SCSI Disks and RAID on page 255. • Convert the partition to VMFS-2. Click the Convert to VMFS-2 link. In order to convert the file system, you must deactivate the swap partition if it exists. To deactivate the partition, see Configuring a Swap File on page 241. • Removing the partition. Click Remove. You are asked to confirm that you want to remove the partition. You cannot remove a volume that is spanned.
C H A P T E R 6 Administering ESX Server Viewing Failover Paths Connections The Failover Paths page allows you to review the current state of paths between your system and SAN LUNs. Multipathing support allows your system to maintain a constant connection between the server machine and the storage device in case of the failure of a host bus adapter (HBA), switch, storage controller, or a Fibre Channel cable.
VMware ESX Server Administration Guide Configuring Failover Policies The failover paths edit feature allows you to configure the policy for transferring LUN access from one path to another. To edit the failover policy for a LUN: 1. From the Failover Paths page, click Edit. The configuration page appears and displays information about the current state of the paths and failover policy options. 2.
C H A P T E R 6 Administering ESX Server Configuring a Swap File Use the Swap Configuration option to create and configure a swap file, which enables your virtual machines to use more memory than is physically available on the server. For background, see Memory Resource Management on page 363. You can manage a single swap file with the management interface. ESX Server can manage up to 8 swap files, but you must use vmkfstools to do so. For information on vmkfstools, see Using vmkfstools on page 259.
VMware ESX Server Administration Guide • The name of the swap file, which defaults to SwapFile.vswp. To change the name of the swap file, select Other from the File Name list, then type the name of the swap file. The file must have a .vswp extension. • The capacity of the swap file in MB. A recommended value is provided. • The activation policy. The swap file can be active when the system boots, or it can be activated manually.
C H A P T E R 6 Administering ESX Server When you configure the VMware ESX Server computer (see the VMware ESX Server Installation Guide), various system parameters are assigned predetermined values. These parameters control settings for memory, the processor and networking, for example, and affect the running of virtual machines. You can view these settings from the management interface. If you are logged in as the root user, you can change the values for these parameters.
VMware ESX Server Administration Guide Configuring the Service Console’s Processor Usage To review and configure the service console’s processor usage, click the CPU tab. The CPU page appears. The CPU page shows how much of the server processor or processors the service console is utilizing and how CPU resources are allocated to the service console.
C H A P T E R 6 Administering ESX Server That is, the virtual machine has three times as much CPU time as the service console, as long as the virtual machine’s CPU percentage is between 20% and 50%. In actuality, the virtual machine may only get twice the CPU time of the service console, because three times the CPU time exceeds 50%, or the maximum CPU percentage of the virtual machine. These values can be modified. Click Edit. The Edit CPU Resources window appears.
VMware ESX Server Administration Guide The Disk page shows hard disk performance information and resources allocated to the service console. Disk bandwidth represents the amount of data that is written to or read from the server’s physical disks. The values under Performance indicate how much bandwidth is being used when the service console is reading from or writing to the physical disk on the server.
C H A P T E R 6 Administering ESX Server • Service Console messages, the data for which is gathered from /var/log/messages in the service console. For more information, see Viewing Service Console Logs on page 250. • The availability report, which contains information and statistics about server uptime and downtime. For more information, see Viewing the Availability Report on page 251.
VMware ESX Server Administration Guide Viewing VMkernel Messages To view the VMkernel message log, click the VMkernel Log tab. 248 www.vmware.
C H A P T E R 6 Administering ESX Server This information is useful if you are experiencing problems with ESX Server or your virtual machines. If your log contains any alerts, check the VMware Knowledge Base at or contact your VMware support representative. For more information, see the VMware ESX Server Installation Guide.
VMware ESX Server Administration Guide Viewing Service Console Logs To view service console messages, click the Service Console Log tab. 250 www.vmware.
C H A P T E R 6 Administering ESX Server This information is useful if you are experiencing problems with ESX Server or your virtual machines. If your log contains any alerts, check the VMware Knowledge Base at or contact your VMware support representative. For more information, see the VMware ESX Server Installation Guide. Viewing the Availability Report To view the server availability report, click the Availability Report tab.
VMware ESX Server Administration Guide The availability report contains useful information about server uptime and downtime. This includes detailed statistics regarding uptime history and an analysis of downtime. 252 www.vmware.
C H A P T E R 6 Administering ESX Server Seeing How Memory Is Utilized The Memory Utilization page shows how much memory is being used by the ESX Server and how memory resources are allocated to virtual machines. For more information about memory utilization, refer to Memory Resource Management on page 403.
VMware ESX Server Administration Guide Memory • Memory Savings Due to Sharing — amount of memory saved by sharing memory between virtual machines Many VMware ESX Server workloads present opportunities for sharing memory across virtual machines. For example, several VMs may be running instances of the same guest operating system, have the same applications or components loaded, or contain common data.
C H A P T E R 6 Administering ESX Server Memory • Private — total memory allocated to virtual machines that is not shared • Shared — total memory allocated to virtual machines and securely shared with other virtual machines • Swapped — total memory forcibly reclaimed from virtual machines and stored in system swap files • Balloon Driver — memory reclaimed from virtual machines by cooperation with the VMware Tools (vmmemctl driver) and guest operating systems This is the preferred method for reclaiming memo
VMware ESX Server Administration Guide • Active — memory that has been accessed recently by the virtual machine • Swap I/O— rate at which the virtual machine is reading from and writing to system swap files, in bytes per second To adjust the allocation of server memory to a virtual machine, click the virtual machine name. This takes you to the Status Monitor, where you view details about the virtual machine.
C H A P T E R 6 Administering ESX Server Configuring Startup and Shutdown Options for Virtual Machines Using the system-wide Virtual Machine Startup and Shutdown option, you can: • Configure your server to determine if virtual machines start up or shut down when the system starts or shuts down. • Set a delay for starting or stopping one virtual machine before starting or stopping the next.
VMware ESX Server Administration Guide Note: The when VMWare Tools starts option applies an additional condition for starting up the next virtual machine. It does not override the delay period set in the pulldown menu. • Attempt to Continue Stopping Virtual Machines After — sets the delay limit between initiating shutdowns of virtual machines. The server will stop the next virtual machine as soon as the current virtual machine shuts down.
C H A P T E R 6 Administering ESX Server 2. Under System Configuration, click Edit. The System Startup and Shutdown Defaults page appears. 3. To enable system-wide startup and shutdown policies, check the Start Up and Shut Down Virtual Machines check box. 4.
VMware ESX Server Administration Guide number of minutes other than what is displayed in the list, select Other and enter the number of minutes at the prompt. 6. Click OK to save your settings. 7. Click Close Window to return to the management interface’s Options page. 260 www.vmware.
C H A P T E R 6 Administering ESX Server Disabling the System’s Configuration Settings To disable the system-wide configuration settings, complete the following steps. 1. Under System Configuration, click Edit. The System Startup and Shutdown Defaults page appears. 2. Clear the Start Up and Shut Down Virtual Machines check box, then click OK. 3. Click Close Window to return to the management interface’s Options page.
VMware ESX Server Administration Guide Editing the Startup Sequence for Virtual Machines To edit the startup sequence for virtual machines, click Edit under Startup Sequence. The Virtual Machine Startup Sequence configuration page appears and displays the virtual machines on your system. To specify the startup order for virtual machines, select the check box next to one or more machines. Once selected, navigation arrows highlight, allowing you to move machines between the three lists.
C H A P T E R 6 Administering ESX Server Rebooting or Shutting Down the Server To reboot or shut down the computer where ESX Server is running: 1. Log in to the management interface as root. The URL to connect to the server is http://. 2. On the Status Monitor page, be sure all virtual machines are shut down or suspended. Then click the Options tab. 3. Click Restart or Shut Down to reboot or shut down the server, respectively. A prompt appears. 4.
VMware ESX Server Administration Guide 264 www.vmware.
CHAPTER Using SNMP with ESX Server 7 Simple network management protocol (SNMP) is a communication protocol between the SNMP client (for example, a workstation) and the SNMP agent (management software that executes on a remote device including hosts, routers, X terminals, and so on). The SNMP client queries the SNMP agent, that provides information to the client regarding the device’s status.
VMware ESX Server Administration Guide Using SNMP to Monitor the Computer Running ESX Server ESX Server ships with an SNMP agent that allows you to monitor the health of the physical machine where ESX Server is running and of virtual machines running on it. This agent is based on Net-SNMP with enhancements to support data specific to ESX Server. Background information on Net-SNMP is available at net-snmp.sourceforge.net.
C H A P T E R 7 Using SNMP with ESX Server Information about the Virtual Machines SNMP get variables allow you to monitor a number of items about particular virtual machines running on the computer.
VMware ESX Server Administration Guide vmware-serverd. You may restart vmware-serverd by rebooting the server or by logging in to the service console as root and issuing the command killall -HUP vmware-serverd 268 www.vmware.
C H A P T E R 7 Using SNMP with ESX Server Setting Up and Installing for ESX Server SNMP Setting Up VMware ESX Server SNMP ESX Server 2.1 includes two daemons, a master (snmpd) and a subagent (vmwaresnmpd), as illustrated in the following diagram. The master snmpd daemon is either the default snmpd daemon shipped with ESX Server or a third party SNMP application daemon. The subagent vmware-snmpd exports ESX Server MIB information to the master, that communicates directly with the SNMP client application.
VMware ESX Server Administration Guide Then, configure your SNMP trap destinations. See Configuring SNMP Trap Destinations on page 274. 270 www.vmware.
C H A P T E R 7 Using SNMP with ESX Server Configuring the ESX Server Agent Configuring the ESX Server Agent through the VMware Management Interface To configure the ESX Server SNMP subagent, complete the following steps. 1. Log in to the VMware Management Interface as root. The Status Monitor page appears. 2. Click the Options tab. The Options page appears. 3. Click SNMP Configuration. The options in this page act as toggle between two choices. To change an option, click the link. 4.
VMware ESX Server Administration Guide 5. Make sure that the status of the master SNMP agent is Running. 6. If you’re interested in VMware-specific SNMP MIBs, then make sure the status and VMware traps of the VMware SNMP subagent is Enabled. 7. Optional: If you want the master SNMP agent (and the VMware SNMP subagent, if its status is Enabled) to start automatically upon booting, then make sure the Startup Type is Automatic. 8. Configure your traps. See Configuring SNMP Trap Destinations on page 274.
C H A P T E R 7 Using SNMP with ESX Server export of ESX Server MIB items after installing the third party management application. The script connects the third party application snmpd daemon with the vmware-snmpd subagent daemon. 4. The script then starts both daemons.
VMware ESX Server Administration Guide Configuring SNMP Configuring SNMP Trap Destinations Currently, you cannot configure trap destinations through the VMware Management Interface. To configure traps, log into the service console as the root user and modify the /etc/snmp/snmpd.conf file as follows: 1. Using a text editor, add the following line, replacing mercury.solar.com with the name of the host on your network that will receive traps. You may repeat this line to specify more than one destination.
C H A P T E R 7 Using SNMP with ESX Server security mechanism that allow an administrator to set up a more elaborate permissions scheme. See the snmpd.conf(5) man page for details. Using SNMP with Guest Operating Systems To use SNMP to monitor guest operating systems or applications running in virtual machines, install the SNMP agents you would normally use for that purpose in the guest operating systems. No special configuration is required on ESX Server.
VMware ESX Server Administration Guide VMware ESX Server SNMP Variables The VMware enterprise tree is at .iso.dod.org.internet.private.enterprises.vmware. (.1.3.6.1.4.1.6876.) The tree consists of several groups; the variables in each of the groups are shown in the tables below. Note: All variables are read-only. The data type field refers to the SNMP type described by the structure of management information (SMI). vmware.
C H A P T E R 7 Using SNMP with ESX Server Name Data type Description vmGuestState Display string Guest operating system on or off. hbaTable — a table of disk adapters seen by this virtual machine. Name Data type Description vmIdx (Index field) Integer This number corresponds to the index of the virtual machine in vmTable. hbaIdx (Index field) Integer There is a correspondence to the order of the SCSI device module loaded into the VMkernel.
VMware ESX Server Administration Guide Name Data type Description fdIdx (Index field) Integer Index into floppy table. Order of the floppy device on this virtual machine. fdName Display string Device number/name (/dev/fd0, etc. NULL if not present). fdConnected Display string Is the floppy drive connected (mounted)? cdromTable — a table of CD-ROM drives seen by this virtual machine.
C H A P T E R 7 Using SNMP with ESX Server vmware.vmwResources.vmwMemory This group contains RAM information in three simple variables and one table. Name Data type Description memSize Integer Amount of physical memory present on machine (KB). memCOS Integer Amount of physical memory used by the service console (KB). memAvail Integer Amount of physical memory available/free (KB). memTable — a table of memory usage by virtual machine.
VMware ESX Server Administration Guide vmwNetTable — network adapter statistics. Name Data type Description netIdx Integer (Index field) Index into table for Net (corresponds to the order of the adapter on the physical computer). netName Display string String describing the network adapter (format: vmnic* or vmnet*). vmID Integer ID assigned to running virtual machine by the VMkernel. ifAddr Display string MAC address of virtual machine's virtual network adapter.
C H A P T E R 7 Using SNMP with ESX Server Name Data type Description vmPoweredOff Trap This trap is sent when a virtual machine is powered off. vmHBLost Trap This trap is sent when a virtual machine detects a loss in guest heartbeat. vmHBDetected Trap This trap is sent when a virtual machine detects or regains the guest heartbeat. vmID Integer This is the vmID of the affected virtual machine in the preceding traps. If the vmID is nonexistent, (such as for a power-off trap) -1 is returned.
VMware ESX Server Administration Guide 282 www.vmware.
CHAPTER 8 Using VMkernel Device Modules The ESX Server virtualization layer, also known as the VMkernel, runs on the native hardware. It manages all the operating systems on the machine, including both the service console and the guest operating systems running on each virtual machine. The VMkernel supports device driver modules. Using these modules, the VMkernel can provide access to all devices on the server.
VMware ESX Server Administration Guide Configuring Your Server to Use VMkernel Device Modules Loading VMkernel Device Modules The installation process should detect the devices that are assigned to the VMkernel and automatically load appropriate modules into the VMkernel to make use of these devices. However, there may be situations in which you wish to load VMkernel device modules explicitly. Modules supported in this release are located in /usr/lib/vmware/vmkmod.
C H A P T E R 8 Using VMkernel Device Modules -u --unload Unload the module named . -v --verbose Be verbose during the module loading. -d --device The module being loaded is for a SCSI adapter that is currently being used by the service console. After the module is loaded the SCSI adapter is controlled by the VMkernel but the service console continues to be able to access all SCSI devices.
VMware ESX Server Administration Guide vmkload_mod --device 0:12 ~/modules/aic7xxx.o vmhba loads the module ~/modules/aic7xxx.o into the VMkernel. The tag for this module is vmhba. The Adaptec SCSI adapter is currently being used by the service console. The SCSI adapter is located on PCI bus 0, slot 12. vmkload_mod --exportsym ~/modules/vmklinux linuxdrivers loads the module ~/modules/vmklinux into the VMkernel.
C H A P T E R 8 Using VMkernel Device Modules adapters that are shared and load the device module appropriately. However, if you wish to control the sharing explicitly, assign the SCSI device to the service console during the installation process. Then load the VMkernel SCSI module using the following syntax: vmkload_mod -d bus:slot \ /usr/lib/vmware/vmkmod/aic7xxx.o vmhba Note: This command should be entered on a single line. Do not type the backslash.
VMware ESX Server Administration Guide Controlling VMkernel Module Loading During Bootup You can customize the loading of VMkernel device driver modules during bootup by editing one of the following files: • /etc/vmware/hwconfig — Automatically supply extra parameters to a driver when it is loaded during bootup. • /etc/vmware/vmkmodule.conf — Supply extra parameters to a driver, add or prevent a driver module from loading, or determine the order in which the driver modules are loaded during bootup.
C H A P T E R 8 Using VMkernel Device Modules Customizing Loading of VMkernel Device Driver Modules on Bootup You can completely customize the loading of modules at bootup time by editing the /etc/vmware/vmkmodule.conf file. By adding or removing entries from this file, you can add or prevent a device driver module from loading. Also, by rearranging the order of the device driver modules in this file, you can specify the order in which these modules are loaded during bootup.
VMware ESX Server Administration Guide 290 www.vmware.
CHAPTER Storage and File Systems 9 This chapter contains information about SCSI disks. These disks may be accessed by local SCSI adapters, or on a Storage Area Network (SAN) by Fibre Channel adapters. Therefore, whenever we describe SCSI adapters in this chapter, these descriptions also apply to Fibre Channel adapters, even though they are not explicitly mentioned.
VMware ESX Server Administration Guide File System Management on SCSI Disks and RAID VMFS (VMware ESX Server File System) is a simple, high-performance file system on physical SCSI disks and partitions, used for storing large files such as the virtual disk images for ESX Server virtual machines and, by default, the memory images of suspended virtual machines. The VMFS also stores the redo-log files for virtual machines in nonpersistent, undoable, or append disk modes.
C H A P T E R 9 Storage and File Systems Viewing and Manipulating Files in the /vmfs Directory You can view and manipulate files under /vmfs in these mounted VMFS volumes with ordinary file commands such as ls and cp. Although mounted VMFS volumes may appear similar to any other file system such as ext3, VMFS is primarily intended to store large files such as disk images. Unfortunately, the service console (which is based on a Linux 2.4 kernel) does not support files greater than 2GB.
VMware ESX Server Administration Guide Labelling VMFS Volumes If you create a VMFS volume on a SCSI disk or partition, you can give a label to that volume and use that label when specifying VMFS files on that volume. For instance, suppose you have a VMFS volume on the SCSI partition vmhba0:3:0:1 and have created a VMFS file nt4.dsk. You can label that volume by using a vmkfstools command such as: vmkfstools -S mydisk vmhba0:3:0:1 You can then refer to the nt4.dsk file as mydisk:nt4.
C H A P T E R 9 Storage and File Systems VMFS Accessibility on a SAN Any VMFS volume on a disk that is on a SAN should have VMFS accessibility set to public or shared. Public, the default and recommended accessibility mode, makes the VMFS volume available to multiple physical servers, and to the virtual machines on those servers. With VMFS-2 volumes, public access is concurrent to multiple physical servers, whereas for VMFS-1 volumes, public access is limited to a single server at a time.
VMware ESX Server Administration Guide Using vmkfstools The vmkfstools command supports the creation of a VMware ESX Server file system (VMFS) on a SCSI disk. Use vmkfstools to create, manipulate and manage files stored in VMFS volumes. You can store multiple virtual disk images on a single VMFS volume. Note: You can also do most of the vmkfstools operations through the VMware Management Interface. vmkfstools Command Syntax Note: You must be logged in as the root user to run the vmkfstools command.
C H A P T E R 9 Storage and File Systems For example, you can specify a VMFS volume by a path such as: /vmfs/vmhba1:2:0:3 You can also specify a single VMFS file: /vmfs/lun1/rh9.dsk vmkfstools Options This section includes a list of all the options used with the vmkfstools command. Some of the tasks in this section include options that are suggested for advanced users only. These advanced options are not available through the VMware Management Interface.
VMware ESX Server Administration Guide • Specify the block size by using the -b option. The block size must be 2x (a power of 2) and at least 1MB. (The default file block size is 1MB.) You can specify the size in kilobytes, megabytes, or gigabytes by adding a suffix of k (kilobytes), m (megabytes), g (gigabytes) respectively. • Specify the maximum number of files in the file system with the -n option. The default maximum number of files is 256 files.
C H A P T E R 9 Storage and File Systems Note: However, your original source redo log(s) and base virtual disk remain unchanged. • If you want to export your redo logs and base virtual disk separately, then use the exportfile option to export the base virtual disk, and the cp command to export each redo log separately. Use the combination of exportfile and importfile together to copy VMFS files to remote machines.
VMware ESX Server Administration Guide Sets the name of the VMFS on the specified SCSI device -S --setfsname You can see the VMFS name by running the vmkfstools command with the -l option, vmkfstools -l. Advanced vmkfstools Options Advanced options are tasks that you may perform infrequently. These tasks are not available through the management interface, or are available in a limited form, and are suggested for advanced users only.
C H A P T E R 9 Storage and File Systems Note: A VMFS volume that is used for failover-based clustering should have its mode set to shared. Writable — When virtual machines access a file on a shared VMFS, the file system metadata becomes read-only. That is, no virtual machine or user command can create, delete or change the attributes of a file. If you need to create, remove, or change the length of a file (vmkfstools -X), then you need to change the volume to “writable”.
VMware ESX Server Administration Guide Displays Disk Geometry for a VMware Workstation or GSX Server Virtual Disk -g -- geometry The output is in the form: Geometry information C/H/S is 1023/128/ 32, where C represents the number of cylinders, H represents the number of heads, and S represents the number of sectors. When importing VMware Workstation or VMware GSX virtual disks to VMware ESX Server, you may see a disk geometry mismatch error message.
C H A P T E R 9 Storage and File Systems The -L reserve command reserves the specified raw disk, or the disk containing the specified VMFS volume. After the reservation, other servers will get a SCSI reservation error if they attempt to access that disk, but the server that did the reservation will be able to access the disk normally. The -L release command releases the reservation on the specified disk, or disk containing the specified VMFS volume. Any other server can access the disk again.
VMware ESX Server Administration Guide You can resize an existing swap file by specifying the new file size as an argument to the -k option: 1. Deactivate the swap file, if it is active, with vmktools -y. 2. Resize the swap file with the -k option. 3. Activate the swap file with vmktools -w filename. If you try to resize an active swap file, ESX Server returns an error message. ESX Server does not automatically activate a swap file after it is created.
C H A P T E R 9 Storage and File Systems Note: If you have an active swap partition, you must deactivate it before running this command. Deactivate swap through the VMware Management Interface and reboot your server. Once this vmkfstools -T command completes, you can reactivate your swap file. This conversion may take several minutes. When your prompt returns, the conversion is complete. Note: In ESX Server 2.1, private VMFS volumes are deprecated.
VMware ESX Server Administration Guide You can address the file system by using the name of its head partition; for example, vmhba1:3:0:1. Names a VMFS volume vmkfstools -S mydisk vmhba1:3:0:1 This example illustrates assigning the name of mydisk to the new file system. Creates a new VMFS virtual disk file vmkfstools -c 2000m mydisk:rh6.2.dsk This example illustrates creating a 2GB VMFS file with the name of rh6.2.dsk on the VMFS volume named mydisk. The rh6.2.
C H A P T E R 9 Storage and File Systems vmkfstools -i winXP.vmdk vmhba0:6:0:1:winXP.dsk By contrast, if you are importing directly into a raw partition, the example becomes: vmkfstools -i winXP.vmdk vmhba0:6:0:1 Lists the files on the VMFS of the specified device vmkfstools -l vmhba0:2:0:0 This command illustrates listing the contents of the file system, including redo logs, virtual disk files, and swap files on target 2 of SCSI adapter 0.
VMware ESX Server Administration Guide Accessing Raw SCSI Disks You can access raw disks directly or use the vmkfstools -r command to map them to files on VMFS-2 volumes. Once this mapping is established, you access the raw disk or partition like a normal file. For more information on this mapping, see Using vmkfstools on page 296, in particular, the vmkfstools -r option.
C H A P T E R 9 Storage and File Systems 3. Click Add Device. The Add Device Wizard starts. 4. Click Hard Disk. The Virtual Disk Type page appears.
VMware ESX Server Administration Guide 5. Click System LUN/Disk to allow the virtual machine to access a physical disk stored on a LUN. Then specify the following. 6. Choose the LUN you want to use in the Storage Controller LUN list. 7. Specify the virtual device node. Select the appropriate SCSI ID in the Virtual SCSI Node list. 8. Click OK to add the disk. 310 www.vmware.
C H A P T E R 9 Storage and File Systems Determining SCSI Target IDs In order to assign SCSI disks to a virtual machine, you need to know which controller the drive is on and what the SCSI target ID of the controller is. This section helps you determine these values without opening your computer and physically looking at the SCSI target ID settings on the drives. SCSI disks may be accessed by local SCSI adapters, or on a SAN by Fibre Channel adapters.
VMware ESX Server Administration Guide Partition Info: Block size: 512 Num Blocks: 17783240 num: Start Size Type 4: 1 17526914 fb Partition 0: VM 11 Commands 2 Kbytes read 0 Kbytes written 0 Commands aborted 0 Bus resets 0 Partition 4: Commands 336 Kbytes read 857 Kbytes written 488 Commands aborted 0 Bus resets 0 This information should help you determine the SCSI target ID to use in the storage configuration page, as displayed by the VMware Management Interface.
C H A P T E R 9 Storage and File Systems Sharing the SCSI Bus Normally, VMware ESX Server enforces locking and does not allow two virtual machines to access the same virtual disk (VMFS file) at the same time. If a second virtual machine tries to access a VMFS file, it gets an error and does not power on. However, it is often useful to have more than one virtual machine share a disk in order to provide high availability.
VMware ESX Server Administration Guide Also, if the bus sharing is Physical, commands that reserve, reset or release a shared virtual disk are transmitted through to the physical disk, so other machines sharing the disk can properly detect when a virtual disk has been reserved or reset.
C H A P T E R 9 Storage and File Systems Using Storage Area Networks with ESX Server VMware ESX Server can be used effectively with storage area networks (SANs). ESX Server supports Qlogic and Emulex host bus adapters, which allow an ESX Server computer to be connected to a SAN and to see the disk arrays on the SAN. The SCSI configuration information contained in this section also applies to Fibre Channel adapters, but note that FC adapters may require additional configuration as well.
VMware ESX Server Administration Guide Configuring VMFS Volumes on SANs Be sure that only one ESX Server has access to the SAN while you are using the VMware Management Interface to configure the SAN and format the VMFS-2 volumes. After you have finished the configuration, be sure that all partitions on the physically shared SAN disk are set for public or shared access for access by multiple ESX Servers (see VMFS Accessibility on page 294).
C H A P T E R 9 Storage and File Systems Note: If you are using multipathing with multiple FC HBAs, then you should run this command on all of the FC HBAs. If, after your rescan, you see new LUNs and they have VMFS volumes, then you will see the appropriate subdirectories when you view the contents of the /vmfs directory. Choosing QLogic Adapters If you are using a QLogic storage adapter, then be sure to choose the right driver version: • IBM storage — QLogic driver version 6.
VMware ESX Server Administration Guide The DiskMaskLUNs configuration option allows the masking of specific LUNs on specific HBAs. Masked LUNs are not touched or accessible by the VMkernel, even during initial scanning. The DiskMaskLUNs option takes a string comprised of the adapter name, target ID and comma-separated range list of LUNs to mask.
C H A P T E R 9 Storage and File Systems Troubleshooting SAN Issues with ESX Server You can view LUNs through the VMware Management Interface or viewing the output of ls /proc/vmware/scsi/. If the output differs from what you expect, then check the following: • DiskMaxLUN — the maximum number of LUNs per vmhba that are scanned by ESX Server.
VMware ESX Server Administration Guide Using Persistent Binding You can specify persistent bindings for your Fibre Channel host bus adapters (HBAs). With persistent binding, ESX Server assigns specific target IDs to specific Fibre Channel SCSI devices. This target ID association is retained from reboot to reboot unless changed by you. Persistent binding is particularly useful if you are using raw disks with ESX Server.
C H A P T E R 9 Storage and File Systems Example Output for a QLogic HBA #cat /proc/scsi// . . . SCSI Device Information: scsi-qla0-adapter-node=200100e08b229b53; scsi-qla0-adapter-port=210100e08b229b53; scsi-qla0-target-0=20000060163cad13; . . .
VMware ESX Server Administration Guide Examples Using the pbind.pl Script This example adds bindings for all QLogic 2200 hosts. pbind.pl -a /proc/scsi/qla2200/ This example adds binding for QLogic 2200 host 2. pbind.pl -a /proc/scsi/qla2200/2 Note: Typing a wildcard character, for example, pbind.pl -a /proc/scsi/ qla2200/* is invalid. 322 www.vmware.
C H A P T E R 9 Storage and File Systems Using Multipathing in ESX Server ESX Server 2.1 includes multipathing support to maintain a constant connection between the server machine and the storage device in case of the failure of a host bus adapter (HBA), switch, storage controller (or storage processor; abbreviated as SP in the following diagram), or a Fibre Channel cable. Unlike previous versions of ESX Server, this version of multipathing support does not require specific failover drivers.
VMware ESX Server Administration Guide Choosing Path Management Tools ESX Server allows you to configure and manage multipath access to storage devices through both the Management Interface and the Service Console. The sections below describe how to manage multipathing in the Service Console with the vmkmultipath command. For instructions on configuring multipathing with the Management Interface, seeViewing Failover Paths Connections on page 239.
C H A P T E R 9 Storage and File Systems vmhba0:2:4 vmhba1:0:4 vmhba1:1:4 vmhba1:2:4 on on on on Disk vmhba0:0:6 (0 MB) has 6 paths. Policy is fixed. vmhba0:0:6 on (active, preferred) vmhba0:1:6 on vmhba0:2:6 on vmhba1:0:6 on vmhba1:1:6 on vmhba1:2:6 on Disk vmhba0:3:3 (0 MB) has 2 paths. Policy is mru. vmhba0:3:3 on (active, preferred) vmhba1:3:3 on In this system configuration, the disk vmhba0:0:2 has a “fixed” policy. There are six paths to the disk recognized by ESX Server.
VMware ESX Server Administration Guide Setting Your Multipathing Policy for a LUN You can specify the default policy for the multipathing feature. There are two policies: • fixed — ESX Server always uses the preferred path to the disk; if it cannot access the disk through the preferred path, then it tries the alternate paths. Fixed is the default policy for active/active storage devices. Enter the following command to select the fixed policy for a disk, in this example, vmhba0:0:0.
C H A P T E R 9 Storage and File Systems Note: ESX Server ignores the preferred path when the multipathing policy is set to mru. Saving Your Multipathing Settings Your multipathing settings are saved when shutting down ESX Server normally. However, we suggest you run the following command, as root, to ensure your settings are saved, in case of an abnormal shutdown. # /usr/sbin/vmkmultipath -S By running this command, your multipathing settings are restored automatically when you restart your system.
VMware ESX Server Administration Guide Failover in Windows 2000 and Windows Server 2003 Guest Operating Systems For the Windows 2000 and Windows Server 2003 guest operating systems, you may want to increase the standard disk TimeOutValue so that Windows will not be extensively disrupted during failover. 1. Select Start > Run, type regedit.exe, and click OK. 2. In the left panel hierarchy view, double-click HKEY_LOCAL_MACHINE, System, CurrentControlSet, Services, then Disk. 3.
CHAPTER 10 Configuration for Clustering ESX Server clustering capabilities are ideally suited for development, testing and training applications. Any clustering configuration based on ESX Server should not be deployed in a production environment unless it has been rigorously tested and reviewed. The following sections outline how to use VMware ESX Server 2.1 and higher to provide clustered virtual machines in a variety of environments.
VMware ESX Server Administration Guide What Is Clustering? Clustering is simply described as providing a service via a group of servers to get high availability, scalability or both. For example, all nodes in a cluster serve a Web site that serves static content. The main gateway distributes requests to all nodes according to load. It redirects requests to remaining nodes if one crashes. This gives better availability and better performance. Network Load Balancing in Windows 200 provides such a service.
C H A P T E R 1 0 Configuration for Clustering Clustering Hardware A typical clustering setup includes: • Disks that are shared between nodes These are needed if the application uses dynamic data as mail servers or database servers do. The shared disks may be shared SCSI disks or a storage area network using Fibre Channel. • Extra network connectivity between nodes for monitoring heartbeat status. • A method for redirecting incoming requests.
VMware ESX Server Administration Guide Clustering Virtual Machines Clustering Software in Virtual Machines Network Load Balancing, Microsoft Clustering Service and Veritas Clustering Service run without modification in virtual machines on ESX Server 2.1. Use of clustering services in virtual machines provides high availability with less hardware (such as machines and network adapters). Clustering Scenarios Several scenarios are possible for clustering in virtual machines.
C H A P T E R 1 0 Configuration for Clustering Cluster across Boxes — This type of cluster also consists of virtual machines. The virtual disks are stored on real shared disks, so all virtual machines can access them. Using this type of cluster, you can deal with the crash of a physical machine. Virtual machine Virtual machine Cluster software Cluster software .
VMware ESX Server Administration Guide Cost-effective Standby Host — Provide a standby host for multiple physical machines on one standby box with multiple virtual machines. Virtual machine Cluster software Cluster software Virtual machine Cluster software Cluster software Virtual machine Cluster software Cluster software Physical machine A standby host using three virtual machines on a single physical machine; all are running clustering software.
C H A P T E R 1 0 Configuration for Clustering • One or more virtual disks that will be shared attached to the secondary SCSI host adapter Important Notes • Each virtual machine by default has five PCI slots available. In this configuration (two network adapters and two SCSI host bus adapters), four of these slots are used. This leaves one more PCI slot for a third network adapter if needed.
VMware ESX Server Administration Guide 5. Change the Location of the virtual machine configuration file to /home//vmware/cluster1/cluster1.vmx. 6. Click Next. 7. Select the number of processors you want the guest operating system to use, up to 2. 8. Change Memory to show the amount of RAM you want to allocate to this virtual machine. 9. Click Next. 10. Click Blank to create a new virtual disk. 11. Choose the VMFS volume on which you want to store the virtual disk. 12.
C H A P T E R 1 0 Configuration for Clustering Note: Shared disks must be attached to a separate SCSI controller. Select SCSI 1:1 8. By default, the disk mode is set to persistent. Click Persistent to verify the disk mode. 9. Click OK. Note: A new virtual disk and SCSI Controller 1 are now visible on the hardware tab. 10. Click Edit next to SCSI Controller 1 and change the bus sharing from none to virtual. From the Bus Sharing drop-down list, select virtual, then Click OK.
VMware ESX Server Administration Guide 6. Accept all the default options during the installation. Do not install the clustering service at this time. 7. When the installation is completed, install VMware Tools in the guest operating system. Cloning the Virtual Machine Now that you have a virtual machine with Windows 2000 Advanced Server installed, you can save time by cloning this virtual machine as follows: 1. Run sysprep.exe, which is available on the Windows 2000 CD in the \support\tools\deploy.
C H A P T E R 1 0 Configuration for Clustering Creating the Second Node Virtual Machine Create a new virtual machine as follows: 1. On the management interface’s Overview page, click Add Virtual Machine. 2. Keep the default Guest Operating System selection of Microsoft Windows 2000 Server. 3. Change the Display Name field to describe the virtual machine — for example, SCS Node 2 (Kena). 4. Change the Location to home//vmware/cluster2/cluster2.vmx 5. Click Next. 6.
VMware ESX Server Administration Guide 8. By default the disk mode is set to persistent. Click Persistent to verify the disk mode. 9. Click OK. Note: A new virtual disk and SCSI Controller 1 are now visible on the hardware tab. 10. Click Edit next to SCSI Controller 1 to change the bus sharing from none to virtual. 11. From the Bus Sharing drop-down list select virtual, then click OK. Repeat step 1–step 9 create an additional shared virtual disk using SCSI 1:2 with the filename shared2.dsk.
C H A P T E R 1 0 Configuration for Clustering 4. Start the Disk Administrator and change both shared disks to basic disks. 5. Format both shared virtual disks with NTFS if they are not already formatted. 6. Assign the first shared disk to Q: (quorum) and the second disk to R:. If you have joined this virtual machine to an existing Active Directory domain, skip to step 11. 7. Run dcpromo.exe from the command prompt. This starts the Active Directory Wizard. 8.
VMware ESX Server Administration Guide 25. Stop the cluster service on the local node (from Cluster Manager, right-click the node name), so the second virtual machine can access the shared disks. 26. Start the node 2 virtual machine. 27. Repeat step 2 and step 3 above. 28. Start the Disk Administrator and assign the first shared disk to Q: (quorum) and the second disk to R:. 29. Start dcpromo.
C H A P T E R 1 0 Configuration for Clustering For this exercise the VMFS partition for the internal storage on each ESX Server computer is labeled vms. The VMFS partition for the shared storage is labeled sharedfs. • The VMFS partition for the internal storage on each ESX Server machine is labeled vms. • The VMFS partition for the shared storage is labeled sharedfs.
VMware ESX Server Administration Guide configured for public access. In order to support clustering, the VMFS partition needs to be configured for shared access. Take the following steps to change the access settings for the VMFS partition: 1. From the management interface click the Options tab 2. Click Storage Configuration. 3. Identify the disk volume that contains the VMFS partition where the shared virtual disks are stored. Click Edit for the disk volume. 4.
C H A P T E R 1 0 Configuration for Clustering This sets the transfer mode to binary. If you use text transfer mode, the virtual disk may not be usable on the target server. 9. Type: hash on This turns on the display of a series of hash signs as a transfer progress indicator. 10. Retrieve the virtual disk file: get cluster1.dsk This initiates the transfer of the virtual disk file to the current directory on the second ESX Server machine. 11.
VMware ESX Server Administration Guide In order for the virtual machine to access a physical disk, the instructions in the Virtual Disk Configuration section on page 339 should be replaced with the following steps: To add a physical SCSI controller and shared raw SCSI disks, go to the Hardware tab and take the following steps: 1. Click Add Device. 2. Click Hard disk. 3. Click System LUN/Disk to give your virtual machine direct access to a SAN or shared storage volume. 4.
C H A P T E R 1 0 Configuration for Clustering example installation above), always put these virtual disks in the same MSCS resource group. That ensures the disks are always reserved by the same computer and are always failed over at the same time. • Ensure that the swap file for each ESX Server machine is not on any of the physical shared disks. Since the shared disks are reserved by one host or another, the swap file may become inaccessible to one host or the other during the operation of the cluster.
VMware ESX Server Administration Guide Running Microsoft Cluster Service Microsoft Cluster Service should operate normally in the virtual machines once it is installed. Note: Some disk errors are recorded in the Windows event log in normal operation.
C H A P T E R 1 0 Configuration for Clustering In a public VMFS-2 volume, locking is at a per-file level, resulting in fewer locking issues. However, you may still encounter the preceding message and may need to use vmkfstools --recover, if a server fails. If a VMFS is used to store a virtual disk that is accessed by multiple virtual machines on multiple physical servers for the purposes of failover clustering, the VMFS should be configured as a shared file system.
VMware ESX Server Administration Guide machine cluster that is running across physical machines, reservations by the clustering software are transmitted through to the physical shared disk. If you encounter a disk that is reserved unexpectedly, you should try to determine if some clustering software has explicitly reserved the disk.
C H A P T E R 1 0 Configuration for Clustering Network Load Balancing What Is Network Load Balancing? Network Load Balancing is a Windows 2000 Advanced Server feature. By using Network Load Balancing to build a server cluster, you can enhance the availability of Internet server programs, such as those used on Web, proxy, domain name service (DNS), FTP, virtual private network (VPN) and streaming media servers. Network Load Balancing can help you scale your server’s performance.
VMware ESX Server Administration Guide 8. Change Memory to show the amount of RAM you want to allocate to this virtual machine. 9. Click Next. 10. Click Blank to create a new virtual disk. 11. Choose the VMFS volume on which you want to store the virtual disk. 12. Give the virtual disk file a unique name — for example, cluster1.dsk. 13. If you need a primary SCSI disk larger than 4GB, enter the appropriate value in the Capacity field. 14.
C H A P T E R 1 0 Configuration for Clustering 4. Click Power On. 5. Install Windows 2000 Advanced Server on the disk connected to scsi0. 6. Accept all the default options during the installation. You may opt to install the applications at this time. Network Load Balancing is installed by default. 7. When the installation is completed, install VMware Tools in the guest operating system. 8. Remove the Windows 2000 Advanced Server CD from the server’s CD-ROM drive.
VMware ESX Server Administration Guide Cloning the Virtual Machine, an Alternate Method 1. Run sysprep.exe, which is available on the Windows 2000 CD in the \support\tools\deploy.cab file. This strips the security ID assigned to the guest operating system and resets the machine information as well as the TCP/IP network configuration. 2. Shut down the guest operating system and power off the virtual machine. 3. At the ESX Server console, log on as root. 4.
C H A P T E R 1 0 Configuration for Clustering 9. Retrieve the virtual disk file: get cluster1.dsk This transfers a copy of the virtual disk to the second ESX Server machine’s VMFS partition. 10. Quit the ftp session: bye 11. Rename the virtual disk file: mv cluster1.dsk cluster9.dsk This renames the virtual disk file to cluster9.dsk. This assumes that this ESX Server machine will host nodes 9 and up. Repeat this command using a different target file name if you want to create more than one copy.
VMware ESX Server Administration Guide Network Device Configuration — You need to add another network adapter that the cluster nodes will use to communicate with each other. 1. On the hardware tab for this virtual machine, click Add Device. 2. Click Network Adapter. 3. From the Device Binding drop-down list, choose vmnic1. Note: If all nodes of the cluster will reside on the same ESX Server machine, you may use vmnet_0 for the second network adapter.
C H A P T E R 1 0 Configuration for Clustering 10. On the Cluster Parameters tab, configure cluster operations using these parameters: • Primary IP Address: This is the address for the cluster as a whole. This is the address that the clients will use to access the cluster. • Subnet Mask: This is the subnet mask of the network to which the above address belongs. • Multicast: Leave this unchecked, unless your virtual machine was configured with a single network adapter.
VMware ESX Server Administration Guide Guidelines for Specific Configurations Configuring FAStT Storage for Failover and Multipath Visibility Use the following guidelines to configure a FAStT Storage Processor and QLogic controller so you can use HBA failover along with multipath SAN visibility and Microsoft Cluster Services. Be sure your FAStT is running firmware version 8.21. The firmware update is available on the IBM Web site at http://www.pc.ibm.com/qtechinfo/MIGR-43752.html.
C H A P T E R 1 0 Configuration for Clustering 3. In Enterprise Management, choose Tools > Execute Script. The Script Editor opens. 4. In the Script Editor, choose File > Load Script. Browse to LinuxCluster.scr and load it. 5. Use Tools > Verify and Execute to run the script.
VMware ESX Server Administration Guide 360 www.vmware.
CHAPTER Networking 11 This section contains the following: • Setting the MAC Address Manually for a Virtual Machine on page 362 • The VMkernel Network Card Locator on page 365 • Forcing the Network Driver to Use a Specific Speed on page 367 • Enabling a Virtual Adapter to Use Promiscuous Mode on page 368 • Sharing Network Adapters and Virtual Networks on page 369 • Allowing the Service Console to Use the Virtual Machines’ Devices on page 369 • Using Virtual Switches on page 373 • Troubleshooting on page
VMware ESX Server Administration Guide Setting the MAC Address Manually for a Virtual Machine VMware ESX Server automatically generates MAC addresses for the virtual network adapters in each virtual machine. In most cases, these MAC addresses are appropriate. However, there may be times when you need to set a virtual network adapter’s MAC address manually — for example: • Virtual network adapters on different physical servers share the same subnet and are assigned the same MAC address, causing a conflict.
C H A P T E R 1 1 Networking Once the MAC address has been generated, it does not change, unless the virtual machine is moved to a different location; for example, a different path on the same server or a different ESX Server machine. We save the MAC address in the configuration file of the virtual machine. ESX Server keeps track of all MAC addresses that have been assigned to network adapters of running and suspended virtual machines on a given physical machine.
VMware ESX Server Administration Guide Using MAC Addresses The easiest way to familiarize yourself with MAC addresses is to set the MAC address statically, then remove the virtual machine configuration file options ethernet.address, ethernet.addressType and ethernet.generatedAddressOffset. Check to see that the virtual machine gets a generated MAC address. We cannot guarantee that a host stays within a specific MAC address range.
C H A P T E R 1 1 Networking The VMkernel Network Card Locator When network interface cards are assigned to the VMkernel, sometimes it is difficult to map from the name of the VMkernel device to the physical network adapter on the machine. For example, if there are four Intel EEPro cards in a machine and all are dedicated to the VMkernel, these four cards are called vmnic0, vmnic1, vmnic2 and vmnic3.
VMware ESX Server Administration Guide Examples findnic vmnic0 10.2.0.5 10.2.0.4 Binds VMkernel device vmnic0 to IP address 10.2.0.5 and then tries to ping the remote machine with the IP address 10.2.0.4. findnic -f vmnic1 10.2.0.5 10.2.0.4 Binds VMkernel device vmnic1 to IP address 10.2.0.5, then tries to flood ping the remote machine with the IP address 10.2.0.4. 366 www.vmware.
C H A P T E R 1 1 Networking Forcing the Network Driver to Use a Specific Speed The VMkernel network device drivers start with a default setting of Autonegotiate. This setting will work correctly with network switches set to autonegotiate. If your switch is configured for a specific speed and duplex setting, you must force the network driver to use the same speed and duplex setting.
VMware ESX Server Administration Guide Enabling a Virtual Adapter to Use Promiscuous Mode For security reasons, guest operating systems are not normally allowed to set their virtual Ethernet adapters to use promiscuous mode. In some circumstances, you may need to use the virtual Ethernet adapters in promiscuous mode. To enable this use, you must set the PromiscuousAllowed configuration variable to yes. To do so, follow these steps. 1.
C H A P T E R 1 1 Networking Sharing Network Adapters and Virtual Networks In many ESX Server configurations, there is a clear distinction between networking resources used by the virtual machines and those used by the service console. This may be important for security reasons, for example — isolating the management network from the network used by applications in the virtual machines. However, there may be times when you want to share resources, including physical network adapters and virtual networks.
VMware ESX Server Administration Guide insmod vmxnet_console devName=”vmnic1;vmnet_0” The devName parameter is a comma-separated list of names of VMkernel network adapters and virtual networks. When you install the module, it adds the appropriate number of eth devices on the service console in the order that you list the VMkernel network adapter and virtual network names after the devName parameter.
C H A P T E R 1 1 Networking Another method is to set up the files /etc/sysconfig/network-scripts/ ifcfg-eth1 and /etc/sysconfig/network-scripts/ifcfg-eth2 with the appropriate network information. And be sure the ONBOOT= line is ONBOOT=yes. The ifcfg-eth1 file for this example would be DEVICE=eth1 BOOTPROTO=static BROADCAST=10.255.255.255 IPADDR=10.2.0.4 NETMASK=255.0.0.0 NETWORK=10.0.0.0 ONBOOT=yes In this case, the lines you add to /etc/rc.d/rc.
VMware ESX Server Administration Guide configuration you want to change. Find the table row that lists the Ethernet controller assigned to the console and click the radio button in the Virtual Machine column to reassign it. Click Save Configuration, then reboot the machine when prompted. 3. When the machine reboots, no network adapter is assigned to the service console, so you must do this step at the server. Add the appropriate lines to /etc/rc.d/rc.local.
C H A P T E R 1 1 Networking Using Virtual Switches ESX Server allows you to create abstracted network devices called virtual ethernet switches. Each virtual switch is a network hub that can be used by virtual machines. A virtual switch can route traffic internally between virtual machines, or link to external networks. Virtual switches can be used to combine the bandwidth of multiple network adapters and balance communications traffic among them.
VMware ESX Server Administration Guide When you choose a network connection for a virtual machine, ESX Server links it to the associated virtual switch. The operation of the virtual machine depends on the configuration of its network connection. Thus, you cannot bind or detach physical adapters while a virtual switch is being used by a virtual machine. You can bind up to ten physical adapters to each virtual switch.
C H A P T E R 1 1 Networking Choosing a Load Balancing Mode You can choose one of three modes for determining how ESX Server distributes traffic among the network adapters assigned to a virtual switch: • MAC address balancing • IP address balancing • Standby You select the load balancing mode by setting the load_balance_mode option for a virtual switch. All options for virtual switches are defined in /etc/vmware/ hwconfig, which you can modify through the Service Console.
VMware ESX Server Administration Guide Select a primary adapter by setting the home_link option for a virtual switch: 1. Log into the Service Console as root. 2. Edit /etc/vmware/hwconfig. 3. Define the primary adapter. For example, to choose vmnic2 for bond1: nicteam.bond1.home_link = “vmnic2” If you previously defined the option for this switch, just change the current mode value to vmnic2. 4. Save the file and close it.
C H A P T E R 1 1 Networking the failure threshold will the server identify a link as disconnected and switch to another adapter. By default, the beacon failure threshold is set to zero for each virtual switch. You can enable beacon monitoring by setting the failure threshold to two or greater. ESX Server also allows you to determine the frequency with which it issues beacons.
VMware ESX Server Administration Guide Using Beacon Monitoring with a Port Group You can enable beacon monitoring for a port group with the SwitchFailoverBeaconVlanID option. If you select a port group with this option, ESX Server broadcasts monitor beacons tagged with the VLAN ID of that port group. This effectively limits the server to monitoring connection failures within the external VLAN. You can set the value of the SwitchFailoverBeaconVlanID in the Advanced Settings...
C H A P T E R 1 1 Networking Troubleshooting If, while booting your virtual machine, you see an error message stating that the Ethernet device cannot be detected, then check the following: • Network Connections page — Be sure that the correct physical adapters are assigned to a bond • VM Configuration page — Be sure the correct bond is selected for the specified Ethernet device and that the selected vmnic is not already assigned to a bond device or already in use.
VMware ESX Server Administration Guide 380 www.vmware.
CHAPTER 12 VMware ESX Server Resource Management VMware ESX Server allows you to optimize the performance of your virtual machines by managing a virtual machine’s resource allocations. You can control a virtual machine’s access to: • CPU time • Memory space • Network bandwidth • Disk bandwidth Note: You must be the root user to manage virtual machine resources.
VMware ESX Server Administration Guide This chapter contains the following sections: • Virtual Machine Resource Management on page 383 • Using ESX Server Resource Variables on page 384 • Improving Performance on page 386 • CPU Resource Management on page 388 • Managing Virtual Machine CPU Resources on page 394 • Memory Resource Management on page 403 • Managing Virtual Machine Memory on page 410 • Using Your NUMA System on page 418 • Sizing Memory on the Server on page 424 • Managing Disk Bandwidth on page
C H A P T E R 1 2 VMware ESX Server Resource Management Virtual Machine Resource Management ESX Server uses a proportional share mechanism to allocate CPU, memory, and disk resources when multiple virtual machines are contending for the same resource. Network bandwidth is controlled with network traffic shaping. CPU and memory resource each offer an additional dimension of control.
VMware ESX Server Administration Guide Using ESX Server Resource Variables The majority of this chapter describes the different parameters you can use to optimize resources on ESX Server. We include information on the various algorithms and policies ESX Server uses to determine resource allocation. Note: In the next section, we provide a practical description of resource optimization, based on the behavior of ESX Server and its virtual machines.
C H A P T E R 1 2 VMware ESX Server Resource Management • Automatic NUMA Optimizations on page 420 • Manual NUMA Optimizations on page 420 • Sizing Memory on the Server on page 424 • Server Memory on page 424 • Service Console Memory on page 424 • Virtual Machine Memory Pool on page 424 • Virtual Machine Memory on page 425 • Memory Sharing on page 425 • Memory Overcommitment on page 426 • Example: Web Server Consolidation on page 427 • Managing Network Bandwidth on page 428 • Using Network Filters on page
VMware ESX Server Administration Guide Improving Performance Before deploying all your virtual machines, we suggest that you create a list of all the virtual machines you plan to run on ESX Server. For each virtual machine, identify its primary functions and applications. Based on its primary function, determine its limiting resources. For example, a Web server’s most limiting resource may be memory, while a terminal services server’s most limiting resource may be CPU.
C H A P T E R 1 2 VMware ESX Server Resource Management If the problem is VMkernel swapping, then check and make sure VMware Tools is installed. Place the swap file in a different physical drive than the virtual disks. You may also consider adding more physical memory to the server, or possibly migrating some virtual machines onto another ESX Server.
VMware ESX Server Administration Guide CPU Resource Management VMware ESX Server provides dynamic control over both the execution rate and the processor assignment of each scheduled virtual machine. The ESX Server scheduler performs automatic load balancing on multiprocessor systems. You can manage the CPU resources on a server from the VMware Management Interface, from the procfs interface on the service console and the VMware Scripting API.
C H A P T E R 1 2 VMware ESX Server Resource Management CPU shares entitle a virtual machine to a relative fraction of CPU resources. For example, a virtual machine that has twice as many shares as another is generally entitled to consume twice as much CPU time, subject to their respective minimum and maximum percentages. You may specify shares by specifying a numerical value, or specifying high, normal, or low. By default, the setting for normal shares is twice that of low.
VMware ESX Server Administration Guide For example, if one of your virtual machines is running an important application, you can specify a higher minimum percentage for this virtual machine, compared to the other virtual machines on your ESX Server. Note: You can set CPU percentages for some, or all of your virtual machines. Alternately, you may choose to set only minimum, or only maximum CPU percentages. You do not need to set both.
C H A P T E R 1 2 VMware ESX Server Resource Management You can modify CPU shares and affinity sets dynamically at any time by using the procfs interface on the service console or using the VMware Management Interface. Initial values for a virtual machine may also be specified in its configuration file. Using Proportional-share Scheduling by Allocating Shares With proportional-share processor scheduling, you can allocate a number of shares to each scheduled virtual machine. CPU shares are relative.
VMware ESX Server Administration Guide increase the minimum CPU percentage or the number of CPU shares to allocated more CPU to the service console. For more information, see Configuring the Service Console on page 220. Note: CPU share allocations, by themselves, do not necessarily guarantee the rate of progress within a virtual machine. For example, suppose virtual machine A is allocated high shares, while virtual machine B is allocated normal shares.
C H A P T E R 1 2 VMware ESX Server Resource Management Using Hyper-Threading Enabling Hyper-Threading in ESX Server You should enable Hyper-Threading with the Enable Hyper-Threading option for your system startup profile. You can set this option with Options->Startup Profile in the Management Interface. See Updating the Startup Profile on page 218. You can also enable Hyper-Threading in the Service Console. Edit the system profile / etc/vmware/hwconfig to set the hyperthreading option: 1.
VMware ESX Server Administration Guide Managing Virtual Machine CPU Resources You can manage CPU resources from the VMware Management Interface or from the service console. Managing CPU Resources from the Management Interface You may also view and change settings from the virtual machine details pages in the VMware Management Interface. 1. On the server’s Status Monitor page, click the name of an individual virtual machine. The details page for that virtual machine appears. 2. Click the CPU tab.
C H A P T E R 1 2 VMware ESX Server Resource Management 3. Click Edit. The CPU Resource Settings page appears. 4. Enter the desired settings, then click OK. You must log in as root in order to change resource management settings using either the management interface or procfs. Managing CPU Resources from the Service Console You can also manage CPU resources by editing the virtual machine configuration (.vmx) file or using procfs.
VMware ESX Server Administration Guide sched.cpu.min = This configuration file option specifies a minimum CPU reservation , as a percentage, for a virtual machine. The valid range of values for is 0 (the default minimum) to the number representing the total physical CPU resources. Note that the minimum may be greater than 100 for SMP virtual machines that are guaranteed more than one full physical CPU.
C H A P T E R 1 2 VMware ESX Server Resource Management operating with the shared system resources provided by Hyper-Threading, and can reduce performance. • internal — Each CPU of the virtual machine can share logical CPUs with the second CPU in the same virtual machine, but not with CPUs from other virtual machines. This mode switches to none for virtual machines with one CPU. Note: Only SMP virtual machines can use multiple virtual CPUs. Using procfs You can also use procfs to manage CPU resources.
VMware ESX Server Administration Guide Writing a number to this file changes the number of shares allocated to the virtual machine identified by to . The valid range of numerical values for is 1 to 100000. Or, you may use the special values low, normal and high. These values are automatically converted into numbers, through the configuration options CpuSharesPerVcpuLow, CpuSharesPerVcpuNormal and CpuSharesPerVcpuHigh, described in this section.
C H A P T E R 1 2 VMware ESX Server Resource Management /proc/vmware/sched/cpu Reading from this file reports the status information for all virtual machines in the entire system. Each virtual CPU is displayed on its own line, with information including uptime, time used, and resource management parameters. /proc/vmware/config/CpuSharesPerVcpuLow This option specifies the a numerical value for the low value. By default, this number is 500.
VMware ESX Server Administration Guide 2000 To query the affinity set for virtual machine 103, simply read the file: cat /proc/vmware/vm/103/cpu/affinity The identifying numbers of the processors in the affinity set are displayed. 0,1 This indicates that virtual machine 103 is allowed to run on CPUs 0 and 1. To restrict virtual machine 103 to run only on CPU 1, simply write to the file. Note that you need root privileges in order to change affinity sets.
C H A P T E R 1 2 VMware ESX Server Resource Management The System Summary section at the top shows systemwide information. The Virtual Machines section below it shows information for particular virtual machines. You can also read the current CPU statistics for a virtual machine from its status file on the service console.
VMware ESX Server Administration Guide shares CPU shares allocation for the virtual machine. emin Effective minimum percentage allocation for the virtual machine. extrasec Cumulative processor consumption above emin by the virtual machine. In this example, ID 137 is an SMP virtual machine with two virtual CPUs. The output shows statistics associated with its first virtual cpu vmm0, identified as vcpu 137, with a configured display name that begins with “Win2kAS”.
C H A P T E R 1 2 VMware ESX Server Resource Management Memory Resource Management VMware ESX Server provides dynamic control over the amount of physical memory allocated to each virtual machine. You may overcommit memory, if you wish, so the total size configured for all running virtual machines exceeds the total amount of available physical memory. The system manages the allocation of memory to virtual machines automatically based on allocation parameters and system load.
VMware ESX Server Administration Guide system performance, see Improving Slow Performance on Virtual Machines on page 387. • Its maximum size — max The maximum size is the amount of memory configured for use by the guest operating system running in the virtual machine. This maximum size must be specified in the configuration file for the virtual machine. By default, virtual machines operate at their maximum allocation, unless memory is overcommitted.
C H A P T E R 1 2 VMware ESX Server Resource Management times that of low. For example, a virtual machine with high shares has twice as many shares as a virtual machine with normal shares, or four times as many shares as a virtual machine with low shares. If you want to change these defaults, see Service Console Commands on page 412.
VMware ESX Server Administration Guide Similarly, while memory reservations are used for admission control, actual memory allocations vary dynamically, and unused reservations are not wasted. The amount of swap space configured for the system limits the maximum level of overcommitment. A default swap file size equal to the physical memory size of the computer is recommended in order to support a reasonable 2x level of memory overcommitment.
C H A P T E R 1 2 VMware ESX Server Resource Management The MemIdleTax configuration option provides explicit control over the policy for reclaiming idle memory. You may use this option, together with the MemSamplePeriod configuration option, to control how the system reclaims memory. However, in most cases, changes shouldn’t be necessary. For complete information on using these options, see Service Console Commands on page 412.
VMware ESX Server Administration Guide quickly enough to satisfy current system demands. Standard demand paging techniques swap pages back in when the virtual machine needs them. The vmmemctl approach is used whenever possible for optimum performance. swapping is a reliable mechanism of last resort that the system uses to reclaim memory only when necessary.
C H A P T E R 1 2 VMware ESX Server Resource Management memory than it would when running on physical machines. As a result, higher levels of overcommitment can be supported efficiently. The ESX Server approach does not require any cooperation from the guest operating system. You may use the MemShareScanVM and MemShareScanTotal configuration options to control the rate at which the system scans memory to identify opportunities for sharing memory.
VMware ESX Server Administration Guide Managing Virtual Machine Memory You can manage virtual machine memory from the VMware Management Interface or from the service console. Managing Memory Resources from the Management Interface You may also view and change settings from the virtual machine details pages in the VMware Management Interface. 1. On the server’s Status Monitor page, click the name of an individual virtual machine. The details page for that virtual machine appears. 2. Click the Memory tab.
C H A P T E R 1 2 VMware ESX Server Resource Management You must log in as root in order to change resource management settings using either the management interface or procfs. Managing Memory Resources from the Service Console You can also manage memory resources by editing the following settings in the virtual machine’s configuration file. To edit the configuration file, use the configuration file editor in the management interface.
VMware ESX Server Administration Guide memory should be allocated on the specified NUMA node. For more information, see Associating Future Virtual Machine Memory Allocations with a NUMA Node on page 422. Service Console Commands /proc/vmware/vm//mem/min Reading from this file reports the minimum memory size in megabytes for the virtual machine identified by . Writing a number to this file changes the minimum memory size for the virtual machine identified by to MB.
C H A P T E R 1 2 VMware ESX Server Resource Management /proc/vmware/mem Reading from this file reports the maximum size with which a new virtual machine can be powered on, admission control status including the amount of unreserved memory and unreserved swap space and the current amount of free memory in the system. /proc/vmware/pshare/status Reading from this file reports various detailed statistics about the current status of transparent page sharing.
VMware ESX Server Administration Guide an allocation policy that allows idle memory to be reallocated away from virtual machines that are unproductively hoarding it, regardless of shares. The default is 75 percent. /proc/vmware/config/MemShareScanVM This ESX Server option specifies the maximum per-virtual machine rate at which memory should be scanned for transparent page sharing opportunities. The rate is specified as the number of pages to scan per second.
C H A P T E R 1 2 VMware ESX Server Resource Management Monitoring Memory Statistics The VMware Management Interface provides information on the current use of RAM by the physical computer and the virtual machines running on it. View the Status Monitor page in the management interface. The System Summary section at the top shows systemwide information. The Virtual Machines section below it shows information for particular virtual machines.
VMware ESX Server Administration Guide 0/ 0 38164 191756 14508/ 55296 14508 0 The preceding output is shown with additional line breaks, in order to avoid wrapping long lines. All memory sizes are reported in kilobytes; 1 megabyte = 1024KB.
C H A P T E R 1 2 VMware ESX Server Resource Management automatically when you install VMware Tools in the guest operating system. The system uses swapping to reclaim memory from virtual machines running other guest operating systems and from virtual machines that do not have VMware Tools installed. The maximum amount of memory that the system may attempt to reclaim using vmmemctl is restricted automatically based on known limitations of the type of guest operating system.
VMware ESX Server Administration Guide Using Your NUMA System ESX Server 2.1 includes additional support for machines that are based on NUMA (Non-Uniform Memory Access) architecture. NUMA machines are made up of multiple nodes (also called CECs on IBM eServer machines). Each node comprises one to four processors and main memory. In a node, each CPU has the same distance from its “local memory.
C H A P T E R 1 2 VMware ESX Server Resource Management The system type indicates the hardware for your NUMA system (in this case, an IBM x445 server). There are two NUMA nodes. The fields in the table are defined as follows: • Node — Node number • ID — Hardware ID number of the NUMA node • MachineMem — Amount of physical memory located on this NUMA node, including memory that may be used by the service console.
VMware ESX Server Administration Guide An example output is: Node# 0 1 Pages/MB 13250/51 0/0 The preceding output indicates that the virtual machine, with the specified ID, occupies 51MB of memory on node 0, and no memory on node 1. Note: In this preceding example, the memory affinity is set so that only pages associated with node 0 are allocated for this virtual machine (sched.mem.affinity = 0).
C H A P T E R 1 2 VMware ESX Server Resource Management There are two NUMA options you may set manually: • CPU affinity — See the following section. • Memory affinity — See Associating Future Virtual Machine Memory Allocations with a NUMA Node on page 422. Typically, to bind a virtual machine to a NUMA node, you should set the virtual machine’s CPU affinity to use only the CPUs on the desired node, and set the NUMA memory affinity to the same node.
VMware ESX Server Administration Guide Note: If you manually set CPU affinity by one of the preceding options, then ESX Server automatically sets the virtual machine’s memory to be allocated on the same NUMA node. If you want to disable this feature, you need to change the NUMAAutoMemAffinity configuration option to 0 (zero). For more information on changing this advanced option, see Changing Advanced Settings on page 219.
C H A P T E R 1 2 VMware ESX Server Resource Management Example of Binding a Virtual Machine to a Single NUMA Node on an 8-way Server The following example illustrates manually binding four CPUs to a single NUMA node for a virtual machine. In the example, we want this virtual machine to run only on node 1.
VMware ESX Server Administration Guide Sizing Memory on the Server These guidelines are intended to help system administrators determine an appropriate amount of hardware memory for running a virtual machine workload on ESX Server 2.1. Since the characteristics of your particular workload also influence memory needs, you should follow up with testing to confirm that memory sizes computed according to these guidelines achieve the desired results.
C H A P T E R 1 2 VMware ESX Server Resource Management Virtual Machine Memory Each virtual machine consumes memory based on its configured size, plus additional overhead memory for virtualization. The dynamic memory allocation for a virtual machine is bounded by its minimum and maximum size parameters. The maximum size is the amount of memory configured for use by the guest operating system running in the virtual machine.
VMware ESX Server Administration Guide To determine the effectiveness of memory sharing for a given workload, try running the workload, and observe the actual savings by looking at the output of the /proc/ vmware/mem file. ESX Server memory sharing runs as a background activity that scans for sharing opportunities over time. The amount of memory saved may vary over time; for a fairly constant workload, the amount generally increases slowly until all sharing opportunities are exploited.
C H A P T E R 1 2 VMware ESX Server Resource Management Example: Web Server Consolidation Suppose that you are using ESX Server to consolidate eight nearly-identical Web servers running IIS on Windows 2000. Each Windows 2000 machine is configured with 512MB of memory. The native memory requirement with eight physical servers is 8 * 512MB = 4GB. To consolidate these servers as virtual machines, 24MB is needed for the server virtualization layer and 192MB is recommended for the service console.
VMware ESX Server Administration Guide Managing Network Bandwidth VMware ESX Server supports network traffic shaping with the nfshaper loadable module. A loadable packet filter module defines a filter class; multiple filter instances may be active for each loaded class.
C H A P T E R 1 2 VMware ESX Server Resource Management 3. Click Edit. The Network Resource Settings page appears. 4. Enter the desired settings, then click OK. For information on these settings, see Configuring a Virtual Machine’s Networking Settings on page 104. You must log in as root in order to change resource management settings using either the management interface or procfs.
VMware ESX Server Administration Guide Reading from a file reports status information for the filter instance in a class-defined format. Writing to a file issues a command to the filter instance using a class-defined syntax. Note: The current release allows only a single network packet filter to be attached to each virtual machine. Receive filters are not implemented in this release.
C H A P T E R 1 2 VMware ESX Server Resource Management This attaches a traffic shaper with average bandwidth of 1Mbps, peak bandwidth of 2Mbps and maximum burst size of 160Kb. To find the number of the attached nfshaper instance, query the network filtering status, which contains a list of all filters attached to virtual machines: cat /proc/vmware/filters/status Suppose the reported status information indicates that the filter attached to virtual machine 104 is nfshaper.2.104.
VMware ESX Server Administration Guide Managing Disk Bandwidth ESX Server provides dynamic control over the relative amount of disk bandwidth allocated to each virtual machine. You can control disk bandwidth separately for each physical disk or logical volume. The system manages the allocation of disk bandwidth to virtual machines automatically based on allocation parameters and system load. This is done in a way that maintains fairness and tries to maximize throughput.
C H A P T E R 1 2 VMware ESX Server Resource Management Managing Disk Bandwidth from the Management Interface You may also view and change settings from the virtual machine details pages in the VMware Management Interface. To change disk bandwidth settings, you must be logged in as root and the virtual machine must be running. 1. On the server’s Status Monitor page, click the name of an individual virtual machine. The details page for that virtual machine appears. 2. Click the Disk tab. 3. Click Edit.
VMware ESX Server Administration Guide 3. Click Add to add a new configuration parameter or click in the text field to edit an existing parameter. 4. Click OK. If you edit a virtual machine’s configuration file by hand, use the following formats to control disk bandwidth allocation for the virtual machine. scsi0:1.name = :.dsk This is the standard format for specifying the VMFS file underlying a virtual disk. sched.scsi0:1.
C H A P T E R 1 2 VMware ESX Server Resource Management Reading from this file reports the number of disk bandwidth shares allocated to the virtual machine identified by for the disk identified by vmhba. It also reports disk usage statistics. Writing a number to this file changes the number of disk bandwidth shares allocated to the virtual machine identified by to . The valid range of values for is 0 to 100000. Or, you may use the special values low, normal and high.
VMware ESX Server Administration Guide 436 www.vmware.
Index A Access to configuration file 207 Accessibility of virtual disks 313 Affinity set 390 Apache server and the VMware Management Interface 158 API VmPerl 54, 175 Append disk mode 124 ASCII characters 38, 87 Authentication 206 availability report 251 B Backup 174 creating stable disk images for 175 333 setup with virtual machines 329 sharing virtual disks 313 using an ESX Server machine as a standby host 334 Color depth 126 Command Linux 197–204, 206 passing from console operating system to guest 54 Com
managing remotely 163 D Devices 211 Filters network 428 DHCP 194 findnic 195, 365 Directories managing remotely 163 Floppy disk image file 134 Debug monitor 138 Directory creating 166 Disk bandwidth managing from the management interface 433 managing from the service console 434 Disk bandwidth management 432 Disk mode 42, 43, 123, 151 append 42, 43, 123, 124 nonpersistent 42, 43, 123 persistent 42, 43, 123 undoable 42, 43, 123, 124 FTP 293 TCP/IP port 209 G Gigabit Ethernet 121 Guest operating syst
interface 410 managing from the service console 411 ISO disc image file 132 K Kerberos 207 L LDAP 207 Legacy mode virtual machines 67 Linux installing VMware Tools in 49 Load balancing 375 logs 246 availability report 251 service console messages 250 VMkernel messages 248 VMkernel warnings 247 LUNs detecting 317 setting multipathing policy for 326 M MAC address setting manually 362 machine.
NIC teaming ??–379 machines 213 installing 75 starting 180 using 179 NIS 207 Node in clustering configuration 330 Nonpersistent disk mode 123 NUMA node 418–423 automatic optimization 420 manual optimization 420–422 P PAM 207 Paste in file manager 164 text 189 pbind.
Shaping network traffic 430 Shares CPU 389 memory 404 of CPU time 391 Sharing disks in clustering configuration 334 virtual disks 313 sharing the SCSI bus 313 Shut down server 263 using guest operating system service 53 virtual machine 191 Sizing memory 424 Suspend 97, 189 location of suspended state file 138 Switches virtual 373 system logs 246 T Tape drive 211 adding to virtual machine 136 assigning to virtual machines or service console 174 SCSI ID 211 TCP/IP ports used for management access 209 Telnet
display name 39 exporting 298 Hyper-Threading 109 ID number 94 importing 299 legacy mode 67 monitoring with SNMP 267 registering 74 shutting down 191 SMP 64 suspending and resuming 97 viewing through remote console 213 Virtual Machine Wizard 38 Virtual machines special power options 182 Virtual network 369 Virtual switches 373 beacon monitoring 376 failover 375 load balancing 375 vlance network driver 121 VMFS 296 mounting 292 naming 294, 300 VMFS-2 converting to 236, 238 vm-list 74, 208 VMware Remote Con
VMware Virtual SMP 40, 120 VMware Workstation migrating virtual machines 67 vmware-authd 207 TCP/IP port 209 vmware-device.map.local file 211 vmxnet network driver 121 vmxnet.
444 www.vmware.