Administration Guide VMware ESX Server 2
Administration Guide Administration Guide Version: 2.5.4 Revision: 20061006 Item: ESX-ENG-Q105-057 You can find the most up-to-date technical documentation on our Web site at http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com © 2006 VMware, Inc. All rights reserved. Protected by one or more of U.S. Patent Nos.
Contents Contents P Preface 19 About This Book 20 Intended Audience 20 Document Feedback 20 Conventions and Abbreviations 20 Abbreviations Used in Graphics 20 Technical Support and Education Resources 21 Self‐Service Support 21 Online and Telephone Support 22 Support Offerings 22 VMware Education Services 22 Reporting Problems 22 1 Introduction to VMware ESX Server 25 VMware ESX Server System Architecture 25 Virtualization 26 CPU Virtualization 27 Memory Virtualization 27 Disk Virtualization 27 Network V
Administration Guide Installing a Guest Operating System and VMware Tools 43 Installing a Guest Operating System in a Virtual Machine 43 Installing a Guest Operating System on a Formatted Raw Disk 44 Installing VMware Tools in the Guest Operating System 44 Starting VMware Tools Automatically 48 Using the VMware Guest Operating System Service 49 Synchronizing the Time Between the Guest and Service Consoles 50 Shutting Down and Restarting a Virtual Machine 50 Shutting Down or Restarting a Virtual Machine fro
Contents Registering Your Virtual Machines 69 Installing the Remote Console Software 70 Third Party Software Compatibility 71 Configuring a Virtual Machine for Use with Citrix MetaFrame XP 71 Executing Scripts When the Virtual Machine’s Power State Changes 71 Issues to Consider 72 Configuring Virtual Machines 73 Recommended Configuration Options 74 SleepWhenIdle 74 Optimizing Disk Access Failure Modes in Windows Virtual Machines 74 Modifying the SMBIOS UUID 75 Generating the UUID Automatically 75 Comparing
Administration Guide Unregistering a Virtual Machine 93 Deleting a Virtual Machine 93 Configuring VMware ESX Server 93 Using Common Controls 93 Configuring a Virtual Machine 94 Editing a Virtual Machine’s Configuration 95 Configuring a Virtual Machine’s CPU Usage 96 Understanding Performance Values 96 Understanding Resource Values 97 Modifying CPU Values 97 Configuring a Virtual Machine’s Memory Usage 97 Understanding Performance Values 98 Understanding Resource Values 98 Modifying Memory Values 99 Configu
Contents Setting Startup and Shutdown Options by Modifying the Configuration File Directly (Advanced Users Only) 126 Viewing a List of Connected Users 129 Viewing a Log of a Virtual Machine’s Events 130 Modifying Virtual Machine Peripherals 131 Adding More than Six SCSI Virtual Disks to a Virtual Machine 131 Using a Physical (Raw) Disk in a Virtual Machine 132 Using Parallel Ports in a Virtual Machine 133 Using Serial Ports in a Virtual Machine 134 Using Disk Modes 135 Deleting a Virtual Machine Using the
Administration Guide Using Hardware or Software Disk Snapshots 153 Using Network‐Based Replication Tools 154 4 Using the VMware Remote Console 155 Using the Remote Console 155 Starting the Remote Console 156 Running a Virtual Machine Using the Remote Console 157 Special Power Options for Virtual Machines 157 Options for Powering Off a Virtual Machine 158 Options for Suspending a Virtual Machine 158 Option for Resuming a Virtual Machine 159 Options for Resetting a Virtual Machine 159 VMware Tools Settings
Contents Switching User Names 177 The proc File System 177 Getting Help for Service Console Commands 180 Authentication and Security Features 180 Authenticating Users 180 Using Your Own Security Certificates when Securing Your Remote Sessions 182 Default Permissions 182 TCP/IP Ports for Management Access 182 High Security 183 Medium Security 183 Low Security 183 Using Devices With ESX Server 184 Supporting Generic Tape and Media Changers 184 Editing the vmware‐device.map.
Administration Guide Changing the Maximum Size of a File Allowed by VMFS 200 Spanning a VMFS volume.
Contents Configuring the ESX Server Agent 227 Configuring the ESX Server Agent Through the VMware Management Interface 227 Configuring the ESX Server Agent from the Service Console 228 Configuring the Default SNMP Daemon 228 Starting the SNMP Agents Automatically 229 Starting the SNMP Agents Manually 229 Configuring SNMP 230 Configuring SNMP Trap Destinations 230 Configuring SNMP Management Client Software 230 Configuring SNMP Security 231 Using SNMP with Guest Operating Systems 231 VMware ESX Server SNMP
Administration Guide 9 Storage and File Systems 245 File System Management on SCSI Disks and RAID 245 Viewing and Manipulating Files in the /vmfs Directory 246 VMFS Volumes 247 Labelling VMFS Volumes 247 VMFS Accessibility 248 VMFS Accessibility on a SAN 248 Changing Storage Configuration Options 248 Using vmkfstools 249 vmkfstools Command Syntax 249 vmkfstools Syntax When Specifying a SCSI Device 249 vmkfstools Syntax When Specifying a VMFS Volume or File 250 vmkfstools Options 250 Basic vmkfstools Option
Contents Deactivate a Swap File 258 Migrate a VMFS from VMFS‐1 to VMFS‐2 258 Examples Using vmkfstools 259 Create a new file system 259 Extends the new logical volume by spanning two partitions 259 Names a VMFS volume 260 Creates a new VMFS virtual disk file 260 Imports the contents of a virtual disk to the specified file on a SCSI device 260 Migrate virtual machines to VMware GSX Server or VMware Workstation, then back to VMware ESX Server 260 Lists the files on the VMFS of the specified device 261 Access
Administration Guide Saving Your Multipathing Settings 277 In Case of Failover 277 Settings for QLogic Adapters 277 Failover in Windows 2000 and Windows Server 2003 Guest Operating Systems 278 10 Configuration for Clustering 279 What Is Clustering? 279 Applications that Can Use Clustering 280 Clustering Software 280 Clustering Hardware 280 Clustering Virtual Machines 280 Clustering Software in Virtual Machines 281 Clustering Scenarios 281 Configuring Virtual Machine Clusters with Shared Disks 283 Importan
Contents Creating Multinode Network Load Balancing Clusters on ESX Server 302 Creating the First Node’s Base Virtual Machine 302 Installing the Guest Operating System 304 Cloning the Virtual Machine 304 Cloning the Virtual Machine, an Alternate Method 305 Cloning the Virtual Machine to Another ESX Server Machine 306 Creating the Second Node Virtual Machine 307 Configuring the Network Load Balancing Cluster 308 11 Networking 311 Setting the MAC Address Manually for a Virtual Machine 311 How VMware ESX Serv
Administration Guide Improving Performance 329 Improving Slow Performance 329 Improving Slow Performance on ESX Server 329 Improving Slow Performance on Virtual Machines 330 Optimizing Performance on the Service Console 330 CPU Resource Management 331 Allocating CPU Resources 331 Admission Control Policy 332 Specifying Minimum and Maximum CPU Percentages 332 Assigning Virtual Machines to Run on Specific Processors 333 Using Proportional‐share Scheduling by Allocating Shares 333 Controlling Relative CPU Rat
Contents Determining the Amount of Memory for Each NUMA Node 359 Determining the Amount of Memory for a Virtual Machine on a NUMA Node 360 Automatic NUMA Optimizations 360 Manual NUMA Optimizations 361 Associating Virtual Machines to a Single NUMA Node 361 Associating Future Virtual Machine Memory Allocations with a NUMA Node 362 Binding a Virtual Machine to a Single NUMA Node on an 8‐way Server 363 Sizing Memory on the Server 363 Server Memory 364 Service Console Memory 364 Virtual Machine Memory Pool 364
Administration Guide 18 VMware, Inc.
P Preface This preface describes the contents of the ESX Server Administration Guide and provides pointers to technical and educational resources. This preface contains the following topics: ! “About This Book” on page 20 ! “Intended Audience” on page 20 ! “Document Feedback” on page 20 ! “Conventions and Abbreviations” on page 20 ! “Technical Support and Education Resources” on page 21 VMware, Inc.
Administration Guide About This Book This manual, ESX Server Administration Guide, describes how to administer and configure ESX Server 2.5 and how to access the server using the VMware Management Interface. Intended Audience The information presented in this manual is written for experienced Windows or Linux system administrators who are familiar with virtual machine technology and datacenter operations.
Preface Table P-2.
Administration Guide Online and Telephone Support Use online support to submit technical support requests, view your product and contract information, and register your products. Go to http://www.vmware.com/support. Customers with appropriate support contracts should use telephone support for the fastest response on priority 1 issues. Go to http://www.vmware.com/support/phone_support.html. Support Offerings Find out how VMwareʹs support offerings can help you meet your business needs. Go to http://www.
Preface A problem in the VMkernel normally causes the machine to display an error screen for a period of time and then reboot. If you specified a VMware core dump partition when you configured your machine, the VMkernel also generates a core dump and error log. More serious problems in the VMkernel can freeze the machine without an error screen or core dump. When you report problems directly to VMware, describe the steps you took in the period before this failure.
Administration Guide 24 VMware, Inc.
1 Introduction to VMware ESX Server 1 The VMware ESX Server Administration Guide provides information on how to use VMware ESX Server after it has been installed. For information on installing ESX Server, refer to the VMware ESX Server Installation Guide.
Administration Guide Figure 1-1. ESX Server core architecture Virtualization The VMware virtualization layer brings hardware virtualization to the standard Intel server platform. The virtualization layer is common among VMware desktop and server products, providing a consistent platform for development, testing, delivery, and support of application workloads from the developer desktop to the workgroup to the data center.
Chapter 1 Introduction to VMware ESX Server CPU Virtualization Each virtual machine appears to run on its own CPU, or set of CPUs, fully isolated from other virtual machines, with its own registers, translation lookaside buffer, and other control structures. Most instructions are directly executed on the physical CPU, allowing compute‐intensive workloads to run at near‐native speed. Privileged instructions are performed safely by the patented and patent‐pending technology in the virtualization layer.
Administration Guide Private Virtual Ethernet Networks (VMnets) You can use VMnet connections for high‐speed networking between virtual machines, allowing private, cost‐effective connections. 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.
Chapter 1 Introduction to VMware ESX Server Virtual machine 1 Virtual machine 2 CPU Memory Disk NIC NIC CPU1 Mem1 Disk1 NIC1a NIC1b CPU2 Mem2 Disk2 NIC2a NIC2b CPU Mem1 Mem2 Memory Disk2 CPU1 CPU2 NIC Disk Physical resources NIC2a NIC NIC1a NIC Disk2 Disk Mem1 Memory Disk1 CPU NIC1b NIC2b Virtual network Figure 1-3.
Administration Guide Service Console This section discusses the service console functions, processes, and files. 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.
Chapter 1 Introduction to VMware ESX Server ! 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 can also be used.
Administration Guide Familiarizing Yourself with ESX Server Table 1‐1 includes tasks from the VMware Management Interface for an Administrator (root user), who manages and maintains ESX Server. Table 1-1. ESX Server Administrator Tasks Task Description Log into the VMware Management Interface and familiarize yourself with its features. As the root user, you have privileges that other users don’t have.
Chapter 1 Introduction to VMware ESX Server Table 1-1. ESX Server Administrator Tasks (Continued) Task Description Create “golden master” (template) virtual disks. To manage ESX Server more efficiently, create a small number of “golden master” (template) virtual disks for easier deployment. These are virtual disks that have complete guest operating systems, installed applications, complete management‐agent installs, virus detection software, complete VMware Tools installs, and so on.
Administration Guide Table 1-1. ESX Server Administrator Tasks (Continued) Task Description Set user permissions to connect to a virtual machine through the remote console. For a user to connect to and power on a virtual machine in the remote console the user, or a group to which the user belongs, must have read and execute access to that virtual machine’s configuration file. Also, the user must have execute (x) permission on all parent directories.
Chapter 1 Introduction to VMware ESX Server Table 1-2. VMware Management Interface Tasks (Continued) Task Description Create a virtual machine. The Add Virtual Machine wizard lets you add a small number of devices to a virtual machine. This makes the initial creation process simpler. Add devices later by clicking Add Device in the Hardware tab for the virtual machine. If you purchased the VMware Virtual SMP for ESX Server product, you can create dual‐virtual CPU SMP virtual machines.
Administration Guide Table 1-3. Maintenance tasks for an Administrator (Continued) Task Description Use scripts to schedule frequent tasks. For more information on VMware Scripting APIs, see http://www.vmware.com/support/developer. View system logs and reports through the management interface. As needed, view the ESX Server log files for warnings, serious system alerts and messages through the management interface. See Viewing System Logs and Reports on page 229.
Chapter 1 Introduction to VMware ESX Server Table 1-4. Performance-related tasks for an Administrator (Continued) Task Description Remove unnecessary programs or services from your virtual machines. Remove unnecessary programs or services, such as CPU‐intensive screensavers, from your virtual machines. Run Linux virtual machines without the X Window system, if possible. Make sure that the service console has enough CPU and RAM.
Administration Guide Table 1‐5 includes some general troubleshooting information.\ Table 1-5. Troubleshooting Problem Suggestions Can’t start a virtual machine. Check permissions on the virtual machine configuration file and on the virtual disk. See Setting Permissions for Owners of Virtual Machines on page 139. Check that there is enough memory to power on this virtual machine. See Sizing Memory on the Server on page 401. Check that there is enough unreserved swap space.
2‘ Creating and Configuring Virtual Machines 2 This chapter describes how to create and configure virtual machines and install the VMware Remote Console.
Administration Guide The Add Virtual Machine wizard guides you through the basic steps to create a virtual machine on your server. Any user who has an account on the server’s service console may log in to the wizard and create a virtual machine. If you are logged in as root, you might want to log out and log in again as a user authorized to manage the new virtual machine. NOTE Check for any VMkernel ALERT messages in the warning log files before creating a new virtual machine.
Chapter 2 Creating and Configuring Virtual Machines NOTE Configuration files for virtual machines created with VMware ESX Server 2.0 and later, use the .vmx extension. Earlier versions of ESX Server used the .cfg extension. Access virtual machine configuration files with a .cfg extension by ESX Server 2.5. 5 Click Next. 6 In the Processors list, choose the number of virtual CPUs in your virtual machine.
Administration Guide c In the Capacity field, specify the size of the virtual disk in MB. The default entry indicates the lesser of either 4000MB or the amount of free space available on the volume. d Select the appropriate SCSI ID in the Virtual SCSI Node list. e Under Disk Mode, click Persistent, Nonpersistent, Undoable, or Append. See “Using Disk Modes” on page 135. ! Click Existing to add an existing virtual disk to the virtual machine.
Chapter 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 43 ! “Installing VMware Tools in the Guest Operating System” on page 44 ! “Starting VMware Tools Automatically” on page 48 ! “Using the VMware Guest Operating System Service” on page 49 In most cases, configure your virtual machine with a blank (unformatted) SCSI virtual disk.
Administration Guide NOTE When you install a guest operating system on a new virtual disk, you might get a warning message that the disk is corrupted. It will ask whether you want to place a partition table on the disk. This message means that some data needs to be written to the file that holds your virtual hard disk. Respond Yes. You also need to partition and format the virtual disk as you would with a new, blank hard drive.
Chapter 2 Creating and Configuring Virtual Machines To install VMware Tools in a Windows Server 2003 guest 1 Choose Settings > VMware Tools Install to connect the virtual machine’s CD‐ROM drive to an ISO image file on the ESX Server machine. If autorun is enabled in your guest operating system, a dialog box appears asking whether you want to install VMware Tools. 2 Click Install to launch the installation wizard. If autorun is not enabled, the dialog box does not appear. Run VMwareTools.
Administration Guide To Install VMware Tools in a Windows 2000 guest 1 Choose Settings > VMware Tools Install to connect the virtual machine’s CD‐ROM drive to an ISO image file on the ESX Server machine. If autorun is enabled in your guest operating system, a dialog box appears asking whether you want to install VMware Tools. 2 Click Install to launch the installation wizard. If autorun is not enabled, the dialog box does not appear. Run VMwareTools.
Chapter 2 Creating and Configuring Virtual Machines If you are installing on a virtual machine that was created with VMware Workstation and used networking, use an address different from the one the original network configuration used (that address is assigned to the now nonexistent virtual AMD card). Or change the address assigned to the AMD card. NOTE The VMware Virtual Ethernet Adapter driver runs correctly only if you have Service Pack 3 or later installed.
Administration Guide NOTE If you created this virtual machine using the vmxnet driver, run netconfig or another network configuration utility in the virtual machine to set up the virtual network adapter. To install VMware Tools in a NetWare 6.0 SP3, 6.5, or 5.1 SP6 guest 1 Power on the virtual machine. 2 Choose File > Install VMware Tools. The remaining steps take place inside the virtual machine.
Chapter 2 Creating and Configuring Virtual Machines To start VMware Tools in a Red Hat Linux 7.1 guest using GNOME, for example 1 Open the Startup Programs panel in the GNOME Control Center. Main Menu (the foot in the lower left corner of the screen) > Programs > Settings > Session > Startup Programs 2 Click Add. 3 In the Startup Command field, enter vmware-toolbox. 4 Click OK, click OK again, and close the GNOME Control Center. The next time you start X, VMware Tools start automatically.
Administration Guide Synchronizing the Time Between the Guest and Service Consoles The guest service can synchronize the date and time in the guest operating system with the time in the service console once every second. In the VMware Tools control panel, on the Other tab (Options in a Linux guest), select Time synchronization between the virtual machine and the host operating system. Figure 2-1.
Chapter 2 Creating and Configuring Virtual Machines Shutting Down or Restarting a Virtual Machine from the VMware Management Interface You can click to shut down or to restart a virtual machine from the VMware Management Interface. After you select one of these operations, click to the Users and Events page for this virtual machine to respond to any messages that require a response.
Administration Guide executes by modifying the /etc/vmware/dualconf.vm startup script in the guest to start the guest service with the following command line options: /etc/vmware/vmware-guestd --halt-command where is the command to execute when ESX Server asks the guest service to halt the guest operating system. /etc/vmware/vmware-guestd --reboot-command where is the command to execute when ESX Server asks the guest service to reboot the guest operating system.
Chapter 2 Creating and Configuring Virtual Machines have the guest service retrieve this string, which can be used by your script to set your virtual machineʹs system ID, machine name, or IP address. In the following example, a Linux guest illustrates how you can use the guest service to retrieve a string containing what becomes the virtual machine’s machine name and IP address. Use RedHat62VM as the machine name and 148.30.16.24 as the IP address.
Administration Guide ! Boot a Linux virtual machine over the network and run it diskless. Use PXE with your virtual machine in conjunction with remote installation tools such as Windows 2000 Remote Installation Services or the Red Hat Linux 9.0 installer’s PXE package. You can use Ghost or Altiris to stream an image of an already configured virtual disk to a new virtual machine. Make sure the virtual machine has a virtual network adapter; one is installed by default.
Chapter 2 Creating and Configuring Virtual Machines NOTE ESX Server does not support installation of a Windows XP guest operating system using PXE. 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, Windows Server 2003 virtual machines are configured to use the LSI Logic adapter by default.
Administration Guide To add the LSI Logic SCSI Adapter to the configuration file 1 Connect to the service console and, using a text editor, open the virtual machine’s configuration file (.vmx). 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, switch the original BusLogic adapter to the LSI Logic adapter by changing this line: scsi.virtualDev = “vmxbuslogic” to scsi.
Chapter 2 Creating and Configuring Virtual Machines in “Configuring the LSI Logic SCSI Adapter in a Linux Guest Operating System” on page 58. ! For new Windows virtual machines, complete the steps in “Configuring the LSI Logic SCSI Adapter in a Windows Guest Operating System,” next. 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 discussed above.
Administration Guide Shut down and power off the virtual machine, then edit the configuration file. Switch the original BusLogic adapter to the LSI Logic adapter by changing this line: scsi0.virtualDev = “vmxbuslogic” to: scsi0.virtualDev = “vmxlsilogic” 5 Remove the LSI Logic adapter you added by removing these lines: scsi1.present = “TRUE” scsi1.virtualDev = “vmxlsilogic” 6 Save your changes to the configuration file and boot the virtual machine.
Chapter 2 Creating and Configuring Virtual Machines For an existing Linux virtual machine with the modified configuration, the guest needs to boot with the LSI Logic SCSI adapter, so it tries to load that driver from the initial RAM disk (initrd) before the root partition is mounted. To configure the LSI Logic SCSI Adapter in a Linux guest operating system 1 Edit /etc/modules.conf and set scsi_hostadapter to mptscsih. 2 Create a new initial RAM disk for the running kernel.
Administration Guide ! Boot loader might not have been installed or was not installed correctly, which results in the loader loading the old ram disk image. Check the boot loader configuration and install the boot loader again. ! Kernel does not support the LSI Logic adapter. Check that you can manually modprobe mptscsi without errors and that it appears in the output of lsmod. If not, upgrade the kernel and start over. NOTE You might see different results on different distributions.
Chapter 2 Creating and Configuring Virtual Machines ! The guest operating system must support multiprocessor systems. Examples include Windows Server 2003, Windows 2000, and Red Hat Enterprise Linux AS 2.1. Review the list of supported guest operating systems in the VMware ESX Server Installation Guide to see which guests are multiprocessor‐ or SMP‐capable. ! The virtual machine cannot have more virtual processors than the ESX Server system has physical processors.
Administration Guide Downgrading to One Virtual Processor VMware ESX Server does not support downgrading a multiprocessor virtual machine to a uniprocessor virtual machine. Migrating Older ESX Server Virtual Machines You can use virtual machines created with versions of ESX Server older than 2.5. Virtual machines created in ESX Server 1.5 can work as is. To take advantage of the new features of the current release, upgrade your virtual machines. If you created the virtual machine under ESX Server 1.
Chapter 2 Creating and Configuring Virtual Machines 3 Click the Options tab and, under Verbose Options, click the link. 4 Change the value of the guestOS configuration parameter to one of the following: 5 ! winNetWeb (Windows Server 2003 Web Edition) ! winNetStandard (Windows Server 2003 Standard Edition) ! winNetEnterprise (Windows Server 2003 Enterprise Edition) 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.
Administration Guide NOTE Virtual machines created under versions earlier than GSX Server 2.0 or Workstation 3.2 must be upgraded to ESX Server 1.5 before they can be migrated to ESX Server 2.5. After these virtual machines run under ESX Server 1.5, migrate them to ESX Server 2.5. See the upgrade instructions in the ESX Server Installation Guide at http://www.vmware.com/support/pubs/esx_pubs.html. Import the virtual disks and any redo logs to the server and create a new virtual machine configuration.
Chapter 2 Creating and Configuring Virtual Machines When you install VMware Tools in the VMware ESX Server virtual machine, you can set up a new network driver. Virtual machines migrated from Workstation and GSX Server cannot be configured to use more than one virtual processor.
Administration Guide Otherwise, if you do not add the new geometry information to the configuration file, when you power on the virtual machine, a message appears stating Error loading operating system. To power on the virtual machine, add the new option to the configuration file, as discussed above. Path Name Failures When Importing GSX Server Virtual Machines Plain disks used with virtual machines created in GSX Server might contain disk file names that ESX Server cannot translate. Versions 2.
Chapter 2 Creating and Configuring Virtual Machines To import a virtual machine into VMware ESX Server 1 Make sure you have access to the files in the directory that holds the source virtual machine. You might be able to mount the source location, or you can FTP or copy the files to a temporary folder on the service console. If you are not sure where the source files are, open the virtual machine in the VMware product you used to create it, open the Configuration Editor (Settings > Configuration Editor).
Administration Guide NOTE If you do not see the message about transferring disks, a problem exists with the import. Make sure you are pasting to the correct vmfs folder. 7 Select the newly imported disk file (.dsk or .vmdk), and click Edit Properties. 8 Change the user and group names in the right column so the file’s owner and group match those of the user who will run the virtual machine and click OK. 9 Log out, and log back in as the user who will run the new virtual machine.
Chapter 2 Creating and Configuring Virtual Machines Workstation 4 does not support the LSILogic SCSI adapter. To use the SCSI adapter in the virtual machine, switch to the BusLogic adapter. ESX Server 2.5 does not support exporting virtual machines to ESX Server 1.5 or earlier, VMware Workstation 3.2 or earlier, or VMware GSX Server 2.5 or earlier. Uninstall VMware Tools from a virtual machine before exporting it for use in Workstation or GSX Server.
Administration Guide To register the virtual machines from the service console, use this command: vmware-cmd -s register //.vmx To remove a virtual machine from the list, use this command: vmware-cmd -s unregister //.vmx 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.
Chapter 2 Creating and Configuring Virtual Machines 4 Change to the directory where the archive was unpacked. cd vmware-console-distrib 5 Run the installer. ./vmware-install.pl For more information, see “Running a Virtual Machine Using the Remote Console” on page 157. Third Party Software Compatibility This section includes instructions for using a virtual machine with third‐party middleware and management software.
Administration Guide You perform these power operations from the toolbar buttons and menus in the consoles. For more information on changing the power state of a virtual machine in a console, see “Special Power Options for Virtual Machines” on page 157. Scripts can run when using the power buttons in the VMware Management Interface. See “Running the VMware Management Interface” on page 80. Scripts can be executed only when the VMware guest operating system service is running.
Chapter 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. To configure the virtual machine 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.
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.
Chapter 2 Creating and Configuring Virtual Machines 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 include an explicit returnBusyOnNoConnectStatus option definition for each SCSI disk in a virtual machine automatically. If the option is not defined for a disk in the virtual machine configuration file, ESX Server defaults to TRUE.
Administration Guide Figure 2-2. UUID dialog box This dialog box has four options: ! If you moved this virtual machine, you can keep the UUID. Select Keep and click OK to continue powering on the virtual machine. ! If you copied this virtual machine to a new location, create a new UUID, because the copy of the virtual machine is using the same UUID as the original virtual machine. Select Create and click OK to continue powering on the virtual machine.
Chapter 2 Creating and Configuring Virtual Machines If the UUID does not match the value of uuid.location, the newly generated value is used as the virtual machine’s UUID and is saved to the configuration file, replacing the previous value of uuid.location and (if it exists) uuid.bios. NOTE Any changes to the UUID take effect only after the virtual machine is rebooted.
Administration Guide If the virtual machine’s UUID has been set to a specific value, the configuration file has a line that begins with uuid.bios. The 128‐bit hexadecimal value that follows is the value you should use in the new location. If no line begins with uuid.bios, look for the line that begins with uuid.location and note the 128‐bit hexadecimal value that follows it. 2 Move the virtual machine’s disk (.dsk or .vmdk) file to the new location.
3 Using the VMware Management Interface 3 You can manage and configure virtual machines using either the Service Console or the VMware Management Interface. The the VMware Management Interface provides an easy‐to‐use, graphical interface for working with your virtual machines.
Administration Guide ! “Setting a MIME Type to Launch the VMware Remote Console” on page 139 ! “Editing a Virtual Machine’s Configuration File Directly” on page 140 ! “Using the VMware Management Interface File Manager” on page 141 ! “Registering and Unregistering Virtual Machines” on page 145 ! “Running Many Virtual Machines on ESX Server” on page 148 ! “Backing Up Virtual Machines” on page 151 Running the VMware Management Interface VMware ESX Server provides the VMware Management Interface,
Chapter 3 Using the VMware Management Interface NOTE You can use only ASCII characters when viewing the management interface. After your user name and password are authorized by the management interface, the Status Monitor appears, which contains high‐level details about all the virtual machines on the server to which you are connected.
Administration Guide 3 Under the line PerlSetEnv vmware_SESSION_LENGTH 60, do one of the following. ! To set the period to 1 minute, add this line: PerlSetEnv vmware_STATS_PERIOD 1 ! To set the period to 15 minutes, add this line: PerlSetEnv vmware_STATS_PERIOD 15 4 Save and close the file. 5 Restart Apache for the change to take effect. /etc/init.d/httpd.vmware restart Using Internet Explorer 6.
Chapter 3 Using the VMware Management Interface To disable the option to launch the remote console automatically 1 In the Internet Explorer 6.0 window, choose Tools > Internet Options to open the Internet Options control panel 2 Click the Advanced tab. 3 Scroll down to the Security section and uncheck Do not save encrypted pages to disk. 4 Click OK.
Administration Guide When you use Internet Explorer 6.0 to connect to the management interface, do not use a fully qualified domain name. Connecting to the Management Interface Without a Proxy Server If you are on a Windows system and your network does not use a proxy server, you must use fully‐qualified domain names when connecting to the management interface with Internet Explorer 6.0.
Chapter 3 Using the VMware Management Interface Figure 3-1. Status Monitor Viewing Summary Information About VMware ESX Server In the System Summary pane, you can view: NOTE ! Number of processors on ESX Server, including the average percentage of CPU usage used by virtual machines and the service console and the total being used by the whole system for the previous five minutes.
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 displays its ID number after the power status of the virtual machine. a NOTE Virtual machines may not appear in the list, if their configuration files are stored on an NFS‐mounted drive.
Chapter 3 Using the VMware Management Interface Depending on your permissions and the state of the virtual machine, some options may not be available. ! NOTE Attach Remote Console – Launches the VMware Remote Console, which connects to this virtual machine. This is the same as clicking . You need to log in to the host. See “Using the Remote Console” on page 155. Netscape and Mozilla users must define a MIME type for the console first. Internet Explorer is configured when the remote console is installed.
Administration Guide ! Power On/Resume – Powers on a stopped virtual machine or resumes a suspended virtual machine without running a script. ! Reset – Resets the virtual machine immediately without running a script. You can also press the reset button. ! Unregister Virtual Machine – Unregisters the virtual machine. The virtual machine no longer appears on the Status Monitor so it cannot be managed or accessed. See “Registering and Unregistering Virtual Machines” on page 145.
Chapter 3 Using the VMware Management Interface Changing the power state executes any script associated with the power state change. For information about running scripts, see “Choosing Scripts for VMware Tools to Run During Power State Changes” on page 162. Suspending and Resuming Virtual Machines Suspending a virtual machine, and later resuming its operation, can speed provisioning tasks—for example, deployment of standby servers.
Administration Guide 3 Click Edit. The Edit Options dialog box appears. For fastest suspend and restore operations, select the appropriate VMFS volume from the Suspend File Location list. ESX Server 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. 4 Click OK to save your changes. Enabling Repeatable Resume When you click the Suspend button to suspend a virtual machine, ESX Server writes a file with a .
Chapter 3 Using the VMware Management Interface 4 Next to Virtual Disk, click Edit. 5 Click Nonpersistent, and click OK to save your change. 6 Click the Options tab and click the link under Verbose Options. The configuration file opens in an editor. 7 Click Add. 8 Create an option called resume.repeatable and set its value to TRUE. 9 Click OK to save and close the configuration file. 10 Power on the virtual machine.
Administration Guide When you click Power Off, the virtual machine will power off, ready to resume at the suspend point you set. If you do not want to resume the virtual machine using the repeatable resume point, shut down the virtual machine and manually remove the suspended state (.std) file from the virtual machine directory. After it is deleted, suspend the virtual machine in a new state to create a new repeatable resume point. Otherwise, set the resume.
Chapter 3 Using the VMware Management Interface Creating a New Virtual Machine To create a new virtual machine from the management interface, on the Status Monitor pane, click Add Virtual Machine. The Add Virtual Machine wizard starts. See “Creating a New Virtual Machine” on page 39. Unregistering a Virtual Machine You can unregister a virtual machine so that it no longer appears on the Status Monitor and cannot be managed or accessed. See “Registering and Unregistering Virtual Machines” on page 145.
Administration Guide Close – Closes the current management interface window. You can close only windows that were opened while using the management interface. Configuring a Virtual Machine To see information about a virtual machine and to modify its configuration, click the link to the virtual machine in the Display Name column on the Status Monitor. The Status Monitor specific to the virtual machine you selected appears in a new browser window. Figure 3-2.
Chapter 3 Using the VMware Management Interface time these statistics cover. See “Configuring the Statistics Period for the VMware Management Interface” on page 81. NOTE ! Minimum, maximum, and average amount of server memory that the virtual machine used in the previous five minutes. You can modify the period of time these statistics cover. See “Configuring the Statistics Period for the VMware Management Interface” on page 81. ! The length of time the virtual machine has been running.
Administration Guide ! On the Status Monitor or a details pane for that virtual machine, click the arrow to the right of the terminal icon ( ) and select Configure Hardware or Configure Options in the Virtual Machine menu. See “Using the Virtual Machine Menu” on page 86. A new browser window appears, allowing you to make changes to the virtual machine’s configuration. Configuring a Virtual Machine’s CPU Usage To review and configure the virtual machine’s processor usage, click the CPU tab. Figure 3-3.
Chapter 3 Using the VMware Management Interface Understanding Resource Values The values under Resources indicate a range of percentages of a processor to which the virtual machine is entitled. Resource information displayed includes: ! Minimum – Minimum amount of processor capacity that must be available to power on the virtual machine. ! Maximum – Highest amount of processor capacity the virtual machine can ever consume, even if the processor is idle.
Administration Guide Figure 3-4. Memory tab The Memory tab shows how much memory is being used by the virtual machine and how memory resources are allocated to the virtual machine. Understanding Performance Values The values under Performance are based on the past five minutes. The period of time these statistics cover can be modified. See “Configuring the Statistics Period for the VMware Management Interface” on page 81.
Chapter 3 Using the VMware Management Interface Resource information displayed includes: ! Minimum – Minimum amount of memory that must be available to power on the virtual machine. ! Maximum – Amount of memory allocated to the virtual machine when it was configured. ! Shares – A relative metric for allocating memory to all virtual machines. Symbolic values low, normal, and high are compared to the sum of all shares of all virtual machines on the server and the service console.
Administration Guide Understanding Performance Values The values under Performance are based on the past five minutes. The period of time these statistics cover can be modified. See “Configuring the Statistics Period for the VMware Management Interface” on page 81. Performance information displayed includes: ! Read Bandwidth – Amount of bandwidth being used when the virtual machine is reading from the physical disk on the server.
Chapter 3 Using the VMware Management Interface Figure 3-6. Network tab The Network tab shows network performance information and resources allocated to the virtual machine’s virtual network card. The receive and transmit bandwidths indicate how fast data is transferred to and from the virtual machine. The values under Performance are based on the past five minutes. The period of time these statistics cover can be modified.
Administration Guide To enable network traffic shaping 1 In the Network tab, click Edit. The Network Resource Settings dialog box appears. 2 To enable traffic shaping, select Enable Traffic Shaping and define network traffic parameters. 3 In the Average Bandwidth field, specify the average value for network bandwidth, and specify whether that amount is in Megabits per second (Mbps), Kilobits per second (Kbps), or bits per second (bps).
Chapter 3 Using the VMware Management Interface Figure 3-7. Hardware tab The Hardware tab lists the virtual hardware in the virtual machine—configured devices like the virtual disk, removable devices like floppy, CD‐ROM or DVD‐ROM drives, virtual network adapter, memory allocated to the virtual machine, and the display settings. More information about each device is listed, and you can configure each virtual hardware component. You can configure most hardware only when the virtual machine is powered off.
Administration Guide To configure the virtual machine’s floppy drive 1 In the Hardware tab, under Floppy Drive, click Edit. The Floppy Drive dialog box appears. 2 To connect this virtual machine to the floppy drive, check Connected. NOTE Only one virtual machine can connect to the floppy drive on the server at a time. 3 To connect this virtual machine to the floppy drive when the virtual machine is powered on, select Connect at Power On.
Chapter 3 Using the VMware Management Interface To configure the virtual machine’s DVD/CD-ROM drive 1 In the Hardware tab, under DVD/CD‐ROM Drive, click Edit. The DVD/CD‐ROM Drive dialog box appears. 2 To connect this virtual machine to the server’s DVD/CD‐ROM drive, select Connected. NOTE Only one virtual machine can connect to the DVD/CD‐ROM drive on the server at a time.
Administration Guide Keep in mind the following: ! Virtual machines running certain guest operating systems, such as Windows NT, can be configured with a single processor only. Review the list of supported guest operating systems in the VMware ESX Server Installation Guide to see which guests are multiprocessor‐ or SMP‐capable. ! Virtual machines can be configured with multiple processors only if the server has more than one processor.
Chapter 3 Using the VMware Management Interface To configure the virtual machine’s virtual processors and memory 1 In the Hardware tab, under Processors and Memory, click Edit. The Processors and Memory dialog box appears. Depending on the guest operating system and the number of processors with which it is configured, a message appears under Edit Processor Configuration. 2 Provided the guest operating system is multi‐processor capable, and to change the number of processors, click the click here link.
Administration Guide ! vmnet adapter – Connects the virtual machine to an internal network of other virtual machines. All the virtual machines on this computer connected to a particular vmnet are on the same network. For this network connection, choose between the vlance driver, which installs automatically, and the vmxnet driver, which provides better network performance. The difference in network performance is most noticeable if the virtual machine is connected to a Gigabit Ethernet card.
Chapter 3 Using the VMware Management Interface Configuring a Virtual Machine’s SCSI Controllers You can configure the settings for the virtual machine’s virtual SCSI controller. These settings include the virtual SCSI controller driver and whether the SCSI bus is shared with virtual or physical devices. To configure the virtual machine’s virtual SCSI controller 1 In the Hardware tab, under SCSI Controller, click Edit. The SCSI Controller dialog box appears.
Administration Guide ESX Server can use disks in four modes: ! Persistent – Disks in persistent mode behave exactly like conventional disk drives on a computer. All writes to a disk in persistent mode are written out permanently to the disk as soon as the guest operating system writes the data. ! Nonpersistent – All changes to a disk in nonpersistent mode are discarded when a virtual machine session is powered off.
Chapter 3 Using the VMware Management Interface You can change the disk mode for an existing virtual disk that is not a physical disk on a LUN. 3 Click OK to save your changes and close the window. Configuring a Virtual Machine’s Display Settings You can configure the display depth or number of colors in a virtual machine. A higher color depth setting slows down screen redraws and increases network load when you use a remote console to view a virtual machine across a network connection.
Administration Guide To configure a virtual machine’s generic SCSI device 1 To configure an existing generic SCSI device, on the Hardware tab, under Generic SCSI Device, click Edit. The Generic Device (SCSI ) dialog box appears. 2 To connect this virtual machine to the server’s SCSI device when the virtual machine is powered on, check Connect at Power On. 3 In the Device drop‐down list, choose the appropriate device. 4 Select the appropriate SCSI ID in the Virtual SCSI Node list.
Chapter 3 Using the VMware Management Interface To add a new virtual disk to a virtual machine 1 On the Hardware tab, click Add Device. The Add Device wizard starts. 2 Click Hard Disk. The Virtual Disk Type page appears. VMware, Inc.
Administration Guide 3 Create one of the following virtual disks: ! Click Blank to create a new virtual disk. Specify the following: 114 ! Image File Location – Choose the volume from the list 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. ! Image File Name – Enter a disk name, making sure the file has a .vmdk extension. ! Capacity – Specify the size of the virtual disk in MB.
Chapter 3 Using the VMware Management Interface ! Click Existing to add an existing virtual disk to the virtual machine. Specify the following: 4 ! Image File Location – Choose the volume from the list on which the virtual disk is located. ! Image File Name – Select the virtual disk you want from the list. The size of the virtual disk appears in the Capacity field. ! Virtual SCSI Node – Select the appropriate SCSI ID from the list.
Administration Guide To add a new virtual network adapter to a virtual machine 1 On the Hardware tab, click Add Device. The Add Device wizard starts. 2 Click Network Adapter. The Network Adapter page appears. 116 3 To connect this virtual machine to the network when the virtual machine is powered on, select Connect at Power On. 4 In the Network Connection list, select the virtual network device that you want the virtual machine to use.
Chapter 3 Using the VMware Management Interface 6 Click OK to add the network adapter. Adding a Virtual DVD/CD-ROM Drive to a Virtual Machine If your server contains a DVD/CD‐ROM drive, you can add a DVD/CD‐ROM drive to the virtual machine. You can point the CD‐ROM drive to an ISO disk image file. You can connect a device to only one virtual machine on a server at a time. Before adding a virtual DVD/CD‐ROM drive, make sure the virtual machine is powered off.
Administration Guide 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, select Connect at Power On. 4 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. For example, the server’s CD‐ROM drive could be /dev/cdrom. 6 Click OK to add the drive.
Chapter 3 Using the VMware Management Interface To add a new virtual floppy drive to a virtual machine 1 On the Hardware tab, click Add Device. The Add Device wizard starts. 2 Click Floppy Drive. The Floppy Drive page appears. 3 To have the floppy drive be connected to the virtual machine when you power it on, select Connect at Power On. 4 In the Device list, select System Floppy Drive or Floppy Image. 5 Enter the location of the drive or floppy image in the Location field.
Administration Guide Adding a Generic SCSI Device to a Virtual Machine Before adding a generic SCSI device, make sure the virtual machine is powered off. To add a new generic SCSI device to a virtual machine, 1 On the Hardware tab, click Add Device. The Add Device wizard starts. 2 Click Generic SCSI Device. The SCSI Device page appears. 120 3 To connect this virtual machine to the server’s SCSI device when the virtual machine is powered on, select Connect at Power On.
Chapter 3 Using the VMware Management Interface 5 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 Before adding a tape drive, make sure the virtual machine is powered off. To add a new tape drive to a virtual machine 1 On the Hardware tab, click Add Device. The Add Device wizard starts. 2 Click Generic SCSI Device. The SCSI Device page appears. VMware, Inc.
Administration Guide 3 To connect this virtual machine to the server’s SCSI device when the virtual machine is powered on, select Connect at Power On. 4 In the Device entry field, type: vmhba:::0 5 Select the appropriate SCSI ID in the Virtual SCSI Node list. 6 Click OK to add the device. Removing Hardware from a Virtual Machine To remove hardware from a virtual machine, access the Hardware page. Next to the item you want to remove, click Remove.
Chapter 3 Using the VMware Management Interface The Options tab shows standard virtual machine information: ! Display Name – Identifies the virtual machine in a more descriptive way. ! Guest Operating System – Guest operating system installed on the virtual disk. ! Suspend File Location – Location of the suspended state file (a VMFS volume). This file is created when you suspend a virtual machine. It contains information about the virtual machine’s state at the time at which it was suspended.
Administration Guide The virtual machine startup options include: ! At System Startup – Whether this virtual machine should start when the server starts. By default, virtual machines do not start automatically when the system starts up. ! Continue Starting Other Virtual Machines After – Amount of time to wait after starting the virtual machine before starting another virtual machine.
Chapter 3 Using the VMware Management Interface 4 To specify that VMware Tools should start in a virtual machine before the next virtual machine starts, select the when VMware Tools starts check box. If VMware Tools does not start in the virtual machine before the time specified elapses, ESX Server starts the next virtual machine. 5 In At System Shutdown, Attempt to list, select whether you want to power off the virtual machine, shut down the guest operating system, or suspend the virtual machine.
Administration Guide Setting Startup and Shutdown Options by Modifying the Configuration File Directly (Advanced Users Only) To add or change a configuration option for a virtual machine that cannot be accessed from elsewhere in the management interface, edit the virtual machine’s configuration file (the file with the .vmx extension) from the Options dialog box. For example, to enable repeatable resume in the virtual machine, see “To add an option to the configuration file (.vmx)” on page 127.
Chapter 3 Using the VMware Management Interface To add an option to the configuration file (.vmx) 1 Under Verbose Options, click the link. The Options dialog box appears. 2 Click Add. 3 Enter a name for the option and click OK. For example, to enable repeatable resume in the virtual machine, create an option called resume.repeatable. 4 VMware, Inc. Enter a value for the option you specified and click OK.
Administration Guide For example, set the value of resume.repeatable to TRUE. 5 Click OK in the Options dialog box to save the change to the configuration file. To change an option in the configuration file (.vmx) 1 Under Verbose Options, click the link. The Options dialog box appears. 128 2 Locate the option, and 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 dialog box. VMware, Inc.
Chapter 3 Using the VMware Management Interface 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. Figure 3-9. Users and Events tab: Remote Console Connections and Permissions The list under Remote Console Connections identifies 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.
Administration Guide 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. Figure 3-10. Users and Events tab: Events The Events list displays a log of the most recent actions or events recorded in the virtual machine, such as the questions VMware ESX Server asks, errors and other events like the powering on or off of the virtual machine. The events appear in reverse chronological order.
Chapter 3 Using the VMware Management Interface The log shows the date and time the event occurred and an explanation of the event. Some events have a symbol associated that corresponds to the type of event that occurred. – Indicates a question or a warning was generated by the virtual machine. – Indicates an error occurred in the virtual machine. Click the tabs at the top of the page to view more information about the virtual machine.
Administration Guide To add SCSI disks with IDs between 8 and 15 1 On the Options tab for the virtual machine, click the link under Verbose Options. 2 Click Add. 3 Create an option called scsi0:8.present and set its value to true. 4 Click Add. 5 Create an option called scsi0:8.name and set its value to :.vmdk. In these entries, scsi0 refers to the first SCSI controller and 8 is the device ID. 6 Click OK to save your changes and close the configuration file.
Chapter 3 Using the VMware Management Interface Using Parallel Ports in a Virtual Machine Virtual machines must be configured so that parallel ports on the virtual machine are connected to the appropriate port on the physical machine. To connect the virtual machine's first parallel port (LPT1) to the physical computer's first parallel port 1 Reboot the physical computer and enter the BIOS setup. Typically, you press F2 or Delete while the machine is booting.
Administration Guide NOTE When the virtual machine starts after you update the virtual hardware version, the message “The CMOS of this virtual machine is incompatible with the current version of VMware ESX Server. A new CMOS with default values will be used instead” appears. Click OK. As the virtual machine starts, the guest operating system may detect new virtual hardware and install drivers for it. Respond to any messages. 5 Start the virtual machine using the remote console.
Chapter 3 Using the VMware Management Interface virtual machine starts, add an option serial0.startConnected to the configuration file and set its value to true, as described in “Setting Startup and Shutdown Options by Modifying the Configuration File Directly (Advanced Users Only)” on page 126. To reconfigure the virtual machine so it starts with the first serial port disconnected, change the value for the serial0.startConnected option to false.
Administration Guide point, the changes can be undone by removing the redo log. Shut down the guest operating system and power off the virtual machine before deleting that virtual machine’s redo log. You can also commit the changes to the main virtual disk file using the commit option in vmkfstools. See “Using vmkfstools” on page 249 for details. To change the disk mode for a virtual disk, see “Configuring a Virtual Machine’s Virtual Disks” on page 109.
Chapter 3 Using the VMware Management Interface The Confirm: Deleting dialog box appears. All the files to be deleted are listed. 4 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 5 Any virtual disk files associated with another registered virtual machine do not appear in this window.
Administration Guide Figure 3-11. Options tab These options allow you to configure ESX Server. For information on each of these links, see “Administering ESX Server” on page 187. Click the Status Monitor tab to return to the Status Monitor. 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 tab. You are prompted to confirm that you want to log out.
Chapter 3 Using the VMware Management Interface 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.vmware restart 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.
Administration Guide 2 Save the file in a location of your choice. NOTE On a Linux host, change to the directory where you saved the file and give yourself permission to execute the file: 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 A dialog box asks what you want to do with the file. 5 Click Advanced.
Chapter 3 Using the VMware Management Interface Changing Your Virtual SCSI Adapter By default, ESX Server assigns the BusLogic virtual SCSI adapter to Linux, Windows NT 4.0, Windows 2000, or Windows XP Professional guest operating systems. Similarly, ESX Server assigns the LSI Logic SCSI virtual adapter to Windows 2003 Server guest operating systems.
Administration Guide Figure 3-12. File Manager In the left pane of the file manager, click a folder to display its contents. NOTE The tree view may fail to load or only partially load when viewed with Mozilla. To restore the proper view, right‐click in the left pane, and choose Reload Frame or Refresh from the context menu. Some file and folder icons have special meanings. Table 3-2. Folder and File Icons Icon Description Identifies a virtual machine configuration file.
Chapter 3 Using the VMware Management Interface When you start a long‐running operation—for example, pasting a file larger than 10MB after a copy or moving it between logical file systems—a progress bar appears so you can track the progress of the operation. When you copy and paste or cut and paste a virtual disk file from the VMFS file system to the service console’s file system, or vice versa, the file manager uses vmkfstools to import or export the file, translating the format appropriately.
Administration Guide ! 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. Figure 3-14. Settings to make changes to files Use the top pane of the file manager to navigate the directory structure and create new directories. To create a new directory, click New, enter the name for the directory, and click OK.
Chapter 3 Using the VMware Management Interface NOTE The remote console still requires that the user has execute (x) permission on all parent directories. Creating a Flagship User You might choose to have a virtual machine owned by a “flagship user” instead of a real person. By using a “flagship user,” only one user account owns the virtual machines that are in production. An advantage of using flagship accounts is that flagship users never leave the company or go on vacation.
Administration Guide Registering a Virtual Machine Virtual machines created on the server are automatically registered. If you imported a virtual machine from another server or from another VMware product, or if you unregistered a virtual machine, you can register it by completing the following steps. To register a virtual machine 1 Log into the management interface as the user with full permissions to the virtual machine’s configuration file.
Chapter 3 Using the VMware Management Interface A message indicates that the virtual machine is registered. 5 Click Close Window. The virtual machine appears on the Status Monitor and you can connect to it with a remote console. Unregistering a Virtual Machine Registered virtual machines can be accessed and managed remotely. Unregister the virtual machine to prevent remote management.
Administration Guide Running Many Virtual Machines on ESX Server To run or register more than 60 virtual machines, you must change some 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.
Chapter 3 Using the VMware Management Interface 3 Raise the vmware‐serverd process priority to ‐15 so that it can connect to all running virtual machines: renice -15 -p 4 Raise the httpd process priority to ‐15: renice -15 -p 5 Verify that you can log into the VMware Management Interface and view correct information about the virtual machines, and continue with the next step. 6 Change the vmware-serverd process priority back to the default of zero (0).
Administration Guide NOTE Increasing this value might have an impact the performance of the virtual machines, because the Apache processes will require more memory in the service console. Increasing the Timeout Value for the vmware-authd Process As root, use a text editor and add the following configuration parameter to the /etc/vmware/config file: vmauthd.connectionSetupTimeout = 120 This increases the timeout value to 2 minutes from the default of 30 seconds.
Chapter 3 Using the VMware Management Interface To increase service console shares through the service console 1 Log into the service console as the root user. 2 Type cat /proc/vmware/sched/cpu. 3 Find the line that has console for the name. For example: vcpu 4 vm name uptime status ... 125 125 console 71272.378 RUN ... 126 126 idle1 71272.378 RUN ... 127 127 idle2 71272.378 RUN ...
Administration Guide ! Recover from catastrophic failures in which your entire virtual machine is damaged. VMware ESX Server provides several approaches for backing up your data, whether to tape or to another system over the network. The best data protection for your virtual machines is achieved with a combination of these approaches. Using Tape Drives with VMware ESX Server This section describes how to make tape drives available to both your virtual machine and your service console.
Chapter 3 Using the VMware Management Interface Backing Up Virtual Machines from the Service Console You can back up your virtual machines by copying to tape the entire virtual disk files and any redo logs, along with the backups of the service console. This approach makes it easy to restore your virtual machines in the event of a full system loss or data loss due to failure of unprotected disks. These full‐image backups do not permit you to restore individual files.
Administration Guide Using Network-Based Replication Tools You can configure any enterprise disk storage subsystems to replicate, or mirror, their data to another subsystem at a local or remote location. This replication can occur either synchronously or asynchronously, as described below: ! If the replication is synchronous, a write operation does not appear to be completed locally until the data is committed to disk at the remote location.
5 Using the VMware Service Console 5 In this chapter, the following sections describe aspects of using the VMware Service Console: ! “Characteristics of the VMware Service Console” on page 167 ! “Using DHCP for the Service Console” on page 168 ! “Managing the Service Console” on page 168 ! “Authentication and Security Features” on page 180 ! “Using Devices With ESX Server” on page 184 ! “Enabling Users to View Virtual Machines Through the VMware Remote Console” on page 185 Characteristics of
Administration Guide Using DHCP for the Service Console The recommended setup is to use static IP addresses for the service console. It is also possible to set up the service console to use DHCP, as long as your DNS server can map the service console’s host name to the dynamically generated IP address.
Chapter 5 Using the VMware Service Console Commands Specific to ESX Server Identifying Network Cards The findnic command lets you send network traffic from a specified network adapter so you can observe the LEDs on the adapters and see which physical adapter is associated with that device name. The format of the command is: findnic Option Explanation -f Do a flood ping. -i Send pings at specified interval. Example: findnic -f vmnic1 10.2.0.5 10.2.
Administration Guide The format for the vmkfstools command, when specifying a VMFS volume or file, is: vmkfstools where is an absolute path that names a directory or a file under the /vmfs directory. For an explanation on using this command, see “Using vmkfstools” on page 249. Automatically Mounting VMFS Volumes VMFS volumes are automatically mounted in the /vmfs directory on the service console when the VMkernel is loaded as the computer boots.
Chapter 5 Using the VMware Service Console Table 5-1. Linux commands used on the service console Command cd Example and Explanation Change directories. cd /home/user Change to the directory /home/user (the home directory for a user with the user name user). cd .. Go up one level from the current directory. cp Copy a file. cp oldfile newfile Make a copy of the file oldfile in the current directory. The copy is named newfile. cp oldfile /home/user Make a copy of the file oldfile in the current directory.
Administration Guide Table 5-1. Linux commands used on the service console (Continued) Command Example and Explanation rm Remove a file. rm deadfile Remove the file deadfile from the current directory. rmdir Remove a directory. rmdir gone Remove the directory gone, which exists beneath the current directory. Finding and Viewing Files Table 5‐2 describes some common Linux commands for finding and viewing files that can also be used in the ESX Server service console. Table 5-2.
Chapter 5 Using the VMware Service Console Table 5-2. Linux commands used on the service console (Continued) Command Example and Explanation grep Search for a specified text pattern in a specified directory or list of files and display the lines in which the pattern is found. grep "log file" * Search all the files in the current directory for the text string log file. less Display the contents of a specified file one screen at a time. Use the arrow keys to move up and down through the file.
Administration Guide Table 5-3. Linux commands used on the service console (Continued) Command fdformat Example and Explanation Do a floppy disk format. fdformat /dev/fd0 Format a floppy disk in the first floppy disk drive. 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 all network devices.
Chapter 5 Using the VMware Service Console Table 5-3. Linux commands used on the service console (Continued) Command Example and Explanation 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. who Show the user names of all users logged in to the system. whoami Show the user name you are currently using on the system.
Administration Guide execute). The final cluster of three characters (r--) indicates that all other users have permission to read the file but not to write to it or execute it. Change permissions for a file using the chmod command, shown in Table 5‐4. One way to specify permissions is by using a numerical shorthand: ! Read = 4 ! Write = 2 ! Execute = 1 Specify combinations of these permissions by adding the numbers for the permissions you want to set. For example, read and execute is 5.
Chapter 5 Using the VMware Service Console Table 5-4. Permissions and ownership commands . Command chmod Example and Explanation Change mode (permissions) for a specified file, group of files or directory. chmod 755 *.vmx Set permissions on all files in the current directory that end with .vmx to be -rwxr-xr-x. chmod 660 nvram Set permissions on the file nvram in the current directory to be ‐rw‐rw‐‐‐‐.
Administration Guide The /proc/vmware directory contains information specific to the running of the ESX Server virtualization layer in virtual machines. You can use the cat command to check status and use the echo command to write values to certain files in the proc file system to change the configuration of ESX Server. NOTE Most of this information is available through the VMware Management Interface. VMware recommends that you obtain and set information through this management interface.
Chapter 5 Using the VMware Service Console Table 5-6. proc file system entries and descriptions (Continued) /proc/vmware Entry Description mem Memory parameters. See “Memory Resource Management” on page 345 migration Reserved for future use. net Configuration and statistics for virtual NICs and bond devices. See “Binding Physical Adapters” on page 320. pci State of PCI adapters in the system (what they are and how they’re partitioned). procstats Statistics for the /proc/vmware directory.
Administration Guide Getting Help for Service Console Commands Detailed usage notes for most service console commands are available as man files. To view the man page for a command, use the man command followed by the name of the command for which you want to see information. Table 5-7. man command Command Example and Explanation man Displays the man page for a specified command. Press the spacebar to go to the next screen of text. Press q to exit from the display.
Chapter 5 Using the VMware Service Console it can be configured easily to use LDAP, NIS, Kerberos, or another distributed authentication mechanism. The PAM configuration is in /etc/pam.d/vmware-authd. Every time a connection is made to the server running ESX Server, the inetd process runs an instance of the VMware authentication daemon (vmware-authd). The vmware-authd process requests a user name and password, and hands them off to PAM, which performs the authentication.
Administration Guide Using Your Own Security Certificates when Securing Your Remote Sessions When using the VMware Remote Console or the VMware Management Interface over a network connection, the username, password, and network packets sent to ESX Server are encrypted in ESX Server by default when you choose Medium or High security settings for the server. With SSL enabled, security certificates are created by ESX Server and stored on the server.
Chapter 5 Using the VMware Service Console The key ports for use of the VMware Management Interface and the VMware Remote Console are the HTTP or HTTPS port and the port used by vmware-authd. Use of other ports is optional. NOTE For compatibility with GSX Server, TCP ports 8222 and 8333 are handled as HTTP redirects to TCP ports 80 or 443. High Security The following list shows the port numbers and use for high security: ! 443 – HTTPS, used by the VMware Management Interface.
Administration Guide Using Devices With ESX Server In this section, we discuss considerations when using devices with ESX Server. Supporting Generic Tape and Media Changers For the guest operating system to see and control the media changer, the SCSI ID in the target raw device’s configuration file must match the SCSI ID that ESX Server sees for that device.
Chapter 5 Using the VMware Service Console You can also find the device name linked to a specific controller with the singular vmhba_dev query: $ vmkpcidivy -q vmhba_dev vmhba0:0:0 /dev/ida/c0d0 The vmhba_dev query accepts one or more controller names as arguments. When You Change Storage Adapters Whenever you change storage adapters on an ESX Server system, run the vmkpcidivy utility to ensure proper loading of the kernel modules.
Administration Guide 186 VMware, Inc.
6 Administering ESX Server 6 You can modify ESX Server configuration options by logging in to the VMware Management Interface as root and clicking the Options tab. The settings you can change and activities you can perform include updating the startup profile, configuring storage and network settings, and configuring other server options. Refer to the VMware ESX Server Installation Guide for additional information about server configuration during installation.
Administration Guide Startup Profile From the Options tab of the VMware Management Interface, use the Startup Profiles option to create and modify ESX Server boot configurations. For each configuration, you can specify how you want to allocate your devices: to the virtual machines, to the service console, or shared between them.
Chapter 6 Administering ESX Server Creating and Editing Virtual Switches You can create new virtual switches or edit existing switches. To create a virtual switch 1 Log in to the VMware Management Interface as root. The Status Monitor appears. 2 Click the Options tab, and click the Network Connections tab. The Create Virtual Switch dialog box opens and displays configuration options for the new switch. 3 Enter a name for the virtual switch in the Network Label field.
Administration Guide An internal adapter is created for the virtual switch. A notification message shows “No outbound adapters. Traffic routed locally.” 5 Select an adapter to assign it to the switch from the Bind Unassigned Adapters list. Under Other Outbound Adapters, Bind Unassigned Adapters lists any unassigned adapters. You can transfer any listed adapters from other switches to the virtual switch you are configuring. 6 Click OK to save the new switch configuration and close the window.
Chapter 6 Administering ESX Server To change your VLAN processing settings 1 From the Options tab, select Advanced Settings. The Advanced Settings pane appears and displays a list of configuration parameters. 2 Locate the parameter: Net.VlanTrunking. 3 Click the value for the parameter. The Modify VMkernel Parameter dialog box opens. 4 In the Value entry field, enter 1 (one) to enable the parameter or 0 (zero) to disable the parameter. 5 Click OK to close the window and save the setting.
Administration Guide 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. If the adapter is configured to Autonegotiate, these settings are automatically negotiated by the adapter. If these settings are not appropriate, click Edit next to the physical adapter you want to change.
Chapter 6 Administering ESX Server 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 In the Confirm New Password field, type the same password. 6 To add the user to one or more groups, click Add and select a group from the list. Repeat this step for each group to which you want to add the user.
Administration Guide To change information for or remove a user 1 Click the + (plus) sign next to Users to expand the Users list and click the user you want to edit or remove. The Edit Users and Groups dialog box appears. 2 3 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.
Chapter 6 Administering ESX Server access and enable SSH, telnet, and FTP access to the server and enable NFS file sharing. The following standard security settings are available: ! The server is set to High security by default, which does not allow unencrypted VMware Management Interface and Remote Console sessions. High security enables SSH access for secure remote login sessions, but it also disables FTP, Telnet, and NFS file sharing services.
Administration Guide SNMP Configuration From the Options tab of the VMware Management Interface, use the SNMP Configuration option to configure the ESX Server SNMP agent and sub‐agent. These agents allow 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 227. For information about SNMP, see “Using SNMP with ESX Server” on page 223.
Chapter 6 Administering ESX Server storing disks for virtual machines. You can also edit, label, and remove existing partitions. When you edit a VMFS partition, you can change the volume label, maximum file size, access mode, and whether you want to span the partition. Figure 6-4. Disks and LUNs tab NOTE You can have only one VMFS volume per LUN. Creating a Disk Partition You can use existing free space on your VMFS volumes to create new disk partitions.
Administration Guide If a core dump file does not exist on the disk, you are prompted to create one. Creating a new volume consumes all the free space remaining on a disk. ESX Server determines the optimum setting for the maximum file size based on the volume’s file system. To create a new partition 1 In the Disks and LUNs tab, click Create Volume. The Volume Creation Method options appear. 2 Click Typical. If it does not exist, you are asked if you want to create a core dump partition.
Chapter 6 Administering ESX Server Editing a Disk Partition Select a partition to edit and click Edit. Figure 6-5. Disks and LUNs tab If this partition is formatted for VMFS‐1, you can convert it to the newer VMFS‐2 format. See “File System Management on SCSI Disks and RAID” on page 245 for information on the VMFS‐2 file system. The changes you can make to the partition may include: ! Setting the volume’s type. ! Changing the name of the volume label. ! Setting the volume’s access mode.
Administration Guide Setting the Volume’s Access Mode There are two modes for accessing VMFS volumes: public or shared. ! Public mode – Default mode for ESX Server. VMware recommends this mode. With a public VMFS version 1 (VMFS‐1) volume, multiple ESX Server computers have the ability to access the VMware ESX Server file system, as long as the VMFS volume is on a shared storage system (for example, a VMFS on a storage area network). Only one ESX Server can access the VMFS volume at a time.
Chapter 6 Administering ESX Server CAUTION Metadata on VMFS‐2 volumes utilize more space than metadata on VMFS‐1 volumes. To successfully convert a file partition, you might need to move files to allow for more disk space. Removing a Disk Partition To convert the partition to VMFS‐2, click the Convert to VMFS‐2 link. To convert the file system, you must deactivate the swap partition if it exists. See “Configuring a Swap File” on page 203. To remove the partition, click Remove.
Administration Guide The status of each path is indicated by a symbol that corresponds to its current status: – Indicates that the path is active and data is being transferred successfully. – Indicates that the path is set to disabled and is available for activation. – Indicates that the path should be active, but the software cannot connect to the LUN through this path. If you configured a LUN to use a preferred path, that path will be identified with the label Preferred after the SAN Target listing.
Chapter 6 Administering ESX Server 3 Click OK to save your settings and return to the Failover Paths tab. The name of the failover policy appears next to each SAN LUN in the failover paths list. For more information on failover policies, see “Setting Your Multipathing Policy for a LUN” on page 275. Configuring Failover Paths You can enable or disable individual failover paths by changing their status in the Adapter icon pulldown menu.
Administration Guide ! NOTE Activation policy. The swap file can be active when the system boots, or it can be activated manually. To deactivate the swap partition, set the activation policy to Activated manually, and restart the server. The swap file is not deactivated until you reboot. Because you are making changes to the amount of swap space after the initial configuration, you must restart the server for the changes take effect.
Chapter 6 Administering ESX Server Advanced Settings From the Options tab of the VMware Management Interface, use the Advanced Settings option to view and modify the configuration parameters of the VMkernel. Figure 6-8. Advanced Settings: Configuration Parameters of the VMkernel When you configure the VMware ESX Server computer (see the VMware ESX Server Installation Guide), some system parameters are assigned default values.
Administration Guide NOTE Some configuration settings shown on this page are described in the ESX Server manual and may be changed as described in the manual. In most cases, do not modify these settings unless a VMware technical support engineer tell you do so. To change the setting for a VMkernel configuration parameter, click the link for the value. The VMkernel Parameter Update dialog box opens on top of the VMware Management Interface window. Figure 6‐9.
Chapter 6 Administering ESX Server Configuring the Service Console’s Processor Usage To review and configure the service console’s processor usage, click the CPU tab. Figure 6-10. CPU tab The CPU tab shows how much of the server processor or processors the service console is utilizing and how CPU resources are allocated to the service console.
Administration Guide 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 might get only 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. To modify CPU resource values: 1 Click Edit. The Edit CPU Resources window appears. 2 Change the settings.
Chapter 6 Administering ESX Server The Shares value represents a relative metric for controlling disk bandwidth, where this value is compared to the sum of all shares of all virtual machines on the same disk as the service console and the service console itself. For example, the service console and two VMFS partitions, VMFS‐A and VMFS‐B, are located on the same hard disk on the ESX Server system.
Administration Guide ! Service Console messages, the data for which is gathered from /var/log/messages in the service console. See “Viewing Service Console Logs” on page 212. ! The availability report, which contains information and statistics about server uptime and downtime. See “Viewing the Availability Report” on page 213. Periodically check the VMkernel warning and alert messages for out‐of‐memory errors, hardware failures, and so on.
Chapter 6 Administering ESX Server Viewing VMkernel Messages To view the VMkernel message log, click the VMkernel Log tab. Figure 6-13. VMkernel Log tab 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 http://kb.vmware.com or contact your VMware support representative. VMware, Inc.
Administration Guide Viewing Service Console Logs To view service console messages, click the Service Console Log tab. Figure 6-14. Service Console Log tab 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 http://kb.vmware.com or contact your VMware support representative. 212 VMware, Inc.
Chapter 6 Administering ESX Server Viewing the Availability Report To view the server availability report, click the Availability Report tab. Figure 6-15. Availability Report tab The availability report contains useful information about server uptime and downtime. This includes detailed statistics regarding uptime history and an analysis of downtime. VMware, Inc.
Administration Guide How Memory Is Utilized The Memory Utilization pane shows how much memory is being used by the ESX Server and how memory resources are allocated to virtual machines. See “Memory Resource Management” on page 345. Figure 6-16. Memory tab System Summary: Physical Memory This list shows the current allocation of physical memory on the server: ! Virtual Machines – Memory currently allocated to virtual machines.
Chapter 6 Administering ESX Server Many VMware ESX Server workloads present opportunities for sharing memory across virtual machines. For example, several VMs might be running instances of the same guest operating system, might have the same applications or components loaded, or might contain common data. In such cases, VMware ESX Server uses a proprietary transparent page sharing technique to securely eliminate redundant copies of memory pages.
Administration Guide ! 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 memory from virtual machines, because it reclaims the memory that is considered least valuable by the guest operating system.
Chapter 6 Administering ESX Server 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. Click the virtual machine’s Memory tab to set the number of memory shares granted to the virtual machine.
Administration Guide ! when VMWare Tools starts – Wait until VMWare Tools is operating in the current virtual machine before starting up the next virtual machine. This 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.
Chapter 6 Administering ESX Server The System Startup and Shutdown Defaults dialog box appears. 3 To enable system‐wide startup and shutdown policies, select the Start Up and Shut Down Virtual Machines check box.
Administration Guide Disabling the System’s Configuration Settings To disable the system-wide configuration settings 1 Under System Configuration, click Edit. The System Startup and Shutdown Defaults dialog box appears. 2 Deselect the Start Up and Shut Down Virtual Machines check box and click OK. 3 Click Close Window to return to the management interface’s Options pane.
Chapter 6 Administering ESX Server Figure 6-17. Virtual Machine Startup Sequence configuration pane To specify the startup order for virtual machines, select the check box next to one or more machines. Navigation arrows become active, allowing you to move machines between the three lists. Virtual machines can be set to one of the following options: ! Other – Contains virtual machines that are not configured to start and stop with the system.
Administration Guide To reboot 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, make sure all virtual machines are shut down or suspended. 3 Click the Options tab. 4 Click Restart reboot the server. A prompt appears. 5 Enter the reason for the reboot, and click OK. This information is logged for reliability monitoring.
7 Using SNMP with ESX Server 7 Simple network management protocol (SNMP) is a communication protocol between an SNMP client (for example, a workstation) and an 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.
Administration Guide You can use the ESX Server SNMP agent with any management software that can load and compile a management information base (MIB) in SMIv1 format and can understand SNMPv1 trap messages. The location of the VMware subtree in the SNMP hierarchy is: .iso.org.dod.internet.private.enterprises.vmware (.1.3.6.1.4.1.6876) You can choose to use SNMP with or without any specific ESX Server MIB items.
Chapter 7 Using SNMP with ESX Server NOTE ! State of the virtual machine’s power switch: on or off ! State of the guest operating system: on or off (running or not running) ! Disk adapters seen by the virtual machine ! Network adapters seen by the virtual machine ! Floppy disk drives seen by the virtual machine ! State of the floppy drive: connected or disconnected ! CD‐ROM drives seen by the virtual machine ! State of the CD‐ROM drive: connected or disconnected SNMP information is provide
Administration Guide Overview of Setting Up ESX Server SNMP ESX Server 2.5 includes two daemons, a master (snmpd), and a subagent (vmware-snmpd), as illustrated in Figure 7‐1. 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.
Chapter 7 Using SNMP with ESX Server Configuring the ESX Server Agent You can configure the ESX Server agent in two ways, described in these sections: ! “Configuring the ESX Server Agent Through the VMware Management Interface,” next ! “Configuring the ESX Server Agent from the Service Console” on page 228 Configuring the ESX Server Agent Through the VMware Management Interface This section describes how to use the VMware Management Interface to configure the ESX Server Agent.
Administration Guide 4 Make sure the paths to the snmpd daemon startup script and its configuration file are correct. If either of these is incorrect, click Change and type the correct path. 5 Make sure that the status of the master SNMP agent is Running. 6 If you’re interested in VMware‐specific SNMP MIBs, make sure the status and VMware traps of the VMware SNMP subagent is Enabled.
Chapter 7 Using SNMP with ESX Server To use the VMware SNMP Daemon with Third Party Management Applications 1 Install your third party management application. Refer to your management application documentation and the ESX Server release notes at www.vmware.com/support/pubs/esx_pubs.html. 2 Log into the service console as the root user. 3 Type the following to run the script: snmpsetup.sh connect The connect option configures exporting ESX Server MIB items through your third party SNMP daemon.
Administration Guide The second command starts the subagent vmware-snmpd daemon. By default, the agents start and run as background processes. NOTE The master snmpd daemon can run by itself or together with the subagent vmware-snmpd daemon. However, the subagent daemon cannot run alone. Configuring SNMP The following sections discuss SNMP configuration options for setting trap destinations, configuring management client software, security settings, and guest operating system configuration.
Chapter 7 Using SNMP with ESX Server ! Set up appropriate community names in the management software. These must correspond to the values set in the master SNMP agent’s configuration file, for example, rocommunity, trapcommunity, and trapsink. ! Load the ESX Server MIBs into the management software so you can view the symbolic names for the ESX Server variables. You can find the MIB files on VMware ESX Server, in the /usr/lib/vmware/snmp/mibs directory.
Administration Guide Table 7-1. vmware.vmwSystem variables Name Data type Description vmwProdName Display string Product name. vmwProdVersion Display string Product version. vmwProdOID ObjectID A unique identifier for this product in the VMware MIB. This ID is unique also within versions of the same product. vmwProdBuild Display string Product build number. vmware.vmwVirtMachines This group consists of virtual machine configuration information in six tables.
Chapter 7 Using SNMP with ESX Server Table 7-3. hbaTable (Continued) Name Data type Description hbaNum Display string Device number (format: scsi*). hbaVirtDev Display string Virtual device name for this adapter. hbaTgtTable Contains SCSI targets seen by this virtual machine. Table 7-4. hbaTgtTable Name Data type Description hbaTgtVmIdx (Index field) Integer Corresponds to the index of the virtual machine in vmTable. hbaTgtIdx (Index field) Integer Dummy target index.
Administration Guide Table 7-6. floppyTable (Continued) Name Data type Description fdName Display string Device number/name (/dev/fd0, etc. NULL if not present). fdConnected Display string Is the floppy drive connected (mounted)? cdromTable Contains CD‐ROM drives seen by this virtual machine. Table 7-7. cdromTable Name Data type Description cdVmIdx (Index field) Integer Corresponds to the index of the virtual machine in vmTable. cdromIdx (Index field) Integer Index into CD‐ROM table.
Chapter 7 Using SNMP with ESX Server Table 7-9. cpuTable (Continued) Name Data type Description cpuShares Integer Share of CPU allocated to virtual machine by VMkernel. cpuUtil Integer Amount of time the virtual machine has been running on the CPU (seconds). vmware.vmwResources.vmwMemory This group contains RAM information in three variables and one table. Table 7-10. vmware.vmwResources.vmwMemory Name Data type Description memSize Integer Amount of physical memory present on machine (KB).
Administration Guide vmwHBATable Disk adapter and target information table. Table 7-12. vmwHBATable Name Data type Description hbaIdx (Index field) Integer Index into table for HBA (corresponds to the order of the adapter on the physical computer). hbaName Display string String describing the disk. (format: ::) hbaVMID Integer ID assigned to running virtual machine by the VMkernel. diskShares Integer Share of disk bandwidth allocated to this virtual machine.
Chapter 7 Using SNMP with ESX Server Table 7-13. vmwNetTable (Continued) Name Data type Description pktsTx Integer Number of packets transmitted on this network adapter since network module was loaded. kbTx Integer KB sent from this network adapter since network module was loaded. pktsRx Integer Number of packets received on this network adapter since network module was loaded. kbRx Integer KB received on this network adapter since system start. vmware.
Administration Guide Table 7-15. vmware.vmwTraps (Continued) Name Data type Description vmHBLost Trap Sent when a virtual machine detects a loss in guest heartbeat. vmHBDetected Trap Sent when a virtual machine detects or regains the guest heartbeat. vmID Integer 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.
8 Using VMkernel Device Modules 8 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.
Administration Guide VMkernel Module Loader The program vmkload_mod is used to load device driver and network shaper modules into the VMkernel. vmkload_mod can also be used to unload a module, list the loaded modules and list the available parameters for each module. The format for the command is: vmkload_mod where is the name of the module binary that is being loaded.
Chapter 8 Using VMkernel Device Modules The format of is :. -e --exportsym Export all global exported symbols from this module. This allows other modules to use exported functions and variables from the loaded module. Do not use this option for normal device driver and shaper modules because there might be symbol conflicts. -s --showparam List all available module parameters that can be specified in the section of the command line.
Administration Guide Preparing to Load Modules vmkload_mod -e /usr/lib/vmware/vmkmod/vmklinux linux This command must be given before you load other device modules. It loads common code that allows the VMkernel to make use of modules derived from Linux device drivers to manage its high‐performance devices. The -e option is required so that the vmklinux module exports its symbols, making them available for use by other modules. Loading Modules vmkload_mod /usr/lib/vmware/vmkmod/e100.
Chapter 8 Using VMkernel Device Modules After you load a VMkernel device module, an entry appears in /proc/vmware/net or /proc/vmware/scsi. For example, when e100.o is loaded as described above, the entry /proc/vmware/net/vmnic0 appears, indicating there is one EEPro card controlled by the VMkernel and available as vmnic0 to the virtual machines. See “Creating and Configuring Virtual Machines” on page 39 for information on how to configure virtual machines to use VMkernel devices.
Administration Guide CAUTION Do not modify /etc/vmware/hwconfig except to add parameters, as described in this section. Use the VMware Management Interface to manage your hardware. As an example of passing a parameter to the Emulex device driver, identify the bus, slot, and function holding the first (or only) Emulex card. (Find this information in the Startup Profile pane of the Options tab.) Add a line with the format: device.vmnix.6.14.0.
9 Storage and File Systems 9 This chapter contains information about SCSI disks, accessed by local SCSI adapters, or on a Storage Area Network (SAN) by Fibre Channel adapters. Instructions given for using SCSI adapters apply to both local and Fibre Channel adapters. For additional information about configuring SANs, see the VMware SAN Configuration Guide at www.vmware.com/support/pubs/esx_pubs.html.
Administration Guide machines in nonpersistent, undoable, or append disk modes. For information on disk modes, see “Creating a New Virtual Machine” on page 39. ESX Server 2.5 supports two types of file systems: VMFS version 1 (VMFS‐1) or VMFS version 2 (VMFS‐2). VMFS‐1 is the same VMFS shipped with 1.x versions of ESX Server. The VMFS‐2 file system contains the following features that are not available with VMFS‐1: ! Ability to span multiple VMFS‐2 partitions on the same or different SCSI disks.
Chapter 9 Storage and File Systems NOTE If you use the ls command inside a ftp session, the file size might be different from the output of the ls -l command or vmkfstools -l command. This is because ftp uses 32‐bit values for file sizes, and the maximum file size it can display is 4GB. You can safely transfer any large files between ESX Server machines with a ftp session. VMFS Volumes In ESX Server 2.
Administration Guide VMFS Accessibility There are two modes for accessing VMFS volumes: public and shared. ! public – The default mode for ESX Server. With a public VMFS version 1 (VMFS‐1) volume, multiple ESX Server computers can access the VMware ESX Server file system, as long as the VMFS volume is on a shared storage system (for example, a VMFS on a storage area network). Only one ESX Server can access the VMFS volume at a time.
Chapter 9 Storage and File Systems 4 NOTE Make the appropriate changes, and click OK. You cannot change VMFS accessibility if any files are open on the VMFS volume. The attempted operation returns errors. Close any open files, and edit the VMFS volume. See “Configuring Storage: Disk Partitions and File Systems” on page 196 for additional information. Using vmkfstools The vmkfstools command supports the creation of a VMware ESX Server file system (VMFS) on a SCSI disk.
Administration Guide vmkfstools Syntax When Specifying a VMFS Volume or File The format for the vmkfstools command, when specifying a VMFS volume or file, is: vmkfstools where is an absolute path that names a directory or a file under the /vmfs directory. 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.
Chapter 9 Storage and File Systems Create a VMFS on the specified SCSI device -C --createfs [vmfs1|vmfs2] -b --blocksize #[gGmMkK] -n --numfiles # This command creates a VMFS version1 (vmfs1) or version 2 (vmfs2) file system on the specified SCSI device. NOTE When creating a VMFS volume on a LUN, you can have only one VMFS volume per LUN. For advanced users: ! Specify the block size 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.
Administration Guide Create a file with the specified size on the file system of the specified SCSI device -c --createfile #[gGmMkK] The size is specified in bytes by default, but you can specify the size in kilobytes, megabytes, or gigabytes by adding a suffix of k (kilobytes), m (megabytes), g (gigabytes) respectively.
Chapter 9 Storage and File Systems NOTE The destination device must have space for the entire size of the virtual disk, even if it is mostly free space, as the complete contents of the source disk are copied. CAUTION The vmkfstools command may fail when attempting to import plain disks created with version 2.5 or earlier of GSX Server. If vmkfstools returns an error when importing a plain disk, see “Path Name Failures When Importing GSX Server Virtual Machines” on page 66.
Administration Guide Set the VMFS on the specified SCSI device to the specified mode -F --config [public|shared|writable] NOTE In ESX Server 2 and later, private VMFS volumes are deprecated. If you have existing VMFS version 1 (VMFS‐1) or VMFS version 2 (VMFS‐2) private volumes, change the access to public. Public With public VMFS‐2 volumes, multiple ESX Server computers can access the same VMware ESX Server VMFS volume concurrently.
Chapter 9 Storage and File Systems This option adds another physical extent (designated by ), starting at the specified SCSI device. By running this option, you lose all data on . NOTE A logical VMFS‐2 volume can have at most 32 physical extents. This operation is not supported on the VMFS‐1 file system and in fact, returns an error if the specified SCSI device is formatted as VMFS‐1.
Administration Guide See “Migrating VMware Workstation and VMware GSX Server Virtual Machines” on page 63 for details on specifying the disk geometry in a virtual machine’s configuration file. Extend the specified VMFS to the specified length -X --extendfile #[gGmMkK] Use this command to extend the size of a disk allocated to a virtual machine, after the virtual machine has been created. The virtual machine that uses this disk file must be powered off when you enter this command.
Chapter 9 Storage and File Systems NOTE Use this command if you are certain that no other ESX Server is accessing the file system. Scans the specified vmhba adapter for devices and LUNs ‐s ‐‐scan NOTE VMware recommends that you use the cos-rescan.sh command rather than this option to vmkfstools. This option is useful for adapters connected to storage area networks, particularly if you are reconfiguring your SAN.
Administration Guide ESX Server does not activate a swap file after it is created. Use vmkfstools with the -w option to activate a swap file. You can set a swap file to be activated automatically after a system reboot with the Activation Policy option of the Swap Management pane in the Options tab of the Management Interface. Activate a Swap File -w --activateswapfile This command activates the specified swap file.
Chapter 9 Storage and File Systems This conversion may take several minutes. When your prompt returns, the conversion is complete. NOTE In ESX Server 2.5, private VMFS volumes are deprecated. If you have an existing VMFS version 1 (VMFS‐1) private volume, the newly created VMFS‐2 volume’s access mode is changed to public. Before starting this conversion, check the following: ! Back up the VMFS‐1 volume that is being converted. ! Make sure no virtual machines are powered on using this VMFS‐1 volume.
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.vmdk This example illustrates creating a 2GB VMFS file with the name of rh6.2.vmdk on the VMFS volume named mydisk. The rh6.2.
Chapter 9 Storage and File Systems The following example imports a GSX Server or Workstation virtual disk file into the VMFS volume on the specified SCSI device: vmkfstools -i winXP.vmdk vmhba0:6:0:1:winXP.vmdk By contrast, if you are importing directly into a raw partition, the example becomes: vmkfstools -i winXP.
Administration Guide The Hardware tab for this virtual machine appears. 3 Click Add Device to start the Add Device wizard. 4 Click Hard Disk. The Virtual Disk Type page appears. 5 262 Click System LUN/Disk to allow the virtual machine to access a physical disk stored on a LUN. VMware, Inc.
Chapter 9 Storage and File Systems 6 Specify the following: a Select Use Metadata to enable access to the disks metadata file information. b Choose the Metadata File Location. c Enter a name in the Metadata File Name field. d Select the appropriate SCSI ID in the Virtual SCSI Node list. e Choose the Compatibility of the guest operating system: Physical – Gives the guest operating system direct disk access. Virtual – Allows you to choose a disk mode for the guest operating system.
Administration Guide Each SCSI controllerʹs subdirectory contains entries for the SCSI devices on that controller, numbered by SCSI target ID and LUN (logical unit number). Run cat on each target ID:LUN pair to get information about the device with that target ID and LUN.
Chapter 9 Storage and File Systems can immediately access the necessary data when the failover occurs. See “Configuration for Clustering” on page 279 for information on clustering with ESX Server. The bus sharing setting is used to determine whether virtual machines are allowed to access the same virtual disk simultaneously. Setting Bus Sharing Options Use the VMware Management Interface to change the bus sharing settings for each virtual machine that will access the same virtual disk simultaneously.
Administration Guide To change the bus sharing setting 1 Log into the management interface as the appropriate user and be sure the virtual machine you want to configure is powered off. 2 Point to the terminal icon for the virtual machine you want to configure and click Configure Hardware. 3 Click Edit next to the appropriate SCSI controller. 4 Choose the bus sharing setting you want from the drop‐down list, and click OK.
Chapter 9 Storage and File Systems though these FC adapters are dedicated to virtual machines, the LUNs on the SANs are visible to system management agents on the service console. Configuring VMFS Volumes on SANs Make sure that only one ESX Server system has access to the SAN while you are using the VMware Management Interface to configure the SAN and format the VMFS‐2 volumes. NOTE You can have only one VMFS volume per LUN.
Administration Guide To change VMkernel configuration options 1 Log in to the VMware Management Interface as root. The Status Monitor appears. 2 Click the Options tab. 3 Click Advanced Settings. 4 To change an option, click the current value. 5 Enter the new value in the dialog box and click OK. For information on changing these settings, see “Advanced Settings” on page 205. Detecting All LUNs By default, the VMkernel scans for only LUN 0 to LUN 7 for every target.
Chapter 9 Storage and File Systems In this example, vmhba0 and vmhba2 only scan LUNs 0‐7, but vmhba1 and vmhba3 scan all LUNs that are not masked, up to LUN 255, or the maximum LUN setting reported by the adapter, whichever is less. For administrative or security purposes, use LUN masking to prevent the server from seeing LUNs that it doesn’t need to access. Refer to your documentation on disk arrays for more information.
Administration Guide ! LUN masking – With LUN masking, each LUN is assigned and accessed by a specific list of connections. Be sure that LUN masking is implemented properly and that the LUNs are visible to the HBAs on ESX Server. ! Zoning – Limits access to specific storage devices and increases security and decreases traffic over the network. If you use zoning, be sure that zoning on the SAN switch is set up properly and that all vmhba and the controllers of the disk array are in the same zone.
Chapter 9 Storage and File Systems Link Up - Ready: PortID 0x21900 Fabric Current speed 1G lpfc0t00 DID 021500 WWPN 20:00:00:60:16:3c:ad:13 WWNN 20:00:00:60:16:3c:ad:13 where: Portname: 10:00:00:00:c9:32:23:49 Adapter port name Nodename: 20:00:00:00:c9:32:23:49 Adapter node name lpfc0t00 0 (lpfc0) is the host bus adapter and 00 is the target WWPN 20:00:00:60:16:3c:ad:13 Target world wide port name (WWPN) WWNN 20:00:00:60:16:3c:ad:13 Target world wide node name (WWNN) Example Output for a QLogic
Administration Guide pbind.pl Script The pbind.pl script is located in the /usr/sbin directory. As root, type pbind.pl to see the list of options for this command. Table 9-1. pbind.pl options pbind.pl Option Description pbind.pl -A Persists bindings for all adapters. pbind.pl -D Deletes bindings for all adapters. pbind.pl -a Adds bindings for all adapters specified in . pbind.pl -d Deletes bindings for all adapters specified in . pbind.
Chapter 9 Storage and File Systems Storage SP1 SP2 FC Switch FC Switch HBA 1 HBA 2 HBA 3 Server 1 HBA 4 Server 2 Figure 9-1. HBA failover paths In the diagram in Figure 9‐1, there are multiple, redundant paths from each server to the storage device. For example, if HBA1, or the link between HBA1 and the Fibre Channel (FC) switch breaks, HBA2 takes over and provides the connection between the server and the switch. This process is called HBA failover.
Administration Guide Viewing the Current Multipathing State You can view your current multipathing configuration with the vmkmultipath -q command. The -q option displays the state of all or selected paths recognized by ESX Server. The report displayed by vmkmultipath shows the current multipathing policy for a disk and the connection state and mode for each path to the disk. The report identifies disks by their canonical name. The canonical name for a disk is the first path ESX Server finds to the disk.
Chapter 9 Storage and File Systems vmhba1:0:6 vmhba1:1:6 vmhba1:2:6 on on 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. Six paths to the disk are recognized by ESX Server. The list of paths indicates the different physical routes by which the disk can be accessed. The status of each path to the disk is indicated in the second column.
Administration Guide Type the following command to select the fixed policy for a disk, in this example, vmhba0:0:0. # vmkmultipath -s vmhba0:0:0 -p fixed ! NOTE mru – ESX Server uses the most recent path to the disk until this path becomes unavailable. That is, ESX Server does not automatically revert back to the preferred path. Most recent path (mru) is the default policy for active/passive storage devices. Use the MRU path policy for disks on active/passive storage devices.
Chapter 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. However, VMware suggests that 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.
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 can increase the standard disk TimeOutValue so that Windows will not be extensively disrupted during failover. To increase the TimeOutValue 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, and Disk.
10 Configuration for Clustering 10 In this chapter, the following sections describe how to use VMware ESX Server to provide clustered virtual machines in a variety of environments. ! “What Is Clustering?” on page 279 ! “Clustering Virtual Machines” on page 280 ! “Network Load Balancing” on page 302 What Is Clustering? Clustering provides a service through a group of servers to get high availability, scalability, or both.
Administration Guide Applications that Can Use Clustering To take advantage of clustering services, applications need to be able to recongnize clustering. Such applications can be: ! Stateless, as are Web servers and VPN servers . ! With built‐in recovery features, like those in database servers, mail servers, file servers, or print servers.
Chapter 10 Configuration for Clustering 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.5. Clustering Scenarios Several scenarios are possible for clustering in virtual machines. Cluster in a Box This scenario provides simple clustering to deal with software crashes or administrative errors. The cluster consists of multiple virtual machines on a single physical machine.
Administration Guide Virtual machine Virtual machine Cluster software Cluster software .vmdk Requests Physical machine Physical machine Figure 10-2. Two-node cluster using two physical machines; each node running clustering software. Consolidating Clusters This type of cluster combines features of the previous two types. For example, you can consolidate four clusters of two machines each to two physical machines with four virtual machines each for protection from hardware and software failures.
Chapter 10 Configuration for Clustering Virtual machine Cluster software Cluster software Virtual machine Cluster software Cluster software Virtual machine Cluster software Cluster software Physical machine Figure 10-4. Standby host using three virtual machines on a single physical machine; all running clustering software.
Administration Guide ! QLogic and Emulex HBAs in a clustered environment must be dedicated to VMkernel. 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 virtual machines emulate only the SCSI‐2 disk reservation protocol and do not support applications using SCSI‐3 disk reservations.
Chapter 10 Configuration for Clustering To create a base virtual machine in the first node NOTE 1 Access the VMware Management Interface at: https:/// 2 Log on as the user who will own the virtual machine. 3 Click Add Virtual Machine. 4 Keep the default Guest Operating System selection of Microsoft Windows 2000 Server. This example uses Microsoft Windows 2000 Server as the guest operating system. You can use another Windows operating system that supports Microsoft Cluster Service.
Administration Guide Virtual Disk Configuration You need a shared SCSI controller and shared SCSI disks for shared access to clustered services and data. To add a shared SCSI controller and shared SCSI disks 1 Access the VMware Management Interface. 2 Click the Hardware tab. 3 Click Add Device. 4 Click Hard disk. 5 Click Blank to create a new virtual disk. 6 Choose the VMFS volume on which you want to store the virtual disk. 7 Give the virtual disk image a unique name, for example, quorum.
Chapter 10 Configuration for Clustering 3 Click Add Device. 4 Click Network Adapter. 5 From the Device Binding drop‐down list choose vmnet_0. This attaches the second Ethernet adapter to a private network between the cluster nodes. 6 Click OK. You have created the first cluster node virtual machine. Installing the Guest Operating System Now you need to install Windows 2000 Advanced Server in the virtual machine you just created.
Administration Guide 2 Shut down the guest operating system and power off the virtual machine. 3 Remove the Windows 2000 Advanced Server CD from the server’s CD‐ROM drive. 4 On the management interface’s Overview page, click Manage Files. 5 Locate the vmfs folder and the vms folder. This action might take time to refresh. 6 Select the check box next to the cluster1.vmdk file. 7 Click Copy and click Paste.
Chapter 10 Configuration for Clustering 9 From the Virtual Disk Image drop‐down list, choose cluster2.vmdk. 10 Choose the virtual SCSI node to which you want to attach the virtual disk, and click Next. Virtual Disk Configuration You need a shared SCSI controller and shared SCSI disks for shared access to clustered services and data. To add a shared SCSI controller and shared SCSI disks 1 Click the Hardware tab for this virtual machine. 2 Click Add Device. 3 Click Hard Disk.
Administration Guide This attaches the second Ethernet adapter to a private network between the cluster nodes. 5 Click OK. You have created the second cluster node virtual machine. Go to the management interface’s Overview page. The management interface should list both virtual machines and show them powered off. Installing Microsoft Cluster Service To install Microsoft Clustering Service 1 Start the node 1 virtual machine.
Chapter 10 Configuration for Clustering 10 To add a cluster services account in the domain, go to Programs > Administrative Tools > Active Directory Users and Computers. 11 Add an account named cluster, check User cannot change password and Password never expires. 12 Insert the Windows 2000 Advanced Server CD in the server’s CD‐ROM drive. 13 Go to Control Panel > Add/Remove Programs. 14 Select Add/Remove Windows Components. 15 Check the Cluster Service component and click Next.
Administration Guide Running Microsoft Cluster Service Microsoft Cluster Service should operate normally in the virtual machine after it is installed. NOTE Some disk errors are recorded in the Windows event log in normal operation.
Chapter 10 Configuration for Clustering ! In “Network Device Configuration” on page 286, in Step 5 use vmnic1 instead of vmnet_0 as the device used by Ethernet Adapter 1. ! Access the virtual machine menu by clicking the arrow to the right of the virtual machine icon. Choose Configure Options. Under Verbose Options, click the click here link. Change the specifications of scsi1:1.name and scsi1:2.name to use the strict vmhba name (for example, vmhba0:1:0:1:shared1.
Administration Guide Cloning the Virtual Machine Now that you have a virtual machine with Windows 2000 Advanced Server installed, clone this virtual machine instead of creating virtual machines individually. To clone the virtual machine 1 Run sysprep.exe, which is available on the Windows 2000 CD in the \support\tools\deploy.cab file. Strips the Security ID assigned to the guest operating system and resets the machine information as well as the TCP/IP network configuration.
Chapter 10 Configuration for Clustering This concludes the cloning process. Continue with creating the second node virtual machine. Creating the Second Node Virtual Machine Follow the procedure in “Creating the First Node’s Base Virtual Machine” on page 292, noting the following differences: ! In “Virtual Disk Configuration” on page 286, Step 8, click Edit next to SCSI Controller 1 to change the bus sharing from none to physical instead of virtual.
Administration Guide NOTE 6 Choose the virtual SCSI node to which you want to attach the raw disk. NOTE 7 In ESX Server, physical disks are identified by a vmhba number. For example, vmhba0:1:2:1 means physical adapter vmhba0, target 1, LUN 2, partition 1. When the final number is :0, that indicates you are specifying the entire disk, rather than a particular partition. Shared disks must be attached to a separate SCSI controller from the system disk. Select, SCSI 1:1 Click OK.
Chapter 10 Configuration for Clustering Table 10‐1 summarizes additional, important points for using Microsoft Clustering Software with ESX Server. Table 10-1. MSCS Configuration Considerations Area Component Non‐clustered disks Virtual machine ! and swap ! (paging) file Must be on local storage, not on a SAN. Non‐clustered virtual disks (.vmdk) ! Must reside on a public VMFS volume. ! Must use VMFS label notation. ! Virtual adapter must be set to shared mode = none.
Administration Guide Table 10-1. MSCS Configuration Considerations (Continued) Area Component Clustered disks (Continued) Clustered ! non‐pass‐ through raw ! device mapping Clustered pass‐through raw device mapping Single-Host Clustering Revision must be ESX 2.5 or higher. Multi-Host Clustering Not supported Must reside on a public VMFS volume. ! Must use VMFS label notation. ! Disk must be in persistent mode. ! DeviceType must be scsi-nonpassthru-rdm.
Chapter 10 Configuration for Clustering Table 10-1. MSCS Configuration Considerations (Continued) Area Component Single-Host Clustering Multi-Host Clustering ESX Server Configuration /proc/vmware/config/Disk/UseLunReset must be set to 1. /proc/vmware/config/Disk/UseDeviceReset must be set to 0. Swap partitions must be local, not on a SAN. RDM LUNs cannot be used with ESX Server versions earlier than 2.5.2. QLogic and Emulex HBAs in a clustered environment must be dedicated to VMkernel.
Administration Guide VMFS Locking and SCSI Reservation For a shared SCSI disk that can be accessed by multiple ESX Server machines, two kinds of locking may be in use. These two kinds of locking are somewhat independent and can cause confusion. The shared SCSI disk may be on shared SCSI bus or, more likely, on a storage area network (SAN). VMFS File System Locking The first kind of locking is VMFS file system locking.
Chapter 10 Configuration for Clustering Substitute the name of the appropriate disk or VMFS in place of vmhba0:1:0:0. Locking at SCSI Disk Level The second kind of locking is locking at the SCSI disk level, which is called SCSI disk reservation. Any server connected to a SCSI disk can issue a SCSI command to reserve the disk. If no other server is reserving the disk, the current server obtains a reservation on the disk. As long as that reservation exists, no other server can access the disk.
Administration Guide Using LUN Masking to Avoid Locking Issues Locking issues are likely to happen on a SAN, where multiple users may be accessing some of the same disks or may mistakenly access a disk assigned to another user. It is helpful to use LUN masking or zoning to limit which disks are visible to each server in the system and reduce the ways in which one user can affect another user.
Chapter 10 Configuration for Clustering 3 Keep the default Guest Operating System selection of Microsoft Windows 2000 Server. NOTE This example uses Microsoft Windows 2000 Server as the guest operating system. You can substitute another Windows operating system that supports Microsoft Cluster Service. 4 Change the Display Name field to describe the virtual machine. For example, MSCS Node 1 (Portsaid).
Administration Guide To add a virtual network adapter 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 4 If all nodes of the cluster will reside on the same ESX Server machine, use vmnet_0 for the second network adapter. This allows all nodes to communicate with each other on a private virtual network connected to the vmnet_0 virtual switch. Click OK.
Chapter 10 Configuration for Clustering To clone the virtual machine using the management interface 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 On the management interface Overview tab, click Manage Files.
Administration Guide Repeat this command using a different target filename to create more than one copy. This concludes the cloning process. Now continue with creating the second node virtual machine Cloning the Virtual Machine to Another ESX Server Machine This section assumes that you are planning to run each node of an eight‐node cluster on a separate ESX Server machine. To run a different number of nodes on each ESX Server machine, adjust the procedure.
Chapter 10 Configuration for Clustering This concludes the cloning process. Continue with creating the second node virtual machine Repeat Step 3 – Step 11 on each ESX Server machine that will participate in the cluster. Creating the Second Node Virtual Machine To create a new virtual machine 1 On the management interface Overview tab, click Add Virtual Machine. 2 Keep the default Guest Operating System selection of Microsoft Windows 2000 Server.
Administration Guide NOTE If all nodes of the cluster will reside on the same ESX Server machine, use vmnet_0 for the second network adapter. This allows all nodes to communicate with each other on a private virtual network connected to the vmnet_0 virtual switch. 4 Click OK. You have finished creating and configuring the new node’s virtual machine. Go to the management interface’s Overview page. Both virtual machines should be listed and shown as powered off.
Chapter 10 Configuration for Clustering ! Primary IP Address: Address for the cluster as a whole. This is the address that the clients will use to access the cluster. ! Subnet Mask: Subnet mask of the network to which the above address belongs. ! Multicast: Check this box to enable multicast mode. NOTE ! All members of the cluster must use the same setting for this option. When you enable multicast mode, you might need to change the configuration of your physical LAN switches.
Administration Guide 310 VMware, Inc.
11 Networking 11 This chapter guides you through the basic concepts of networking in the ESX Server environment and how to set up and configure a network.
Administration Guide How VMware ESX Server Generates MAC Addresses Each virtual network adapter in a virtual machine gets a unique MAC address. ESX Server attempts to ensure that the network adapters for each virtual machine that are on the same subnet have unique MAC addresses. The algorithm used by ESX Server limits the number of virtual machines that can be running and suspended at once on a given machine.
Chapter 11 Networking or of different virtual machines) having the same predetermined generated MAC addresses and your virtual machines will start up. The guest OS must detect these duplicate MAC addresses. Ensure that on your LAN, your predetermined addresses do not conflict with each other and do not conflict with those that ESX Server has generated.
Administration Guide VMkernel Network Card Locator When network interface cards are assigned to the VMkernel, it can be difficult to map from the name of the VMkernel device to the physical network adapter on the machine. For example, if four Intel EEPro cards in a machine are dedicated to the VMkernel, these cards are called vmnic0, vmnic1, vmnic2, and vmnic3.
Chapter 11 Networking Examples findnic vmnic0 10.2.0.5 10.2.0.4 Binds VMkernel device vmnic0 to IP address 10.2.0.5 and 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, and tries to flood ping the remote machine with the IP address 10.2.0.4. Forcing the Network Driver to Use a Specific Speed The VMkernel network device drivers start with a default setting of Autonegotiate.
Administration Guide To enable the setting of the PromiscuousAllowed configuration variable 1 Click the Edit Configuration tab of the VMware Management Interface to determine which network the virtual Ethernet adapter is using. For this example, assume that the Networking section of the page shows the adapter is using vmnic0.
Chapter 11 Networking virtual machines’ resources available to the service console and allowing virtual machines to share the network adapter used by the service console. This sharing is made possible by the vmxnet_console driver, which is installed with the service console. CAUTION VMware recommends that only advanced users make these configuration changes. The steps below are easier for someone who is familiar with administering a Linux system.
Administration Guide 10.2.0.4 for the network accessed through the vmnic1 adapter, use the following command: ifconfig eth1 up 10.2.0.4 If you want an easy way to see which eth devices are added by the insmod command, add the tagName parameter to the insmod command, as shown in this example: insmod vmxnet_console devName=”vmnic1;vmnet_0” tagName= In this case, the vmxnet_console module adds the names of each of the eth devices that it created to /var/log/messages.
Chapter 11 Networking The lines you add to /etc/rc.d/rc.local would be: insmod vmxnet_console devName=”vmnic1;vmnet_0” ifup eth1 ifup eth2 Sharing the Service Console’s Network Adapter with Virtual Machines When you install and configure ESX Server, the VMkernel is not loaded, so the service console needs to control the network adapter that is eth0. When you configure ESX Server, assign the adapter that is eth0 to the service console.
Administration Guide If you are unsure what name the VMkernel has assigned to the network adapter that formerly was eth0 in the service console, determine its name using the findnic program (see “VMkernel Network Card Locator” on page 314). The next time you reboot the system, the network adapter is shared by the service console and the virtual machines. 7 To begin sharing the network adapter without rebooting the system, manually issue the same commands you added to /etc/rc.d/rc.
Chapter 11 Networking Bind together similar physical adapters whenever possible. ESX Server uses only features or capabilities common to all adapters when defining the functionality of a bonded switch. For example, ESX Server can use a hardware acceleration feature for a bond only if all adapters in the bond include that feature.
Administration Guide 2 Search /etc/vmware/devnames.conf: $ grep 2:04.0 /etc/vmware/devnames.conf 002:04.0 nic vmnic0 The device name is vmnic0. Creating a Virtual Switch You can find basic instructions for creating and modifying virtual switches in “Network Connections” on page 188. NOTE The configuration options described below are used for optimizing virtual switches for complex operating conditions. You can create and use a virtual switch without changing these options for most configurations.
Chapter 11 Networking To set the load balancing mode for bond1 to IP address load balancing 1 Log into the Service Console as root. 2 Edit /etc/vmware/hwconfig. 3 Define the load balancing mode for bond1: nicteam.bond1.load_balance_mode = “out-ip” If you previously defined the option for this switch, change the current mode value to out-ip. 4 Save the file and close it. Configuring the Bond Failure Mode You can select one physical adapter to be the primary network connection for a virtual switch.
Administration Guide This basic failure detection mode passively monitors an adapter for loss of physical connection to an external switch. You can configure ESX Server to actively search for network failures using beacon monitoring. Using Beacon Monitoring The beacon monitoring feature broadcasts beacon packets on the external network linked to the server to detect distributed connection failures. ESX Server issues beacon packets from one adapter addressed to other adapters assigned to a virtual switch.
Chapter 11 Networking 4 Save the file and close it. ESX server broadcasts beacons with the same frequency for all switches. The SwitchFailoverBeaconInterval option sets this value. The server also defines an overall failure threshold for all switches with the SwitchFailoverThreshold option, but switch_failover_threshold overrides this value for each individual switch.
Administration Guide connections. ESX Server can detect only that the link has been physically restored, but not that the port is blocked by the Spanning‐Tree check. ! Portfast Mode – Use to reduce errors caused by Spanning‐Tree checks. If you cannot disable the Spanning‐Tree Protocol for an external switch, configure the ports connected to the server to use Portfast mode. This reduces Spanning‐Tree delays, resulting in fewer false indications of link failures.
12 VMware ESX Server Resource Management 12 VMware ESX Server allows you to optimize the performance of your virtual machines by managing a virtual machine’s resource allocations. You must be the root user to manage virtual machine resources.
Administration Guide ! “Using Your NUMA System” on page 358 ! “Sizing Memory on the Server” on page 363 ! “Managing Network Bandwidth” on page 367 ! “Managing Disk Bandwidth” on page 371 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.
Chapter 12 VMware ESX Server Resource Management 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.
Administration Guide If the problem is VMkernel swapping, make sure VMware Tools is installed. Place the swap file in a different physical drive than the virtual disks. Also consider adding more physical memory to the server or migrating some virtual machines onto another ESX Server. Improving Slow Performance on Virtual Machines If slow performance is isolated on a few virtual machines, check their resource utilization before examining the service console.
Chapter 12 VMware ESX Server Resource Management 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 from the VMware Scripting API.
Administration Guide 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. The setting for high shares is twice that of normal (or four times that of low). You can specify a minimum percentage, a maximum percentage, CPU shares, or a combination of these.
Chapter 12 VMware ESX Server Resource Management you deploy an additional 15 virtual machines, these five initial virtual machines will receive a smaller share of CPU time than what they used previously. To have the users of these original five virtual machines become accustomed to this higher level of CPU time, set a maximum CPU percentage for these five virtual machines and limit the amount of CPU time they receive. Then, these users won’t see a difference when you deploy the additional virtual machines.
Administration Guide By default, the setting for high is twice that of normal, or four times that of low. For example, a virtual machine with high shares can consume twice as many CPU cycles as a virtual machine with normal shares, or four times as many CPU cycles as a virtual machine with low shares. To change these defaults, see “Using procfs” on page 339. You can use proportional‐share scheduling by itself, or in combination with CPU percentages.
Chapter 12 VMware ESX Server Resource Management maximum usage by a virtual machine. Shares represent relative importance or priority. You set shares to specify which virtual machines will get preferential treatment when ESX Server is constrained. For example, virtual machine A has a minimum CPU percentage of 20%, and a maximum CPU percentage of 50%, while virtual machine B has a minimum percentage of 30% and no specified maximum percentage.
Administration Guide 3 Define the hyperthreading option: hyperthreading = “true” If you previously defined this option, change the current value to true. 4 Save the file and close it. Configuring Hyper-Threading Options for Virtual Machines You can configure the htsharing option with the Verbose Options configuration panel. Use the complete name of the option: cpu.htsharing.
Chapter 12 VMware ESX Server Resource Management 2 Click the CPU tab. 3 Click Edit. The CPU Resource Settings dialog box appears. 4 Enter the settings you want, and click OK. You must log in as root to change resource management settings using either the management interface or procfs. Managing CPU Resources from the Service Console You can manage CPU resources by editing the virtual machine configuration (.vmx) file or using procfs.
Administration Guide sched.cpu.shares = This configuration file option specifies the initial share allocation for a virtual machine to shares. The valid range of numerical values for is 1 to 100000. You can use the values low, normal, and high. These values are converted into numbers, through the configuration options CpuSharesPerVcpuLow, CpuSharesPerVcpuNormal, and CpuSharesPerVcpuHigh, described in the next section, “Using procfs.
Chapter 12 VMware ESX Server Resource Management NOTE For SMP virtual machines, the affinity set applies to all virtual CPUs on the virtual machine. cpu.htsharing = Setting the htSharing option configures the Hyper‐Threading operation mode for the virtual machine identified by . Valid modes are: NOTE ! any – Each CPU of the virtual machine can share the server’s logical CPUs with all other virtual machines. Default value for htSharing.
Administration Guide NOTE If not enough unreserved CPU time is available in the system to satisfy a demand for an increase in min, the reservation will not be changed. /proc/vmware/vm//cpu/max Reading from this file reports the maximum CPU percentage allocated to the virtual machine identified by . Specifying a percentage to this file changes the maximum percentage allocated to the virtual machine identified by to .
Chapter 12 VMware ESX Server Resource Management NOTE ! none – Each CPU of the virtual machine requires an entire physical CPU (two logical CPUs) of the server to operate. This prevents the virtual machine from 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.
Administration Guide Examples Suppose that we are interested in the CPU allocation for the virtual machine with ID 103. To query the number of shares allocated to virtual machine 103, read the file. cat /proc/vmware/vm/103/cpu/shares The number of shares is displayed. 1000 This indicates that virtual machine 103 is currently allocated 1,000 shares. To change the number of shares allocated to virtual machine 103, simply write to the file. Note that you need root privileges to change share allocations.
Chapter 12 VMware ESX Server Resource Management Figure 12-1. Status Monitor tab The System Summary section shows systemwide information. The Virtual Machines section below it shows information for particular virtual machines. You can read the current CPU statistics for a virtual machine from its status file on the service console.
Administration Guide The output above is shown with additional line breaks, to avoid wrapping long lines. All times are reported in seconds, with millisecond resolution. Min and max percentages are reported as a percentage of a single processor. Figure 12-2. The columns are described in Table 12-1. Table 12-1. CPU statistics Name Description vcpu Virtual CPU identifier. vm Virtual machine identifier. name Display name associated with the virtual machine.
Chapter 12 VMware ESX Server Resource Management time it has consumed about 265 seconds of processor time, including about 3 seconds of ESX Server system time (such as processing interrupts on behalf of the virtual machine). The virtual CPU is not currently waiting, but has waited for a total of about 52 seconds since it has powered on. Together, both of the virtual machine’s virtual CPUs are allowed to use between 0 and 2 physical processors (min=0% and max=200%).
Administration Guide Allocating Memory Resources Three parameters control the allocation of memory resources to each virtual machine: ! Minimum size – min The minimum size is a guaranteed lower bound on the amount of memory that is allocated to the virtual machine, even when memory is overcommitted. The system uses an admission control policy to enforce this guarantee. You cannot power on a new virtual machine if there isn’t sufficient memory to reserve its minimum size.
Chapter 12 VMware ESX Server Resource Management Setting Memory Minimum, Maximum, and Shares You can set a memory minimum, memory maximum, and shares to manage memory resources for your virtual machines. Memory minimums and maximums specify absolutes, an absolute minimum or maximum memory usage by a virtual machine. Shares, on the other hand, represent relative importance or priority. You set shares to specify which virtual machines will get preferential treatment when ESX Server is overcommitted.
Administration Guide NOTE To create SMP virtual machines with ESX Server, you must also have purchased the VMware Virtual SMP for ESX Server product. For more information on the VMware Virtual SMP for ESX Server product, contact VMware, Inc. or your authorized sales representative. Swap space must be reserved on disk for the remaining virtual machine memory—that is the difference between the maximum and minimum settings.
Chapter 12 VMware ESX Server Resource Management Virtual machines that are not actively using their allocated memory automatically have their effective number of shares reduced, by levying a tax on idle memory. This “memory tax” prevents virtual machines from hoarding idle memory. A virtual machine is charged more for an idle page than for a page that it is actively using. The MemIdleTax configuration option provides explicit control over the policy for reclaiming idle memory.
Administration Guide Swapping is used to forcibly reclaim memory from a virtual machine when no vmmemctl driver is available. This might be the case if the vmmemctl driver was never installed, has been explicitly disabled, is not running (for example, while the guest operating system is booting), or is temporarily unable to reclaim memory quickly enough to satisfy current system demands. Standard demand paging techniques swap pages back in when the virtual machine needs them.
Chapter 12 VMware ESX Server Resource Management technique to securely eliminate redundant copies of memory pages. With memory sharing, a workload running in virtual machines often consumes less 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.
Administration Guide The Memory Resource Settings dialog box appears. 4 Enter the settings, and click OK. Log in as root to change resource management settings using either the management interface or procfs. Managing Memory Resources from the Service Console You can 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.
Chapter 12 VMware ESX Server Resource Management For example, if you created a virtual machine with a maximum memory of 256MB, and with its shares settings as normal, this virtual machine has 10 times 256, or 2560 shares. Similarly, a virtual machine with a maximum memory of 1GB with a normal share setting, has 10240 shares. sched.mem.maxmemctl = Specifies the maximum amount of memory that can be reclaimed from the virtual machine using vmmemctl to be MB.
Administration Guide current target size, memory overhead for virtualization and the amount of allocated memory actively in use. All memory sizes are reported in kilobytes. /proc/vmware/sched/mem Reading from this file reports the memory status information for all non‐system virtual machines in the entire system as well as several aggregate totals. Writing the string realloc to this file causes an immediate memory reallocation. Memory is normally reallocated periodically every MemBalancePeriod seconds.
Chapter 12 VMware ESX Server Resource Management This ESX Server option specifies the periodic time interval, in seconds, for automatic memory reallocations. Reallocations are also triggered by significant changes in the amount of free memory. The default is 15 seconds. /proc/vmware/config/Mem/SamplePeriod This ESX Server option specifies the periodic time interval, measured in seconds of virtual machine virtual time, over which memory activity is monitored in order to estimate working set sizes.
Administration Guide 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. Figure 12-3. Status Monitor tab The System Summary section shows systemwide information. The Virtual Machines section below it shows information for particular virtual machines.
Chapter 12 VMware ESX Server Resource Management 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. The columns are described in Table 12‐2. Table 12-2. Memory statistics vm Virtual machine identifier. mctl? vmmemctl driver active?. shares Memory shares associated with the virtual machine. min Minimum size. max Maximum size. size Current size. sizetgt Target size.
Administration Guide the virtual machine is approximately 187MB. About 14MB of overhead memory is currently being used for virtualization, out of a maximum of 54MB. Cautions VMware supplies vmmemctl drivers for Windows Server 2003, Windows XP, Windows 2000, Windows NT 4.0, and Linux. The appropriate vmmemctl driver is installed when you install VMware Tools in the guest operating system.
Chapter 12 VMware ESX Server Resource Management Obtaining NUMA Statistics This command checks for the presence of a NUMA system.
Administration Guide Here’s an example of what you might see: . . . Node Total-/MB 0 836022/3265 1 2621440/10240 Totals FreeHi/MB 98304/384 2601144/10160 2699448/10544 FreeLow/MB Reserved/MB 737528/2880 34574/135 0/0 0/0 737528/2880 Kernel/MB 190/0 20296/79 In this example, the total memory managed by the VMkernel for the NUMA nodes is listed in the Totals row. This amount might be smaller than the total amount of physical memory on the server machine.
Chapter 12 VMware ESX Server Resource Management other nodes. ESX Server rebalances the nodes by changing a virtual machine’s “home” NUMA node from the overutilized node to an underutilized node. When the NUMA nodes are balanced, ESX Server again attempts to maximize use of “local memory.” For more information, refer to the numa man page. You can also set affinity manually as described in the next section.
Administration Guide where comprises CPU numbers on a single NUMA node. This entry binds all virtual CPUs in this virtual machine to the NUMA node. For example, typing sched.cpu.affinity = 4,5,6,7 binds this virtual machine to the NUMA node that has physical CPUs 4 through 7. See “Editing the Virtual Machine Configuration File” on page 337. ! procfs interface on the service console /proc/vmware/vm//cpu/affinity Write a comma‐separated list of the CPU numbers on a single NUMA node.
Chapter 12 VMware ESX Server Resource Management ! procfs interface on the service console: /proc/vmware/vm//mem/affinity Write the number of the NUMA node. 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. You want the virtual machine to run only on node 1.
Administration Guide with testing to confirm that memory sizes computed according to these guidelines achieve the results you want. ESX Server uses a small amount of memory for its virtualization layer, additional memory for the service console, and all remaining memory for running virtual machines. The following sections explain each of these uses and provide a quantitative sizing example. Server Memory ESX Server 2.5 uses approximately 24MB of system memory for its virtualization layer.
Chapter 12 VMware ESX Server Resource Management 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. By default, virtual machines operate at their maximum allocation, unless memory is overcommitted.
Administration Guide Memory Overcommitment In many consolidated workloads, it is rare for all virtual machines to be actively using all of their memory simultaneously. Typically, some virtual machines are lightly loaded, while others are more heavily loaded, and relative activity levels generally vary over time. In such cases, it might be reasonable to overcommit memory to reduce hardware memory requirements.
Chapter 12 VMware ESX Server Resource Management If memory sharing achieves a 10 percent savings (410MB), the total memory overhead drops to only 510MB. If memory sharing achieves a 25 percent savings (1GB), the virtualized workload actually consumes 104MB less memory than it would on eight physical servers. It may also make sense to overcommit memory.
Administration Guide 2 Click the Network tab. 3 Click Edit. 4 The Network Resource Settings dialog box appears. 5 Enter the settings, and click OK. For information on these settings, see “Configuring a Virtual Machine’s Networking Settings” on page 100. You must log in as root to change resource management settings using either the management interface or procfs.
Chapter 12 VMware ESX Server Resource Management Contains network filtering status information, including a list of all available filter classes and, for each virtual machine with attached filters, its list of attached filter instances. Read the file with cat to see a quick report on network filtering status. /proc/vmware/filters/xmitpush Command file used to add a new transmit filter instance to a virtual machine.
Administration Guide second, maximum burst size of bytes, and an optional peak bandwidth enforcement period in milliseconds. Each parameter can optionally use the suffix k (1k = 1024) or m (1m = 1024k). maxq Dynamically set the maximum number of queued packets to . reset Dynamically reset shaper statistics. Examples Suppose you want to attach a traffic shaper to limit the transmit bandwidth of the virtual machine with ID 104.
Chapter 12 VMware ESX Server Resource Management 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.
Administration Guide Managing Disk Bandwidth from the Management Interface You can 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. To change disk bandwidth settings 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.
Chapter 12 VMware ESX Server Resource Management To edit configurations parameters in the management interface 1 Click the arrow to the right of the terminal icon and select Configure Options in the Virtual Machine menu. 2 In the Options pane, in the Verbose Options section, click here. 3 Click Add to add a new configuration parameter or click in the text field to edit an existing parameter. 4 Click OK.
Administration Guide Managing Disk Bandwidth from the Service Console Use the following guidelines for the service console commands to monitor and manage allocation of disk bandwidth on an ESX Server computer. /proc/vmware/vm//disk/vmhba 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.
Index Index A Access SNMP controls 230 access to configuration file 181 Accessibility of virtual disks 264 activation policy swap file 204 adapters running vmkpcidivy after changing 185 Affinity set 333 Apache server and the VMware Management Interface 138 API VmPerl 52, 153 Append disk mode 110 ASCII characters 39, 81 Authentication 180 availability report 213 B Backup 151 creating stable disk images for 153 Beacon monitoring 324 Bind Outbound Adapters list 189 binding adapters 320 Bootup, loading VMker
Administration Guide passing from console operating system to guest 52 Commit 253 Communication notes on adding and removing adapters 185 DHCP 168 Directories from console operating system to guest 52 Configuration managing remotely 141 Directory SNMP agent 230 virtual machine 40, 73, 140 Configuration options for SANs 267–269 Configuring a Virtual Machine’s Startup and Shutdown Options 124 Console operating system 167 Copy creating 144 Disk bandwidth managing from the management interface 372 managin
Index FAStT storage configuring for failover in a cluster 309 File manager 141 TCP/IP port 183 HTTPS TCP/IP port 183 Hyper-Threading 97 cut, copy and paste 142 enabling 335 renaming files and folders 143 htSharing option 336 setting permissions 143 Files Startup Profile 188 managing remotely 141 Filters virtual machines 336 using 335 network 367 findnic 169, 314 Floppy disk image file 118 Folder I creating 144 For 201 FTP 246 virtual machine 252 Installation ID virtual machine 86 Import of
Administration Guide service console messages 212 VMkernel messages 211 VMkernel warnings 210 LUN 201 LUNs detecting 268 setting multipathing policy for 275 VMFS volumes on 251 M MAC address setting manually 311 machine.
Index vmnet adapter 108 vmnic adapter 107 Network driver Primary adapter 323 proc interface 178–179 Processor manual speed settings 315 affinity set 333 vlance 108 scheduling virtual machine use of 331 vmxnet 108 Network label 320 NFS 246 nfshaper 243 NIC teaming ??–326 Node in clustering configuration 279 Nonpersistent disk mode 110 NUMA node 358–363 automatic optimization 360 manual optimization 361–363 O SMP virtual machines 61 virtual 61 Promiscuous mode 315 PXE boot 53 R RAID file system mana
Administration Guide S CPU 331 SANs 266–270 memory 346 configuration options 267–269 persistent bindings 270 troubleshooting 269–270 scp 246 Scripts running during power state changes 71 VMware Tools and 162 SCSI 264 bus sharing 265–266 file system management 245 reservation in clustering configuration 301 target IDs 263 SCSI disk reservation 301 Security 180 disks in clustering configuration 283 virtual disks 264 sharing the SCSI bus 264 Shut down server 221 using guest operating system service 50 vi
Index Speed U setting for network driver 315 SSH Undoable TCP/IP port 183 Startup Profile Hyper-Threading 335 String passing from console operating system to guest 52 Suspend 89, 165 location of suspended state file 123 swap file activation policy 204 capacity 203 name 203 disk mode 110 User groups 21 UUID modifying 75 V Variables SNMP 231–238 Verbose Options Hyper-Threading 336 Veritas Cluster Service 279 Virtual disk 41 exporting 68, 163 volume 203 Switches sharing 264 Virtual Machine virtual 32
Administration Guide console 185 Virtual Machine Wizard 40 Virtual machines example commands 259 special power options 157 Virtual network 316 Virtual switches 320 extend a VMFS volume 256 beacon monitoring 324 failover 323 load balancing 322 vlance network driver 108 VMFS 249 default block size 251 extending a VMFS-2 volume across multiple partitions 254 extend an existing logical VMFS-2 volume 254 import contents of virtual, plain or raw disks to the service console 252 log files and troubleshooting
Index browsers required 84 VMware Tools changing virtual machine power state 88 and SNMP 225 configuration options 122 choosing scripts 162 configuring for Windows systems 82 installing 43, 44 connected users 129 running scripts during power state changes 71 build number 164 controls 86–94 settings 159 creating a new virtual machine 39– 42 starting automatically in Linux guest 48 deleting a virtual machine 136–137 editing a configuration 95 event log 130 host status monitor 84 launching remo
Administration Guide 384 VMware, Inc.
4 Using the VMware Remote Console 4 The VMware Remote Console gives you a direct window from a management workstation into an individual virtual machine running under VMware ESX Server.
Administration Guide Starting the Remote Console Select the appropriate procedure for your remote workstation operating system. To start the Remote Console on Windows 1 Start the remote console program. Select: Start > Programs > VMware > VMware Remote Console 2 3 Fill in the dialog box fields with information to connect to the virtual machine: ! Host name (or IP address) ! Your user name ! Your password Click Connect.
Chapter 4 Using the VMware Remote Console 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. Instead of using physical buttons to turn this computer on and off, use buttons located at the top of the VMware console window. You can also reset the virtual machine, suspend a virtual machine, and resume a suspended virtual machine. Figure 4-1.
Administration Guide Similarly, when you power off the virtual machine, you can shut down the guest operating system, which gracefully closes applications and shuts the guest operating system down, or turn off the virtual machine, which is the same as pressing the power button on a physical computer. All the power options are available on the Power menu. Each menu item corresponds to a button on the toolbar and opens a submenu containing the associated options.
Chapter 4 Using the VMware Remote Console Option for Resuming a Virtual Machine Choose from the following options when resuming a virtual machine: ! Resume Then Run Script – Resumes the suspended virtual machine, and executes the associated script. This is the same as clicking Resume on the toolbar, unless a script is not associated with resuming a virtual machine. ! Resume Virtual Machine – Resumes the suspended virtual machine.
Administration Guide Figure 4-4. VMware Tools Properties: Options tab ! Time synchronization – Specify whether to synchronize the time in the guest operating system with the time in the service console. NOTE Synchronize the time in the guest operating system with the time in the service console only when the time in the guest is earlier than the time in the service console.
Chapter 4 Using the VMware Remote Console Connecting Devices with VMware Tools You can enable or disable removable devices in the Devices tab. Figure 4-5. VMware Tools Properties: Devices tab The devices you can enable or disable include the server machine’s floppy disk drive, the CD‐ROM drive, and the virtual network interface card. You can also set these options from the Devices menu of the ESX Server remote console window. VMware, Inc.
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. Figure 4-6. VMware Tools Properties: Scripts tab 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. Table 4-1.
Chapter 4 Using the VMware Remote Console 3 ! To edit a script, click Edit. The script opens in your default editor to make your changes. ! To test the script, click Run Now. ! To disable the running of a script, deselect the Use Script check box. 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 optional.
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: ! VMware Tools build number, which lets you verify that your VMware Tools version matches the VMware ESX Server version you are running. It is useful when you request support. ! An indication as to whether the VMware guest operating system service is running.
Chapter 4 Using the VMware Remote Console Cutting, Copying, and Pasting Make sure you installed and started VMware Tools in your virtual machine. In a Windows guest operating system, a VMware Tools icon appears in the system tray when VMware Tools is running. When VMware Tools is running, you can copy and paste text between applications in the virtual machine and on your management workstation or between two virtual machines. Use the normal hot keys or menu choices to cut, copy, and paste.
Administration Guide Figure 4-8. Virtual machine suspended You can restore a suspended virtual machine in two ways: ! With a remote console connected to that virtual machine, click Resume on the toolbar. ! With the VMware Management Interface connected to the virtual machine’s server, click the pause button ( ) for that virtual machine. ! You can also set your virtual machine so it always resumes in the same state. See “Enabling Repeatable Resume” on page 90.