You are on page 1of 384

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. 6,397,242, 6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156, 6,795,966, 6,880,022, 6,961,941, 6,961,806 and 6,944,699; patents pending. VMware, the VMware boxes logo and design, Virtual SMP and VMotion are registered trademarks or trademarks of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.

VMware, Inc. 3145 Porter Drive Palo Alto, CA 94304 www.vmware.com


2 VMware, Inc.

Contents

Contents

P Preface 19
AboutThisBook 20 IntendedAudience 20 DocumentFeedback 20 ConventionsandAbbreviations 20 AbbreviationsUsedinGraphics 20 TechnicalSupportandEducationResources 21 SelfServiceSupport 21 OnlineandTelephoneSupport 22 SupportOfferings 22 VMwareEducationServices 22 ReportingProblems 22

1 IntroductiontoVMwareESXServer 25
VMwareESXServerSystemArchitecture 25 Virtualization 26 CPUVirtualization 27 MemoryVirtualization 27 DiskVirtualization 27 NetworkVirtualization 27 PrivateVirtualEthernetNetworks(VMnets) 28 VirtualizationataGlance 28 SoftwareCompatibility 29 ServiceConsole 30 ServiceConsoleFunctions 30 ServiceConsoleProcessesandFiles 30 UsingVMwareESXServer 31 FamiliarizingYourselfwithESXServer 32 WorkingWithESXServer 35

2 CreatingandConfiguringVirtualMachines 39
CreatingaNewVirtualMachine 39

VMware, Inc.

Administration Guide

InstallingaGuestOperatingSystemandVMwareTools 43 InstallingaGuestOperatingSysteminaVirtualMachine 43 InstallingaGuestOperatingSystemonaFormattedRawDisk 44 InstallingVMwareToolsintheGuestOperatingSystem 44 StartingVMwareToolsAutomatically 48 UsingtheVMwareGuestOperatingSystemService 49 SynchronizingtheTimeBetweentheGuestandServiceConsoles 50 ShuttingDownandRestartingaVirtualMachine 50 ShuttingDownorRestartingaVirtualMachinefromtheVMware ManagementInterface 51 ShuttingDownorRestartingaVirtualMachinefromtheCommand Line 51 ExecutingCommandstoHaltorRebootaVirtualMachine 51 PassingaStringfromtheServiceConsoletotheGuestOperating System 52 ExampleofPassingaStringfromtheServiceConsoletotheGuest 52 UsingPXEwithVirtualMachines 53 ConfiguringaVirtualMachinetoUsetheLSILogicSCSIAdapter 55 AddingtheAdaptertotheVirtualMachinesConfigurationFile 55 ConfiguringtheLSILogicSCSIAdapterinaWindowsGuestOperating System 57 ConfiguringtheLSILogicSCSIAdapterinaLinuxGuestOperating System 58 Importing,Upgrading,andExportingVirtualMachines 60 ConfiguringaVirtualMachinetoUseMorethanOneVirtualProcessor 60 WindowsServer2003GuestOperatingSystems 61 Windows2000GuestOperatingSystems 61 LinuxGuestOperatingSystems 61 DowngradingtoOneVirtualProcessor 62 MigratingOlderESXServerVirtualMachines 62 UpgradingWindowsServer2003GuestOperatingSystemsCreatedbyESX Server1.5.2 62 RunningESXServer1.5VirtualMachinesinLegacyMode 63 UsingtheLSILogicSCSIAdapter 63 MigratingVMwareWorkstationandVMwareGSXServerVirtual Machines 63 DiskGeometryFailuresWhenImportingGSXServerVirtualMachines 65 PathNameFailuresWhenImportingGSXServerVirtualMachines 66 ImportingaGSXServerorWorkstationVirtualMachine 66 ExportingVirtualMachines 68 PreparingtoUsetheRemoteManagementSoftware 69
4 VMware, Inc.

Contents

RegisteringYourVirtualMachines 69 InstallingtheRemoteConsoleSoftware 70 ThirdPartySoftwareCompatibility 71 ConfiguringaVirtualMachineforUsewithCitrixMetaFrameXP 71 ExecutingScriptsWhentheVirtualMachinesPowerStateChanges 71 IssuestoConsider 72 ConfiguringVirtualMachines 73 RecommendedConfigurationOptions 74 SleepWhenIdle 74 OptimizingDiskAccessFailureModesinWindowsVirtualMachines 74 ModifyingtheSMBIOSUUID 75 GeneratingtheUUIDAutomatically 75 ComparingtheGeneratedUUIDtoConfigurationFileParameters 76 SettingtheUUIDforaVirtualMachineThatIsNotBeingMoved 77 SettingtheUUIDforaVirtualMachineThatIsBeingMoved 77 EnablingthePhysicalHardwaresOEMIDtoBeSeenbytheVirtual Machine 78

3 UsingtheVMwareManagementInterface 79
RunningtheVMwareManagementInterface 80 ConfiguringtheStatisticsPeriodfortheVMwareManagementInterface 81 UsingInternetExplorer6.0toAccesstheVMwareManagementInterface 82 LaunchingtheRemoteConsolefromtheManagementInterfaceonan EncryptedServer 82 ConnectingtotheManagementInterfaceOnaProxyServer 83 ConnectingtotheManagementInterfaceWithoutaProxyServer 84 LoggingIntotheVMwareManagementInterface 84 UsingtheStatusMonitor 84 ViewingSummaryInformationAboutVMwareESXServer 85 ViewingSummaryInformationAboutVirtualMachinesonVMwareESX Server 86 ConnectingtoaVirtualMachinewiththeVMwareRemoteConsole 86 UsingtheVirtualMachineMenu 86 ChangingthePowerStateofaVirtualMachine 88 SuspendingandResumingVirtualMachines 89 SettingtheSuspendDirectory 89 EnablingRepeatableResume 90 ViewingInformationAboutaVirtualMachine 92 DownloadingRemoteManagementPackages 92 CreatingaNewVirtualMachine 93

VMware, Inc.

Administration Guide

UnregisteringaVirtualMachine 93 DeletingaVirtualMachine 93 ConfiguringVMwareESXServer 93 UsingCommonControls 93 ConfiguringaVirtualMachine 94 EditingaVirtualMachinesConfiguration 95 ConfiguringaVirtualMachinesCPUUsage 96 UnderstandingPerformanceValues 96 UnderstandingResourceValues 97 ModifyingCPUValues 97 ConfiguringaVirtualMachinesMemoryUsage 97 UnderstandingPerformanceValues 98 UnderstandingResourceValues 98 ModifyingMemoryValues 99 ConfiguringaVirtualMachinesDiskUsage 99 UnderstandingPerformanceValues 100 UnderstandingResourcesValues 100 ModifyingDiskValues 100 ConfiguringaVirtualMachinesNetworkingSettings 100 EnablingTrafficShaping 101 ConfiguringaVirtualMachinesHardware 102 ConfiguringaVirtualMachinesFloppyDrive 103 ConfiguringaVirtualMachinesDVDROMorCDROMDrive 104 ConfiguringaVirtualMachinesMemoryandVirtualProcessors 105 ConfiguringaVirtualMachinesVirtualNetworkAdapters 107 ConfiguringaVirtualMachinesSCSIControllers 109 ConfiguringaVirtualMachinesVirtualDisks 109 ConfiguringaVirtualMachinesDisplaySettings 111 ConfiguringaVirtualMachinesGenericSCSIDevice 111 AddingaVirtualDisktoaVirtualMachine 112 AddingaVirtualNetworkAdaptertoaVirtualMachine 115 AddingaVirtualDVD/CDROMDrivetoaVirtualMachine 117 AddingaVirtualFloppyDrivetoaVirtualMachine 118 AddingaGenericSCSIDevicetoaVirtualMachine 120 AddingaTapeDrivetoaVirtualMachine 121 RemovingHardwarefromaVirtualMachine 122 SettingStandardVirtualMachineConfigurationOptions 122 SettingStartupandShutdownOptionsforaVirtualMachine 123 SettingStartupandShutdownOptions 124

VMware, Inc.

Contents

SettingStartupandShutdownOptionsbyModifyingtheConfigurationFile Directly(AdvancedUsersOnly) 126 ViewingaListofConnectedUsers 129 ViewingaLogofaVirtualMachinesEvents 130 ModifyingVirtualMachinePeripherals 131 AddingMorethanSixSCSIVirtualDiskstoaVirtualMachine 131 UsingaPhysical(Raw)DiskinaVirtualMachine 132 UsingParallelPortsinaVirtualMachine 133 UsingSerialPortsinaVirtualMachine 134 UsingDiskModes 135 DeletingaVirtualMachineUsingtheVMwareManagementInterface 136 ManagingESXServerResources 137 ConfiguringVMwareESXServer 137 LoggingOutoftheVMwareManagementInterface 138 UsingtheApacheWebServerwiththeManagementInterface 138 SettingaMIMETypetoLaunchtheVMwareRemoteConsole 139 SettingtheMIMETypeinNetscape7.0andMozilla1.x 139 EditingaVirtualMachinesConfigurationFileDirectly 140 ChangingYourVirtualSCSIAdapter 141 UsingtheVMwareManagementInterfaceFileManager 141 SettingPermissionsforOwnersofVirtualMachines 144 CreatingaFlagshipUser 145 RegisteringandUnregisteringVirtualMachines 145 RegisteringaVirtualMachine 146 UnregisteringaVirtualMachine 147 RunningManyVirtualMachinesonESXServer 148 IncreasingtheReservedMemoryfortheServiceConsole 148 AllocatingCPUResourcestotheManagementInterface 148 ChangingDefaultParametersintheconfigFile 149 IncreasingMemorytotheApacheProcess 149 IncreasingtheTimeoutValueforthevmwareauthdProcess 150 IncreasingMemoryforthevmwareserverdProcess 150 RunningManyVirtualMachineswithaSignificantCPULoad 150 AvoidingManagementInterfaceFailureswhenManyVirtualMachinesAre Registered 151 BackingUpVirtualMachines 151 UsingTapeDriveswithVMwareESXServer 152 BackingUpfromWithinaVirtualMachine 152 BackingUpVirtualMachinesfromtheServiceConsole 153 ProvidingOptimumDataIntegrityInVirtualMachineBackupsWithout Downtime 153
VMware, Inc. 7

Administration Guide

UsingHardwareorSoftwareDiskSnapshots 153 UsingNetworkBasedReplicationTools 154

4 UsingtheVMwareRemoteConsole 155
UsingtheRemoteConsole 155 StartingtheRemoteConsole 156 RunningaVirtualMachineUsingtheRemoteConsole 157 SpecialPowerOptionsforVirtualMachines 157 OptionsforPoweringOffaVirtualMachine 158 OptionsforSuspendingaVirtualMachine 158 OptionforResumingaVirtualMachine 159 OptionsforResettingaVirtualMachine 159 VMwareToolsSettings 159 SettingOptionswithVMwareTools 159 ConnectingDeviceswithVMwareTools 161 ChoosingScriptsforVMwareToolstoRunDuringPowerState Changes 162 ShrinkingVirtualDiskswithVMwareTools 163 ViewingInformationAboutVMwareTools 164 InstallingNewSoftwareInsidetheVirtualMachine 164 Cutting,Copying,andPasting 165 SuspendingandResumingVirtualMachines 165 ShuttingDownaVirtualMachine 166

5 UsingtheVMwareServiceConsole 167
CharacteristicsoftheVMwareServiceConsole 167 UsingDHCPfortheServiceConsole 168 ManagingtheServiceConsole 168 ConnectingtotheServiceConsole 168 CommandsSpecifictoESXServer 169 IdentifyingNetworkCards 169 ManagingaVMwareESXServerFileSystem 169 AutomaticallyMountingVMFSVolumes 170 LoadingVMkernelDeviceModules 170 CommonLinuxCommandsUsedontheServiceConsole ManipulatingFiles 170 FindingandViewingFiles 172 ManagingtheComputerandItsUsers 173 SettingFilePermissionsandOwnership 175

170

VMware, Inc.

Contents

SwitchingUserNames 177 TheprocFileSystem 177 GettingHelpforServiceConsoleCommands 180 AuthenticationandSecurityFeatures 180 AuthenticatingUsers 180 UsingYourOwnSecurityCertificateswhenSecuringYourRemote Sessions 182 DefaultPermissions 182 TCP/IPPortsforManagementAccess 182 HighSecurity 183 MediumSecurity 183 LowSecurity 183 UsingDevicesWithESXServer 184 SupportingGenericTapeandMediaChangers 184 Editingthevmwaredevice.map.localFile 184 FindingDiskControllers 184 WhenYouChangeStorageAdapters 185 EnablingUserstoViewVirtualMachinesThroughtheVMwareRemote Console 185

6 AdministeringESXServer 187
StartupProfile 188 NetworkConnections 188 CreatingandEditingVirtualSwitches 189 CreatingPortGroups 190 DisablingvmkernelVLANTagging 190 ConfiguringPhysicalAdapters 191 ConfiguringNetworkSpeedandDuplexSettings 192 UsersandGroups 192 AddingUsersandGroups 192 EditingandRemovingUsersandGroups 193 SecuritySettings 194 UsingCustomSecuritySettings 195 SNMPConfiguration 196 LicensingandSerialNumbers 196 StorageManagement 196 ConfiguringStorage:DiskPartitionsandFileSystems 196 CreatingaDiskPartition 197 EditingaDiskPartition 199 SettingtheVolumesAccessMode 200

VMware, Inc.

Administration Guide

ChangingtheMaximumSizeofaFileAllowedbyVMFS 200 SpanningaVMFSvolume. 200 ConvertingaPartitiontoVMFS2 200 RemovingaDiskPartition 201 ViewingFailoverPathsConnections 201 ConfiguringFailoverPolicies 202 ConfiguringFailoverPaths 203 ConfiguringaSwapFile 203 AdapterBindings 204 AdvancedSettings 205 ServiceConsoleSettings 206 ConfiguringtheServiceConsolesProcessorUsage 207 ConfiguringtheServiceConsolesDiskUsage 208 SystemLogsandAvailabilityReport 209 ViewingVMkernelWarnings 210 ViewingVMkernelMessages 211 ViewingServiceConsoleLogs 212 ViewingtheAvailabilityReport 213 HowMemoryIsUtilized 214 SystemSummary:PhysicalMemory 214 Memory 214 SystemSummary:ReservedMemory 215 VirtualMachines:VirtualMachineSummary 215 VirtualMachines:VirtualMachineName 216 VirtualMachinesStartupandShutdown 217 SystemConfigurationSettings 217 EnablingtheSystemsConfigurationSettings 218 DisablingtheSystemsConfigurationSettings 220 SpecifyingtheOrderInWhichVirtualMachinesStart 220 EditingtheStartupSequenceforVirtualMachines 220 RebootingorShuttingDowntheServer 221

7 UsingSNMPwithESXServer 223
UsingSNMPtoMonitortheComputerRunningESXServer 223 InformationAboutthePhysicalComputer 224 InformationAbouttheVirtualMachines 224 SNMPTraps 225 OverviewofSettingUpESXServerSNMP 226 InstallingtheESXServerSNMPAgents 226

10

VMware, Inc.

Contents

ConfiguringtheESXServerAgent 227 ConfiguringtheESXServerAgentThroughtheVMwareManagement Interface 227 ConfiguringtheESXServerAgentfromtheServiceConsole 228 ConfiguringtheDefaultSNMPDaemon 228 StartingtheSNMPAgentsAutomatically 229 StartingtheSNMPAgentsManually 229 ConfiguringSNMP 230 ConfiguringSNMPTrapDestinations 230 ConfiguringSNMPManagementClientSoftware 230 ConfiguringSNMPSecurity 231 UsingSNMPwithGuestOperatingSystems 231 VMwareESXServerSNMPVariables 231 vmware.vmwSystem 231 vmware.vmwVirtMachines 232 vmware.vmwResources 234 vmware.vmwResources.vmwMemory 235 vmware.vmwResources.vmwHBATable 235 vmware.vmwResources.vmwNetTable 236 vmware.vmwProductSpecific 237 vmware.vmwProductSpecific.vmwESX 237 vmware.vmwProductSpecific.vmwESX.esxVMKernel 237 vmware.vmwTraps 237 vmware.vmwOID 238 vmware.vmwExperimental 238

8 UsingVMkernelDeviceModules 239
ConfiguringYourServertoUseVMkernelDeviceModules 239 LoadingVMkernelDeviceModules 239 VMkernelModuleLoader 240 Options 240 Parameters 241 Examples 241 PreparingtoLoadModules 242 LoadingModules 242 OtherInformationaboutVMkernelModules 243 ControllingVMkernelModuleLoadingDuringBootup 243 CustomizingParametersofVMkernelDeviceDriverModulesonStartup 243 CustomizingLoadingofVMkernelDeviceDriverModulesonStartup 244

VMware, Inc.

11

Administration Guide

9 StorageandFileSystems 245
FileSystemManagementonSCSIDisksandRAID 245 ViewingandManipulatingFilesinthe/vmfsDirectory 246 VMFSVolumes 247 LabellingVMFSVolumes 247 VMFSAccessibility 248 VMFSAccessibilityonaSAN 248 ChangingStorageConfigurationOptions 248 Usingvmkfstools 249 vmkfstoolsCommandSyntax 249 vmkfstoolsSyntaxWhenSpecifyingaSCSIDevice 249 vmkfstoolsSyntaxWhenSpecifyingaVMFSVolumeorFile 250 vmkfstoolsOptions 250 BasicvmkfstoolsOptions 250 CreateaVMFSonthespecifiedSCSIdevice 251 ListtheattributesofaVMFSvolumeorarawdiskmapping 251 CreateafilewiththespecifiedsizeonthefilesystemofthespecifiedSCSI device 252 ExportthecontentsofthespecifiedfileonthespecifiedSCSIdevicetoa virtualdiskonthefilesystemoftheserviceconsole 252 ImportthecontentsofaVMwarevirtual,plain,orrawdiskontheservice consoletothespecifiedfileonthespecifiedSCSIdevice 252 Listthefilesonthefilesystemonthespecifieddevice 253 SetthenameoftheVMFSonthespecifiedSCSIdevice 253 AdvancedvmkfstoolsOptions 253 Committheredologofthespecifiedfile,makingtheassociatedchanges permanent 253 SettheVMFSonthespecifiedSCSIdevicetothespecifiedmode 254 ExtendanexistinglogicalVMFS2volumebyspanningmultiple partitions 254 MapaRawDiskorPartitiontoaFileonaVMFS2Volume 255 DisplayDiskGeometryforaVMwareWorkstationorGSXServerVirtual Disk 255 ExtendthespecifiedVMFStothespecifiedlength 256 ManageSCSIreservationsofphysicaltargetsorLUNs 256 RecoversaVMFS 256 ScansthespecifiedvmhbaadapterfordevicesandLUNs 257 CreateorResizeaSwapFileinaVMFSVolumeofthespecifiedSCSI device 257 ActivateaSwapFile 258

12

VMware, Inc.

Contents

DeactivateaSwapFile 258 MigrateaVMFSfromVMFS1toVMFS2 258 ExamplesUsingvmkfstools 259 Createanewfilesystem 259 Extendsthenewlogicalvolumebyspanningtwopartitions 259 NamesaVMFSvolume 260 CreatesanewVMFSvirtualdiskfile 260 ImportsthecontentsofavirtualdisktothespecifiedfileonaSCSI device 260 MigratevirtualmachinestoVMwareGSXServerorVMwareWorkstation, thenbacktoVMwareESXServer 260 ListsthefilesontheVMFSofthespecifieddevice 261 AccessingRawSCSIDisks 261 UsingaPhysicalDiskinaVirtualMachine 261 DeterminingSCSITargetIDs 263 SharingtheSCSIBus 264 SettingBusSharingOptions 265 UsingStorageAreaNetworkswithESXServer 266 UnderstandingStorageArrays 266 InstallingESXServerwithAttachedSANs 266 ConfiguringVMFSVolumesonSANs 267 ScanningforDevicesandLUNs 267 ChangingVMkernelConfigurationOptionsforSANs 267 DetectingAllLUNs 268 UsingIBMFAStTDiskArrays 269 TroubleshootingSANIssueswithESXServer 269 UsingPersistentBindings 270 DeterminingTargetIDsThroughtheServiceConsole 270 ExampleOutputforanEmulexHBA 270 ExampleOutputforaQLogicHBA 271 pbind.plScript 272 ExamplesUsingthepbind.plScript 272 UsingMultipathinginESXServer 272 ChoosingPathManagementTools 273 ViewingtheCurrentMultipathingState 274 SettingYourMultipathingPolicyforaLUN 275 SpecifyingPaths 276 EnablingaPath 276 DisablingaPath 276 SettingthePreferredPath 276

VMware, Inc.

13

Administration Guide

SavingYourMultipathingSettings 277 InCaseofFailover 277 SettingsforQLogicAdapters 277 FailoverinWindows2000andWindowsServer2003GuestOperating Systems 278

10 ConfigurationforClustering 279
WhatIsClustering? 279 ApplicationsthatCanUseClustering 280 ClusteringSoftware 280 ClusteringHardware 280 ClusteringVirtualMachines 280 ClusteringSoftwareinVirtualMachines 281 ClusteringScenarios 281 ConfiguringVirtualMachineClusterswithSharedDisks 283 ImportantNotes 284 TwoNodeClusterwithMicrosoftClusterServiceonaSingleESXServer Machine 284 CreatingtheFirstNodesBaseVirtualMachine 284 InstallingtheGuestOperatingSystem 287 CloningtheVirtualMachine 287 CreatingtheSecondNodeVirtualMachine 288 NetworkDeviceConfiguration 289 InstallingMicrosoftClusterService 290 RunningMicrosoftClusterService 292 TwoNodeswithMicrosoftClusterServiceonSeparateESXServer Machines 292 CreatingtheFirstNodesBaseVirtualMachine 292 InstallingtheGuestOperatingSystem 293 CloningtheVirtualMachine 294 CreatingtheSecondNodeVirtualMachine 295 ClusteringUsingaRawSCSIDisk 295 InstallingMicrosoftClusterService 296 AdditionalNotesforClusteringAcrossPhysicalMachines 296 RunningMicrosoftClusterService 299 VMFSLockingandSCSIReservation 300 VMFSFileSystemLocking 300 LockingatSCSIDiskLevel 301 UsingLUNMaskingtoAvoidLockingIssues 302 NetworkLoadBalancing 302
14 VMware, Inc.

Contents

CreatingMultinodeNetworkLoadBalancingClustersonESXServer 302 CreatingtheFirstNodesBaseVirtualMachine 302 InstallingtheGuestOperatingSystem 304 CloningtheVirtualMachine 304 CloningtheVirtualMachine,anAlternateMethod 305 CloningtheVirtualMachinetoAnotherESXServerMachine 306 CreatingtheSecondNodeVirtualMachine 307 ConfiguringtheNetworkLoadBalancingCluster 308

11 Networking 311
SettingtheMACAddressManuallyforaVirtualMachine 311 HowVMwareESXServerGeneratesMACAddresses 312 SettingMACAddressesManually 313 UsingMACAddresses 313 VMkernelNetworkCardLocator 314 findnicCommand 314 Options 314 Examples 315 ForcingtheNetworkDrivertoUseaSpecificSpeed 315 EnablingaVirtualAdaptertoUsePromiscuousMode 315 SharingNetworkAdaptersandVirtualNetworks 316 AllowingtheServiceConsoletoUsetheVirtualMachinesDevices 317 StartingSharedVMkernelNetworkAdaptersandVirtualNetworkswhenthe ServiceConsoleBoots 318 SharingtheServiceConsolesNetworkAdapterwithVirtualMachines 319 UsingVirtualSwitches 320 ChoosingaNetworkLabel 320 BindingPhysicalAdapters 320 FindingBondsandAdaptersintheServiceConsole 321 CreatingaVirtualSwitch 322 ChoosingaLoadBalancingMode 322 ConfiguringtheBondFailureMode 323 UsingBeaconMonitoring 324 ConfiguringExternalNetworkSwitches 325 Troubleshooting 326

12 VMwareESXServerResourceManagement 327
VirtualMachineResourceManagement 328 ServiceConsoleResourceManagement 328 UsingESXServerResourceVariables 328
VMware, Inc. 15

Administration Guide

ImprovingPerformance 329 ImprovingSlowPerformance 329 ImprovingSlowPerformanceonESXServer 329 ImprovingSlowPerformanceonVirtualMachines 330 OptimizingPerformanceontheServiceConsole 330 CPUResourceManagement 331 AllocatingCPUResources 331 AdmissionControlPolicy 332 SpecifyingMinimumandMaximumCPUPercentages 332 AssigningVirtualMachinestoRunonSpecificProcessors 333 UsingProportionalshareSchedulingbyAllocatingShares 333 ControllingRelativeCPURates 334 ManagingCPUTimewithPercentagesandShares 334 UsingHyperThreading 335 EnablingHyperThreadinginESXServer 335 ConfiguringHyperThreadingOptionsforVirtualMachines 336 ManagingVirtualMachineCPUResources 336 ManagingCPUResourcesfromtheManagementInterface 336 ManagingCPUResourcesfromtheServiceConsole 337 EditingtheVirtualMachineConfigurationFile 337 Usingprocfs 339 Examples 342 MonitoringCPUStatistics 342 MemoryResourceManagement 345 AllocatingMemoryResources 346 SettingMemoryMinimum,Maximum,andShares 347 AdmissionControlPolicy 347 AllocatingMemoryDynamically 348 ReclaimingMemoryfromVirtualMachines 349 SwapSpaceandGuestOperatingSystems 350 SharingMemoryAcrossVirtualMachines 350 ManagingVirtualMachineMemory 351 ManagingMemoryResourcesfromtheManagementInterface 351 ManagingMemoryResourcesfromtheServiceConsole 352 ServiceConsoleCommands 353 MonitoringMemoryStatistics 356 Cautions 358 UsingYourNUMASystem 358 NUMAConfigurationInformation 358 ObtainingNUMAStatistics 359

16

VMware, Inc.

Contents

DeterminingtheAmountofMemoryforEachNUMANode 359 DeterminingtheAmountofMemoryforaVirtualMachineonaNUMA Node 360 AutomaticNUMAOptimizations 360 ManualNUMAOptimizations 361 AssociatingVirtualMachinestoaSingleNUMANode 361 AssociatingFutureVirtualMachineMemoryAllocationswithaNUMA Node 362 BindingaVirtualMachinetoaSingleNUMANodeonan8way Server 363 SizingMemoryontheServer 363 ServerMemory 364 ServiceConsoleMemory 364 VirtualMachineMemoryPool 364 VirtualMachineMemory 364 MemorySharing 365 MemoryOvercommitment 366 Example:WebServerConsolidation 366 ManagingNetworkBandwidth 367 UsingNetworkFilters 367 ManagingNetworkBandwidthfromtheManagementInterface 367 ManagingNetworkBandwidthfromtheServiceConsole 368 TrafficShapingwithnfshaper 369 ServiceConsoleCommands 369 Examples 370 ManagingDiskBandwidth 371 AllocationPolicy 371 ManagingDiskBandwidthfromtheManagementInterface 372 ConfigurationFileOptions 372 ConfigurationFileExamples 373 ManagingDiskBandwidthfromtheServiceConsole 374

Index 375

VMware, Inc.

17

Administration Guide

18

VMware, Inc.

Preface

ThisprefacedescribesthecontentsoftheESXServerAdministrationGuideandprovides pointerstotechnicalandeducationalresources. Thisprefacecontainsthefollowingtopics:


! ! ! ! !

AboutThisBookonpage 20 IntendedAudienceonpage 20 DocumentFeedbackonpage 20 ConventionsandAbbreviationsonpage 20 TechnicalSupportandEducationResourcesonpage 21

VMware, Inc.

19

Administration Guide

About This Book


Thismanual,ESXServerAdministrationGuide,describeshowtoadministerand configureESX Server2.5andhowtoaccesstheserverusingtheVMwareManagement Interface.

Intended Audience
TheinformationpresentedinthismanualiswrittenforexperiencedWindowsorLinux systemadministratorswhoarefamiliarwithvirtualmachinetechnologyand datacenteroperations.

Document Feedback
Ifyouhavecommentsaboutthisdocumentation,submityourfeedbackto: docfeedback@vmware.com

Conventions and Abbreviations


ThismanualusesthestyleconventionslistedinTable P1. Table P-1. Type Conventions
Style Purpose Usedforcommands,filenames,directories,paths. Applytoindicateuserinput. Usefortheseterms: Interfaceobjects,keys,buttons Itemsofhighlightedinterest Glossaryterms Italic <name> Usedforbooktitles. Anglebracketsindicatevariableandparameternames.

Monospace
Monospace bold Bold

Abbreviations Used in Graphics


ThegraphicsinthismanualusetheabbreviationslistedinTable P2. Table P-2. Abbreviations
Abbreviation VC VI Description VirtualCenter VirtualInfrastructureClient

20

VMware, Inc.

Preface

Table P-2. Abbreviations (Continued)


Abbreviation server database hostn VM# user# dsk# datastore SAN tmplt Description VirtualCenterServer VirtualCenterdatabase VirtualCentermanagedhosts virtualmachinesonamanagedhost userwithaccesspermissions storagediskforthemanagedhost storageforthemanagedhost storageareanetworktypedatastoresharedbetweenmanagedhosts template

Technical Support and Education Resources


Thefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou:
! ! ! !

SelfServiceSupportonpage 21 OnlineandTelephoneSupportonpage 22 SupportOfferingsonpage 22 VMwareEducationServicesonpage 22

Self-Service Support
UsetheVMwareTechnologyNetworkforselfhelptoolsandtechnicalinformation:
! ! ! ! ! !

ProductInformationhttp://www.vmware.com/products/ TechnologyInformationhttp://www.vmware.com/vcommunity/technology Documentationhttp://www.vmware.com/support/pubs KnowledgeBasehttp://www.vmware.com/support/kb DiscussionForumshttp://www.vmware.com/community UserGroupshttp://www.vmware.com/vcommunity/usergroups.html

FormoreinformationabouttheVMwareTechnologyNetwork,goto http://www.vmtn.net.

VMware, Inc.

21

Administration Guide

Online and Telephone Support


Useonlinesupporttosubmittechnicalsupportrequests,viewyourproductand contractinformation,andregisteryourproducts.Goto http://www.vmware.com/support. Customerswithappropriatesupportcontractsshouldusetelephonesupportforthe fastestresponseonpriority1issues.Goto http://www.vmware.com/support/phone_support.html.

Support Offerings
FindouthowVMwaressupportofferingscanhelpyoumeetyourbusinessneeds.Go tohttp://www.vmware.com/support/services.

VMware Education Services


VMwarecoursesofferextensivehandsonlabs,casestudyexamples,andcourse materialsdesignedtobeusedasonthejobreferencetools.Formoreinformationabout VMwareEducationServices,gotohttp://mylearn1.vmware.com/mgrreg/index.cfm.

Reporting Problems
Theseguidelinesdescribetheinformationyoumaybeaskedtoprovidewhenyou reportproblems. Besuretoregisteryourserialnumber.Ifyouarerequestingsupportdirectlyfrom VMware,thenreportyourproblemsusingthesupportrequestformontheVMware Websiteatwww.vmware.com/requestsupport. WhenrequestingsupportfromVMware,runthe/usr/bin/vm-supportscriptonthe serviceconsoleandsavetheresultingesx-<date>-<unique-xnumber>.tgzfile.This scriptcollectsandpackagesallrelevantESXServersystem,configurationinformation, andESXServerlogfiles.Thisinformationisusedtoanalyzetheproblemyouare encountering.
!

Ifavirtualmachineexitsabnormallyorcrashes,pleasesavethelogfile (vmware.loginthesamedirectoryasyour.vmxfile)andanycorefiles(coreor vmware-coreinthatdirectory).Also,pleasesavethevirtualmachines configuration(.vmx)fileandanyotherinformationthatmighthelpreproducethe problem. Besuretorecordadescriptionofyourphysicalhardwareandofthesoftware (operatingsystemandapplications)thatwasrunninginthevirtualmachine.This informationmayberequiredwhenyourequestsupport.

22

VMware, Inc.

Preface

AproblemintheVMkernelnormallycausesthemachinetodisplayanerrorscreen foraperiodoftimeandthenreboot.IfyouspecifiedaVMwarecoredump partitionwhenyouconfiguredyourmachine,theVMkernelalsogeneratesacore dumpanderrorlog.MoreseriousproblemsintheVMkernelcanfreezethe machinewithoutanerrorscreenorcoredump. WhenyoureportproblemsdirectlytoVMware,describethestepsyoutookinthe periodbeforethisfailure.Includethisinformationinyoursupportrequest,along withthecontentsof/var/log/messagesfromtheserviceconsole.Alsoinclude thecoredumpanderrorlog,ifany.Youcanfindtheseinfilesnamed vmkernel-core.<date>andvmkernel-log.<date>inthe/rootdirectoryafter yourebootyourmachine.

VMware, Inc.

23

Administration Guide

24

VMware, Inc.

Introduction to VMware ESX Server

TheVMwareESXServerAdministrationGuideprovidesinformationonhowtouse VMwareESXServerafterithasbeeninstalled.ForinformationoninstallingESXServer, refertotheVMwareESXServerInstallationGuide. Thischaptercontainsthefollowingsections:


! !

VMwareESXServerSystemArchitecture,next UsingVMwareESXServeronpage 31

VMware ESX Server System Architecture


VMwareESXServerincorporatesaresourcemanagerandaserviceconsolethat providesbootstrapping,management,andotherservices. ThedesignoftheESXServercorearchitectureimplementstheabstractionsthatallow hardwareresourcestobeallocatedtomultipleworkloadsinfullyisolated environments. Thekeyelementsofthesystemsdesignare:
!

VMwarevirtualizationlayerProvidestheidealizedhardwareenvironmentand virtualizationofunderlyingphysicalresources. ResourcemanagerEnablesthepartitioningandguaranteeddeliveryofCPU, memory,networkbandwidth,anddiskbandwidthtoeachvirtualmachine. HardwareinterfacecomponentsIncludesdevicedrivers,whichenable hardwarespecificservicedeliverywhilehidinghardwaredifferencesfromother partsofthesystem.

VMware, Inc.

25

Administration Guide

Figure 1-1. ESX Server core architecture

Virtualization
TheVMwarevirtualizationlayerbringshardwarevirtualizationtothestandardIntel serverplatform.ThevirtualizationlayeriscommonamongVMwaredesktopand serverproducts,providingaconsistentplatformfordevelopment,testing,delivery, andsupportofapplicationworkloadsfromthedeveloperdesktoptotheworkgroupto thedatacenter. Aswithmainframevirtualization,theVMwarevirtualmachineofferscomplete hardwarevirtualization.Theguestoperatingsystemandapplications(thoseoperating insideavirtualmachine)canneverdirectlydeterminewhichspecificunderlying physicalresourcestheyareaccessing,suchasonwhichCPUtheyarerunningina multiprocessorsystemorwhichphysicalmemoryismappedtotheirpages.The virtualizationoftheCPUincorporatesdirectexecution:nonprivilegedinstructionsare executedbythehardwareCPUwithoutoverheadsintroducedbyemulation. Thevirtualizationlayerprovidesanidealizedphysicalmachinethatisisolatedfrom othervirtualmachinesonthesystem.Itprovidesthevirtualdevicesthatmaptoshares ofspecificphysicaldevices.ThesedevicesincludevirtualizedCPU,memory,I/Obuses, networkinterfaces,storageadaptersanddevices,humaninterfacedevices,BIOS,and others. Eachvirtualmachinerunsitsownoperatingsystemandapplications.Theycannottalk toeachotherorleakdata,otherthanthroughnetworkingmechanismssimilartothose usedtoconnectseparatephysicalmachines.Thisisolationleadsmanyusersof VMwaresoftwaretobuildinternalfirewallsorothernetworkisolationenvironments, allowingsomevirtualmachinestoconnecttotheoutsidewhileothersareconnected onlythroughvirtualnetworksthroughothervirtualmachines.

26

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

CPU Virtualization
EachvirtualmachineappearstorunonitsownCPU,orsetofCPUs,fullyisolatedfrom othervirtualmachines,withitsownregisters,translationlookasidebuffer,andother controlstructures.MostinstructionsaredirectlyexecutedonthephysicalCPU, allowingcomputeintensiveworkloadstorunatnearnativespeed.Privileged instructionsareperformedsafelybythepatentedandpatentpendingtechnologyin thevirtualizationlayer.

Memory Virtualization
Whileacontiguousmemoryspaceisvisibletoeachvirtualmachine,thephysical memoryallocatedmaynotbecontiguous.Instead,noncontiguousphysicalpagesare remappedefficientlyandpresentedtoeachvirtualmachine.Someofthephysical memoryofavirtualmachinemightbemappedtosharedpagesortopagesthatare unmappedorswappedout.ThisvirtualmemorymanagementisperformedbyESX Serverwithouttheknowledgeoftheguestoperatingsystemandwithoutinterfering withitsmemorymanagementsubsystem.

Disk Virtualization
SupportofdiskdevicesinESXServerisanexampleoftheproductshardware independence.EachvirtualdiskispresentedasaSCSIdriveconnectedtoaSCSI adapter.Thisdeviceistheonlydiskstoragecontrollerusedbytheguestoperating system,despitethewidevarietyofSCSI,RAID,andFibreChanneladaptersthatmight beusedinthesystem. Thisabstractionmakesvirtualmachinesmorerobustandmoretransportable.Youdo notneedtoworryaboutthepotentiallydestabilizingdriversthatyoumighthaveto installonguestoperatingsystems,andthefilethatencapsulatesavirtualdiskis identicalnomatterwhichunderlyingcontrollerordiskdriveisused. YoucanuseVMwareESXServereffectivelywithstorageareanetworks(SANs).ESX ServersupportsQLogicandEmulexhostbusadapters,whichallowanESXServer computertobeconnectedtoaSANandtoseethediskarraysontheSAN.

Network Virtualization
Youmaydefineuptofourvirtualnetworkcardswithineachvirtualmachine.Each virtualnetworkcardhasitsownMACaddressandmayhaveitsownIPaddress(or multipleaddresses),aswell.Virtualnetworkinterfacesfrommultiplevirtualmachines maybeconnectedtoavirtualswitch.Eachvirtualswitchcanbeconfiguredasapurely virtualnetworkwithnoconnectiontoaphysicalLANorcanbebridgedtoaphysical LANbyoneormoreofthephysicalNICsonthehostmachine.

VMware, Inc.

27

Administration Guide

Private Virtual Ethernet Networks (VMnets)


YoucanuseVMnetconnectionsforhighspeednetworkingbetweenvirtualmachines, allowingprivate,costeffectiveconnections.Theisolationinherentintheirdesign makesthemespeciallyusefulforsupportingnetworktopologiesthatnormallydepend ontheuseofadditionalhardwaretoprovidesecurityandisolation.
Physical NIC NIC vmnic0

Virtual machine 2 External Web server

Virtual machine 1 Firewall

vmnet_0

Virtual machine 3 Firewall

vmnet_1

Internal Virtual Network machine 4 On internal Virtual network Machine

Figure 1-2. Firewall configuration example InFigure 12,aneffectivefirewallcanbeconstructedbyconfiguringonevirtual machineonanESXServersystemwithtwovirtualEthernetadapters,oneboundtoa VMnic(givingitaconnectiontoaphysicalnetwork)andtheotherboundtoaVMnet. OthervirtualmachineswouldbeconnectedonlytotheVMnet.Byrunningfiltering softwareinthedualhomedvirtualmachine,ausercanconstructaneffectivefirewall withouttheneedforadditionalhardwareandwithhighperformancevirtual networkingbetweenthevirtualmachines. Youcanuseasimilarapproachwithmultitierapplications(withtheWeborapplication serversreachablefromothersystems)butwiththedatabaseserverconnectedonlyto theothertiers.

Virtualization at a Glance
ESXServervirtualizestheresourcesofthephysicalsystemforusebythevirtual machines.

28

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

Virtual machine 1
CPU CPU1 Memory Mem1 Disk Disk1 NIC NIC1a NIC NIC1b CPU CPU2

Virtual machine 2
Memory Mem2 Disk Disk2 NIC NIC2a NIC NIC2b

Mem1

NIC1a

CPU1 CPU2

Mem1

Mem2

CPU

Memory

Disk

NIC NIC1b NIC2b Virtual network

Physical resources

Figure 1-3. virtual Machine configuration InFigure 13,eachvirtualmachineisconfiguredwithoneCPU,anallocationof memoryanddisk,andtwovirtualEthernetadapters.Inreality,theysharethesame physicalCPUandaccessnoncontiguouspagesofmemory(withpartofthememoryof oneofthevirtualmachinescurrentlyswappedtodisk).Theirvirtualdisksaresetupas filesonacommonfilesystem. EachoftheexamplevirtualmachineshastwovirtualNICs.VirtualNICs1aand2aare attachedtothevirtualswitchthatisboundtophysicalNICs1aand2a.VirtualNICs1b and2bareattachedtoapurelyvirtualswitch.

Software Compatibility
IntheVMwareESXServerarchitecture,guestoperatingsystemsinteractonlywiththe standardx86compatiblevirtualhardwarepresentedbythevirtualizationlayer.This providesthecapabilityforVMwaretosupportanyx86compatibleoperatingsystem. Inpractice,VMwaresupportsasubsetofx86compatibleoperatingsystemsthatare testedthroughouttheproductdevelopmentcycle.VMwaredocumentstheinstallation andoperationoftheseguestoperatingsystemsandtrainsitstechnicalpersonnelin theirsupport. Becauseapplicationsinteractonlywiththeirguestoperatingsystem,andnotwiththe underlyingvirtualhardware,afteroperatingsystemcompatibilitywiththevirtual hardwareisestablished,applicationcompatibilityisnotanissue.

VMware, Inc.

NIC2a

Disk1

Disk2

Disk2

29

Administration Guide

Service Console
Thissectiondiscussestheserviceconsolefunctions,processes,andfiles.

Service Console Functions


TheESXServersystemmanagementfunctionsandinterfacesareimplementedinthe serviceconsole.TheseincludetheHTTP,SNMP,andAPIinterfacesdescribedabove,as wellasothersupportfunctionssuchasauthenticationandlowperformancedevice access.Theserviceconsoleisalsoinstalledasafirstcomponentandisusedtobootstrap theESXServerinstallationandconfiguration,aswellastobootthesystemandinitiate executionofthevirtualizationlayerandresourcemanager.InESXServer,theservice consoleisimplementedusingamodifiedLinuxdistribution.

Service Console Processes and Files


TheserviceconsoleprovidesacontrolAPIthatallowsthevirtualmachinesand resourceallocationstobemanaged.Theadministratormayalsoaccessthesecontrols throughpagesaccessedthroughtheWebserverrunningintheserviceconsole.
Web browser API Remote console

httpd vmauthd vmserverd


vmware vmware

snmpd

mks KVM

Figure 1-4. Service Console processes and files InadditiontotheWebserver,thefollowingprocessesandservicesinvolvedinthe managementofanESXServersystemrunintheserviceconsole:


!

Serverdaemon(vmserverd)Performsactionsintheserviceconsoleonbehalfof theVMwareRemoteConsoleandtheWebbasedVMwareManagementInterface.

30

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

Authenticationdaemon(vmauthd)Authenticatesremoteusersofthe managementinterfaceandremoteconsolesusingtheusername/password database.AnyotherauthenticationstorethatcanbeaccessedusingthePluggable AuthenticationModule(PAM)capabilitiespresentintheserviceconsolecanalso beused.ThisallowstheuseofpasswordsfromaWindowsdomaincontroller, LDAPorRADIUSserver,orsimilarcentralauthenticationstoretousewith VMwareESXServerforremoteaccess. SNMPserver(ucd-snmpd)ImplementstheSNMPdatastructuresandtrapsan administratorcanusetointegrateanESXServersystemintoanSNMPbased systemmanagementtool. Serviceconsole(inadditiontoVMwaresuppliedservices)Usetorunother systemwideorhardwaredependentmanagementtools.Theseinclude hardwarespecifichealthmonitors(suchasIBMDirector,HPInsightManager,and others),fullsystembackupanddisasterrecoverysoftware,andclusteringand highavailabilityproducts.

Theserverandvirtualmachineresourcesandconfigurationattributesthatareavailable throughtheSNMPandHTTPinterfacesarealsovisiblethroughafilesysteminthe serviceconsole.Thefilesinthis/proc/vmwarenamespacemaybeexaminedand modifiedbyusersloggedintotheserviceconsolewithsufficientpermissionsormay beusedasapointofintegrationforhomegrownorcommercialscriptsand managementtools.

Using VMware ESX Server


VMwareESXServercontainsmanyfeaturestohelpyoumanageyourvirtualmachines resources.Inthissection,someofthesefeaturesarehighlightedbylistingtasksthatyou performonyourESXServersystem. Theinformationcontainedinthistablepresumesthatyouhavesuccessfullyinstalled andconfiguredESXServeronyourhardware.Forhelp,refertotheVMwareESXServer InstallationGuide.

VMware, Inc.

31

Administration Guide

Familiarizing Yourself with ESX Server


Table 11includestasksfromtheVMwareManagementInterfaceforanAdministrator (rootuser),whomanagesandmaintainsESXServer. Table 1-1. ESX Server Administrator Tasks
Task LogintotheVMware ManagementInterface andfamiliarize yourselfwithits features. Createusersand groups. Description Astherootuser,youhaveprivilegesthatotherusersdonthave.In additiontotheStatusMonitor,youhaveaccesstotheOptionspane thatallowsyoutoconfigureESXServer,includingnetworking, security,SNMP,usersandgroups,storageconfiguration,andsoon. SeeChapter 3,UsingtheVMwareManagementInterface. CreateusersandplacethemintogroupsfordifferentaccesstoESX Server.Forbestpractice,therootusershouldnotownvirtual machines.Userswhocreate,access,andmodifyvirtualmachines dontneedtheadditionaladministrativeprivilegesoftherootuser. Youmightchoosetohaveavirtualmachineownedbyaflagship userinsteadofarealperson.Byusingaflagshipuser,onlyone useraccountownsthevirtualmachinesthatareinproduction.An advantageofusingflagshipaccountsisthatflagshipusersnever leavethecompanyorgoonvacation. SeeCreatingaFlagshipUseronpage 145. Addadditionaldisks andpartitions,as needed. WhencreatingyourVMFSvolumes,keepthedefaultaccesstype public,unlessyouplantouseyourvirtualmachinesforclustering. Ifyouarerunningclusteringsoftware,selectsharedasyour VMFSvolumeaccesstype.SeeConfiguringStorage:Disk PartitionsandFileSystemsonpage 196andConfigurationfor Clusteringonpage 279. Thedefaultlocationforthesefilesisthehomedirectoryoftheuser thatcreatedthevirtualmachine.Inproductionenvironments,most virtualmachinesbelongtoteamsratherthantoindividuals.Setting upacentraldirectorystructureisagoodpractice. Themigrationprocedureisheavilydependentontheversionofthe VMwareproductusedtocreatetheoriginalvirtualmachine. Ifyouaremigratingavirtualmachinefromapreviousversionof ESXServer,seeMigratingOlderESXServerVirtualMachineson page 62. IfyouaremigratingavirtualmachinefromVMwareWorkstationor VMwareGSXServer,seeMigratingVMwareWorkstationand VMwareGSXServerVirtualMachinesonpage 63. Readtheseinstructionsbeforeattemptingtomigrateyourvirtual machine.

Decidehowtoorganize yourvirtualmachine configurationfiles. Upgradeanyexisting virtualmachinesfroma previousversionofESX Serveroranother VMwareproduct.

32

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

Table 1-1. ESX Server Administrator Tasks (Continued)


Task Creategoldenmaster (template)virtual disks. Description TomanageESXServermoreefficiently,createasmallnumberof goldenmaster(template)virtualdisksforeasierdeployment. Thesearevirtualdisksthathavecompleteguestoperatingsystems, installedapplications,completemanagementagentinstalls,virus detectionsoftware,completeVMwareToolsinstalls,andsoon.You canimportthedisksintoaVMFSvolumetocreateanewvirtual machine. Besurethatthegoldenmasterhasthetoolsnecessarytoreset systemattributes(hostnameandIPaddress,NetBIOShostname, domain,andSID[Windowsoperatingsystems]forthevirtual machinesyouclone.Also,besurethattheuserthatwillberunning thenewlycreatedvirtualmachinehastheappropriateuserand grouppermissions. UsetheFileManagerintheVMwareManagementInterfaceto importthegoldenmastervirtualdisks.SeeUsingtheVMware ManagementInterfaceFileManageronpage 141. Setuserandgroup permissionsforthe ownerofavirtual machine. 1 2 3 4 5 LogintothemanagementinterfaceandclickManageFiles. Navigatetotheconfigurationfile(.vmx)ofthevirtualmachine. Selectthevirtualmachinesconfigurationfilecheckbox,and clickEditProperties. Chooseread,write,andexecutepropertiesfortheownerofthe virtualmachine.

Choosereadandexecuteprivilegesfortheownersgroup,and clickOK. Setreadandwritepermissionsfortheowneronthevirtual machinesvirtualdisk(.vmdkfile).Readpermissionsforavirtual diskfilearesufficientifthevirtualdiskisnonpersistent. SeeSettingPermissionsforOwnersofVirtualMachineson page 144andUsingDiskModesonpage 135. Thesameusermustownthevirtualmachinesconfigurationand virtualdiskfileandmusthavefullaccessprivilegesforbothfiles. Setuserandgroup permissionstoviewa virtualmachineonthe StatusMonitor. Forausertoseeavirtualmachineinthemanagementinterface,the user,oragrouptowhichtheuserbelongs,musthavereadaccessto thatvirtualmachine. SeeSettingPermissionsforOwnersofVirtualMachineson page 144.

VMware, Inc.

33

Administration Guide

Table 1-1. ESX Server Administrator Tasks (Continued)


Task Setuserpermissionsto connecttoavirtual machinethroughthe remoteconsole. Description Forausertoconnecttoandpoweronavirtualmachineinthe remoteconsoletheuser,oragrouptowhichtheuserbelongs,must havereadandexecuteaccesstothatvirtualmachinesconfiguration file.Also,theusermusthaveexecute(x)permissiononallparent directories.SeeSettingPermissionsforOwnersofVirtual Machinesonpage 144. ESXServershipswithanSNMPagentthatallowsyoutomonitor thehealthofthephysicalmachinewhereESXServerisrunningand ofvirtualmachinesrunningonit. SeeConfiguringtheESXServerAgentThroughtheVMware ManagementInterfaceonpage 227.

ConfigureyourSNMP agent.

Table 12includestasksfromtheVMwareManagementInterfaceforavirtualmachine user,whocreatesandmodifiesvirtualmachines. Table 1-2. VMware Management Interface Tasks


Task LogintotheVMware ManagementInterface anddownloadthe remoteconsole package. Description Usetheremoteconsoletopoweronandpoweroffyourvirtual machines,connectordisconnectdevices(includingtheCDdrive andnetworkadapter),andsetpreferences(includingmouse, keyboard,andhotkeybehaviorintheremoteconsolewindow). InstalltheremoteconsolefromtheStatusMonitorofthe managementinterface.Launchtheremoteconsolefromyour desktop(Windowsoperatingsystems)orfromthemanagement interface. Clicktheappropriatelinkfortheoperatingsystemonyour workstation. Learntousethe managementinterface. Afterlogin,thestartingpageofthemanagementinterfaceprovides asummaryofthevirtualmachinesonESXServer.Dependingon yourpermissions,youllbeabletoviewandmodifyvirtual machines.SeeUsingtheStatusMonitoronpage 84. Clickingonavirtualmachinenameopensthedetailspageforthat virtualmachine,whereyoucancheckitsCPU,memory,disk, network,hardware,options,andusersandevents.Familiarize yourselfwiththeinformationcontainedinthesepages.See ConfiguringaVirtualMachineonpage 94

34

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

Table 1-2. VMware Management Interface Tasks (Continued)


Task Createavirtual machine. Description TheAddVirtualMachinewizardletsyouaddasmallnumberof devicestoavirtualmachine.Thismakestheinitialcreationprocess simpler.AdddeviceslaterbyclickingAddDeviceintheHardware tabforthevirtualmachine. IfyoupurchasedtheVMwareVirtualSMPforESXServerproduct, youcancreatedualvirtualCPUSMPvirtualmachines. Takeintoaccountthetypeofapplicationsyouplantorunonthis virtualmachinewhenmakingyourchoicesduringitscreation. SeeCreatingaNewVirtualMachineonpage 39. Addadditionaldisks, drives,network adapters,andSCSI devices. Installguestoperating systemandVMware Tools. ClickAddDeviceintheHardwaretabforthevirtualmachine. SeeConfiguringaVirtualMachinesHardwareonpage 102.

VMwareToolsisasoftwarepackageinstalledintheguest operatingsystemthatgivesyoudevicedriversspecifictoVMware virtualdeviceswherenecessaryandincludescommunication channelsbetweenthevirtualmachineandtheESXServer virtualizationlayer. SeeInstallingaGuestOperatingSysteminaVirtualMachineon page 43,andseeVMwareToolsSettingsonpage 159.

Working With ESX Server


Thissectionincludesinformationonmaintenancetasks,performanceenhancements, andgeneraltroubleshootingtips. Table 13includesESXServermaintenancetasksforanAdministrator(rootuser). Table 1-3. Maintenance tasks for an Administrator
Task Backupyour virtualmachines. Description Youcandobackupsforeachvirtualmachine,orfromtheserviceconsole. Backupsfromtheserviceconsolearebestforsystemimages,becausethey resultinabackupbootablevirtualdiskandaresuitableforrapid redeployment.SeeBackingUpfromWithinaVirtualMachineon page 152. Backupsfromwithinthevirtualmachine,usingabackupagent, arebestforapplicationdatabecausenosystemshutdownisrequired.See BackingUpVirtualMachinesfromtheServiceConsoleonpage 153.

VMware, Inc.

35

Administration Guide

Table 1-3. Maintenance tasks for an Administrator (Continued)


Task Usescriptsto schedule frequenttasks. Viewsystemlogs andreports throughthe management interface. Description FormoreinformationonVMwareScriptingAPIs,see http://www.vmware.com/support/developer. Asneeded,viewtheESXServerlogfilesforwarnings,serioussystem alertsandmessagesthroughthemanagementinterface. SeeViewingSystemLogsandReportsonpage 229.

Table 14includesESXServerperformancerelatedtasksforanAdministrator(root user). Table 1-4. Performance-related tasks for an Administrator


Task Enhanceperformance onvirtualmachines, basedonits application(s). Description ESXServerappliesaproportionalsharemechanismtoCPU, memoryallocation,anddiskbandwidth.Themoresharesavirtual machinehas,themoreCPU,memory,ordiskbandwidthithas. Forexample,virtualmachinesrunningaCPUintensive applicationshouldhaveagreaterminimumCPUandmemory sharethanavirtualmachinerunninganonCPUintensive application. SeeChapter 12,VMwareESXServerResourceManagement. EnhanceCPU performanceonvirtual machines. Setminimumandmaximumpercentagesaswellasmemoryshares foreachvirtualmachine.Alsoselecttheprocessorsonwhichthe virtualmachineruns. SeeConfiguringaVirtualMachinesCPUUsageonpage 96and CPUResourceManagementonpage 331 Enhancememory utilizationonvirtual machines. Youcansetmemorysharesforavirtualmachine.Ifyouhavea NUMAmachine,youcanalsoselecttheNUMAaffinitynodesfor thevirtualmachine. SeeConfiguringaVirtualMachinesCPUUsageonpage 96, MemoryResourceManagementonpage 345,andUsingYour NUMASystemonpage 358. Enhancedisk bandwidthutilization onvirtualmachines. Enhancenetworking performanceonvirtual machines. Youcansetdiskbandwidthforavirtualmachine.Avirtual machinewithmoreshareshasmorebandwidth. SeeConfiguringaVirtualMachinesCPUUsageonpage 96and ManagingDiskBandwidthonpage 371. Youcanmanagenetworkingperformancebyenablingtraffic shapingandspecifyingnetworkparameters. SeeConfiguringaVirtualMachinesNetworkingSettingson page 100 andManagingNetworkBandwidthonpage 367.

36

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

Table 1-4. Performance-related tasks for an Administrator (Continued)


Task Removeunnecessary programsorservices fromyourvirtual machines. Makesurethatthe serviceconsolehas enoughCPUandRAM. Makesurethereis sufficientswapspace foryourguest operatingsystem. Description Removeunnecessaryprogramsorservices,suchasCPUintensive screensavers,fromyourvirtualmachines. RunLinuxvirtualmachineswithouttheXWindowsystem,if possible. IfyouarerunningalotofvirtualmachinesonESXserver,andyou noticeadegradationinsystemperformance,increasetheCPU minimumfortheserviceconsole.SeeManagingtheService Consoleonpage 168 Forresourcemanagementpurposes,ESXServermayincreasethe memoryutilizationwithinaguestoperatingsystem.Ensurethat theguestoperatingsystemhassufficientswapspace. Addadditionalswapspaceintheguestoperatingsystem,equalto thedifferencebetweenthevirtualmachinesmaximumand minimummemorysizes. SeeAdmissionControlPolicyonpage 332. Removeunnecessary programsorservices fromyourservice console. UseSNMPtowatch memory,resource usage,andworkloads onESXServerandits virtualmachines. DonotruntheXWindowsysteminyourserviceconsole.

SeeChapter 7,UsingSNMPwithESXServer.

VMware, Inc.

37

Administration Guide

Table 15includessomegeneraltroubleshootinginformation.\ Table 1-5. Troubleshooting


Problem Cantstartavirtual machine. Suggestions Checkpermissionsonthevirtualmachineconfigurationfileandon thevirtualdisk.See Setting Permissions for Owners of Virtual Machines on
page 139.

Checkthatthereisenoughmemorytopoweronthisvirtual machine.See Sizing Memory on the Server on page 401. Checkthatthereisenoughunreservedswapspace.SeeSwap Space and Guest Operating Systems on page 388. CheckthatthevirtualdisksareinaVMFSvolume.Ifthevirtual diskfileisfromVMwareWorkstationorVMwareGSXServer,be surethevirtualdiskhasbeenproperlyimported,throughthe managementinterface,intoESXServer.See Migrating VMware
Workstation and VMware GSX Server Virtual Machines on page 50.

Cantconnecttothe VMwareManagement Interface.

CheckwhethertherehasbeenalossinIPconnectivity. CheckthattheNICduplexorspeedmatchestheEthernetswitch. Checkthattheserviceconsoleisnotswapping. Checkthattherootfilesystemhasavailablediskspace. CheckwhethertherehasbeenalossinIPconnectivity. CheckthattheNICduplexorspeedmatchestheEthernetswitch. Checkthattheserviceconsoleisnotswapping. Checkthattherootfilesystemhasavailablediskspace.

Cantconnecttothe VMwareRemote Console.

38

VMware, Inc.

Creating and Configuring Virtual Machines

Thischapterdescribeshowtocreateandconfigurevirtualmachinesandinstallthe VMwareRemoteConsole.Itcontainsthefollowingsections:
! ! ! ! ! ! ! ! ! !

CreatingaNewVirtualMachineonpage 39 InstallingaGuestOperatingSystemandVMwareToolsonpage 43 UsingPXEwithVirtualMachinesonpage 53 ConfiguringaVirtualMachinetoUsetheLSILogicSCSIAdapteronpage 55 Importing,Upgrading,andExportingVirtualMachinesonpage 60 PreparingtoUsetheRemoteManagementSoftwareonpage 69 InstallingtheRemoteConsoleSoftwareonpage 70 ThirdPartySoftwareCompatibilityonpage 71 ExecutingScriptsWhentheVirtualMachinesPowerStateChangesonpage 71 ConfiguringVirtualMachinesonpage 73

Creating a New Virtual Machine


YoucancreatenewvirtualmachinesfromwithintheVMwareManagementInterface. Theprocesssetsupanewconfigurationforeachvirtualmachineyoucreatethisway. NOTE UseonlyASCIIcharactersintheentryfieldswhencreatingavirtualmachinewiththe managementinterface.Thevirtualmachinesdisplaynameandpathcannotcontain nonASCIIcharacters.Inaddition,donotcreatefilenamesanddirectoriesforvirtual machineswithspacecharacters.

VMware, Inc.

39

Administration Guide

TheAddVirtualMachinewizardguidesyouthroughthebasicstepstocreateavirtual machineonyourserver.Anyuserwhohasanaccountontheserversserviceconsole maylogintothewizardandcreateavirtualmachine.Ifyouareloggedinasroot,you mightwanttologoutandloginagainasauserauthorizedtomanagethenewvirtual machine. NOTE CheckforanyVMkernelALERTmessagesinthewarninglogfilesbeforecreatinga newvirtualmachine. To create a new virtual machine 1 Logintothemanagementinterface,usingthisURL:
http://<hostname>

Onthemanagementinterfaceloginpage,enteryourusernameandpasswordand clickLogin. TheStatusMonitorappears.

ClickAddVirtualMachine. TheAddVirtualMachinewizardstarts.

Choosetheguestoperatingsystemforyourvirtualmachine. Defaultentriesappearforthenameofthevirtualmachineandthenameofits configurationfile.Youcanchangethesesettings. ThenameyouenterintheDisplayNamefieldislistedintheVMware ManagementInterface. TheLocationfieldcontainsthenameoftheconfigurationfile(thisfilehasa.vmx extension).BesurethattheentryintheLocationfieldisunique.

40

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

NOTE

ConfigurationfilesforvirtualmachinescreatedwithVMwareESXServer2.0 andlater,usethe.vmxextension.EarlierversionsofESXServerusedthe.cfg extension.Accessvirtualmachineconfigurationfileswitha.cfgextension byESXServer2.5.

5 6

ClickNext. IntheProcessorslist,choosethenumberofvirtualCPUsinyourvirtualmachine. Choose1or2virtualCPUs,buttheymustbelessthanorequaltothenumberof physicalCPUsonyourserver.

NOTE

Someguestoperatingsystems,suchasWindowsNT,canbeconfiguredwitha singleprocessor.Ifyouareconfiguringsuchavirtualmachine,anoteindicates thisandyoucannotselectmorethanonevirtualCPU. YoucancreatedualvirtualCPUvirtualmachinesonlyifyouhavepurchased theVMwareVirtualSMPforESXServerproduct.Formoreinformationonthis product,contactVMware,Inc.oryourauthorizedsalesrepresentative.

NOTE

Youmightneedtochangeittomeetthedemandsofapplicationsyouplantorun inthevirtualmachine.Youcanchangethissettinglateronthevirtualmachines Memorytabinthemanagementinterface.SeeManagingMemoryResources fromtheManagementInterfaceonpage 351. 7 IntheWorkloadslist,selectCitrixTerminalServicestorunCitrixMetaFrameon thevirtualmachine. DonotselectthisoptionifyoudonotplantorunCitrixMetaFrameonthe virtualmachine.Virtualmachineswiththissettingusemorevirtualization overheadandESXServerwillbeabletorunfewervirtualmachines simultaneously.

NOTE

8 9

ClickNext. Choosethetypeofvirtualdiskyouwanttoaddtothevirtualmachine.
!

ClickBlanktocreateanewvirtualdisk.Specifythefollowing: IntheVMFSVolumelist,choosethevolumeonwhichtolocatethevirtual disk.Theamountoffreespaceislistednexttothevolumename. IntheVMwareDiskImagefield,specifythedisknamewitha.vmdk extension.

a b

VMware, Inc.

41

Administration Guide

IntheCapacityfield,specifythesizeofthevirtualdiskinMB.Thedefault entryindicatesthelesserofeither4000MBortheamountoffreespace availableonthevolume. SelecttheappropriateSCSIIDintheVirtualSCSINodelist. UnderDiskMode,clickPersistent,Nonpersistent,Undoable,orAppend. SeeUsingDiskModesonpage 135. ClickExistingtoaddanexistingvirtualdisktothevirtualmachine.Specify thefollowing: IntheVMFSVolumelist,choosethevolumeonwhichthevirtualdiskis located. IntheVMwareDiskImagelist,selectthevirtualdiskyouwant.Thesizeof thevirtualdiskappearsintheCapacityfield.Youcannotchangethisvalue. SelecttheSCSIIDintheVirtualSCSINodelist. UnderDiskMode,clickPersistent,Nonpersistent,Undoable,orAppend. SeeUsingDiskModesonpage 135. ClickSystemLUN/Disktoallowthevirtualmachinetoaccessaphysicaldisk storedonaLUN.Specifythefollowing: SelectUseMetadatatoenableaccesstothedisksmetadatafileinformation. ChoosetheMetadataFileLocation. EnteranameintheMetadataFileNamefield. SelecttheSCSIIDintheVirtualSCSINodelist. ChoosetheCompatibilityoftheguestoperatingsystem: PhysicalGivestheguestoperatingsystemdirectdiskaccess. VirtualLetsyouchooseadiskmodefortheguestoperatingsystem.

d e

a b c d
!

a b c d e

10

ClickNext. TheHardwaretabforthisvirtualmachineappears. YoucanchangethedefaultsettingsESXServerassignedtothevirtualmachine (suchasthediskmode,networkcard,colordepthandanyremovabledevices)or configurationitemsyouspecified.Tochangehardware,seeConfiguringaVirtual MachinesHardwareonpage 102.

42

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

Installing a Guest Operating System and VMware Tools


Thissectiondescribesthefollowing:
! ! ! !

InstallingaGuestOperatingSysteminaVirtualMachineonpage 43 InstallingVMwareToolsintheGuestOperatingSystemonpage 44 StartingVMwareToolsAutomaticallyonpage 48 UsingtheVMwareGuestOperatingSystemServiceonpage 49

Inmostcases,configureyourvirtualmachinewithablank(unformatted)SCSIvirtual disk.Youcaninstallanoperatingsystemonthisvirtualdiskjustasyouwouldonanew physicalmachine,usingastandardinstallationCDROMandformattingthevirtual diskattheappropriateplaceintheinstallationprocess. YoucanalsoinstallfromimagefilesISOimagefilesofinstallationCDROMsand floppyimagefilesofanyfloppydisksneededfortheinstallation.UsetheVMware ManagementInterfacetoconnectthevirtualmachinesdrivestotheappropriateimage filesbeforeyoubegintheinstallation. AnotherapproachistostartwithavirtualdiskcreatedwithVMwareWorkstation3.2 orhigherorwithVMwareGSXServer2.5orhigher,andconfiguretheguestoperating systemtoworkwithVMwareESXServer. Afteryourguestoperatingsystemisinstalled,followthedirectionsbelowforinstalling VMwareToolsandthenetworkdriver.

Installing a Guest Operating System in a Virtual Machine


Toinstallaguestoperatingsystemandothersoftware,usetheVMwareRemote ConsoleonadifferentsystemthantheoneonwhichyouveinstalledESXServer. Fordetailsoninstallingtheremoteconsole,seeInstallingtheRemoteConsole Softwareonpage 70.Followthedirectionsforstartingaremoteconsoleonyour WindowsorLinuxworkstationandconnectingtoavirtualmachine. InserttheinstallationCDROMforyourguestoperatingsystemintheCDROMdrive. ClickPowerOnontheremoteconsoletoolbartobeginsettingupyourguestoperating system.Seehttp://ww.vmware.com/support/guestnotes/doc/index.htmlandtheESX Server2.5releasenotesfordetailsoninstallingspecificguestoperatingsystems. Toinstalloveranetwork,youneedISOimagefilesofinstallationCDROMsandfloppy imagefilesofanyfloppydisksneededfortheinstallation.Theinstallationinstructions inthissectionassumeyouareinstallingfromphysicalmedia.Ifyouareusingimage files,youshouldconnectthevirtualmachinesCDROMorfloppydrivestothe appropriateimagefilesbeforeyoubegininstallingtheguestoperatingsystem.
VMware, Inc. 43

Administration Guide

NOTE

Whenyouinstallaguestoperatingsystemonanewvirtualdisk,youmightgeta warningmessagethatthediskiscorrupted.Itwillaskwhetheryouwanttoplacea partitiontableonthedisk.Thismessagemeansthatsomedataneedstobewrittento thefilethatholdsyourvirtualharddisk.RespondYes.Youalsoneedtopartitionand formatthevirtualdiskasyouwouldwithanew,blankharddrive.

Installing a Guest Operating System on a Formatted Raw Disk


Ifyoutrytoinstallaguestoperatingsystemonaraworphysicaldiskthatwas formattedwithafilesystem,youmightseeaNooperatingsystemerrorwhenyou poweronthevirtualmachine.Thisoccursbecausethebootorderspecifiedinthe virtualmachinesBIOSdefaultstothefloppydisk,harddisk,andthentheCDROM drive.InsteadofbootingfromtheinstallationCDROM,thevirtualmachinetriesto bootfromtheharddisk. Toworkaroundthisissue,dooneofthefollowing:
!

ChangethebootorderinBIOSsothevirtualmachinebootsfromtheCDROM drivebeforetryingtheharddisk.Whenthevirtualmachineboots,entertheBIOS andchangethebootorderontheBootmenu. Zerooutthefirst64KBoftherawdiskusingddorasimilarutility.Forexample, usingdd:


# dd if=/dev/zero of=/dev/<device> count=64 bs=1024

Inthecommandabove,deviceisthedevicenameofthephysicaldisk.

Installing VMware Tools in the Guest Operating System


ThissectiondescribeshowtoinstallVMwareToolsandthenetworkdriverintheguest operatingsystem.Notethefollowing:
!

Thestepsforeachguestoperatingsystemassumethatyouareworkingfroma remoteconsoleconnectedtoyourvirtualmachine. Ineachprocedure,choosingSettings>VMwareToolsInstallpreparesthe CDROMdriveinthevirtualmachinetouseanISOimagefilecontainingthe VMwareToolspackages.Thisimage,whichappearsasaregularCDROMdiskin thevirtualmachine,wasplacedonyourservermachinewhenyouinstalled VMwareESXServer.

SelecttheappropriateprocedurebelowforinstallingVMwareToolsinyourguest operatingsystem.

44

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

To install VMware Tools in a Windows Server 2003 guest 1 ChooseSettings>VMwareToolsInstalltoconnectthevirtualmachines CDROMdrivetoanISOimagefileontheESXServermachine. Ifautorunisenabledinyourguestoperatingsystem,adialogboxappearsasking whetheryouwanttoinstallVMwareTools. 2 ClickInstalltolaunchtheinstallationwizard. Ifautorunisnotenabled,thedialogboxdoesnotappear.RunVMwareTools.exe fromtheCDROMdrive(chooseStart>Run>D:\VMwareTools.exe)toinstall VMwareTools. TwoHardwareInstallationmessagesappear,statingthattheVMwareSVGAand VMwarePointingDevicedrivershavenotpassedWindowsLogotesting. 3 4 Acceptthesemessagesandcontinue. Reboottheguestoperatingsystemwhenprompted. Whentheinstallationcompletes,ESXServerdisconnectstheISOimagefileand returnsthevirtualmachinesCDROMdrivetoitsoriginalconfiguration. To install VMware Tools in a Windows XP guest 1 ChooseSettings>VMwareToolsInstalltoconnectthevirtualmachines CDROMdrivetoanISOimagefileontheESXServermachine. Ifautorunisenabledinyourguestoperatingsystem,adialogboxappearsasking whetheryouwanttoinstallVMwareTools. 2 ClickInstalltolaunchtheinstallationwizard. Ifautorunisnotenabled,thedialogboxdoesnotappear.RunVMwareTools.exe fromtheCDROMdrive(chooseStart>Run>D:\VMwareTools.exe)toinstall VMwareTools. TwoHardwareInstallationmessagesappear,statingthattheVMwareSVGAand VMwarePointingDevicedrivershavenotpassedWindowsLogotesting. 3 4 Acceptthesemessagesandcontinue. Reboottheguestoperatingsystemwhenprompted. Whentheinstallationcompletes,ESXServerdisconnectstheISOimagefileand returnsthevirtualmachinesCDROMdrivetoitsoriginalconfiguration.

VMware, Inc.

45

Administration Guide

To Install VMware Tools in a Windows 2000 guest 1 ChooseSettings>VMwareToolsInstalltoconnectthevirtualmachines CDROMdrivetoanISOimagefileontheESXServermachine. Ifautorunisenabledinyourguestoperatingsystem,adialogboxappearsasking whetheryouwanttoinstallVMwareTools. 2 ClickInstalltolaunchtheinstallationwizard. Ifautorunisnotenabled,thedialogboxdoesnotappear.RunVMwareTools.exe fromtheCDROMdrive(Start>Run>D:\VMwareTools.exe,whereD:isthefirst CDROMdriveinyourvirtualmachine)toinstallVMwareTools. 3 Wheninstallationiscomplete,chooseSettings>CancelToolsInstallto disconnecttheISOimagefileandreturnthevirtualmachinesCDROMdriveto itsoriginalconfiguration.

To install VMware Tools and the Network Driver in a Windows NT 4.0 guest 1 ChooseSettings>VMwareToolsInstalltoconnectthevirtualmachines CDROMdrivetoanISOimagefileontheESXServermachine. Ifautorunisenabledinyourguestoperatingsystem,adialogboxappearsasking whetheryouwanttoinstallVMwareTools. 2 ClickInstalltolaunchtheinstallationwizard. Ifautorunisnotenabled,thedialogboxdoesnotappear.Runsetup.exefrom theCDROMdrive(chooseStart>Run>D:\setup.exe)toinstallVMwareTools. 3 Dooneofthefollowing:
!

Ifyouconfiguredthisvirtualmachinetousethevlancenetworkdriver,goto Step 5. Ifyouconfiguredthisvirtualmachinetousethevmxnetnetworkdriver, chooseStart>ControlPanel>Network>AdaptersandclickAdd.

4 5

ClickHaveDiskandtypeD:\Program files\VMware\VMware Tools\Drivers\vmxnet\winntintheInsertDiskdialogbox. ClickOKwhenVMwareVirtualEthernetAdapterappearsintheSelectOEM Optiondialogbox. TheVMwarenetworkdriverisinstalled.

ClickCloseintheAdaptersdialogboxtocompletetheinstallation. WindowsletsyouconfiguretheInternetaddressforthecard.

46

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

IfyouareinstallingonavirtualmachinethatwascreatedwithVMware Workstationandusednetworking,useanaddressdifferentfromtheonethe originalnetworkconfigurationused(thataddressisassignedtothenow nonexistentvirtualAMDcard).OrchangetheaddressassignedtotheAMDcard. NOTE TheVMwareVirtualEthernetAdapterdriverrunscorrectlyonlyifyouhave ServicePack3orlaterinstalled.Ifyoudonothavethecorrectservicepack installed,youmightgetanerrormessagesuchas:


System Process Driver Entry Point Not Found; The \SystemRoot\System32\drivers\vmxnet.sys device driver could not locate the entry point NdisGetFirstBufferFromPacket in driver NDIS.SYS.

Wheninstallationiscomplete,andbeforeyoureboot,chooseSettings>Cancel ToolsInstalltodisconnecttheISOimagefileandreturnthevirtualmachines CDROMdrivetoitsoriginalconfiguration. Rebootthevirtualmachine.

To Install VMware Tools in a Linux Guest 1 ChooseSettings>VMwareToolsInstallandclickInstall. ThisstepconnectsthevirtualmachinesCDROMdrivetoanISOimagefileonthe ESXServermachine. 2 InyourLinuxguest,becomeroot,mounttheVMwareToolsvirtualCDROM,copy theinstallerfilefromthevirtualCDROMto/tmp,andunmounttheCDROM.
su mount -t iso9660 /dev/cdrom /mnt cp /mnt/vmware-linux-tools.tar.gz /tmp umount /dev/cdrom

UntartheVMwareToolstarfilein/tmpandinstallit.
cd /tmp tar zxf vmware-linux-tools.tar.gz cd vmware-tools-distrib ./vmware-install.pl

4 5 6

Choosedirectoriesforthefiles. EnteradisplaysizeforthevirtualmachineandpressEnter. StartXandyourgraphicalenvironmentandlaunchtheVMwareTools backgroundapplication.


vmware-toolbox &

VMware, Inc.

47

Administration Guide

NOTE

Ifyoucreatedthisvirtualmachineusingthevmxnetdriver,runnetconfig oranothernetworkconfigurationutilityinthevirtualmachinetosetupthe virtualnetworkadapter.

To install VMware Tools in a NetWare 6.0 SP3, 6.5, or 5.1 SP6 guest 1 2 Poweronthevirtualmachine. ChooseFile>InstallVMwareTools. Theremainingstepstakeplaceinsidethevirtualmachine. 3 ToloadtheCDROMdriversthattheCDROMdevicemountstheISOimageasa volume,dooneofthefollowing:
!

InthesystemconsoleforaNetWare6.5virtualmachine,type:
LOAD CDDVD

InthesystemconsoleforaNetWare5.1virtualmachine,type:
LOAD CD9660.NSS

Whenthedriverfinishesloading,begininstallingVMwareTools. 4 Inthesystemconsole,type:
vmwtools:\setup.ncf

Whentheinstallationfinishes,themessageVMwareToolsforNetWarearenow runningappearsintheLoggerScreen(NetWare6.5guests)ortheConsoleScreen (NetWare5.1guests). 5 Inthesystemconsole,type:


restart server

MakesuretheVMwareToolsvirtualCDROMimage(netware.iso)isnot attachedtothevirtualmachine.Ifitis,rightclicktheCDROMiconinthestatus baroftheconsolewindowandselectDisconnect.

Starting VMware Tools Automatically


YoumayfindithelpfultoconfigureyourguestoperatingsystemsothatVMwareTools startswhenyoustartX.ThestepsvarydependingonyourLinuxdistributionandthe desktopenvironmentyouarerunning.Checkyouroperatingsystemdocumentation forthestepstotake.

48

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

To start VMware Tools in a Red Hat Linux 7.1 guest using GNOME, for example 1 OpentheStartupProgramspanelintheGNOMEControlCenter. MainMenu(thefootinthelowerleftcornerofthescreen)>Programs>Settings >Session>StartupPrograms 2 3 4 ClickAdd. IntheStartupCommandfield,entervmware-toolbox. ClickOK,clickOKagain,andclosetheGNOMEControlCenter.

ThenexttimeyoustartX,VMwareToolsstartautomatically.

Using the VMware Guest Operating System Service


WhenyouinstallVMwareToolsinavirtualmachine,theVMwareguestoperating systemserviceisoneoftheprimarycomponentsinstalled.Theguestservicecandothe following:
!

Synchronizethetimeoftheguestoperatingsystemwiththetimeonthephysical computer.SeeSynchronizingtheTimeBetweentheGuestandServiceConsoles onpage 50 Gracefullypoweroffandresetavirtualmachine.SeeShuttingDownand RestartingaVirtualMachineonpage 50. Executecommandsinthevirtualmachinewhenitisrequestedtohaltorrebootthe guestoperatingsystem.SeeExecutingCommandstoHaltorRebootaVirtual Machineonpage 51. Passastringfromtheserviceconsoletotheguestoperatingsystem.SeePassing aStringfromtheServiceConsoletotheGuestOperatingSystemonpage 52. SendaheartbeattoVMwareESXServersothatitknowstheguestoperating systemisrunning.

Theguestservicestartswhenyoustarttheguestoperatingsystem. InaLinuxguest,theguestserviceiscalledvmware-guestd.Todisplayhelpaboutthe guestservice,includingalistofalloptions,usethefollowingcommand:


/etc/vmware/vmware-guestd --help

InaWindowsguest,theguestserviceprogramfileiscalledVMwareService.exe.To displayhelp,rightclicktheVMwareToolsiconinthesystemtrayandchooseHelp.

VMware, Inc.

49

Administration Guide

Synchronizing the Time Between the Guest and Service Consoles


Theguestservicecansynchronizethedateandtimeintheguestoperatingsystemwith thetimeintheserviceconsoleonceeverysecond.IntheVMwareToolscontrolpanel, ontheOthertab(OptionsinaLinuxguest),selectTimesynchronizationbetweenthe virtualmachineandthehostoperatingsystem.

Figure 2-1. Options (Other) Tab Inaddition,theguestservicecansynchronizethedateandtimeintheguestwiththe serviceconsoleinresponsetovarioussystemevents,forexample,whenyouresume fromdisk.Disablethisoptionintheconfigurationfilebysetting:


time.synchronize.resume.disk = FALSE

Shutting Down and Restarting a Virtual Machine


ESXServercansignaltheguestservicetoshutdownorrestartavirtualmachine.After theguestservicereceivesarequesttoshutdownorrestart,itsendsan acknowledgmentbacktoESXServer. YoucansendtheserequestsfromtheVMwareManagementInterfaceortheservice consolescommandline. Whetheritispossibletoshutdownorrestartavirtualmachinedependsonthestateof thevirtualmachine.

50

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

Shutting Down or Restarting a Virtual Machine from the VMware Management Interface
Youcanclick toshutdownor torestartavirtualmachinefromtheVMware ManagementInterface.Afteryouselectoneoftheseoperations,clicktotheUsersand Eventspageforthisvirtualmachinetorespondtoanymessagesthatrequirea response. Shuttingdownistheequivalentofusingtheguestoperatingsystemsshutdown command,andturningoffpowertothevirtualmachine.Restartingistheequivalentof usingtheguestoperatingsystemsrestartcommand. Ifyoureceiveaneventlogmessagestating,Youwillneedtopowerofforresetthe virtualmachineatthispoint,connecttothevirtualmachinewitharemoteconsoleand clickPowerOfforResettocompletetheoperation. NOTE PowerOffandResetarenotavailablewhiletheseoperationsareinprogress. Youcanalsoforcepowerofforforceresetfromthemenu.Thesecommandsbypassthe guestserviceandperformthevirtualequivalentofshuttingoffthepowertoaphysical machineorpressingaphysicalresetbutton. Formoreinformation,seeChangingthePowerStateofaVirtualMachineonpage 88.

Shutting Down or Restarting a Virtual Machine from the Command Line


Youcanshutdownandrestartavirtualmachinefromtheserviceconsolecommand lineusingthevmware-cmdutility. Thefollowingcommandsreturnyoutothecommandprompt,beforetheyfinish executing,althoughtheshutdownorrestartprocesscantakesometimetocomplete:
vmware-cmd <vm-cfg-path> stop <powerop_mode> vmware-cmd <vm-cfg-path> reset <powerop_mode>

wherehard,soft,ortrysoftspecifiesthebehaviorofthepoweroperation <powerop_mode>.If<powerop_mode>isnotspecified,thedefaultbehaviorissoft.For moreinformation,seetheVMwareScriptingAPIUsersManual,availableat http://www.vmware.com/support/developer.

Executing Commands to Halt or Reboot a Virtual Machine


InaLinuxguest,youcanhavetheguestserviceexecutespecificcommandswhenESX Serverasksittohaltorrebootthevirtualmachinesguestoperatingsystem.Ifyouuse nonstandardutilitiesorwanttodoadditionalactionsbeforeshuttingdownor rebootingtheguestoperatingsystem,overridethedefaultcommandstheguestservice

VMware, Inc.

51

Administration Guide

executesbymodifyingthe/etc/vmware/dualconf.vmstartupscriptintheguestto starttheguestservicewiththefollowingcommandlineoptions:
/etc/vmware/vmware-guestd --halt-command <command>

where<command>isthecommandtoexecutewhenESXServeraskstheguestservice tohalttheguestoperatingsystem.
/etc/vmware/vmware-guestd --reboot-command <command>

where<command>isthecommandtoexecutewhenESXServeraskstheguestservice toreboottheguestoperatingsystem.

Passing a String from the Service Console to the Guest Operating System
WithESXServerandknowledgeofascriptinglanguagelikePerlorNetShell,youcan passastring(machine.id) fromyourvirtualmachinesconfigurationfiletotheguest operatingsystemwhenyouusetheconfigurationfiletolaunchavirtualmachine. Determinethecontentofthestringyoupasstotheguestoperatingsystem. Foradditionaldetailsandsamplescripts,includinginformationonpassingmessages bothwaysbetweentheserviceconsoleandaguest,seetheVMwareScriptingAPI documentationathttp://www.vmware.com/support/developer/. Usethisfeatureonlyifyouhaveagoodunderstandingofascriptinglanguageand knowhowtomodifysystemstartupscripts.

Example of Passing a String from the Service Console to the Guest


Ifyouusemultipleconfigurationfilesthatpointtothesamevirtualdisk,each configurationfilecancontainitsownuniquemachine.idline. <config_file_1>.vmxcontains:
scsi0:1.present = TRUE scsi0:1.name = my_common_virtual_hard_drive.vmdk scsi0:1.mode = persistent machine.id = the_id_for_my_first_vm

<config_file_2>.vmxcontains:
scsi0:1.present = TRUE scsi0:1.name = my_common_virtual_hard_drive.vmdk scsi0:1.mode = persistent machine.id = the_id_for_my_second_vm

Usingmachine.id,youmaypasssuchstringsastheWindowssystemID(SID),a machinename,oranIPaddress.Intheguestoperatingsystemstartupscript,youcan

52

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

havetheguestserviceretrievethisstring,whichcanbeusedbyyourscripttosetyour virtualmachinessystemID,machinename,orIPaddress. Inthefollowingexample,aLinuxguestillustrateshowyoucanusetheguestserviceto retrieveastringcontainingwhatbecomesthevirtualmachinesmachinenameandIP address.UseRedHat62VMasthemachinenameand148.30.16.24astheIPaddress. To retrieve the machine name and IP address of a Linux guest 1 Definethefollowingoptioninyourvirtualmachinesconfigurationfile:
machine.id = RedHat62VM 148.30.16.24"

SeeSettingStartupandShutdownOptionsbyModifyingtheConfigurationFile Directly(AdvancedUsersOnly)onpage 126. 2 3 Launchavirtualmachineusingthisconfigurationfile. Retrievethemachine.idstringinthevirtualmachine. Inyoursystemstartupscript,beforethenetworkstartupsection,addthefollowing command:


/etc/vmware/vmware-guestd --cmd 'machine.id.get'

InaWindowsguest,thecommandtoretrievethestringis:
VMwareService --cmd machine.id.get

Customizethisstartupscriptsoitusesthestringtheguestserviceretrievedduring startuptosetthevirtualmachinesnetworknametoRedHat62VManditsIP addressto148.30.16.24.Thisshouldbelocatedinthescriptbeforethenetwork servicesarestarted. Fromtheserviceconsole,youcanpreventtheserviceconsolefrompassingastringto theguestoperatingsystemthroughtheguestservice.Setthefollowinglineinyour virtualmachinesconfigurationfile:


isolation.tools.machine.id.get.disable = TRUE

Using PXE with Virtual Machines


Youcanuseaprebootexecutionenvironment(knownasPXE)tobootavirtualmachine overanetwork. WhenyouusePXEwithavirtualmachine,youcan:
!

Remotelyinstallaguestoperatingsystemoveranetworkwithouttheneedforthe operatingsysteminstallationmedia. Deployanimageofavirtualdisktothevirtualmachine.


53

VMware, Inc.

Administration Guide

BootaLinuxvirtualmachineoverthenetworkandrunitdiskless.

UsePXEwithyourvirtualmachineinconjunctionwithremoteinstallationtoolssuch asWindows2000RemoteInstallationServicesortheRedHatLinux9.0installersPXE package.YoucanuseGhostorAltiristostreamanimageofanalreadyconfigured virtualdisktoanewvirtualmachine. Makesurethevirtualmachinehasavirtualnetworkadapter;oneisinstalledby default.ESXServersupportsPXEwhenthevirtualmachineisconfiguredtouseeither thevmxnetorvlancevirtualnetworkadapter. Thevirtualmachinemusthaveavirtualdiskwithoutaguestoperatingsystem installed. Whenavirtualmachinebootsandnoguestoperatingsystemisinstalled,itbootsfrom devices(harddisk,CDROMdrive,floppydrive,networkadapter)intheorderin whichtheyoccurinthebootsequencespecifiedinthevirtualmachinesBIOS.Touse PXEwithavirtualmachine,putthenetworkadapteratthetopofthebootorder.When thevirtualmachinefirstboots,pressF2toenterthevirtualmachinesBIOSandchange thebootorder. Asthevirtualmachinebootsfromthenetworkadapter,ittriestoconnecttoaDHCP server.TheDHCPserverprovidesthevirtualmachinewithanIPaddressandalistof anyPXEserversavailableonthenetwork.AfterthevirtualmachineconnectstoaPXE server,itcanconnecttoabootablediskimage(suchasanoperatingsystemimageora GhostorAltirisdiskimage)andstartinstallingaguestoperatingsystem. VMwarehastestedandsupportsthefollowingPXEconfigurationswithESXServer:
!

RemoteinstallationofaWindowsServer2003guestoperatingsystemfroma serverrunningWindowsServer2003AutomatedDeploymentServices RemoteinstallationofaWindows2000guestoperatingsystemfromaserver runningWindows2000Server/AdvancedServerRemoteInstallationServices RemoteinstallationofaLinuxguestoperatingsystemfromaRedHatEnterprise Linux3.0ASPXEbootserver RemoteinstallationofasupportedguestoperatingsystemfromaGhostimage usingWindows2000andGhostRISBootpackage RemoteinstallationofasupportedguestoperatingsystemfromanAltirisimage usingaWindows2000Altirisserver NetworkbootingaLinuxvirtualmachinebyconnectingwiththeLinuxDiskless optiontoaRedHatEnterpriseLinux3.0ASserver

54

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

NOTE

ESXServerdoesnotsupportinstallationofaWindowsXPguestoperatingsystem usingPXE.

Configuring a Virtual Machine to Use the LSI Logic SCSI Adapter


ESXServervirtualmachinescanusevirtualBusLogicandvirtualLSILogicSCSI adapters.Bydefault,virtualmachinesusetheBusLogicadapter.However,Windows Server2003virtualmachinesareconfiguredtousetheLSILogicadapterbydefault. YoucanaddtheLSILogicSCSIadaptertoanyvirtualmachinebymodifyingits configurationfile.ForanexistingvirtualmachineorforanewWindowsXPor Windows2000virtualmachine,furtherstepsareneededintheguestoperatingsystem. WindowsXPandWindows2000donotincludeadriverfortheLSILogicSCSIadapter, sotheseguestsusetheBusLogicadapterbydefault.TousetheLSILogicSCSIadapter withaWindowsXPorWindows2000virtualmachine,downloadthedriverfromthe DownloadCenterattheLSILogicWebsite.Gotohttp://www.lsilogic.com/andlook fortheLSI20320SCSIadapterdriverforyourguestoperatingsystem.Thefilesareina WinZiparchive. NOTE Linuxdistributionswithkernelsinthe2.4.18seriesorlaterincludeadriverthat supportstheLSILogicadapter.Ifyourguesthasanolderkernelandyouwanttouse theLSIadapterinsteadoftheBusLogicadapter,VMwarerecommendsthatyou upgradethekernelpackagestothelatestversionavailableforthedistribution.Youdo notneedtodownloadthedriverfromLSILogic.

Adding the Adapter to the Virtual Machines Configuration File


ForbothWindowsandLinuxvirtualmachines,modifythevirtualmachines configurationfiletousetheLSILogicSCSIadapter.Foranewvirtualmachine, completethefollowingstepsbeforeyouinstalltheguestoperatingsystem. ForanexistingvirtualmachinewithwhichyouwanttousetheLSILogicadapter,shut downtheguestoperatingsystemandpoweroffthevirtualmachinebeforefollowing thesesteps. CAUTION EventhoughSuSELinux8.1includesthecorrectdriverforLSILogic, becauseofanerrorinaSuSELinuxprocess,theguestoperatingsystem mustfirstbeinstalledwiththeBusLogicdriver.AftertheSuSELinux8.1 guestoperatingsystemhasbeeninstalledandboots,shutdownthevirtual machineandcompletethestepsbelow.

VMware, Inc.

55

Administration Guide

To add the LSI Logic SCSI Adapter to the configuration file 1 2 Connecttotheserviceconsoleand,usingatexteditor,openthevirtualmachines configurationfile(.vmx). Dooneofthefollowing:
!

IfyouareaddingtheLSILogicadaptertoanewvirtualmachinethatis configuredforaBusLogicadapter,switchtheoriginalBusLogicadaptertothe LSILogicadapterbychangingthisline:


scsi<n>.virtualDev = vmxbuslogic

to
scsi<n>.virtualDev = vmxlsilogic !

IfyouareaddingtheLSILogicadaptertoanexistingvirtualmachinethatis configuredforaBusLogicadapter,addtheLSILogicadapterwithnodevices aftertheBusLogicdevice.Forexample,ifyouhaveoneSCSIadapterinthe virtualmachine,theconfigurationfilelookssomethinglikethis:


### ### SCSI devices ### # SCSI controller scsi0 scsi0.present = TRUE scsi0.virtualDev = vmxbuslogic scsi0:1.present = TRUE scsi0:1.name = vmhba0:6:0:1:win2k.vmdk scsi0:1.mode = persistent

ToaddtheLSILogicadapter,typethefollowinglinesaftertheBusLogicdevice information:
scsi1.present = TRUE scsi1.virtualDev = vmxlsilogic

Saveyourchanges,andclosetheconfigurationfile.

NowthattheLSILogicSCSIadapterhasbeenaddedtothevirtualmachines configuration,itwillberecognizedbytheguestoperatingsystem.Followthe appropriatestepsforeithertheWindowsorLinuxguestoperatingsystems:


!

FornewLinuxvirtualmachines(usingtheappropriatekernel),installtheguest operatingsystem,whichwillbeconfiguredforusingtheLSILogicadapter.No otherstepsarenecessary.ForanexistingLinuxvirtualmachine,completethesteps

56

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

inConfiguringtheLSILogicSCSIAdapterinaLinuxGuestOperatingSystem onpage 58.


!

FornewWindowsvirtualmachines,completethestepsinConfiguringtheLSI LogicSCSIAdapterinaWindowsGuestOperatingSystem,next.

Configuring the LSI Logic SCSI Adapter in a Windows Guest Operating System
BeforeyoubeginconfiguringyourWindowsguest,downloadtheLSILogicdriver fromtheLSILogicWebsite,asdiscussedabove.
!

Foranewvirtualmachine,unzipthedriverfilestoafloppydisk.Thisfloppydisk isneededwhileinstallingtheguestoperatingsystem. Foranexistingvirtualmachine,unzipthedriverfilesintoadirectoryintheguest operatingsystem,thenshutdowntheguestandpoweroffthevirtualmachine.

To configure the LSI Logic SCSI Adapter in a Windows guest operating system 1 2 Poweronthevirtualmachine. Dooneofthefollowing:
!

Ifyouareinstallinganewguestoperatingsystem,pressF6atthebeginning oftheinstallationtohaveWindowspromptforadriverdisk.Whenaskedto loadadditionaldrivers,insertthefloppydiskcontainingthedriverfilesand letWindowscopythedriverfilesandcontinuetheinstallation.Donotremove thefloppydiskfromthefloppydriveuntiltheinstallerrebootstheguest. IfyouarechangingfromtheBusLogictotheLSILogicadapterinanexisting virtualmachine,theguestoperatingsystemrecognizesthepresenceoftheLSI LogicadapterandtheAddNewHardwarewizardstartsafteryoulogin. BrowsetothedirectorywhereyouunzippedthedriverfilesandletWindows copythemtothecorrectplace.

3 4

AfteryouinstalltheLSILogicdriver,makesurethevirtualmachineboots completely. ChecktheguestoperatingsystemsDeviceManagertoensuretheLSILogic adapterappearsandisworking.


!

IfyouareinstallingtheLSIadapterinanewguestoperatingsystem,youare finished. IfyouareswitchingfromaBusLogicadapterinanexistingvirtualmachine, continuewiththeremainingsteps.

VMware, Inc.

57

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

RemovetheLSILogicadapteryouaddedbyremovingtheselines:
scsi1.present = TRUE scsi1.virtualDev = vmxlsilogic

Saveyourchangestotheconfigurationfileandbootthevirtualmachine. Afterthevirtualmachineboots,verifyintheDeviceManagerthattheguestis usingtheLSILogicdriveronly.

NOTE

Theguestshouldfindthedriverautomatically.Sometimesmovingthevirtual devicesaroundcausesthePCIslotstochange,sotheguestmightdetectsome devices(likethevmxnetnetworkdriver)again.Lettheoperatingsystem detectthedevicesandcontinue.

Configuring the LSI Logic SCSI Adapter in a Linux Guest Operating System
ThefollowingstepsapplytoexistingvirtualmachinesrunningRedHatLinux7.3and toSuSELinux8.0guestoperatingsystemsandlater.Thekernelsthatcomewiththese andlaterdistributionsincludeadriverthatsupportstheLSILogicSCSIadapter.The driveriscalledmptscsihanddependsonanothermodulecalledmptbase.Earlier kernelsmighthavethemptscsihdriver,buttheydonotsupportthisadapter. NOTE ForanewLinuxvirtualmachineinwhichyouintendtoinstallaRedHatLinux7.3or SuSELinux8.0guestoperatingsystemorlater,installtheguestoperatingsystem.The guestisconfiguredtousetheLSILogicadapterduringinstallation. TousetheLSILogicadapterinanolderdistribution,upgradethevirtualmachines kernelorpatchthekernelwiththesourcefromtheLSILogicWebsiteandrecompile thekernel.VerifythattheLSILogicadapterisdetected.Atacommandpromptinthe guest,type:
modprobe mptscsih

Ifnoerrorsappear,verifywithlsmodthatbothmptscsihandmptbaseareinstalled, andcontinue.Otherwise,youmustdeterminewhythedriverdidnotload.

58

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

ForanexistingLinuxvirtualmachinewiththemodifiedconfiguration,theguestneeds tobootwiththeLSILogicSCSIadapter,soittriestoloadthatdriverfromtheinitial RAMdisk(initrd)beforetherootpartitionismounted. To configure the LSI Logic SCSI Adapter in a Linux guest operating system 1 2 Edit/etc/modules.confandsetscsi_hostadaptertomptscsih. CreateanewinitialRAMdiskfortherunningkernel. mkinitrd --preload mptbase /boot/initrd-<kernelname>-lsi.img <kernelname> Where<kernelname>istheversionoftheguestskernel;suchas2.4.183. Themodules.confmodificationyoumadeallowsmkinitrdtoprovidetheLSI LogicSCSIdrivertothekernelwhenbooting. 3 Edit/etc/lilo.confor/boot/grub/grub.conf(dependingonwhichisinuse intheguest). Createanewentrythatusestheexistingkernel,butthenewRAMdiskfile.Keep theoriginalbootentry,incaseyouhaveaproblemandneedtobootwiththe BusLogicadapter.Installthebootloader(lilo,orgrub-install /dev/sda) again. 4 Shutdownandpoweroffthevirtualmachine,andedittheconfigurationfileinthe managementinterface. SwitchtheBusLogicadaptertotheLSILogicadapterbychangingthisline:
scsi0.virtualDev = vmxbuslogic

to
scsi0.virtualDev = vmxlsilogic

RemovetheLSILogicadapteryouaddedbyremovingtheselines:
scsi1.present = TRUE scsi1.virtualDev = vmxlsilogic

Saveyourchangestotheconfigurationfileandbootthevirtualmachineagain. Ifthevirtualmachinedoesnotboot,switchtheconfigurationbacktoBusLogicand bootwiththeoriginalconfiguration,andtroubleshootthefollowingissues:


!

RAMdiskmightnothavebeencreatedcorrectly.Itmustpreloadmptbase andloadmptscsihasthemainSCSIdriver,whichyouspecifiedinStep 1. Verifythatbothoftheseactivitiesoccurred.

VMware, Inc.

59

Administration Guide

Bootloadermightnothavebeeninstalledorwasnotinstalledcorrectly,which resultsintheloaderloadingtheoldramdiskimage.Checkthebootloader configurationandinstallthebootloaderagain. KerneldoesnotsupporttheLSILogicadapter.Checkthatyoucanmanually modprobe mptscsiwithouterrorsandthatitappearsintheoutputoflsmod. Ifnot,upgradethekernelandstartover. Youmightseedifferentresultsondifferentdistributions.

NOTE

Importing, Upgrading, and Exporting Virtual Machines


Importing,upgrading,andexportingvirtualmachinesinvolvesthefollowingtasks:
! ! !

ConfiguringaVirtualMachinetoUseMorethanOneVirtualProcessor,next MigratingOlderESXServerVirtualMachinesonpage 62 MigratingVMwareWorkstationandVMwareGSXServerVirtualMachineson page 63 ImportingaGSXServerorWorkstationVirtualMachineonpage 66 ExportingVirtualMachinesonpage 68

! !

Configuring a Virtual Machine to Use More than One Virtual Processor


WhenyoucreateavirtualmachinewithESXServer2.5,youcancreateitwithoneor twovirtualprocessors.Toconfigureavirtualmachinewithmorethanonevirtual processor,youmustmeetthefollowingconditions:
!

ThevirtualmachinemustbecreatedunderESXServer2.5.VMwaredoesnot supportupgradingavirtualmachinecreatedunderESXServer1.5.2toESXServer 2.5andconfiguringitasamultiprocessororACPIvirtualmachine.Creatinga virtualmachineunderVMwareGSXServer2.5.1orVMwareWorkstation4.0,and importingittoESXServer2.5whileupgradingthenumberofvirtualprocessorsis alsonotsupported. YoumusthavepurchasedtheVMwareVirtualSMPforESXServerproductand createdthevirtualmachineunderESXServer2.5.Formoreinformationonthe VMwareVirtualSMPforESXServerproduct,contactVMwareoryourauthorized salesrepresentative.Afteryouhavethelicense,installtheproductbyenteringthe serialnumberwhenyouconfiguretheESXServersystem.SeetheVMwareESX ServerInstallationGuide.

60

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

Theguestoperatingsystemmustsupportmultiprocessorsystems.Examples includeWindowsServer2003,Windows2000,andRedHatEnterpriseLinuxAS 2.1.ReviewthelistofsupportedguestoperatingsystemsintheVMwareESXServer InstallationGuidetoseewhichguestsaremultiprocessororSMPcapable. ThevirtualmachinecannothavemorevirtualprocessorsthantheESXServer systemhasphysicalprocessors.Tocreateavirtualmachinewithtwovirtual processors,theESXServersystemmusthaveatleasttwophysicalprocessors.

First,configurethevirtualmachinetousemorethanonevirtualprocessorusingthe managementinterface.SeeConfiguringaVirtualMachinesMemoryandVirtual Processorsonpage 105.Followthestepsappropriatetotheguestoperatingsystem below.

Windows Server 2003 Guest Operating Systems


WindowsServer2003upgradestheHALautomatically.Usethemanagementinterface toconfigurethevirtualmachinetousemorethanonevirtualprocessor.Whenyou poweronthevirtualmachine,theguestoperatingsystemdetectsthenewprocessor andupdatestheHALaccordingly.

Windows 2000 Guest Operating Systems


ForWindows2000guestoperatingsystems,tousemorethanonevirtualprocessor, configurethevirtualmachinetousemorethanonevirtualprocessor.Upgradethe guestoperatingsystemsHAL.VirtualmachinescreatedwithoneprocessorinESX Server2.5usetheACPIUniprocessorHAL.Tousetwovirtualprocessors,usetheACPI MultiprocessorHAL.TochangetheHAL,followtheinstructionsintheMicrosoft KnowledgeBase.Gotosupport.microsoft.com/default.aspx?scid=kb;ENUS;237556.

Linux Guest Operating Systems


Tocreateavirtualmachinewithmorethanonevirtualprocessor,createanewvirtual machinewithtwovirtualprocessorsandinstalltheguestoperatingsysteminthisnew virtualmachine. TheLinuxdistributionmustsupportSMP.SupportedLinuxguestoperatingsystems thatcanbeconfiguredwithmorethanonevirtualprocessorincludeRedHatEnterprise Linux2.1and3.0,RedHatLinux9.0,SuSELinux8.2,andSuSELinuxEnterpriseServer (SLES)8and9.0. ForthelistofsupportedLinuxguestoperatingsystems,refertotheESXServer InstallationGuideathttp://www.vmware.com/support/pubs/esx_pubs.html.

VMware, Inc.

61

Administration Guide

Downgrading to One Virtual Processor


VMwareESXServerdoesnotsupportdowngradingamultiprocessorvirtualmachine toauniprocessorvirtualmachine.

Migrating Older ESX Server Virtual Machines


YoucanusevirtualmachinescreatedwithversionsofESXServerolderthan2.5.Virtual machinescreatedinESXServer1.5canworkasis.Totakeadvantageofthenew featuresofthecurrentrelease,upgradeyourvirtualmachines. IfyoucreatedthevirtualmachineunderESXServer1.5anddonotwanttoupgradethe virtualmachine,runitinlegacymode.SeeRunningESXServer1.5VirtualMachines inLegacyModeonpage 63. NOTE YoumustupgradevirtualmachinescreatedunderESXServer1.0orESXServer1.1to ESXServer1.5beforetheycanbemigratedtoESXServer2.5.Afterthesevirtual machinesrununderESXServer1.5,migratethemtoESXServer2.5.Seetheupgrade instructionsintheESXServerInstallationGuideat http://www.vmware.com/support/pubs/esx_pubs.html. UpgradethevirtualmachineshardwareforanyvirtualmachinecreatedunderESX Server1.0,1.1or1.5.Makesurethevirtualmachineispoweredoff.OntheStatus Monitorinthemanagementinterface,clickthearrownexttotheterminalicon( )and chooseConfigureHardware.OntheHardwaretab,clickUpgradeVirtualHardware, andclickOKtoupgradethehardware. Assigndiskbandwidthsharestothevirtualmachine.SeeManagingDiskBandwidth fromtheManagementInterfaceonpage 372.

Upgrading Windows Server 2003 Guest Operating Systems Created by ESX Server 1.5.2
IfyouusedESXServer1.5.2tocreateavirtualmachinewithaWindowsServer2003 guestoperatingsystem,updatetheguestOSconfigurationparameterinthevirtual machinesconfigurationfile.Otherwise,thisvirtualmachinewillnotrunproperlywith ESXServer2.5. To update the guestOS configuration parameter 1 2 LogintotheVMwareManagementInterfaceastheownerofthevirtualmachine orastherootuser. ClickthearrowtotherightoftheterminaliconfortheWindowsServer2003 virtualmachineandchooseConfigureOptions.

62

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

3 4

ClicktheOptionstaband,underVerboseOptions,clickthelink. ChangethevalueoftheguestOSconfigurationparametertooneofthefollowing:
! ! !

winNetWeb(WindowsServer2003WebEdition) winNetStandard(WindowsServer2003StandardEdition) winNetEnterprise(WindowsServer2003EnterpriseEdition)

ClickOKtosaveyourchanges.

Running ESX Server 1.5 Virtual Machines in Legacy Mode


YoucanchoosetonotupgradeanESXServer1.5virtualmachineandrunitinlegacy mode.Thisletsyouusethevirtualdiskasis.Changescanbewrittentothevirtualdisk file.Youcanaddanyvirtualhardwaretoalegacyvirtualmachine,including upgradingVMwareTools. AnyvirtualmachinescreatedbeforeESXServer2.5canhaveonlyasinglevirtual processor.MultiprocessorvirtualmachinesmustbecreatedunderESXServer2.0.

Using the LSILogic SCSI Adapter


PriortoESXServer2.5,virtualmachinesonlyusedBusLogicSCSIadapters.Nowyou canchoosetouseeithertheBusLogicSCSIadapterortheLSILogicSCSIadapterfor yourvirtualmachines. IfyouareupgradinganolderESXServervirtualmachine,upgradethevirtualmachine hardwarebeforeproceeding.InstallthelatestversionofVMwareTools.Ifnecessary, poweroffthevirtualmachineandupgradethevirtualhardware.Makesuretheguest operatingsystembootscompletely.Poweroffthevirtualmachineandbackitup.You arereadytoaddtheLSILogicadapter. ToaddtheLSILogicSCSIadaptertothevirtualmachine,seeConfiguringaVirtual MachinetoUsetheLSILogicSCSIAdapteronpage 55.

Migrating VMware Workstation and VMware GSX Server Virtual Machines


YoucanmigratevirtualmachinescreatedwithVMwareWorkstation4orearlieror VMwareGSXServer2.5.1orearliertoyourVMwareESXServersystem. Thevirtualmachineyouwanttomigratemusthavebeenconfiguredwithavirtual SCSIdiskandhaveasupportedguestoperatingsysteminstalled.Forthelistof supportedguestoperatingsystems,seetheVMwareESXServerInstallationGuide.

VMware, Inc.

63

Administration Guide

NOTE

VirtualmachinescreatedunderversionsearlierthanGSXServer2.0orWorkstation3.2 mustbeupgradedtoESXServer1.5beforetheycanbemigratedtoESXServer2.5.After thesevirtualmachinesrununderESXServer1.5,migratethemtoESXServer2.5.See theupgradeinstructionsintheESXServerInstallationGuideat http://www.vmware.com/support/pubs/esx_pubs.html. Importthevirtualdisksandanyredologstotheserverandcreateanewvirtual machineconfiguration.SeeImportingaGSXServerorWorkstationVirtualMachine onpage 66. OntheVMFSpartitionwhereyoustoreyourvirtualmachines,haveenoughspaceto holdthefullcapacityofthesourcevirtualdisk.AvirtualdiskcreatedinESXServerhas itsfullcapacityallocatedatthetimethevirtualdiskfileiscreated.Fora2GBvirtual disk,thevirtualdiskfileis2GBatthetimethediskiscreated. InVMwareWorkstationandGSXServer,thevirtualdiskfileusuallystartssmallerand growstothemaximumcapacityasdataisadded.Youcancreatea2GBvirtualdisk, installtheguestoperatingsystemandthevirtualdiskmaybecontainedina500MBfile. However,whenyoumigratethevirtualdisktoESXServer,theimportprocessconverts thediskforESXServerandthediskoccupies2GBofspaceonthepartition. CAUTION Ifyoucreatedavirtualdiskthatiscontainedinasingle.vmdkfilelarger than2GBandwanttomigratethevirtualdisktoESXServer,FTPorcopythe diskfromtheWorkstationhosttotheESXServermachine.Afterthefilehas beencopiedtotheserviceconsole,usevmkfstoolstoimportthediskinto ESXServer.Forthesyntaxonhowtoimportthedisk,seeExamplesUsing vmkfstoolsonpage 259.

NOTE

ESXServerversion2.5usesadefaultfilenameextensionof.vmdkforvirtualdisks. VirtualmachinescreatedunderESXServer2.1andearliercreatediskfileswitha.dsk extension. Ifthevirtualdiskhasaredolog(GSXServer2.5orWorkstation3.2orearliervirtual machines)orasnapshot(Workstation4virtualmachines)associatedwithit,youcan doeitherofthefollowing:


!

Forthemostcurrentrepresentationofthevirtualdiskbeforeyouimportit,commit thechangesintheredologortakeasnapshotjustbeforeimporting. Tousethebasedisk,discardthechangesintheredologormigratethevirtual machinewithoutthesnapshot(.vmss)file.

64

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

WhenyouinstallVMwareToolsintheVMwareESXServervirtualmachine,youcan setupanewnetworkdriver. VirtualmachinesmigratedfromWorkstationandGSXServercannotbeconfiguredto usemorethanonevirtualprocessor.

Disk Geometry Failures When Importing GSX Server Virtual Machines


IfyouusedvmkfstoolstoimportavirtualmachinecreatedunderGSXServertoESX Server,afteryouimportthevirtualmachine,youmightseethefollowingmessage: Diskgeometrymismatch.Topoweronthevirtualmachineyoushouldspecify scsi<adapter-id>:<target-id>.biosGeometry=<cylinders>/<heads>/< sectors>intheconfigurationfile. Asimilarproblemcanoccurifyouusedthemanagementinterfacefilemanagerto importthevirtualmachine,althoughnomessageappears.Ifyouhaveproblems poweringonavirtualmachinewiththeimporteddisk,youmighthaveamismatch withthevirtualdisksgeometry. VirtualdiskscreatedunderGSXServeruseadifferentdiskgeometrythanvirtualdisks createdunderESXServer.Todeterminethecorrectdiskgeometry,runthefollowing vmkfstoolscommandonthesourcevirtualdisk(thecopyofthevirtualdiskonthe GSXServerhost,notthediskinaVMFSpartition):
vmkfstools -g //path/to/<sourceVirtualDisk>.vmdk

Afteryoudeterminethediskgeometry,youcanaddthecorrectgeometryinformation totheconfigurationfile.SeeSettingStartupandShutdownOptionsbyModifyingthe ConfigurationFileDirectly(AdvancedUsersOnly)onpage 126. Createanoptioncalledscsi<adapter-id>:<target-id>.biosGeometryandsetthe valueoftheoptionto<cylinders>/<heads>/<sectors>,where <adapter-id>:<target-id>istheSCSIIDofthevirtualdiskontheESXServer systemand<cylinders>/<heads>/<sectors>isthenumberofcylinders,heads, andsectorsonthevirtualdiskreturnedbythevmkfstoolscommand. Forexample,ifthevirtualdiskislocatedontheSCSI0:0nodeinthevirtualmachineon theESXServersystem,andyoudeterminethatthediskgeometryoftheoriginalvirtual disk(theoneontheGSXServerhost)contains261cylinders,255heads,and63sectors, addthefollowingoptiontotheconfigurationfile:
scsi0:0.biosGeometry=261/255/63

Assignthefollowingvaluetothenewoption:
261/255/63

VMware, Inc.

65

Administration Guide

Otherwise,ifyoudonotaddthenewgeometryinformationtotheconfigurationfile, whenyoupoweronthevirtualmachine,amessageappearsstatingError loading operating system.Topoweronthevirtualmachine,addthenewoptiontothe configurationfile,asdiscussedabove.

Path Name Failures When Importing GSX Server Virtual Machines


PlaindisksusedwithvirtualmachinescreatedinGSXServermightcontaindiskfile namesthatESXServercannottranslate.Versions2.5andearlierofGSXServerused absolutepathnamestoidentifydiskfileswhencreatingplaindisks.Notallplaindisks createdwithearlierversionsofGSXServercontainpathnamespreventingESXServer fromimportingthem.IfyoutrytoimportaplaindiskwithvmkfstoolsandESX Serverappears,checkthepathnameintheplaindisk:
DiskLib_Open() failed. No such file or directory (131591)

NOTE

Thisproblemappliesonlytoplaindisks.VirtualandrawdiskscreatedinGSXServer shouldimportcorrectlyusingvmkfstools. Opentheplaindiskdescriptor(.pln)fileandlocatethepathnametothediskfile.If thepathnamerefersoutsidethedirectorycontainingthedescriptorfile,youmust changeit. Forexample,ifthepathnameis:


C:\user\vmware\VMs\W2KServSP3\Win2KSv1.dat

ESXServercannottranslatetheGSXServerpathnametolocatetheplaindiskdata (.dat)file. Repairtheplaindiskbylocatingthedatafileinthesamedirectoryasthedescriptorfile andchangingthepathnametorefertothedatafiledirectly.Inthisexample,editthe descriptorfiletoremovetheabsolutepathfromthefilenameandsavethefile:


Win2KSv1.dat

Ifyouimporttheplainfile:
$ vmkfstools -i Win2KSv1.pln vmhba0:0:2:Win2KSv1.vmdk

thecommandlocatesWin2KSv1.datinthesamedirectoryandimportsitintothe specifiedESXServervirtualdiskfile.

Importing a GSX Server or Workstation Virtual Machine


ThissectiondescribeshowtoimportvirtualmachinesthathavebeencreatedinGSX ServerorWorkstationintoESXserver.

66

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

To import a virtual machine into VMware ESX Server 1 Makesureyouhaveaccesstothefilesinthedirectorythatholdsthesourcevirtual machine. Youmightbeabletomountthesourcelocation,oryoucanFTPorcopythefilesto atemporaryfolderontheserviceconsole. Ifyouarenotsurewherethesourcefilesare,openthevirtualmachineinthe VMwareproductyouusedtocreateit,opentheConfigurationEditor(Settings> ConfigurationEditor).OnaWindowshost,clickthenameofthedriveyouwant tomigrate.IntheDiskfilesection,clickChoosetoseethelocationinformation.On aLinuxhost,expandtheSCSIDrivestreeandclickthenameofthedriveyouwant tomigrate.ClickChoosetoseethelocationinformation. 2 UsingaWebbrowser,logintotheESXServermachineasrootandclickManage Files. UsethefilemanagerintheVMwareManagementInterfacetoperformallthefile copystepsdescribedbelow.Formoreinformation,seeUsingtheVMware ManagementInterfaceFileManageronpage 141. 3 4 Inthefilemanager,navigatetothelocationofthesourcediskfiles. Selectthemaindisk(.vmdkor.dsk)fileforthevirtualdiskyouaremigratingand clickCopy. Toensurethatyouhaveabackupcopyofthevirtualdisk,donotcutthevirtual diskfile.

NOTE

NavigatetothevmfsfolderandopenthefolderfortheVMFSpartitionwhereyou wanttostorethevirtualdiskfileandclickPaste. AdialogboxappearswiththemessageYouaretransferringoneormoreconsole virtualdiskstoaVMFSpartition.Forvirtualmachinestoaccessthesedisks,they mustbeconvertedtotheVMFSformat.Althoughyoucanconvertconsoledisksat anytime,itisrecommendedthatyoudosonow. TheVMFSpartitionrecognizesthefilesasavirtualdiskandconvertsthediskto theVMFS2formatduringtheimport.Thisallowsthedisktobeaccessedby virtualmachinesrunningunderESXServer2.5. Thefileyouarepastingisselected.

ClickOK. ThevirtualdiskisimportedtotheVMFSpartitionandconvertedtothenew format.

VMware, Inc.

67

Administration Guide

NOTE

Ifyoudonotseethemessageabouttransferringdisks,aproblemexistswith theimport.Makesureyouarepastingtothecorrectvmfsfolder.

7 8 9 10

Selectthenewlyimporteddiskfile(.dskor.vmdk),andclickEditProperties. Changetheuserandgroupnamesintherightcolumnsothefilesownerand groupmatchthoseoftheuserwhowillrunthevirtualmachineandclickOK. Logout,andlogbackinastheuserwhowillrunthenewvirtualmachine. CreateanewvirtualmachineasdescribedinCreatingaNewVirtualMachine onpage 39. Whenyousetthefilenameforthenewvirtualmachinesdisk,usethevirtualdisk fileyoucopiedtotheVMFSpartition.

11

IfyouimportedthevirtualmachinefromESXServer1.5.2,GSXServer2.5.1or Workstation3.2orearlier,upgradethevirtualhardware. a b c Makesurethevirtualmachineispoweredoff. OntheStatusMonitor,clickthearrowtotherightoftheterminalicon ( )andchooseConfigureHardware. OntheHardwaretab,clickUpgradeVirtualHardwareandclickOKto upgradethehardware.

12

Intheconfigurationfile,lookfortheoptionscsi0.virtualDevandchangethe valuefromvmxlsilogictovmxbuslogic. Tomodifytheconfigurationfile,seeSettingStartupandShutdownOptionsby ModifyingtheConfigurationFileDirectly(AdvancedUsersOnly)onpage 126.

13

BootyourvirtualmachineinaremoteconsoleandinstallVMwareToolsandthe networkdriverinthevirtualmachine. Someguestoperatingsystemsdisplaymessagesaboutdetectinghardware changesandrequireyoutorebootthevirtualmachine.Thisoccursbecause VMwareESXServerusesanemulationforchipsetsandBIOSthatisslightly differentfromthoseusedbyotherVMwareproducts.

Exporting Virtual Machines


YoucanexportavirtualmachinetoWorkstation4,provideditisauniprocessorvirtual machine.Multiprocessor(SMP)virtualmachinescannotbeexportedtoWorkstation4. Ifthevirtualdisksareinundoablemode,youmustcommitthechangesintheredolog beforeexportingthevirtualmachineforyourchangestocarryover.

68

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

Workstation4doesnotsupporttheLSILogicSCSIadapter.TousetheSCSIadapterin thevirtualmachine,switchtotheBusLogicadapter. ESXServer2.5doesnotsupportexportingvirtualmachinestoESXServer1.5orearlier, VMwareWorkstation3.2orearlier,orVMwareGSXServer2.5orearlier. UninstallVMwareToolsfromavirtualmachinebeforeexportingitforusein WorkstationorGSXServer. UsethevmktoolscommandintheServiceConsoletoexportvirtualdisksassociated withavirtualmachine.Seethesectiononusingthe-exportfileoptionof vmkfstoolsinBasicvmkfstoolsOptionsonpage 250.Youcanfindanexampleof howtousethe-exportfileoptioninExamplesUsingvmkfstoolsonpage 259.

Preparing to Use the Remote Management Software


YoucanmanageVMwareESXServerfromaremoteworkstationusingtheVMware RemoteConsoleandtheVMwareManagementInterface. RemoteconsolesoftwareisavailableforWindowsandLinuxworkstations.Theremote consoleletsyouattachdirectlytoavirtualmachine.Youcanstartandstopprograms, changetheconfigurationoftheguestoperatingsystemanddoothertasksasifyou wereworkingataphysicalcomputer. NOTE Ifyouneedsecurecommunicationsbetweenyourmanagementworkstationsandthe server,choosetheappropriatesecuritylevelwhenyouconfigureESXServer.See SecuritySettingsonpage 194.

Registering Your Virtual Machines


IfyoucreateyourvirtualmachinesusingtheVirtualMachineConfigurationWizard, theyareautomaticallyregisteredinthefile/etc/vmware/vm-listontheservers serviceconsole.Theremotemanagementsoftwarechecksthisfileforpointerstothe virtualmachinesyouwanttomanage. Tomanagevirtualmachinesthatyousetupwithoutusingthewizard,youmustfirst registerthem. Besurethevirtualmachineispoweredoff.OntheStatusMonitorofthemanagement interface,pointtotheterminaliconforthevirtualmachineyouwanttoregisterand clickEditConfiguration.SelectRegisteredatthetopoftheEditConfigurationpane. NOTE Registeredvirtualmachinesappearinthelistonlyiftheirconfigurationfilesarestored locallyontheESXServercomputer.Iftheconfigurationfilesarestoredonan NFSmounteddrive,thevirtualmachinesarenotlisted.

VMware, Inc.

69

Administration Guide

Toregisterthevirtualmachinesfromtheserviceconsole,usethiscommand:
vmware-cmd -s register /<configpath>/<configfile>.vmx

Toremoveavirtualmachinefromthelist,usethiscommand:
vmware-cmd -s unregister /<configpath>/<configfile>.vmx

Installing the Remote Console Software


Usethepackagethatcorrespondstotheoperatingsystemrunningonyour managementworkstationandfollowtheinstallationstepsbelow. InstallerfilesareavailableonthedistributionCDROM.Youcanalsodownloadthe appropriateinstallerfromtheStatusMonitorofthemanagementinterface. To install the remote console software on Windows Clients 1 2 3 FindtheinstallerfileVMware-console-2.v.v-xxxx.exeonthedistribution CDorinthedirectorywhereyoudownloadedit. DoubleclickVMware-console-2.v.v-xxxx.exetostarttheinstallation. Followtheonscreeninstructions.

To install the remote console software on Linux using the RPM Installer 1 LocatetheinstallerfileVMware-console-2.v.v-xxxx.i386.rpmonthe distributionCDorinthedirectorywhereyoudownloadeditandchangetothat directory. Gainrootprivilegesbytyping:
su -

RuntheRPMinstaller.
rpm -Uhv VMware-console-2.v.v-xxxx.i386.rpm

To install the remote console software on Linux using the Tar Installer 1 LocatetheinstallerfileVMware-console-2.v.v-xxxx.tar.gzonthe distributionCDorinthedirectorywhereyoudownloadeditandcopyittothe /tmpdirectoryortoanotherdirectory. Gainrootprivilegesbytyping:
su -

Unpackthetararchive.
tar zxf VMware-console-2.v.v-xxxx.tar.gz

70

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

Changetothedirectorywherethearchivewasunpacked.
cd vmware-console-distrib

Runtheinstaller.
./vmware-install.pl

Formoreinformation,seeRunningaVirtualMachineUsingtheRemoteConsoleon page 157.

Third Party Software Compatibility


Thissectionincludesinstructionsforusingavirtualmachinewiththirdparty middlewareandmanagementsoftware.

Configuring a Virtual Machine for Use with Citrix MetaFrame XP


IfyouareusingaWindows2000virtualmachineasaMetaFrameXPserver,besureyou areusingFR1orFR2,andcompletethefollowingstepstoconfigurethevirtual machine.IfyouarerunningMetaFrameXPinaWindowsNTvirtualmachine,no specialstepsareneeded. To configure a Windows 2000 virtual machine as a MetaFrame XP server 1 ApplyCitrixhotfixXE102W014. Foradownloadlinkandinstructions,gototheCitrixWebsite(www.citrix.com), navigatetothesupportsectionandsearchforXE102W014. 2 ClickSaveChangestosavetheconfigurationfile.

Foradditionalinformationonperformancetuning,seearticle869intheVMware KnowledgeBase.

Executing Scripts When the Virtual Machines Power State Changes


Youcanrunscriptsintheguestoperatingsystemwhenyouchangethepowerstateof avirtualmachine;thatis,whenyoupoweron,poweroff,suspendorresumethevirtual machine. Scriptscanhelpautomateguestoperatingsystemoperationswhenyouchangethe virtualmachinespowerstate. NOTE TherearenoscriptsforFreeBSDguestoperatingsystems.

VMware, Inc.

71

Administration Guide

Youperformthesepoweroperationsfromthetoolbarbuttonsandmenusinthe consoles.Formoreinformationonchangingthepowerstateofavirtualmachineina console,seeSpecialPowerOptionsforVirtualMachinesonpage 157. ScriptscanrunwhenusingthepowerbuttonsintheVMwareManagementInterface. SeeRunningtheVMwareManagementInterfaceonpage 80. ScriptscanbeexecutedonlywhentheVMwareguestoperatingsystemserviceis running.Theguestservicestartsbydefaultwhenyoustarttheguestoperatingsystem. SeeUsingtheVMwareGuestOperatingSystemServiceonpage 49. DefaultscriptsareincludedinVMwareTools.Thedefaultscriptexecutedwhen suspendingavirtualmachinestopsnetworkingforthevirtualmachinewhilethe defaultscriptexecutedwhenresumingavirtualmachinestartsnetworkingforthe virtualmachine. Inaddition,youcancreateyourownscripts.Thescriptsyourunmustbebatchfilesfor Windowshostsbutcanbeanyexecutableformat(suchasshellorPerlscripts)forLinux hosts.Youshouldbecompletelyfamiliarwiththesetypesofscriptsbeforeyoumodify thedefaultscriptsorcreateyourown. Ifyoucreateyourownscripts,associateeachscriptwithitsparticularpoweroperation. SeeChoosingScriptsforVMwareToolstoRunDuringPowerStateChangeson page 162. Forscriptsandtheirassociatedpoweroperationstowork,thefollowingconditions mustbemet:
!

TheVMwareguestoperatingsystemservicemustberunninginthevirtual machine. TheversionofVMwareToolsmustbeupdatedtothecurrentversion.Ifyouare usingavirtualmachinecreatedwithanolderversionofVMwareESXServeror anotherolderVMwareproduct,updateVMwareToolstotheversionincludedin thisrelease. Dependingupontheoperationthescriptperforms,thevirtualmachinemusthave avirtualnetworkadapterconnected,otherwisethepoweroperationfails.

Issues to Consider
WhenyoureinstallVMwareToolsafteryouupgradetheVMwareESXServersoftware, anychangesyoumadetothedefaultscriptsareoverwritten.Anyscriptsyoucreated onyourownremainuntouched,butdonotbenefitfromanyunderlyingchangesthat enhancethedefaultscripts.

72

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

Configuring Virtual Machines


Keyconfigurationsettingsforanexistingvirtualmachinecanbechangedfromthe VMwareManagementInterface.Thevirtualmachinemustbepoweredoffwhenyou changetheconfiguration. To configure the virtual machine 1 2 3 4 5 Logintotheserverfromthemanagementinterface(http://<hostname>)asa userwhohasrightstochangetheconfigurationfile. Clickthenameofthevirtualmachineyouwanttoreconfigure. OntheStatusMonitorforthatvirtualmachine,clickHardwareorOptionsinthe Configurationsection. Selectadeviceoroptiontoconfigure,andclickEdit. Makeanychangestotheconfiguration,andclickOK.

DetailsaboutchangingtheseconfigurationsettingsarediscussedinConfiguring VirtualMachinesonpage 73. CAUTION Onlyoneuseratatimeshouldmodifytheconfigurationforaparticular virtualmachine. Youcanmodifyothersettingsintheconfiguration.Thesesettingsinclude:


! ! !

RecommendedConfigurationOptionsonpage 74 ModifyingtheSMBIOSUUIDonpage 75 EnablingthePhysicalHardwaresOEMIDtoBeSeenbytheVirtualMachineon page 78

Tomodifythesesettingsintheconfiguration,manuallyedittheconfigurationfileby doingoneofthefollowing:
!

UsetheconfigurationfileeditorintheVMwareManagementInterface.Pointtothe terminaliconforthevirtualmachine,clickthearrowtotherightoftheterminal icon,andselectConfigureOptions.UnderVerboseOptions,clickthelink.See SettingStartupandShutdownOptionsbyModifyingtheConfigurationFile Directly(AdvancedUsersOnly)onpage 126. Logintotheserviceconsoleanduseatexteditor.

Forpurposesofillustration,weassumethatyouareworkingwiththefilenewvm.vmx inadirectorynamed/virtual machines/vm1.

VMware, Inc.

73

Administration Guide

Recommended Configuration Options


Thissectiondetailsoptionsthatcaninfluencetheperformanceofyourvirtual machines.ThesesettingsarenotrequiredtorunVMwareESXServercorrectly.

SleepWhenIdle
Theconfigurationfileoptionmonitor.SleepWhenIdledetermineswhetherthe VMkerneldeschedulesanidlevirtualmachine.Bydefault,thisoptionisenabled,a settingthatensuresmuchbetterperformancewhenrunningmultiplevirtualmachines. Whenyouarerunningonlyasinglevirtualmachine(suchasforbenchmarking VMwareESXServer),addthemonitor.SleepWhenIdleoptiontothevirtual machinesconfigurationfileifyouwanttoachievethebestpossibleperformanceinthe virtualmachine(attheexpenseofresponsivenessintheserviceconsole). Createanoptioncalledmonitor.SleepWhenIdleandsetthevalueofthisoptionto0, asdescribedinSettingStartupandShutdownOptionsbyModifyingthe ConfigurationFileDirectly(AdvancedUsersOnly)onpage 126.

Optimizing Disk Access Failure Modes in Windows Virtual Machines


ESXServerincludesconfigurationoptionsthatallowyoutooptimizehowvirtual machineshandlediskaccessfailures.ForWindowsvirtualmachines,usethe scsi<n>.returnBusyOnNoConnectStatusoptiontodeterminehowESXServer reportsafailuretoconnectwithavirtualSCSIadapterorfailuretoaccessitafter initiatingaconnection.BysettingtheoptiontoTRUEorFALSE,youcandeterminehow thefailuretoaccesstoaphysicaldiskisrepresentedtoyourWindowsvirtualmachine. Thevaluesaredescribedbelow:
! !

IftheoptionissettoTRUE,ESXServerreturnstheerrormessageSCSI BUSY. IftheoptionissettoFALSE,thevalueESXServerreturnsdependsonthetypeof SCSIcontrolleryouchoseforthatvirtualdevice:


!

IfyouchosetheBusLogicadapter(thatis,ifVirtualDeviceissetto vmxbuslogic),yourvirtualmachinereceivestheerrormessage DEVICE_NOT_THERE. IfyouchosetheLSILogicadapter(thatis,ifVirtualDeviceissetto vmxlsilogic),yourvirtualmachinereceivestheerrormessage BTSTAT_SELTIME0.

YoumightneedtosetreturnBusyOnNoConnectStatustoFALSEwhendisk managementsoftwareoperatinginaWindowsvirtualmachineneedstodetectaccess failures.Forexample,sometypesofdiskmirroringsoftwarewillnotselectaduplicate diskunlesstheydetectadiscretefailuretoaccessaprimarydisk.Reportingthata


74 VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

targeteddiskisbusy,ratherthanunavailable,maycausemirroringprogramstorepeat theconnectionattemptinsteadofselectingaduplicatedisk. ESXServerdoesnotincludeanexplicitreturnBusyOnNoConnectStatusoption definitionforeachSCSIdiskinavirtualmachineautomatically.Iftheoptionisnot definedforadiskinthevirtualmachineconfigurationfile,ESXServerdefaultstoTRUE. YouneedtobothcreateanoptiondefinitionforeachdiskandsetittoFALSEtooverride thedefaultvalueofTRUE.SeeSettingStartupandShutdownOptionsbyModifying theConfigurationFileDirectly(AdvancedUsersOnly)onpage 126. NOTE UsingreturnBusyOnNoConnectStatusissupportedonlyinvirtualmachinesusinga Windowsguestoperatingsystem.

Modifying the SMBIOS UUID


EachESXServervirtualmachineisautomaticallyassignedauniversallyunique identifier(UUID),whichisstoredintheSMBIOSsysteminformationdescriptor.Itcan beaccessedbystandardSMBIOSscanningsoftwareandusedforsystemsmanagement inthesamewaysyouusetheUUIDofaphysicalcomputer. TheUUIDisa128bitinteger.The16bytesofthisvalueareseparatedbyspacesexcept foradashbetweentheeighthandninthhexadecimalpairs.AsampleUUIDmightlook likethis:
00 11 22 33 44 55 66 77-88 99 aa bb cc dd ee ff

Generating the UUID Automatically


TheautomaticallygeneratedUUIDisbasedonthephysicalcomputersidentifierand thepathtothevirtualmachinesconfigurationfile.ThisUUIDisgeneratedwhenyou poweronorresetthevirtualmachine.TheUUIDthatisgeneratedremainsthesameas longasthevirtualmachineisnotmovedorcopied. TheautomaticallygeneratedUUIDiswrittentothevirtualmachinesconfigurationfile asthevalueofuuid.location. Ifyoumoveorcopythevirtualmachine,youcancreateanewUUIDthefirsttimeyou poweronthevirtualmachine.ThenewUUIDisbasedonthephysicalcomputers identifierandpathtothevirtualmachinesconfigurationfileinitsnewlocation. Whenyoupoweronavirtualmachinethatwasmovedorcopiedtoanewlocation,a messageappears.SeeFigure 22.

VMware, Inc.

75

Administration Guide

Figure 2-2. UUID dialog box Thisdialogboxhasfouroptions:


!

Ifyoumovedthisvirtualmachine,youcankeeptheUUID.SelectKeepandclick OKtocontinuepoweringonthevirtualmachine. Ifyoucopiedthisvirtualmachinetoanewlocation,createanewUUID,because thecopyofthevirtualmachineisusingthesameUUIDastheoriginalvirtual machine.SelectCreateandclickOKtocontinuepoweringonthevirtualmachine. Iftheoriginalvirtualmachineisbeingusedasatemplateformorevirtual machines,youcancreateanewUUIDthefirsttimeyoupoweroneachcopy.After youconfigurethevirtualmachine,moveittoanewlocationandpoweriton. Whenthemessageappears,selectAlwaysCreateandclickOKtocontinue poweringonthevirtualmachine.Thevirtualmachineissetuptocreateanew UUIDeverytimeitismoved.Poweroffthevirtualmachineandbeginusingitas atemplatebycopyingthevirtualmachinefilestootherlocations. Tomovethevirtualmachinenumeroustimes,andkeepthesameUUIDeachtime thevirtualmachinemoves,selectAlwaysKeepandclickOKtocontinue poweringonthevirtualmachine.

Suspendingandresumingavirtualmachinedoesnottriggertheprocessthatgenerates aUUID.TheUUIDinuseatthetimethevirtualmachinewassuspendedremainsinuse whenthevirtualmachineisresumed,evenifithasbeencopiedormoved.However, thenexttimethevirtualmachineisrebooted,theUUIDisgeneratedagain.Ifthevirtual machinehasbeencopiedormoved,theUUIDischanged.

Comparing the Generated UUID to Configuration File Parameters


Whenavirtualmachineispoweredon,ESXServergeneratesaUUIDasdescribed aboveandcomparesittothevaluesforuuid.locationand(ifitexists)uuid.biosin theconfigurationfile. IftheautomaticallygeneratedUUIDmatchesthevalueofuuid.location,ESXServer checksforuuid.bios.Ifuuid.biosexists,itsvalueisusedasthevirtualmachines UUID.Ifuuid.biosdoesnotexist,theautomaticallygeneratedvalueisused.

76

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

IftheUUIDdoesnotmatchthevalueofuuid.location,thenewlygeneratedvalueis usedasthevirtualmachinesUUIDandissavedtotheconfigurationfile,replacingthe previousvalueofuuid.locationand(ifitexists)uuid.bios. NOTE AnychangestotheUUIDtakeeffectonlyafterthevirtualmachineisrebooted.

Setting the UUID for a Virtual Machine That Is Not Being Moved
ToassignaspecificUUIDtoavirtualmachinethatisnotbeingmoved,addonelineto theconfigurationfile.UsetheconfigurationfileeditorintheVMwareManagement Interfacebycompletingoneofthefollowing:
!

Inthemanagementinterface,clickthearrowtotherightoftheterminaliconfor thatvirtualmachineandselectConfigureOptionsinthevirtualmachinemenu (seeUsingtheVirtualMachineMenuonpage 86).ClickthelinkunderVerbose Options.Createanoptioncalleduuid.biosandsetthevalueasdescribedbelow. Logintotheserviceconsoleand,usingatexteditor,openthevirtualmachines configurationfile(.vmx).Addthefollowingline:


uuid.bios = <uuidvalue>

TheUUIDvalue(<uuidvalue>)mustbesurroundedbyquotationmarks.Asample configurationoptionmightlooklikethis:
uuid.bios = 00 11 22 33 44 55 66 77-88 99 aa bb cc dd ee ff

Afteraddingthisoptiontotheconfigurationfile,restartthevirtualmachine.Thenew UUIDisusedwhenthevirtualmachinerestarts.

Setting the UUID for a Virtual Machine That Is Being Moved


TomoveavirtualmachineandhaveitusethesameUUIDithadbeforethemove,note theUUIDbeingusedbeforethemoveandaddthatUUIDtotheconfigurationfileafter themove. To set the UUID before moving a virtual machine 1 Beforemovingthevirtualmachine,examineitsconfigurationfile. Completeoneofthefollowing:
!

Inthemanagementinterface,clickthearrowtotherightoftheterminalicon forthatvirtualmachineandselectConfigureOptionsinthevirtualmachine menu(seeUsingtheVirtualMachineMenuonpage 86).Clickthelink underVerboseOptions. Logintotheserviceconsoleand,usingatexteditor,openthevirtual machinesconfigurationfile(.vmx).


77

VMware, Inc.

Administration Guide

IfthevirtualmachinesUUIDhasbeensettoaspecificvalue,theconfigurationfile hasalinethatbeginswithuuid.bios.The128bithexadecimalvaluethatfollows isthevalueyoushoulduseinthenewlocation. Ifnolinebeginswithuuid.bios,lookforthelinethatbeginswith uuid.locationandnotethe128bithexadecimalvaluethatfollowsit. 2 3 4 5 6 Movethevirtualmachinesdisk(.dskor.vmdk)filetothenewlocation. Usethemanagementinterfacetocreateanewvirtualmachineconfigurationand setittousethevirtualdiskfileyoumovedinthepreviousstep. Editthevirtualmachinesconfigurationfiletoaddauuid.biosline,asdescribed inSettingtheUUIDforaVirtualMachineThatIsNotBeingMovedonpage 77. Setthevalueofuuid.biostothevalueyourecordedinStep1,andremovethe uuid.locationlineinthevirtualmachinesconfigurationfile. Startthevirtualmachine. ItshouldhavethesameUUIDasitdidbeforethemove.

Enabling the Physical Hardwares OEMID to Be Seen by the Virtual Machine


EachvirtualmachineisassignedanOriginalEquipmentManufacturerID(OEMID), comprisingtheManufacturerandProductName,whichisstoredintheSMBIOS systeminformationdescriptor.ItcanbeaccessedbystandardSMBIOSscanning softwareandusedforsystemsmanagementinthesamewayyouusetheOEMIDofa physicalcomputer. Bydefault,theManufacturerstringisVMware,Inc.andtheProductNamestringis VMwareVirtualPlatform. Ifthevirtualmachinesconfigurationfilehastheoption:
SMBIOS.reflectHost = TRUE

theManufacturerandProductNamestringsinthevirtualmachinearethesameasthe ManufacturerandProductNameofthehostsystem. Thesestringsareupdated(copiedfromthehostBIOStothevirtualmachineBIOS)on everyvirtualmachineBIOSPOST(PowerOnSelfTest).

78

VMware, Inc.

Using the VMware Management Interface

YoucanmanageandconfigurevirtualmachinesusingeithertheServiceConsoleorthe VMwareManagementInterface.ThetheVMwareManagementInterfaceprovidesan easytouse,graphicalinterfaceforworkingwithyourvirtualmachines. ThischapterdescribehowtouseVMwareManagementInterfacetoconfigureandrun virtualmachinesandincludesthefollowingsections:


! !

RunningtheVMwareManagementInterfaceonpage 80 ConfiguringtheStatisticsPeriodfortheVMwareManagementInterfaceon page 81 UsingInternetExplorer6.0toAccesstheVMwareManagementInterfaceon page 82 LoggingIntotheVMwareManagementInterfaceonpage 84 UsingtheStatusMonitoronpage 84 ConfiguringaVirtualMachineonpage 94 ModifyingVirtualMachinePeripheralsonpage 131 DeletingaVirtualMachineUsingtheVMwareManagementInterfaceon page 136 ManagingESXServerResourcesonpage 137 ConfiguringVMwareESXServeronpage 137 LoggingOutoftheVMwareManagementInterfaceonpage 138 UsingtheApacheWebServerwiththeManagementInterfaceonpage 138

! ! ! ! !

! ! ! !

VMware, Inc.

79

Administration Guide

! ! ! ! ! !

SettingaMIMETypetoLaunchtheVMwareRemoteConsoleonpage 139 EditingaVirtualMachinesConfigurationFileDirectlyonpage 140 UsingtheVMwareManagementInterfaceFileManageronpage 141 RegisteringandUnregisteringVirtualMachinesonpage 145 RunningManyVirtualMachinesonESXServeronpage 148 BackingUpVirtualMachinesonpage 151

Running the VMware Management Interface


VMwareESXServerprovidestheVMwareManagementInterface,aWebbased managementtoolthatallowsyouto:
!

MonitorthestateofvirtualmachinesandtheVMwareESXServermachineon whichtheyarerunning. Control(poweron,suspend,resume,resetandpoweroff)thevirtualmachineson theserver. ConnecttheVMwareRemoteConsoletoagivenvirtualmachine,forhandson managementoftheguestoperatingsystem. Modifyvirtualmachineconfigurations. Manageusersandgroups. ConfigureSANs. Createanddeletevirtualmachines. Answerquestionsandacknowledgemessagesposedbythevirtualmachine. ConfigureESXServer(rootusersonly).

! ! ! ! ! !

UsetheVMwareManagementInterfacefromamanagementworkstation,notfromthe servermachinewhereESXServerisinstalled.VMwaredoesnotrecommendrunning theXWindowsSystemonyourserversserviceconsole. Tousethemanagementinterface,whenyouregistereachvirtualmachine,makesure yousetreadpermissionsforallusersforeachofthevirtualmachinesyouwantto managefromabrowser. NOTE IfyouareconnectingtothemanagementinterfacewithInternetExplorer6.0,youmust configurethebrowser.SeeUsingInternetExplorer6.0toAccesstheVMware ManagementInterfaceonpage 82.

80

VMware, Inc.

Chapter 3 Using the VMware Management Interface

NOTE

YoucanuseonlyASCIIcharacterswhenviewingthemanagementinterface. Afteryourusernameandpasswordareauthorizedbythemanagementinterface,the StatusMonitorappears,whichcontainshighleveldetailsaboutallthevirtual machinesontheservertowhichyouareconnected.TheStatusMonitorlinkstoa detailedsetoftabsspecifictoeachvirtualmachine,whereyoufindinformationabout virtualdevices,configurationoptions,andasummaryofrecentevents.Inaddition,you cancreateanddeletevirtualmachinesfromyourbrowser. Thesetabsrefreshorreloadautomatically,refreshingevery90seconds.Youcanrefresh orreloadthemmanuallybeforeyouperformanoperationlikesuspending,resuming, orpoweringonoroffavirtualmachinefromthemanagementinterfaceorafteryou performapoweroperationinaremoteconsoleincaseanotheruserhasperformed thesameoraconflictingoperationbeforeyou.TorefreshtheStatusMonitor,click Refreshatthetopofapage.

NOTE

Yourmanagementinterfacesessiontimesoutaftera60minuteperiodofidletime. Thissettingisrepresentedbythevariablevmware_SESSION_LENGTH,storedin /usr/lib/vmware-mui/apache/conf/access.conf.Youcanblockaccesstothe managementinterfaceforallusersbysettingvmware_SESSION_LENGTHto0minutes. Youcanalsoallowforpersistentsessionsthatnevertimeoutbysetting vmware_SESSION_LENGTHto-1.

Configuring the Statistics Period for the VMware Management Interface


Bydefault,theVMwareManagementInterfaceprovidesstatisticsabouttheserverand virtualmachinesthatreflectthepast5minutesofactivity.Thestatisticsareupdated every20seconds. Youcanconfigurethissettingforaperiodof1minutetoseemoreusagedetailsoryou canconfigureitforaperiodof15minutestosmoothoutshorttermspikes.Increasing thestatisticsperiodchangestheupdatefrequencytoeveryminuteinsteadofevery20 seconds.Italsoreducestheamountofloadontheserviceconsole,improvingthe performanceofaserverrunningalargenumberofvirtualmachines. To configure the statistics period for the management interface 1 2 Connecttotheserviceconsolewithaterminal. Editthefile/usr/lib/vmware-mui/apache/conf/access.conf.

VMware, Inc.

81

Administration Guide

UnderthelinePerlSetEnv vmware_SESSION_LENGTH 60,dooneofthe following.


!

Tosettheperiodto1minute,addthisline:
PerlSetEnv vmware_STATS_PERIOD 1

Tosettheperiodto15minutes,addthisline:
PerlSetEnv vmware_STATS_PERIOD 15

4 5

Saveandclosethefile. RestartApacheforthechangetotakeeffect. /etc/init.d/httpd.vmware restart

Using Internet Explorer 6.0 to Access the VMware Management Interface


ToruntheVMwareManagementInterfaceinInternetExplorer6.0onaWindows managementworkstation,youmusttakestepstoconfigureInternetExplorer. Theconfigurationstepsallowyoutoperformthefollowingactivities:
!

LaunchingtheRemoteConsolefromtheManagementInterfaceonanEncrypted Server,next. ConnectingtotheManagementInterfaceOnaProxyServeronpage 83

Launching the Remote Console from the Management Interface on an Encrypted Server
YoucanlaunchtheVMwareRemoteConsolefromtheVMwareManagementInterface automatically.TodothisinanInternetExplorer6.0browseronaWindowssystem whereSSLisencryptingyourESXServerremoteconnections,ensurethattheDonot saveencryptedpagestodiskoptionisdisabled. Forinformationonencryptingremoteconnections,seeSecuritySettingsonpage 194. Whenthisoptionisenabled,InternetExplorerdoesnotsaveanyfilestodisk,including thefilesitneedstohandofftohelperapplications.Thispreventstheremoteconsole fromlaunchingautomatically. CAUTION Thisoptionmightbeenabledtopreventsavingsensitivefilestodisk. Disablingitmightpermitothersensitiveinformationtobesavedtodisk.

82

VMware, Inc.

Chapter 3 Using the VMware Management Interface

To disable the option to launch the remote console automatically 1 2 3 4 IntheInternetExplorer6.0window,chooseTools>InternetOptionstoopenthe InternetOptionscontrolpanel ClicktheAdvancedtab. ScrolldowntotheSecuritysectionanduncheckDonotsaveencryptedpagesto disk. ClickOK.

Connecting to the Management Interface On a Proxy Server


Ifyournetworkisprotectedbehindaproxyserver,youmustusethemanagement interfaceinInternetExplorer6.0onaWindowssystem.Followthestepsforthe appropriateWindowsoperatingsystem. To configure a proxy server on Windows Server 2003 Systems 1 2 3 4 LaunchInternetExplorer6.0. ChooseTools>InternetOptions,andclicktheSecuritytab. SelectTrustedsitesandclickSites. IntheAddthisWebsitetothezoneentryfield,type:
https://*.domain.com

5 6

ClickAdd. ClickOKuntilyoureturntothebrowserwindow. WhenyouuseInternetExplorer6.0toconnecttothemanagementinterface, useafullyqualifieddomainname.

NOTE

To configure a proxy server on Windows Systems Other than Windows Server 2003 (Windows 2000, Windows XP, and Windows NT operating systems) 1 2 3 4 5 LaunchInternetExplorer6.0. ChooseTools>InternetOptions. ClicktheConnectionstab,andclickLANSettings. MakesurethatBypassproxyserverforlocaladdressesisselected. ClickOKuntilyoureturntothebrowserwindow.

VMware, Inc.

83

Administration Guide

WhenyouuseInternetExplorer6.0toconnecttothemanagementinterface,donotuse afullyqualifieddomainname.

Connecting to the Management Interface Without a Proxy Server


IfyouareonaWindowssystemandyournetworkdoesnotuseaproxyserver,you mustusefullyqualifieddomainnameswhenconnectingtothemanagementinterface withInternetExplorer6.0.

Logging Into the VMware Management Interface


TousetheVMwareManagementInterface,youshouldberunning:
! ! !

InternetExplorer5.5(InternetExplorer6.0orhigherisrecommended) NetscapeNavigator7.0orhigher Mozilla1.x.orhigher

YoumustknowtheservernameorIPaddressoftheserveryouwanttomanage.You musthaveavalidusernameandpasswordonthatserver. Youcanconnecttotheserverwithuptoeightmanagementinterfacesessionsatatime. TheURLtoconnecttotheserverishttp://<hostname>. IfyouareusingNetscapeNavigatororMozilla,checktheadvancedpreferences(Edit >Preferences>Advanced)tomakesurethatbothJavaScriptandstylesheetsare enabled.YouneedthehostnameorIPaddressoftheserveryouwanttomonitor.You shouldalsoensurethatstylesheetsareenabledinyourbrowser,regardlessofwhich browserandversionyouareusing. OntheLoginpage,enteryourusernameandpasswordforthehostmachine,andclick Login.TheStatusMonitorpaneappears.SeeUsingtheStatusMonitoronpage 84.

Using the Status Monitor


TheStatusMonitorcontainsahighlevelviewofVMwareESXServerincludinga serversystemsummaryandlistofallregisteredvirtualmachines.See

84

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Figure 3-1. Status Monitor

Viewing Summary Information About VMware ESX Server


IntheSystemSummarypane,youcanview:
!

NumberofprocessorsonESXServer,includingtheaveragepercentageofCPU usageusedbyvirtualmachinesandtheserviceconsoleandthetotalbeingusedby thewholesystemforthepreviousfiveminutes. AmountofmemoryonESXServer,includingtheaverageamountofmemory usedbyvirtualmachines,otherprocessesontheserverandthetotalbeingusedby thewholesystemforthepreviousfiveminutes.

NOTE

Youcanmodifytheperiodoftimethesestatisticscover.SeeConfiguringtheStatistics PeriodfortheVMwareManagementInterfaceonpage 81.

VMware, Inc.

85

Administration Guide

Viewing Summary Information About Virtual Machines on VMware ESX Server


UnderVirtualMachines,youcanviewalistofallregisteredvirtualmachinesonthe host.Whenavirtualmachineisrunning,theStatusMonitordisplaysitsIDnumber afterthepowerstatusofthevirtualmachine.
a

NOTE

Virtualmachinesmaynotappearinthelist,iftheirconfigurationfilesarestoredonan NFSmounteddrive.WhenavirtualmachinesconfigurationfileisonanNFSmounted drive,therootuserisoftenunabletoaccessthefilebecauserootprivilegesarenot allowed.Also,youcannotseethevirtualmachinesiftheNFSdirectoryisnotmounted. Activitiesyoucanperformfromthisviewincludeconnectingtovirtualmachines, managingvirtualmachinestatus,andconfiguringthevirtualmachines.

Connecting to a Virtual Machine with the VMware Remote Console


Toviewavirtualmachinesdesktop,attachtheVMwareRemoteConsoleandconnect tothevirtualmachine.Clicktheterminalicon( )tolaunchtheremoteconsole.See UsingtheRemoteConsoleonpage 155. NetscapeandMozillausersmustdefineaMIMEtypefortheconsolefirst.Internet Explorerisconfiguredwhentheremoteconsoleisinstalled.SeeSettingaMIMEType toLaunchtheVMwareRemoteConsoleonpage 139. Theterminaliconappearsslightlydifferent,dependingupontheguestoperating systeminstalled.Thisvisualcuehelpstoidentifythevirtualmachine,forexample, whenthedisplaynamedoesnotindicatetheguestoperatingsystem.Belowarethe waystheterminaliconcanappear: IndicatesaWindowsguestoperatingsystem. IndicatesaLinuxguestoperatingsystem. IndicatesaNetWareguestoperatingsystem. IndicatesaBSDguestoperatingsystem. Indicatesotherguestoperatingsystems.

Using the Virtual Machine Menu


Clickthearrowtotherightoftheterminalicon( )todisplayamenuofoptionsfor thevirtualmachine.Themenuincludesthefollowingcommands,mostofwhichcanbe performedusingbuttonsandothervisualelementsofthemanagementinterface.

86

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Dependingonyourpermissionsandthestateofthevirtualmachine,someoptionsmay notbeavailable.
!

AttachRemoteConsoleLaunchestheVMwareRemoteConsole,whichconnects tothisvirtualmachine.Thisisthesameasclicking .Youneedtologintothe host.SeeUsingtheRemoteConsoleonpage 155.

NOTE

NetscapeandMozillausersmustdefineaMIMEtypefortheconsolefirst.Internet Explorerisconfiguredwhentheremoteconsoleisinstalled.SeeSettingaMIMEType toLaunchtheVMwareRemoteConsoleonpage 139.


!

PropertiesOpenstheStatusMonitorforthisvirtualmachineinanewbrowser window.ThisisthesameasclickingthedisplaynamelinkintheDisplayName column. ConfigureHardwareOpenstheHardwaretab,whereyoucaneditavirtual machineshardwareconfiguration.Youcaneditmostconfigurationoptionsonly whenthevirtualmachineispoweredoff.Whenthevirtualmachineispoweredon, youcaneditremovabledevicesandthevirtualnetworkadapter. SeeConfiguringaVirtualMachinesHardwareonpage 102.

ConfigureOptionsOpenstheOptionstab,whereyoucaneditavirtual machinesstandardinformation,suchasguestoperatingsystem,displayname, andlocationofthesuspendedstatefile.Withtheexceptionofthedisplayname, youcanedittheseoptionsonlywhenthevirtualmachineispoweredoff. SeeSettingStandardVirtualMachineConfigurationOptionsonpage 122.

ShutDownGuestShutsdowntheguestoperatingsystem,powersoffthevirtual machine,andrunsthescriptassociatedwiththispowerstatechange.Youcanalso click inthepowerstatepopupmenu. SuspendafterRunningScriptRunstheassociatedscriptandsuspendsa runningvirtualmachine.Youcanalsoclick inthepowerstatepopupmenu. PowerOn/ResumeandRunScriptPowersonastoppedvirtualmachineor resumesasuspendedvirtualmachine,andrunsthescriptassociatedwiththis powerstatechange.Youcanalsoclick inthepowerstatepopupmenu. RestartGuestRestartstheguestoperatingsystemandthevirtualmachine.You canalsoclick inthepowerstatepopupmenu. PowerOffPowersoffthevirtualmachineimmediatelywithoutrunningascript. Youcanalsoturnoffthepowertoaphysicalcomputer. SuspendSuspendsapoweredonvirtualmachinewithoutrunningascript.

VMware, Inc.

87

Administration Guide

PowerOn/ResumePowersonastoppedvirtualmachineorresumesa suspendedvirtualmachinewithoutrunningascript. ResetResetsthevirtualmachineimmediatelywithoutrunningascript.Youcan alsopresstheresetbutton. UnregisterVirtualMachineUnregistersthevirtualmachine.Thevirtual machinenolongerappearsontheStatusMonitorsoitcannotbemanagedor accessed.SeeRegisteringandUnregisteringVirtualMachinesonpage 145. DeleteVirtualMachineLetsyoudeleteavirtualmachineoritsconfiguration, providedthevirtualmachineispoweredoff.SeeDeletingaVirtualMachine UsingtheVMwareManagementInterfaceonpage 136.

Changing the Power State of a Virtual Machine


Dependinguponyourpermissions,youcanchangethepowerstateofthevirtual machineinthemanagementinterface.YourpermissionsarelistedintheUsersand Eventstabforthevirtualmachine.SeeViewingaListofConnectedUserson page 129. Tochangethevirtualmachinespowerstate,clickthebuttonthatindicatesthevirtual machinescurrentpowerstate.Apopupmenudisplaysthebuttonsdescribedin Table 31. Table 3-1. Virtual Machine Power State Buttons
Button Description Shutsdowntheguestoperatingsystemandpowersoffthevirtualmachine. VMwareESXServerclosesopenapplicationsandshutsdowntheguestoperating systembeforepoweringoffthevirtualmachine.VMwareToolsexecutesthescript associatedwiththispowerstatechange,ifany.Whenthisiconisred,thevirtual machineispoweredoff. Suspendsarunningvirtualmachineorresumesasuspendedvirtualmachine. VMwareToolsexecutesthescriptassociatedwiththispowerstatechange,ifany. Whenthisiconisamber,thevirtualmachineissuspended. Powersonastoppedvirtualmachineorresumesasuspendedvirtualmachine. VMwareToolsexecutesthescriptassociatedwiththispowerstatechange,ifany. Whenthisiconisgreen,thevirtualmachineisrunning. Restartsaguestoperatingsystem.VMwareESXServerclosesanyopen applicationsandshutsdowntheguestoperatingsystembeforerestartingthe guestoperatingsystem.

88

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Changingthepowerstateexecutesanyscriptassociatedwiththepowerstatechange. Forinformationaboutrunningscripts,seeChoosingScriptsforVMwareToolstoRun DuringPowerStateChangesonpage 162.

Suspending and Resuming Virtual Machines


Suspendingavirtualmachine,andlaterresumingitsoperation,canspeedprovisioning tasksforexample,deploymentofstandbyservers.VMwareESXServersupportstwo configurationsforresumingasuspendedvirtualmachine:
!

Youcansuspendarunningvirtualmachineatanytime,resumeoperation, suspendatalatertime,andresumewiththemachineinthesecondstate,andso on. Youcansuspendavirtualmachineatanypointinitsoperation,andlockinthe suspendedstateatthatpoint.Anytimeyourestartthevirtualmachine,itresumes inthesamestatethestateitwasinwhenyoufirstsuspendedit.

NOTE

Donotchangeaconfigurationfileafteryoususpendavirtualmachine,becausethe virtualmachinedoesnotresumeproperlyiftheconfigurationfileisinconsistentwith thesuspendedvirtualmachine. Also,donotmoveanyphysicaldisksorchangethenameofanyVMFSfilesystemsthat thevirtualmachineuses.Ifyoudo,thevirtualmachinewillnotbeabletoaccessits virtualdiskswhenitresumes. Youcanalsosettheconfigurationofeachvirtualmachinesothefilethatstores informationonthesuspendedstateissavedinalocationofyourchoice.

Setting the Suspend Directory


Whenavirtualmachineissuspended,itsstateiswrittentoafilewitha.vmss extension.Bydefault,the.vmssfileiswrittentoaVMFSvolume.Whenavirtual machineisresumed,ESXServerlooksforthe.vmssfileinthesameVMFSvolume. Thevirtualmachinemustbepoweredofftochangethedirectorywherethesuspended statefileforavirtualmachineisstored. To set the suspend directory 1 2 LogintotheVMwareManagementInterface,andclickthearrowtotherightofthe terminalicon( )forthevirtualmachineyouwanttochange. ChooseConfigureOptions. TheOptionstabforthisvirtualmachineappearsinanewbrowserwindow.

VMware, Inc.

89

Administration Guide

ClickEdit. TheEditOptionsdialogboxappears. Forfastestsuspendandrestoreoperations,selecttheappropriateVMFSvolume fromtheSuspendFileLocationlist.ESXServeraddsasuffixtothenameofthe suspendedstatefiletoensurethatonevirtualmachinedoesnotoverwritethe suspendedstatefileofanother.

ClickOKtosaveyourchanges.

Enabling Repeatable Resume


WhenyouclicktheSuspendbuttontosuspendavirtualmachine,ESXServerwritesa filewitha.vmssextensionthatcontainstheentirestateofthevirtualmachine.When thevirtualmachineisresumed,itsstateisrestoredfromthe.vmssfile.The.vmssfile ismodifiedwhilethevirtualmachineisrunning.Innormaloperation,the.vmssfile cannotbeusedtoresumeavirtualmachinefromtheoriginalsuspendedstate. Youcanuserepeatableresumetoresumeavirtualmachineinthesamestate repeatedly.Forexample,youcanhaveahotstandbyvirtualmachineinaparticular statesothatitisreadytotakeoverforafailedserver. To prepare a hot-standby virtual machine 1 2 3 Shutdownandpoweroffthevirtualmachine. Inthemanagementinterface,openthevirtualmachinemenu. Clickthearrownexttotheterminalicon( )andselectConfigureHardwareto displaytheHardwaretab.

90

VMware, Inc.

Chapter 3 Using the VMware Management Interface

4 5 6

NexttoVirtualDisk,clickEdit. ClickNonpersistent,andclickOKtosaveyourchange. ClicktheOptionstabandclickthelinkunderVerboseOptions. Theconfigurationfileopensinaneditor.

7 8 9 10 11 12

ClickAdd. Createanoptioncalledresume.repeatableandsetitsvaluetoTRUE. ClickOKtosaveandclosetheconfigurationfile. Poweronthevirtualmachine. Usingtheremoteconsole,placethevirtualmachineinthestateyouwantthe machinetobeinwheninitiatingrepeatableresume. ClickSuspendtoactivaterepeatableresume. Thevirtualmachinewillresumefromthesuspendpointyouset.

VMware, Inc.

91

Administration Guide

WhenyouclickPowerOff,thevirtualmachinewillpoweroff,readytoresumeat thesuspendpointyouset. Ifyoudonotwanttoresumethevirtualmachineusingtherepeatableresumepoint, shutdownthevirtualmachineandmanuallyremovethesuspendedstate(.std)file fromthevirtualmachinedirectory.Afteritisdeleted,suspendthevirtualmachineina newstatetocreateanewrepeatableresumepoint.Otherwise,setthe resume.repeatableflagtoFALSEintheconfigurationfile.

Viewing Information About a Virtual Machine


ImportantvirtualmachineinformationisavailableontheStatusMonitor.
!

DisplayNamecolumnlinkDisplaynameforthevirtualmachine.Ifoneisnot specified,thepathtotheconfigurationfileforthevirtualmachineappears.This columnalsocontainsthevirtualmachinespowerstateanditsprocessIDand virtualmachineID(ifitisrunning).ItalsonoteswhetherVMwareToolsis installed. Ifthevirtualmachineiswaitingforaresponsetoasystemmessage,aWaitingfor inputlinkappears.Clickthelinktoviewthemessageandrespondtoit. Clickthevirtualmachinenamelinkformoredetailsaboutthevirtualmachine. ThevirtualmachinesStatusMonitorappearsinanewbrowserwindow.See ConfiguringVirtualMachinesonpage 73.

! ! !

UpcolumnvalueLengthoftimethevirtualmachinehasbeenrunning. No.columnvalueNumberofvirtualprocessorsinthevirtualmachine. %CPUcolumnvalueAveragepercentageofhostoperatingsystemprocessor capacitythevirtualmachineusedduringthefinalminutebeforethepagewaslast updated.MoredetailedprocessorinformationisavailableontheStatusMonitor. RAMcolumnvalueAmountofmemoryallocatedtothevirtualmachine.See ConfiguringaVirtualMachinesMemoryUsageonpage 97.Forgeneral informationonmemory,seeVirtualMachineMemoryonpage 364.

Downloading Remote Management Packages


YoucandownloadaremotemanagementpackagefromtheVMwareManagement InterfaceStatusMonitor. TodownloadaremoteconsolepackagefromtheStatusMonitor,clickthelinkatthe bottomofthepagefortheappropriateinstallationfile.Thisallowsyoutoquickly downloadtheconsolewithoutloggingoutofthemanagementinterface.

92

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Creating a New Virtual Machine


Tocreateanewvirtualmachinefromthemanagementinterface,ontheStatusMonitor pane,clickAddVirtualMachine.TheAddVirtualMachinewizardstarts.See CreatingaNewVirtualMachineonpage 39.

Unregistering a Virtual Machine


YoucanunregisteravirtualmachinesothatitnolongerappearsontheStatusMonitor andcannotbemanagedoraccessed.SeeRegisteringandUnregisteringVirtual Machinesonpage 145.

Deleting a Virtual Machine


Todeleteavirtualmachinefromthemanagementinterface,clickthearrowtotheright oftheterminalicon( )andchooseDeleteVirtualMachine.TheConfirm:Deleting <VirtualMachine>paneappearsinanewwindow.SeeDeletingaVirtualMachine UsingtheVMwareManagementInterfaceonpage 136.

Configuring VMware ESX Server


TheOptionstabletsyoumakechangestoyourVMwareESXServerconfiguration.See AdministeringESXServeronpage 187. NOTE OnlyauserwithrootprivilegescanaccesstheOptionstab.

Using Common Controls


Thefollowinglinksappearonmostorallofthepagesinthemanagementinterface: RefreshRefreshesorreloadsthecurrentpage.Toavoidconflictswithotherusers, clickthisbuttonbeforeyouperformanoperationinthemanagementinterfaceor afteryouperformsuchanoperationinaremoteconsole. ManageFilesOpensthemanagementinterfacesfilemanager.Thefilemanagerlets youcanmanagethefilesystemofyourVMwareESXServermachineremotely.See UsingtheVMwareManagementInterfaceFileManageronpage 141. HelpConnectsyoutotheVMwareESXServeronlinedocumentationforthecurrent pageinthemanagementinterface. LogoutLetsyoulogoutofthemanagementinterface.Youcanlogoutonlyfromthe StatusMonitorandOptionspane.ClickLogouttoreturntotheLoginpage.See LoggingOutoftheVMwareManagementInterfaceonpage 138.

VMware, Inc.

93

Administration Guide

CloseClosesthecurrentmanagementinterfacewindow.Youcancloseonlywindows thatwereopenedwhileusingthemanagementinterface.

Configuring a Virtual Machine


Toseeinformationaboutavirtualmachineandtomodifyitsconfiguration,clickthe linktothevirtualmachineintheDisplayNamecolumnontheStatusMonitor.The StatusMonitorspecifictothevirtualmachineyouselectedappearsinanewbrowser window.

Figure 3-2. Status Monitor Tab TheStatusMonitorcontainsthefollowinginformation:


!

Currentpowerstateofthevirtualmachinewhetheritispoweredon,powered off,orsuspended. ProcessIDofthevirtualmachine. VMIDofthevirtualmachine,whichisthevmkernelversionofthePIDfora runningvirtualmachine. Minimum,maximum,andaveragepercentageofserverprocessorcapacitythatthe virtualmachineusedinthepreviousfiveminutes.Youcanmodifytheperiodof

! !

94

VMware, Inc.

Chapter 3 Using the VMware Management Interface

timethesestatisticscover.SeeConfiguringtheStatisticsPeriodfortheVMware ManagementInterfaceonpage 81.


!

Minimum,maximum,andaverageamountofservermemorythatthevirtual machineusedinthepreviousfiveminutes.Youcanmodifytheperiodoftime thesestatisticscover.SeeConfiguringtheStatisticsPeriodfortheVMware ManagementInterfaceonpage 81. Thelengthoftimethevirtualmachinehasbeenrunning. VMwareToolsstatus;whetherVMwareToolsisinstalledandrunning. Averagepercentageofheartbeatsreceivedbyavirtualmachineduringthe previousminute.TheheartbeatsaresentbytheVMwareguestoperatingsystem servicetothevirtualmachinefromitsguestoperatingsystem.Thepercentageis relativetothenumberofheartbeatsthevirtualmachineexpectstoreceiveforthe minutebeforethepagewaslastupdated.Heavilyloadedguestoperatingsystems maynotsend100%oftheexpectedheartbeats,eventhoughthesystemis otherwiseoperatingnormally.

! ! !

NOTE

IfVMwareToolsisnotinstalledorisnotrunning,theguestoperatingsystemdoesnot sendanyheartbeatstoitsvirtualmachineandNotAvailableappearshere.
! !

IPaddressofthevirtualmachine. Linkstoeditthevirtualmachineshardwareandstandardconfigurationoptions. ClickHardwaretoeditthevirtualmachineshardwareontheHardwaretab.Click Optionstoeditthevirtualmachinesstandardconfigurationoptions.TheOptions paneappears.Makechangestothevirtualmachinesconfiguration.Tochange mostoptions,thevirtualmachinemustbepoweredoff. Guestoperatingsysteminstalledinthevirtualmachine. Numberofvirtualprocessorsinthevirtualmachine. Amountofmemoryallocatedtothevirtualmachine. PathtothevirtualmachinesconfigurationfileontheESXServersystem.

! ! ! !

Editing a Virtual Machines Configuration


Youcaneditavirtualmachinesconfigurationfromthemanagementinterfacebydoing oneofthefollowing:
!

OntheStatusMonitor,clickHardwareorOptions.Thevirtualmachinemustbe poweredoffbeforeyoucaneditmostconfigurationoptions.

VMware, Inc.

95

Administration Guide

OntheStatusMonitororadetailspaneforthatvirtualmachine,clickthearrowto therightoftheterminalicon( )andselectConfigureHardwareorConfigure OptionsintheVirtualMachinemenu.SeeUsingtheVirtualMachineMenuon page 86.

Anewbrowserwindowappears,allowingyoutomakechangestothevirtual machinesconfiguration.

Configuring a Virtual Machines CPU Usage


Toreviewandconfigurethevirtualmachinesprocessorusage,clicktheCPUtab.

Figure 3-3. CPU Tab TheCPUtabshowshowmuchoftheserverprocessororprocessorseachvirtual processorisutilizing,howCPUresourcesareallocatedtothevirtualmachine,whether HyperThreadingisenabled,andwhetherthereisanyschedulingaffinitytoany specifiedprocessorsontheserver.

Understanding Performance Values


ThevaluesunderPerformancearebasedonthepastfiveminutes.Theperiodoftime thesestatisticscovercanbemodified.SeeConfiguringtheStatisticsPeriodforthe VMwareManagementInterfaceonpage 81. PerformanceinformationdisplayedincludesCPUUtilization,whichistheamountof theserverprocessororprocessorseachvirtualprocessorisutilizing.

96

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Understanding Resource Values


ThevaluesunderResourcesindicatearangeofpercentagesofaprocessortowhichthe virtualmachineisentitled.Resourceinformationdisplayedincludes:
!

MinimumMinimumamountofprocessorcapacitythatmustbeavailableto poweronthevirtualmachine. MaximumHighestamountofprocessorcapacitythevirtualmachinecanever consume,eveniftheprocessorisidle.Themaximumvaluecanbelargerthan100% ifthevirtualmachinehasmorethanonevirtualCPU. SharesArelativemetricforallocatingprocessorcapacity.Thevalueslow, normal,andhigharecomparedtothesumofallsharesofallvirtualmachineson theserverandtheserviceconsole.Shareallocationsymbolicvaluescanbeusedto configuretheirconversionintonumericvalues. Formoreinformationonsharevalues,refertotheresourcemanagementman pages:cpu(8),diskbw(8),andmem(8).

IsolatedfromHyperThreadingCPUoperationstateofthevirtualmachine. EnablingthisoptionpreventsavirtualmachinefromsharingaphysicalCPUwith othervirtualmachineswhenHyperThreadingisenabled. Enablingthisoptionpreventsothervirtualmachinesfromusingthesecondlogical processoraslongasthisvirtualmachineisusingthefirstlogicalprocessor. ForinformationonHyperThreading,seethehyperthreading(8)manpage.

NOTE

SchedulingAffinityRepresentswhichESXServerprocessorsthevirtual machinecanrunon,whentheESXServersystemisamultiprocessorsystem.

NOTE

Foravirtualmachinewithexplicitaffinitysettings,ESXServermightnotalwaysfulfill thespecifiedCPUminimum.Minimumswillalwaysbefulfilledforvirtualmachines withoutexplicitaffinitysettings,evenifothervirtualmachinesuseexplicitaffinity settings.

Modifying CPU Values


Thesevaluescanbemodified.ClickEdit.ForinformationonchangingCPUsettings, seeAllocatingCPUResourcesonpage 331.

Configuring a Virtual Machines Memory Usage


Toreviewandconfigurethevirtualmachinesmemoryusage,clicktheMemorytab.

VMware, Inc.

97

Administration Guide

Figure 3-4. Memory tab TheMemorytabshowshowmuchmemoryisbeingusedbythevirtualmachineand howmemoryresourcesareallocatedtothevirtualmachine.

Understanding Performance Values


ThevaluesunderPerformancearebasedonthepastfiveminutes.Theperiodoftime thesestatisticscovercanbemodified.SeeConfiguringtheStatisticsPeriodforthe VMwareManagementInterfaceonpage 81.Performanceinformationvaluesinclude:
!

UsedMemoryAmountofmemoryallocatedtothevirtualmachinewhenitwas configured,howmuchmemoryhasbeenusedrecentlybythevirtualmachine,and howmuchmemoryhasbeensharedbetweenallrunningvirtualmachinesonthe serverandwithinthevirtualmachineitself. ReclaimedMemoryAmountofmemoryreclaimedbyESXServerunderheavy loadsorwhenyouareovercommittingmemory. VirtualizationOverheadAmountofextramemorythevirtualmachineprocess isusing,inadditiontotheamountofmemoryallocatedtoit.

Understanding Resource Values


ThevaluesunderResourcesindicatearangeofsystemmemorytowhichthevirtual machineisentitled.

98

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Resourceinformationdisplayedincludes:
!

MinimumMinimumamountofmemorythatmustbeavailabletopoweronthe virtualmachine. MaximumAmountofmemoryallocatedtothevirtualmachinewhenitwas configured. SharesArelativemetricforallocatingmemorytoallvirtualmachines.Symbolic valueslow,normal,andhigharecomparedtothesumofallsharesofallvirtual machinesontheserverandtheserviceconsole.Shareallocationsymbolicvalues canbeusedtoconfiguretheirconversionintonumericvalues. Formoreinformationonsharevalues,refertotheresourcemanagementman pages:cpu,diskbw,andmem.

MemoryAffinityIfdisplayed,theNUMAnodesontheESXServersystemto whichthevirtualmachinecanbebound,whentheESXServersystemaNUMA system.SeeUsingYourNUMASystemonpage 358.

Modifying Memory Values


Tomodifymemoryvalues,clickEdit.SeeManagingMemoryResourcesfromthe ManagementInterfaceonpage 351.

Configuring a Virtual Machines Disk Usage


Toreviewandconfigurethevirtualmachinesdisksettings,clicktheDisktab.

Figure 3-5. Disk Tab TheDisktabshowsvirtualdiskperformanceinformationandresourcesallocatedto thevirtualdisk.Diskbandwidthrepresentstheamountofdatathatiswrittentoorread fromtheserversphysicaldisks.

VMware, Inc.

99

Administration Guide

Understanding Performance Values


ThevaluesunderPerformancearebasedonthepastfiveminutes.Theperiodoftime thesestatisticscovercanbemodified.SeeConfiguringtheStatisticsPeriodforthe VMwareManagementInterfaceonpage 81.Performanceinformationdisplayed includes:
!

ReadBandwidthAmountofbandwidthbeingusedwhenthevirtualmachineis readingfromthephysicaldiskontheserver. WriteBandwidthAmountofbandwidthbeingusedwhenthevirtualmachine iswritingtothephysicaldiskontheserver.

Understanding Resources Values


ThevaluesunderResourcesindicatearangeofsystemmemorytowhichthevirtual machineisentitled.
!

SharesRelativemetricforcontrollingdiskbandwidthtoallvirtualmachines. Thevalueslow,normal,andhigharecomparedtothesumofallsharesofall virtualmachinesontheserverandtheserviceconsole.Shareallocationsymbolic valuescanbeusedtoconfiguretheirconversionintonumericvalues. Formoreinformationonsharevalues,refertotheresourcemanagementman pages:cpu,diskbw,andmem.

MemoryAffinityIfdisplayed,theNUMAnodesontheESXServersystemto whichthevirtualmachinecanbebound,whentheESXServersystemaNUMA system.SeeUsingYourNUMASystemonpage 358.

Modifying Disk Values


Tomodifydiskvalues,clickEdit.Forinformationonchangingdisksettings,see ManagingDiskBandwidthonpage 371.

Configuring a Virtual Machines Networking Settings


Toreviewandconfigurethevirtualmachinesnetworkingsettings,clicktheNetwork tab.

100

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Figure 3-6. Network tab TheNetworktabshowsnetworkperformanceinformationandresourcesallocatedto thevirtualmachinesvirtualnetworkcard.Thereceiveandtransmitbandwidths indicatehowfastdataistransferredtoandfromthevirtualmachine. ThevaluesunderPerformancearebasedonthepastfiveminutes.Theperiodoftime thesestatisticscovercanbemodified.SeeConfiguringtheStatisticsPeriodforthe VMwareManagementInterfaceonpage 81. TheNetworktabalsoindicateswhethertrafficshapingisenabled.Thissettingcanbe changed.

Enabling Traffic Shaping


Whennetworktrafficshapingisenabled,outboundnetworkbandwidthislimited accordingtothevaluesspecifiedhere.Becausenetworktrafficisbursty,separate parametersareprovidedtocontrolboththelongtermsustainableAveragetransmit rateandtheshorttermPeaktransmitrate.TheBurstparametercontrolstheamountof datathatmaybesentinoneburstwhileexceedingtheAveragerate.ThePeakrate limitsthemaximumbandwidthduringsuchbursts.

VMware, Inc.

101

Administration Guide

To enable network traffic shaping 1 IntheNetworktab,clickEdit. TheNetworkResourceSettingsdialogboxappears.

2 3

Toenabletrafficshaping,selectEnableTrafficShapinganddefinenetworktraffic parameters. IntheAverageBandwidthfield,specifytheaveragevaluefornetworkbandwidth, andspecifywhetherthatamountisinMegabitspersecond(Mbps),Kilobitsper second(Kbps),orbitspersecond(bps). InthePeakBandwidthfield,specifythepeakvaluefornetworkbandwidth,and specifywhetherthatamountisinMegabitspersecond(Mbps),Kilobitspersecond (Kbps)orbitspersecond(bps). IntheBurstSizefield,specifyhowlargeaburstcanbe,andspecifywhetherthat amountisinMegabytes(M),Kilobytes(K),orbytes(B). ClickOKtosaveyourchangesandclosethewindow.

5 6

Forinformationaboutmanagingnetworkresources,seeManagingNetwork BandwidthfromtheManagementInterfaceonpage 367.

Configuring a Virtual Machines Hardware


Toreviewandconfigurethevirtualhardwareinsideavirtualmachine,clickthe Hardwaretab.

102

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Figure 3-7. Hardware tab TheHardwaretabliststhevirtualhardwareinthevirtualmachineconfigured deviceslikethevirtualdisk,removabledeviceslikefloppy,CDROMorDVDROM drives,virtualnetworkadapter,memoryallocatedtothevirtualmachine,andthe displaysettings.Moreinformationabouteachdeviceislisted,andyoucanconfigure eachvirtualhardwarecomponent. Youcanconfiguremosthardwareonlywhenthevirtualmachineispoweredoff.

Configuring a Virtual Machines Floppy Drive


Eachvirtualmachinecanaccessaphysicalfloppydriveontheserverorafloppyimage file.

VMware, Inc.

103

Administration Guide

To configure the virtual machines floppy drive 1 IntheHardwaretab,underFloppyDrive,clickEdit. TheFloppyDrivedialogboxappears.

Toconnectthisvirtualmachinetothefloppydrive,checkConnected. Onlyonevirtualmachinecanconnecttothefloppydriveontheserverata time.

NOTE

3 4 5

Toconnectthisvirtualmachinetothefloppydrivewhenthevirtualmachineis poweredon,selectConnectatPowerOn. IntheDevicelist,selectSystemFloppyDriveorFloppyImage. EnterthelocationofthedriveorfloppyimageintheLocationfield. Forexample,theserversfloppydrivecouldbe/dev/fd0.

ClickOKtosaveyourchangesandclosethewindow.

Configuring a Virtual Machines DVD-ROM or CD-ROM Drive


EachvirtualmachinecanaccessaphysicalDVDROMorCDROMdriveontheserver oranISOimagefile.

104

VMware, Inc.

Chapter 3 Using the VMware Management Interface

To configure the virtual machines DVD/CD-ROM drive 1 IntheHardwaretab,underDVD/CDROMDrive,clickEdit. TheDVD/CDROMDrivedialogboxappears.

ToconnectthisvirtualmachinetotheserversDVD/CDROMdrive,select Connected. OnlyonevirtualmachinecanconnecttotheDVD/CDROMdriveonthe serveratatime.

NOTE

3 4 5

ToconnectthisvirtualmachinetotheserversDVD/CDROMdrivewhenthe virtualmachineispoweredon,selectConnectatPowerOn. IntheDevicelist,selectSystemDVD/CDROMDriveorISOImage. EnterthelocationofthedriveorISOimageintheLocationfield. Forexample,theserversCDROMdrivecouldbe/dev/cdrom.

ClickOKtosaveyourchangesandclosethewindow.

Configuring a Virtual Machines Memory and Virtual Processors


Youcanchangehowmuchmemorytoallocatetoavirtualmachine.Youcanreviewthe amountofmemoryrecommendedbyESXServer,themaximumamountofmemory thatcanbeallocatedtothevirtualmachine,andthemaximumamountofmemoryfor smoothrunningofthevirtualmachine,giventhenumberofvirtualprocessors. Dependingontheguestoperatingsysteminthevirtualmachineandthenumberof processorsontheserver,youcanchangethenumberofvirtualprocessorsituses.

VMware, Inc.

105

Administration Guide

Keepinmindthefollowing:
!

Virtualmachinesrunningcertainguestoperatingsystems,suchasWindowsNT, canbeconfiguredwithasingleprocessoronly.Reviewthelistofsupportedguest operatingsystemsintheVMwareESXServerInstallationGuidetoseewhichguests aremultiprocessororSMPcapable. Virtualmachinescanbeconfiguredwithmultipleprocessorsonlyiftheserverhas morethanoneprocessor.Avirtualmachinecannothavemorevirtualprocessors thantheserverhasphysicalprocessors. Multiprocessorcapableguestoperatingsystemsconfiguredwithasingle processormightrequireadditionaltuningifyouincreasethenumberofvirtual processors.Atmost,avirtualmachinecanhavetwovirtualprocessors.See ConfiguringaVirtualMachinetoUseMorethanOneVirtualProcessoron page 60. Multiprocessorcapableguestoperatingsystemsconfiguredandtunedwithmore thanonevirtualprocessormaynotbootandwillprobablydegradethe performanceofothervirtualmachinesifyouchangetheconfigurationtoasingle processor. VMwarerecommendsthatyoudonotdowngradeamultiprocessorvirtual machinetouniprocessor.

NOTE

Youcanconfiguredualvirtualprocessorvirtualmachinesonlyifyoupurchasedthe VMwareVirtualSMPforESXServerproduct.Formoreinformationonthisproduct, contactVMware,Inc.oryourauthorizedsalesrepresentative.

106

VMware, Inc.

Chapter 3 Using the VMware Management Interface

To configure the virtual machines virtual processors and memory 1 IntheHardwaretab,underProcessorsandMemory,clickEdit. TheProcessorsandMemorydialogboxappears.

Dependingontheguestoperatingsystemandthenumberofprocessorswith whichitisconfigured,amessageappearsunderEditProcessorConfiguration. 2 3 4 Providedtheguestoperatingsystemismultiprocessorcapable,andtochangethe numberofprocessors,clicktheclickherelink. ChoosethenumberofvirtualprocessorsintheProcessorslist. IntheMemoryfield,entertheamountofmemorytoallocatetothevirtual machine. Theamountmustbeamultipleof4. 5 ClickOKtosaveyourchangeandclosethewindow.

Configuring a Virtual Machines Virtual Network Adapters


Youcanconfigurethesettingsforthevirtualmachinesvirtualnetworkadapter.These settingsincludethevirtualnetworkdevicetowhichthevirtualmachineisboundand thenetworkdriverituses. Tochoosethevirtualnetworkdevice,selecteither:
!

vmnicadapterConnectsthevirtualmachinetothephysicalnetworkadapter, allowingthevirtualmachinetolookandactasanothercomputeronthenetwork.

VMware, Inc.

107

Administration Guide

vmnetadapterConnectsthevirtualmachinetoaninternalnetworkofother virtualmachines.Allthevirtualmachinesonthiscomputerconnectedtoa particularvmnetareonthesamenetwork.

Forthisnetworkconnection,choosebetweenthevlancedriver,whichinstalls automatically,andthevmxnetdriver,whichprovidesbetternetworkperformance.The differenceinnetworkperformanceismostnoticeableifthevirtualmachineis connectedtoaGigabitEthernetcard. NOTE IfyouusevmxnetinaWindowsorLinuxvirtualmachine,thevirtualnetworkdevice isnotvisibletotheguestoperatingsystemuntilyouinstallVMwareTools.SeeTo InstallVMwareToolsinaLinuxGuestonpage 47. Afterthevirtualmachineiscreated,usethistabtoassignadditionalnetworkadapters tothevirtualmachine. Todeterminewhichnetworkadapterisassociatedwithadevicename,usetheservice consolesfindniccommand.SeeVMkernelNetworkCardLocatoronpage 314. To configure the virtual machines virtual network adapter 1 IntheHardwaretab,underNetworkAdapter,clickEdit. TheNetworkAdapterdialogboxappears.

2 3 4

IntheNetworkConnectionlist,selectthevirtualnetworkdevicethatyouwant thevirtualmachinetouse. IntheVirtualDevicelist,selecteitherthevlanceorvmxnetdriver. ClickOKtosaveyourchangesandclosethewindow.

108

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Configuring a Virtual Machines SCSI Controllers


YoucanconfigurethesettingsforthevirtualmachinesvirtualSCSIcontroller.These settingsincludethevirtualSCSIcontrollerdriverandwhethertheSCSIbusisshared withvirtualorphysicaldevices. To configure the virtual machines virtual SCSI controller 1 IntheHardwaretab,underSCSIController,clickEdit. TheSCSIControllerdialogboxappears.

IntheVirtualDevicelist,selecttheSCSIcontrollerdriverthatyouwantthevirtual machinetouse,eithervmxbuslogicorvmxlsilogic. Beforeyouselectadriver,makesureyouinstalledthedriverintheguestoperating system.Otherwise,theguestcannotboot.Toswitchtothevmxlsilogicdriver, seeConfiguringaVirtualMachinetoUsetheLSILogicSCSIAdapteron page 55.

IntheBusSharinglist,selecthowyouwantthevirtualmachinetoshareitsbus:
! ! !

PhysicalSharediskswithvirtualmachinesonanyserver. VirtualSharediskswithvirtualmachinesonthesameserver. NonePreventsharingdiskswithothervirtualmachines.

ClickOKtosaveyourchangesandclosethewindow.

Configuring a Virtual Machines Virtual Disks


Whenyouconfigureanexistingvirtualdisk,youcanchangeitsdiskmode.Youcan alsochangethevirtualdiskavirtualmachineusesorcreateanewvirtualdiskforthe virtualmachine.

VMware, Inc.

109

Administration Guide

ESXServercanusedisksinfourmodes:
!

PersistentDisksinpersistentmodebehaveexactlylikeconventionaldiskdrives onacomputer.Allwritestoadiskinpersistentmodearewrittenoutpermanently tothediskassoonastheguestoperatingsystemwritesthedata. NonpersistentAllchangestoadiskinnonpersistentmodearediscardedwhen avirtualmachinesessionispoweredoff. UndoableKeepordiscardchangesyoumadeduringaworkingsessionwhen youpoweroffthevirtualmachine.Untilyoudecide,thechangesaresavedina redologfile. AppendStoreschangesinaredolog.Itcontinuallyaddschangestotheredolog untilyouremovetheredologfileorcommitthechangesusingthecommit commandinvmkfstools.SeeUsingvmkfstoolsonpage 249.

To configure the virtual machines virtual disk 1 IntheHardwaretab,underVirtualDisk,clickEdit. TheVirtualDiskdialogboxappears.

UnderDiskMode,clickPersistent,Nonpersistent,Undoable,orAppend.

110

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Youcanchangethediskmodeforanexistingvirtualdiskthatisnotaphysicaldisk onaLUN. 3 ClickOKtosaveyourchangesandclosethewindow.

Configuring a Virtual Machines Display Settings


Youcanconfigurethedisplaydepthornumberofcolorsinavirtualmachine.Ahigher colordepthsettingslowsdownscreenredrawsandincreasesnetworkloadwhenyou usearemoteconsoletoviewavirtualmachineacrossanetworkconnection.However, withgreatercolordepth,yougetbettercolorresolutionandfidelity,whichmaybean issue,dependingontheapplicationsyouintendtorunonthevirtualmachine. To configure the virtual machines display settings 1 IntheHardwaretab,underDisplay,clickEdit. TheDisplaydialogboxappears.

IntheColorslist,selectthedisplaydepthorthenumberofcolorsyouwant availabletothevirtualmachine. Select256Colors(8bit),ThousandsofColors(15bit),ThousandsofColors(16 bit),orMillionsofColors(24bit).

ClickOKtosaveyourchangeandclosethewindow.

Configuring a Virtual Machines Generic SCSI Device


YoucanconfigureanygenericSCSIdevicesinavirtualmachine.Makesurethevirtual machineispoweredoffandcompletethefollowingsteps.

VMware, Inc.

111

Administration Guide

To configure a virtual machines generic SCSI device 1 ToconfigureanexistinggenericSCSIdevice,ontheHardwaretab,underGeneric SCSIDevice,clickEdit. TheGenericDevice(SCSI<ID>)dialogboxappears.

2 3 4

ToconnectthisvirtualmachinetotheserversSCSIdevicewhenthevirtual machineispoweredon,checkConnectatPowerOn. IntheDevicedropdownlist,choosetheappropriatedevice. SelecttheappropriateSCSIIDintheVirtualSCSINodelist.

NOTE IfthevirtualdeviceisonSCSIcontroller0:0,awarningappears,statingthat changingtheSCSInodemaycausethevirtualmachinetobootimproperly. 5 ClickOKtosaveyourchangeandclosethewindow.

Adding a Virtual Disk to a Virtual Machine


Makesurethevirtualmachineispoweredoff,andcompletethefollowingsteps.

112

VMware, Inc.

Chapter 3 Using the VMware Management Interface

To add a new virtual disk to a virtual machine 1 OntheHardwaretab,clickAddDevice. TheAddDevicewizardstarts.

ClickHardDisk. TheVirtualDiskTypepageappears.

VMware, Inc.

113

Administration Guide

Createoneofthefollowingvirtualdisks:
!

ClickBlanktocreateanewvirtualdisk.

Specifythefollowing:
!

ImageFileLocationChoosethevolumefromthelistonwhichtolocate thevirtualdisk.Theamountoffreespaceislistednexttothevolume name,soyouknowhowlargeyoucanmakethevirtualdisk. ImageFileNameEnteradiskname,makingsurethefilehasa.vmdk extension. CapacitySpecifythesizeofthevirtualdiskinMB.Thedefaultentry indicatestheamountoffreespaceavailableonthevolume. VirtualSCSINodeSelecttheappropriateSCSIIDfromthelist. DiskModeClickPersistent,Nonpersistent,Undoable,orAppend.

! !

114

VMware, Inc.

Chapter 3 Using the VMware Management Interface

ClickExistingtoaddanexistingvirtualdisktothevirtualmachine.

Specifythefollowing:
!

ImageFileLocationChoosethevolumefromthelistonwhichthe virtualdiskislocated. ImageFileNameSelectthevirtualdiskyouwantfromthelist.Thesize ofthevirtualdiskappearsintheCapacityfield. VirtualSCSINodeSelecttheappropriateSCSIIDfromthelist. DiskModeClickPersistent,Nonpersistent,Undoable,orAppend.

! !

ClickOKtoaddthedisk.

Adding a Virtual Network Adapter to a Virtual Machine


Beforeaddingavirtualnetworkadapter,makesurethevirtualmachineispoweredoff.

VMware, Inc.

115

Administration Guide

To add a new virtual network adapter to a virtual machine 1 OntheHardwaretab,clickAddDevice. TheAddDevicewizardstarts.

ClickNetworkAdapter. TheNetworkAdapterpageappears.

3 4 5

Toconnectthisvirtualmachinetothenetworkwhenthevirtualmachineis poweredon,selectConnectatPowerOn. IntheNetworkConnectionlist,selectthevirtualnetworkdevicethatyouwant thevirtualmachinetouse. IntheVirtualDevicelist,selectthenetworkdriver(eitherthevlanceorvmxnet driver)youwantthevirtualmachinetouse.

116

VMware, Inc.

Chapter 3 Using the VMware Management Interface

ClickOKtoaddthenetworkadapter.

Adding a Virtual DVD/CD-ROM Drive to a Virtual Machine


IfyourservercontainsaDVD/CDROMdrive,youcanaddaDVD/CDROMdriveto thevirtualmachine.YoucanpointtheCDROMdrivetoanISOdiskimagefile. Youcanconnectadevicetoonlyonevirtualmachineonaserveratatime. BeforeaddingavirtualDVD/CDROMdrive,makesurethevirtualmachineis poweredoff. To add a new virtual DVD/CD-ROM drive to a virtual machine 1 OntheHardwaretab,clickAddDevice. TheAddDevicewizardstarts.

ClickDVD/CDROM.

VMware, Inc.

117

Administration Guide

Thecdrompageappears.

3 4 5

ToconnectthisvirtualmachinetotheserversDVD/CDROMdrivewhenthe virtualmachineispoweredon,selectConnectatPowerOn. IntheDevicelist,selectSystemDVD/CDROMDriveorISOImage. EnterthelocationofthedriveorISOimageintheLocationfield. Forexample,theserversCDROMdrivecouldbe/dev/cdrom.

ClickOKtoaddthedrive.

Adding a Virtual Floppy Drive to a Virtual Machine


Ifyourservercontainsafloppydrive,youcanaddavirtualfloppydrivetothevirtual machine.Youcanpointthefloppydrivetoafloppydiskimagefile. Youcanconnectadevicetoonlyonevirtualmachineonaserveratatime. Beforeaddingavirtualfloppydrive,makesurethevirtualmachineispoweredoff.

118

VMware, Inc.

Chapter 3 Using the VMware Management Interface

To add a new virtual floppy drive to a virtual machine 1 OntheHardwaretab,clickAddDevice. TheAddDevicewizardstarts.

ClickFloppyDrive. TheFloppyDrivepageappears.

3 4 5

Tohavethefloppydrivebeconnectedtothevirtualmachinewhenyoupowerit on,selectConnectatPowerOn. IntheDevicelist,selectSystemFloppyDriveorFloppyImage. EnterthelocationofthedriveorfloppyimageintheLocationfield. Forexample,theserversfloppydrivecouldbe/dev/fd0.

ClickOKtoaddthedrive.

VMware, Inc.

119

Administration Guide

Adding a Generic SCSI Device to a Virtual Machine


BeforeaddingagenericSCSIdevice,makesurethevirtualmachineispoweredoff. To add a new generic SCSI device to a virtual machine, 1 OntheHardwaretab,clickAddDevice. TheAddDevicewizardstarts.

ClickGenericSCSIDevice. TheSCSIDevicepageappears.

3 4

ToconnectthisvirtualmachinetotheserversSCSIdevicewhenthevirtual machineispoweredon,selectConnectatPowerOn. IntheDevicedropdownlist,choosetheappropriatedevice(suchas/dev/sga.)

120

VMware, Inc.

Chapter 3 Using the VMware Management Interface

5 6

SelecttheappropriateSCSIIDintheVirtualSCSINodelist. ClickOKtoaddthedevice.

Adding a Tape Drive to a Virtual Machine


Beforeaddingatapedrive,makesurethevirtualmachineispoweredoff. To add a new tape drive to a virtual machine 1 OntheHardwaretab,clickAddDevice. TheAddDevicewizardstarts.

ClickGenericSCSIDevice. TheSCSIDevicepageappears.

VMware, Inc.

121

Administration Guide

3 4

ToconnectthisvirtualmachinetotheserversSCSIdevicewhenthevirtual machineispoweredon,selectConnectatPowerOn. IntheDeviceentryfield,type:


vmhba<x>:<y>:<z>:0

5 6

SelecttheappropriateSCSIIDintheVirtualSCSINodelist. ClickOKtoaddthedevice.

Removing Hardware from a Virtual Machine


Toremovehardwarefromavirtualmachine,accesstheHardwarepage.Nexttothe itemyouwanttoremove,clickRemove.Youareaskedforconfirmationbeforethe deviceisremoved. NOTE Youcannotremovesomeitemsfromavirtualmachine,suchastheprocessor,SCSI controller,orthevirtualdisplay.

Setting Standard Virtual Machine Configuration Options


Toreviewandmodifybasicinformationaboutavirtualmachine,ortoaccessthe configurationfiledirectly,clicktheOptionstab.

Figure 3-8. Options tab

122

VMware, Inc.

Chapter 3 Using the VMware Management Interface

TheOptionstabshowsstandardvirtualmachineinformation:
! ! !

DisplayNameIdentifiesthevirtualmachineinamoredescriptiveway. GuestOperatingSystemGuestoperatingsysteminstalledonthevirtualdisk. SuspendFileLocationLocationofthesuspendedstatefile(aVMFSvolume). Thisfileiscreatedwhenyoususpendavirtualmachine.Itcontainsinformation aboutthevirtualmachinesstateatthetimeatwhichitwassuspended.ESXServer addsasuffixtothenameofthesuspendedstatefiletoensurethatonevirtual machinedoesnotoverwritethesuspendedstatefileofanother. UnlikeearlierversionsofESXServer,thesuspendedstatefilecanresideonly onaVMFSvolume.Itcannotbelocatedinthedirectorywiththevirtual machinesconfigurationfileintheserviceconsole

NOTE

! !

EnableLoggingWhetherloggingisenabled. RunwithDebuggingInformationWhetherthevirtualmachineisrunning withdebugginginformation.Whenyouareexperiencingproblemswiththis virtualmachine,youcanprovidetheinformationtoVMwaresupporttohelp troubleshootproblems. SystemStartupOptionsStartupoptionsforthisvirtualmachinewhentheserver starts. SystemShutdownOptionsShutdownoptionsforthisvirtualmachinewhenthe servershutsdown. Tochangeotheroptions,seeSettingStandardVirtualMachineConfiguration Optionsonpage 122. UnderVerboseOptions,youcanenterandmodifyconfigurationfileentriesby hand.SeeSettingStartupandShutdownOptionsbyModifyingthe ConfigurationFileDirectly(AdvancedUsersOnly)onpage 126.

Setting Startup and Shutdown Options for a Virtual Machine


Youcanconfigurewhatavirtualmachinedoeswhenthesystemstartsandhowitshuts downwhenthesystemshutsdown.Youcanenablethesesettingsonlyifthestartup andshutdownoptionsareenabledfortheserveroverall.SeeSettingStartupand ShutdownOptionsonpage 124.

VMware, Inc.

123

Administration Guide

Thevirtualmachinestartupoptionsinclude:
!

AtSystemStartupWhetherthisvirtualmachineshouldstartwhentheserver starts.Bydefault,virtualmachinesdonotstartautomaticallywhenthesystem startsup. ContinueStartingOtherVirtualMachinesAfterAmountoftimetowaitafter startingthevirtualmachinebeforestartinganothervirtualmachine.Settingsfor startingvirtualmachinesinclude:thesystemdefault,donotwaittostart,waitfor acertainnumberofminutestostart,orstartwhenVMwareToolsstarts.

Thevirtualmachinestartupoptionsinclude:
!

AtSystemShutdown,AttempttoSetstheshutdownactionforthevirtual machinewhentheserverisshutdown.Settingsinclude:poweroffthevirtual machine,shutdowntheguestoperatingsystem,orsuspendthevirtualmachine. Bydefault,allvirtualmachinesarepoweredoffwhenthesystemshutsdown. ContinueStoppingOtherVirtualMachinesAfterAmountoftimetowaitafter stoppingthevirtualmachinebeforestoppinganothervirtualmachine.Settings include:thesystemdefault,nowait,orwaitforacertainnumberofminutes.

Youcansettheseoptionsindividuallyorbymodifyingtheconfigurationfiledirectly. Modifyingtheconfigurationfileisrecommendedonlyforadvancedusers.Selectthe sectionbelowforthemethodappropriateforyourcomfortlevel.

Setting Startup and Shutdown Options


Youcanconfigurehoweachvirtualmachinebehavesduringstartupandshutdownby configuringtheoptionsforthoseevents. To configure a Virtual Machines Startup and Shutdown Options 1 PoweroffthevirtualmachineandclickEditunderSystemStartupOptionsor SystemShutdownOptions. TheOptionsdialogboxappears. 2 3 Toallowthevirtualmachinetostartupwhenthesystemstartsup,selecttheStart VirtualMachinecheckbox. IntheContinueStartingVirtualMachinesAfterlist,choosethenumberof minutesorwhetherESXServershouldnotwaitbeforestartingthenextvirtual machine. IfyouselectOther,specifythenumberofminutestowaitinthepromptthat appears.

124

VMware, Inc.

Chapter 3 Using the VMware Management Interface

TospecifythatVMwareToolsshouldstartinavirtualmachinebeforethenext virtualmachinestarts,selectthewhenVMwareToolsstartscheckbox. IfVMwareToolsdoesnotstartinthevirtualmachinebeforethetimespecified elapses,ESXServerstartsthenextvirtualmachine.

InAtSystemShutdown,Attempttolist,selectwhetheryouwanttopoweroffthe virtualmachine,shutdowntheguestoperatingsystem,orsuspendthevirtual machine. IntheContinueStoppingOtherVirtualMachinesAfterlist,chooseanumberof minutesorwhetherESXServershouldnotwaitbeforestartingthenextvirtual machine. Tochooseanumberofminutesotherthanwhatappears,selectOtherandenterthe numberofminutesattheprompt.

7 8

ClickOKtosaveyoursettings. ClickCloseWindowtoreturntothevirtualmachinesOptionstab.

To change any of these options 1 PoweroffthevirtualmachineandclickEdit. TheOptionsConfigurationdialogboxappears.

NOTE 2 3

Youcanchangethedisplaynamewhenthevirtualmachineispoweredon.

MakeyourchangesandclickOKtosavethem. Closethewindow.

VMware, Inc.

125

Administration Guide

Setting Startup and Shutdown Options by Modifying the Configuration File Directly (Advanced Users Only)
Toaddorchangeaconfigurationoptionforavirtualmachinethatcannotbeaccessed fromelsewhereinthemanagementinterface,editthevirtualmachinesconfiguration file(thefilewiththe.vmxextension)fromtheOptionsdialogbox. Forexample,toenablerepeatableresumeinthevirtualmachine,seeToaddanoption totheconfigurationfile(.vmx)onpage 127. CAUTION Donotaddorchangeanyoptionsinyourconfigurationfileunlessyouhave beengivenaspecificoptiontoaddtothefileinanotherpartoftheuser documentationorifyouareworkingwithVMwaresupporttosolvean issuewithyourvirtualmachine. Beforemodifyingtheconfigurationfile,makesureyouareloggedintothe managementinterfaceasthevirtualmachineuserorauserwiththeproper permissionstomodifythisvirtualmachine(suchastherootuser).

126

VMware, Inc.

Chapter 3 Using the VMware Management Interface

To add an option to the configuration file (.vmx) 1 UnderVerboseOptions,clickthelink. TheOptionsdialogboxappears.

2 3

ClickAdd. EnteranamefortheoptionandclickOK. Forexample,toenablerepeatableresumeinthevirtualmachine,createanoption calledresume.repeatable.

EnteravaluefortheoptionyouspecifiedandclickOK.

VMware, Inc.

127

Administration Guide

Forexample,setthevalueofresume.repeatabletoTRUE. 5 ClickOKintheOptionsdialogboxtosavethechangetotheconfigurationfile.

To change an option in the configuration file (.vmx) 1 UnderVerboseOptions,clickthelink. TheOptionsdialogboxappears.

2 3

Locatetheoption,andchangethevaluefortheoptionintheentryfieldtotheright oftheoption. ClickOKtosaveyourchangeandclosetheOptionsdialogbox.

128

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Viewing a List of Connected Users


Toseealistofusersthatareconnectedtoavirtualmachinewitharemoteconsole,click theUsersandEventstab.

Figure 3-9. Users and Events tab: Remote Console Connections and Permissions ThelistunderRemoteConsoleConnectionsidentifiesusersconnectedtothevirtual machinewitharemoteconsole.ThelistincludesthetimeandIPaddressfromwhich theuserconnectedtothevirtualmachine. ThelistunderPermissionsindicateswhatyoucandowiththevirtualmachine.Youare eitherallowedordeniedthefollowingabilities:
! ! !

Viewingvirtualmachinestatus. Modifyingthevirtualmachinesconfiguration. Controllingthevirtualmachine:poweringitonoroff,suspendingorresumingit.

VMware, Inc.

129

Administration Guide

Viewing a Log of a Virtual Machines Events


Alogofthe15mostrecentvirtualmachineeventsisavailable.ClicktheUsersand Eventstab.

Figure 3-10. Users and Events tab: Events TheEventslistdisplaysalogofthemostrecentactionsoreventsrecordedinthevirtual machine,suchasthequestionsVMwareESXServerasks,errorsandothereventslike thepoweringonoroffofthevirtualmachine.Theeventsappearinreverse chronologicalorder. Theeventlogdrawsitsdatafromthelogfileforthevirtualmachinesconfigurationfile stored,bydefault,inthevirtualmachinesdirectory,<homedir>/vmware/<guestOS>. Whenyouperformanactionwithinthemanagementinterfacethatpromptsthevirtual machinetogenerateamessageforyourresponsebeforeitcanproceed,awaitingfor inputmessageappearsintheDisplayNamecolumn.Whenyouclickthatlink,apopup windowappears,promptingyouforaresponse.Afteryouprovideyouranswer,the popupwindowcloses.

130

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Thelogshowsthedateandtimetheeventoccurredandanexplanationoftheevent. Someeventshaveasymbolassociatedthatcorrespondstothetypeofeventthat occurred. Indicatesaquestionorawarningwasgeneratedbythevirtualmachine. Indicatesanerroroccurredinthevirtualmachine. Clickthetabsatthetopofthepagetoviewmoreinformationaboutthevirtual machine.

Modifying Virtual Machine Peripherals


Avirtualmachinesperipheraldevicescanbeviewedandmodifiedthroughthe managementinterface.Thissectionprovidesanoverviewoftheconfiguration modificationoptions. Thechangesyoucanmakeinclude:
! ! ! ! !

AddingMorethanSixSCSIVirtualDiskstoaVirtualMachine,next UsingaPhysical(Raw)DiskinaVirtualMachineonpage 132 UsingParallelPortsinaVirtualMachineonpage 133 UsingSerialPortsinaVirtualMachineonpage 134 UsingDiskModesonpage 135

CAUTION Theseproceduresinvolvemodifyingavirtualmachinesconfigurationfile settingsdirectly.Onlyadvancedusersshoulddothis.Considerbackingup theconfigurationfile(.vmx)beforemakingchanges.

Adding More than Six SCSI Virtual Disks to a Virtual Machine


YoucanadduptosixvirtualSCSIdisksonasingleSCSIcontrollertoavirtualmachine usingtheVMwareManagementInterface.Todoso,logintothemanagementinterface asauserwiththepermissionstoconfigurethevirtualmachine,clickthelinktothe virtualmachinesname,andclickHardwarenexttoConfigurationinthevirtual machinesummary.ClickAddDevice,andfollowthewizardtoaddanewHardDisk. Toaddmorethansixdiskstothesamecontroller(uptoeightmore),youmusteditthe virtualmachinesconfigurationfiledirectly.DeviceID7isusedbytheSCSIcontroller, soyoucannotusethatIDforavirtualdisk.

VMware, Inc.

131

Administration Guide

To add SCSI disks with IDs between 8 and 15 1 OntheOptionstabforthevirtualmachine,clickthelinkunderVerboseOptions.

2 3 4 5

ClickAdd. Createanoptioncalledscsi0:8.presentandsetitsvaluetotrue. ClickAdd. Createanoptioncalledscsi0:8.nameandsetitsvalueto <vmfsname>:<diskfilename>.vmdk. Intheseentries,scsi0 referstothefirstSCSIcontrollerand8isthedeviceID.

ClickOKtosaveyourchangesandclosetheconfigurationfile.

Bydefault,thevirtualdiskiscreatedinpersistentmode.Tochangethediskmode,click theHardwaretab.EditthediskasdescribedinConfiguringaVirtualMachines VirtualDisksonpage 109.

Using a Physical (Raw) Disk in a Virtual Machine


Insomeconfigurations,youmightgiveavirtualmachinedirectaccesstoaphysical diskpartitionstoredonaLUN,ratherthanusingavirtualdiskstoredasafileona VMFS.Thiscanbeuseful,forexample,ifthevirtualmachineneedssharedaccessto datastoredonaphysicaldisk. Forthevirtualmachinetoaccessaphysicaldisk,addanewvirtualdiskasdescribedin AddingaVirtualDisktoaVirtualMachineonpage 112andclickSystemLUN/Disk.
132 VMware, Inc.

Chapter 3 Using the VMware Management Interface

Using Parallel Ports in a Virtual Machine


Virtualmachinesmustbeconfiguredsothatparallelportsonthevirtualmachineare connectedtotheappropriateportonthephysicalmachine. To connect the virtual machine's first parallel port (LPT1) to the physical computer's first parallel port 1 RebootthephysicalcomputerandentertheBIOSsetup. Typically,youpressF2orDeletewhilethemachineisbooting.Findtheparallel portmodesettingandsetittoPS/2.(ThetypicalchoicesareATandPS/2.)IfPS/2 isnotavailableasanoption,setittobidirectional. 2 Logontotheconsoleoperatingsystemasrootandenterthefollowingcommands:
/sbin/insmod parport /sbin/insmod parport_pc /sbin/insmod ppdev

Typelsmodandconfirmthatthesemodulesareinthelistingofloadedmodules. Tomakethesechangespermanent,addthethreelinesshownabovetotheendof thefile/etc/rc.d/rc.local. 3 Besurethevirtualmachineisshutdownandpoweredoff,andaddthefollowing optionstothevirtualmachinesconfigurationfileasdescribedinSettingStartup andShutdownOptionsbyModifyingtheConfigurationFileDirectly(Advanced UsersOnly)onpage 126.


! !

Addanoptioncalledparallel0.presentandsetitsvaluetotrue. Addanoptioncalledparallel0.fileNameandsetitsvalueto /dev/parport0. Addanoptioncalledparallel0.bidirectionalandsetitsvaluetotrue.

Lookforthelineconfig.version = 6 intheconfigurationfiletomakesurethe virtualmachineisusingvirtualhardwareversion6. Thislineispresentintheconfigurationfileforanyvirtualmachinecreatedwith ESXServer1.5.x.andlater.IfthevirtualmachinewascreatedunderESXServer1.0 or1.1andhasnotbeenupdated,addtheconfig.version = 6 linetothe configurationfile.

VMware, Inc.

133

Administration Guide

NOTE

Whenthevirtualmachinestartsafteryouupdatethevirtualhardwareversion,the messageTheCMOSofthisvirtualmachineisincompatiblewiththecurrentversionof VMwareESXServer.AnewCMOSwithdefaultvalueswillbeusedinsteadappears. ClickOK.Asthevirtualmachinestarts,theguestoperatingsystemmaydetectnew virtualhardwareandinstalldriversforit.Respondtoanymessages. 5 Startthevirtualmachineusingtheremoteconsole. Youmightseeamessagewarningthattheparallelportisstartingdisconnected. Connecttothevirtualmachinewitharemoteconsoleandusetheremoteconsoles Devicesmenutoconnecttheparallelport. 6 7 Asitstartstoboot,clickinsidetheremoteconsolewindow,andpressF2toenter thevirtualmachinesBIOSsetup. GototheAdvancedI/ODeviceConfigurationsectionandconfiguretheparallel portmodeforthevirtualmachinetobidirectional. Nowyourvirtualmachinecanuseadongleorotherparallelportdevice.

NOTE

Onlyoneoperatingsystemcanbeconnectedtotheparallelportatatime.Youcannot configuremorethanonevirtualmachinetouseaparticularparallelportatagiventime.

Using Serial Ports in a Virtual Machine


Toconnectthevirtualmachinesfirstserialport(COM1)tothephysicalcomputersfirst serialport,editthevirtualmachinesconfigurationdirectlyusingtheVMware ManagementInterface. Besurethevirtualmachineisshutdownandpoweredoff,andaddthefollowinglines totheconfigurationfileasdescribedinSettingStartupandShutdownOptionsby ModifyingtheConfigurationFileDirectly(AdvancedUsersOnly)onpage 126.
! ! !

Addanoptioncalledserial0.presentandsetitsvaluetotrue. Addanoptioncalledserial0.fileTypeandsetitsvaluetodevice. Addanoptioncalledserial0.fileNameandsetitsvalueto/dev/ttyS0.

Whenyoupoweronthevirtualmachine,youcanconfiguretheserialportintheguest operatingsystem. Whenthevirtualmachineisrunning,usetheDevicesmenuontheremoteconsoleto connectanddisconnectitsserialport. Youcanalsocontrolwhetherthevirtualmachinestartswithitsserialportconnectedto thephysicalcomputersserialport.Tosetthefirstserialportsoitisconnectedwhenthe

134

VMware, Inc.

Chapter 3 Using the VMware Management Interface

virtualmachinestarts,addanoptionserial0.startConnected totheconfiguration fileandsetitsvaluetotrue,asdescribedinSettingStartupandShutdownOptions byModifyingtheConfigurationFileDirectly(AdvancedUsersOnly)onpage 126. Toreconfigurethevirtualmachinesoitstartswiththefirstserialportdisconnected, changethevaluefortheserial0.startConnectedoptiontofalse. NOTE Onlyoneoperatingsystemcanbeconnectedtotheserialportatonetime.Youcannot configuremorethanonevirtualmachinetouseaparticularserialportatatime.Touse additionalserialports,useahighernumberinthelinesyouaddtotheconfiguration file. Changingthenumberafterserialaffectstheserialportthatisavailableinsidethe virtualmachine.Changingthenumberafter/dev/ttySaffectstheportthatisusedon yourphysicalcomputer.Forexample,toconnectthevirtualmachinessecondserial port(COM2)tothephysicalcomputerssecondserialport,addthefollowinglinesto theconfigurationfileasdescribedinSettingStartupandShutdownOptionsby ModifyingtheConfigurationFileDirectly(AdvancedUsersOnly)onpage 126.
! ! !

Addanoptioncalledserial1.presentandsetitsvaluetotrue. Addanoptioncalledserial1.fileTypeandsetitsvaluetodevice. Addanoptioncalledserial1.fileNameandsetitsvalueto/dev/ttyS1.

Using Disk Modes


ESXServercanusedisksinfourmodes:persistent,nonpersistent,undoable,and append.
!

PersistentPersistentmodedisksbehaveexactlylikeconventionaldiskdriveson acomputer.Allwritestoapersistentdiskarewrittenpermanentlytothediskas soonastheguestoperatingsystemwritesthedata. NonpersistentAllchangestoanonpersistentmodediskarediscardedafterthe virtualmachineispoweredoff. UndoableYouhavetheoptionlaterofkeepingordiscardingchangesyoumade duringasession.Thechangesaresavedinaredologfile.Whenyoupoweroffthe virtualmachine,youarepromptedtocommitthechanges,keepthelogby continuingtosavechangestotheredolog,ordiscardthechanges. AppendVMwareESXServersupportsanadditionalappendmodeforvirtual disksstoredasVMFSfiles.Appendmodemaintainsaredolog,however,nodialog boxappearswhenthevirtualmachineispoweredofftoaskwhetheryouwantto commitchanges.Allchangesarecontinuallyappendedtotheredolog.Atany

VMware, Inc.

135

Administration Guide

point,thechangescanbeundonebyremovingtheredolog.Shutdowntheguest operatingsystemandpoweroffthevirtualmachinebeforedeletingthatvirtual machinesredolog.Youcanalsocommitthechangestothemainvirtualdiskfile usingthecommitoptioninvmkfstools.SeeUsingvmkfstoolsonpage 249for details. Tochangethediskmodeforavirtualdisk,seeConfiguringaVirtualMachinesVirtual Disksonpage 109.

Deleting a Virtual Machine Using the VMware Management Interface


Youcandeleteavirtualmachineonlyifyouaretherootuser,theownerofthe configurationfile,orifyouhavethecorrectpermissionstotheconfigurationfileorthe directorywheretheconfigurationfileislocated. Whenyoudeleteavirtualmachine,thefilesassociatedwithitthatis,locatedinthe samedirectoryaredeleted.Thesefilesincludeitsconfigurationfile(the.vmxfile),log file,andnvramfile.Theredologandanylockfilesarenotdeleted. Anyvirtualdisksthatarenotassociatedwithanotherregisteredvirtualmachineonthe hostcanbedeletedaswell,oryoucansavethemforfutureuse.Thedirectory containingthesefilesisalsodeleted,unlessanydiskfilesorotherfilesnotdeletedstill remain. To delete a virtual machine 1 2 3 IntheVMwareManagementInterface,findthevirtualmachineyouwanttodelete, ifthevirtualmachineispoweredonorsuspended,poweritoff. Clickthearrowtotherightoftheterminalicon( )toaccessthevirtualmachine menu. ChooseDeleteVirtualMachine.

136

VMware, Inc.

Chapter 3 Using the VMware Management Interface

TheConfirm:Deleting<VirtualMachine>dialogboxappears.Allthefilestobe deletedarelisted.

Foreachdiskfilenotassociatedwithanotherregisteredvirtualmachineonthis host,chooseoneofthefollowing:
! !

Tosaveavirtualdiskfile,selecttheSaveoption. Todeleteavirtualdiskfile,selecttheDeleteoption. Anyvirtualdiskfilesassociatedwithanotherregisteredvirtualmachinedonot appearinthiswindow.

NOTE

Todeletethevirtualmachine,clickDeleteSelectedFiles. TheConfirm:Deleting<VirtualMachine>dialogboxcloses.Thevirtualmachine nolongerappearsinthemanagementinterface.

NOTE

Ifyoudonotwanttodeletethisvirtualmachine,clickCancel.

Managing ESX Server Resources


Forinformationonmanagingserverresources,seeVMwareESXServerResource Managementonpage 327.

Configuring VMware ESX Server


ToconfigurecertainVMwareESXServersettings,ontheStatusMonitor,clickthe Optionstab. NOTE Onlyauserwithadministratorprivileges(rootuser)canaccessthistab.

VMware, Inc.

137

Administration Guide

Figure 3-11. Options tab TheseoptionsallowyoutoconfigureESXServer.Forinformationoneachoftheselinks, seeAdministeringESXServeronpage 187. ClicktheStatusMonitortabtoreturntotheStatusMonitor.

Logging Out of the VMware Management Interface


WhenyouarereadytologoutoftheVMwareManagementInterface,clickLogouton theStatusMonitororOptionstab.Youarepromptedtoconfirmthatyouwanttolog out.Loggingoutdoesnotaffectthevirtualmachinesonthehostoranyremoteconsoles youopenedfromthemanagementinterface. VMwareManagementInterfacesessionsexpireautomaticallyafter60minutesof inactivityoridletime.

Using the Apache Web Server with the Management Interface


OnVMwareESXServer,anApacheserverisinstalledwiththeVMwareManagement Interface.Thesearethecommandstostart,stop,orrestarttheApacheserver. Tousethesecommands,youmustloginasroot(su -).
138 VMware, Inc.

Chapter 3 Using the VMware Management Interface

TostarttheApacheserver,type:/etc/init.d/httpd.vmware start TostoptheApacheserver,type:/etc/init.d/httpd.vmware stop TorestarttheApacheserver,type:/etc/init.d/httpd.vmware restart

Setting a MIME Type to Launch the VMware Remote Console


Fromabrowser,youcanconnecttoavirtualmachinefromaremoteconsolebyclicking theterminalicon( )forthatvirtualmachine.Beforedoingso,NetscapeandMozilla usersneedtodefineaMIMEtypeofx-vmware-consoleandassociateitwiththe remoteconsoleprogramfile.InternetExplorerisautomaticallyconfiguredwhenyou installtheconsole.

Setting the MIME Type in Netscape 7.0 and Mozilla 1.x


IfyouareusingNetscape7.0orMozilla1.xandwanttolaunchtheVMwareRemote ConsolefromtheVMwareManagementInterface,youmustsetaMIMEtypeforthe remoteconsoleprogram. TheprocedureissimilarforWindowsandLinuxhosts.Bothinvolvewritingashort scriptthatprovidesthecommandtolaunchtheremoteconsole. To set the MIME type in Netscape or Mozilla 1 Openatexteditoranddooneofthefollowing.
!

OnaWindowshost,writeashortbatchfilecalled vmwareConsole-helper.bat. Thebatchfilemustcontainthefollowingline: <path_to_vmwareConsole> -o %1 wherethedefault<path_to_vmwareConsole> is C:\Program Files\VMware\VMware Remote Console\vmwareConsole.exe

OnaLinuxhost,writeashortshellscriptcalled vmware-console-helper.sh. Theshellscriptmustcontainthefollowingtwolines: #!/bin/sh <path_to_vmware-console> -o $1 > /dev/null 2>&1; wherethedefault<path_to_vmware-console>is /usr/bin/vmware-console.

VMware, Inc.

139

Administration Guide

Savethefileinalocationofyourchoice. OnaLinuxhost,changetothedirectorywhereyousavedthefileandgiveyourself permissiontoexecutethefile:chmod +x vmware-console-helper.sh.

NOTE

3 4

Usethebrowsertoconnecttotheserveryouwanttomanage. Clicktheterminalicon( )forthevirtualmachineyouwanttoviewinaremote console. Adialogboxaskswhatyouwanttodowiththefile.

5 6 7 8 9 10

ClickAdvanced. IntheNewTypedialogbox,intheDescriptionoftypefield,typeVMware Remote Console. IntheFileextensionfield,typexvm. IntheMIMEtypefield,typeapplication/x-vmware-console. IntheApplicationtousefield,typethepathto vmwareConsole-helper.batorvmware-console-helper.sh. ClickOKtwice. Yourbrowserisnowsettolaunchtheremoteconsolewhenyouclicktheterminal iconinthefuture.

Editing a Virtual Machines Configuration File Directly


Youcaneditspecificconfigurationoptionsforavirtualmachineintwoways:
!

OntheOptionstabforaspecificvirtualmachine,youcanaddandchange configurationoptions.SeeSettingStartupandShutdownOptionsbyModifying theConfigurationFileDirectly(AdvancedUsersOnly)onpage 126. Youcanalsoeditavirtualmachinesconfigurationfile(.vmx)byusingatexteditor intheserviceconsole.Thisletsyouadd,change,andremoveelementsofavirtual machinesconfiguration.

Modifyingaconfigurationfileusingatexteditorisrecommendedforadvancedusers only.Thevirtualmachinemustbepoweredoff.Backupyourvirtualmachines configurationfilebeforemodifyingitwithatexteditor.

140

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Changing Your Virtual SCSI Adapter


Bydefault,ESXServerassignstheBusLogicvirtualSCSIadaptertoLinux,Windows NT4.0,Windows2000,orWindowsXPProfessionalguestoperatingsystems.Similarly, ESXServerassignstheLSILogicSCSIvirtualadaptertoWindows2003Serverguest operatingsystems. Youcanchangethesedefaultsettingsbyeditingthevirtualmachinesconfigurationfile throughthemanagementinterface(describedinSettingStartupandShutdown OptionsbyModifyingtheConfigurationFileDirectly(AdvancedUsersOnly)on page 126). To change the default settings 1 Lookforlinessimilartothefollowinginthevirtualmachinesconfigurationfile:
scsi0.present = TRUE scsi0.virtualDev = vmxbuslogic scsi0.sharedBus = none

ChangethevirtualSCSIadaptertoyourchoice. Forexample,forthescsi0.virtualDevoption,changevmxbuslogicto vmxlsilogic.

3 NOTE

ClickOKtosaveyourchangeandclosetheOptionspane.

IfyouchangeavirtualmachinesvirtualSCSIadaptertoacustomadapter,yourchoice isretainedifyouchangetheguestoperatingsysteminthevirtualmachine. IfyouchangetheguestoperatingsystemonavirtualmachinewithaBusLogicorLSI LogicSCSIvirtualadapter,thevirtualSCSIadapterisupdatedtothedefaultforthe newguestoperatingsystem. Forexample,ifyouhaveavirtualmachinewithaLinuxoperatingsystemandchange theguestoperatingsystemtoWindows2003Server,thevirtualSCSIadapterisLSI Logic,thedefaultvirtualSCSIadapterforaWindows2003Serverguestoperating systems.

Using the VMware Management Interface File Manager


UsingtheVMwareManagementInterface,youcanmanagethefilesystemofyour VMwareESXServermachineremotely.Usethefilemanagertochangethepermissions ofanyfileonthephysicalmachine,createnewdirectoriesonthephysicalmachineor cut,copy,paste,anddeletefilesasyouwouldifyouwereworkingdirectlyonthefile systemitself.Tousethefilemanager,clickManageFilesontheStatusMonitoror Optionstabofthemanagementinterface.
VMware, Inc. 141

Administration Guide

Figure 3-12. File Manager Intheleftpaneofthefilemanager,clickafoldertodisplayitscontents. NOTE ThetreeviewmayfailtoloadoronlypartiallyloadwhenviewedwithMozilla.To restoretheproperview,rightclickintheleftpane,andchooseReloadFrameor Refreshfromthecontextmenu. Somefileandfoldericonshavespecialmeanings. Table 3-2. Folder and File Icons
Icon Description Identifiesavirtualmachineconfigurationfile.Ifyouclickthefilenameoriconfora configurationfile,theEditConfigurationpageforthevirtualmachineopens. IdentifiesavirtualdiskfileonaVMFSfilesystem. Identifiesasetoffilesontheserviceconsolethatholdavirtualdiskintheformat usedbyVMwareWorkstationandVMwareGSXServer. IdentifiesaVMFSvolume.

Toperformanactiononafileorfolder(directory),selectthecheckboxbesideitslisting, andclickthebuttonatthebottomofthescreentodelete,editproperties,cut,orcopy. Afteryoucutorcopyafileorfolder,youcanpasteitintothesameoradifferentfolder. Ifyoucopyafileorfolder,pasteitintothesamefolder,thenewfileorfolderis renamed,withcopy_of_beforetheoriginalname.YoucanselectitanduseEdit Propertiestonameit.


142 VMware, Inc.

Chapter 3 Using the VMware Management Interface

Whenyoustartalongrunningoperationforexample,pastingafilelargerthan10MB afteracopyormovingitbetweenlogicalfilesystemsaprogressbarappearssoyou cantracktheprogressoftheoperation. WhenyoucopyandpasteorcutandpasteavirtualdiskfilefromtheVMFSfilesystem totheserviceconsolesfilesystem,orviceversa,thefilemanagerusesvmkfstoolsto importorexportthefile,translatingtheformatappropriately.Thismeansthatavirtual disklargerthan2GBwillsplitintomultiplefileswhenitismovedfromaVMFSdisk orarraytotheserviceconsolesfilesystem. NOTE Thefilemanagerinthemanagementinterfacemaydisplayincorrectinformationorno informationforfileslargerthan2GB.Thismeansthatyoucannotusethefilemanager toimportcertainvirtualdiskfilescreatedunderVMwareWorkstation4.For backgroundonvmkfstools,seeUsingvmkfstoolsonpage 249. AfteryouselectafileorfolderandclickEditProperties,youcanchangeitsnameand permissions.Whenyouarefinished,clickOKtoapplythechanges.

Figure 3-13. Change Name and Permissions dialog box Ifyouselectmorethanonefileorfolder,youcanchangepermissionsforallthefilesat once.Anychangesyoumake,usingthedropdownlistsinthefilemanager,applyto allthefilesyouhaveselected. Usethefollowinglisttomakechanges:
!

Aletter,correspondingtotheletteratthetopofthecolumn(read,writeor execute),indicatesthatthesettingisthesameforallfilesanditgrantsthe permissionindicatedbytheletter.

VMware, Inc.

143

Administration Guide

Ahyphen(-)indicatesthatthesettingisthesameforallfilesanditdoesnotgrant permission. Ablankspaceindicatesthatthesettingisnotthesameforallfiles.

Figure 3-14. Settings to make changes to files Usethetoppaneofthefilemanagertonavigatethedirectorystructureandcreatenew directories. Tocreateanewdirectory,clickNew,enterthenameforthedirectory,andclickOK.

Setting Permissions for Owners of Virtual Machines


TheVMwareManagementInterfaceusesthepermissionsofthevirtualmachines configuration(.vmx)filetodeterminetheprivilegesauserhasonavirtualmachine. Theuserneedsread(r)accesstoviewthevirtualmachine,write(w)accesstomodify thevirtualmachinesconfigurationparameters,andexecute(x)accesstoperform poweroperationsonthevirtualmachine.Inaddition,theuserneedsread,write,and executeaccesstoregisterorunregisterthevirtualmachine.SeeRegisteringand UnregisteringVirtualMachinesonpage 145. PreviousversionsofESXServercheckedtheaccesspermissionsofthevirtualmachines configurationfileandtheaccesspermissionsofthedirectoryinwhichthe configuration(.vmx)filewaslocated.Inotherwords,theuserneededexecute(x) permissionsonalltheparentdirectoriesforaconfigurationfile. Forexample,ifaconfigurationfileis/home/foo/vms/win2k/win2k.vmx,theuser neededtohaveexecute(x)privilegeson/home, /home/foo,/home/foo/vms, /home/foo/vms/win2kandappropriateprivilegesonwin2k.vmx.

144

VMware, Inc.

Chapter 3 Using the VMware Management Interface

NOTE

Theremoteconsolestillrequiresthattheuserhasexecute(x)permissiononallparent directories.

Creating a Flagship User


Youmightchoosetohaveavirtualmachineownedbyaflagshipuserinsteadofa realperson.Byusingaflagshipuser,onlyoneuseraccountownsthevirtual machinesthatareinproduction.Anadvantageofusingflagshipaccountsisthat flagshipusersneverleavethecompanyorgoonvacation. Byusingaflagshipuser,youavoidproblemsinaccessprivileges,ifmultiple individualsinagroup,accessthesamevirtualmachine,throughtheremoteconsole. Thatis,youcangiveallgroupmembersexecuteprivilegestotheflagshipusers directories.thatcontainthevirtualmachines.Withouttheseexecuteprivilegeson parentdirectories,othergroupmemberswontbeabletousetheremoteconsole.

Registering and Unregistering Virtual Machines


ESXServerrequiresthateachvirtualmachinesconfigurationfileberegisteredbefore itcanbeaccessedbyVMwareRemoteConsolesandtheVMwareManagement Interface.Whenyoucreateanewconfigurationfilewiththemanagementinterface, whetherforaneworanexistingvirtualmachine,theconfigurationfileisregistered automaticallywithESXServer. Youcanhaveupto80registeredvirtualmachinesonaserveratonetime.Ifyouintend torunmorethan60,youmustmodifysomeserviceconsolesettings.SeeRunning ManyVirtualMachinesonESXServeronpage 148. Whenyouregisteravirtualmachine,itappearsinthemanagementinterfaceandthe ConnecttoVMwareVirtualMachinedialogboxthatappearswhenyouconnecttothe virtualmachinewiththeremoteconsole. IfyouareusingavirtualmachinethatyoumigratedfromanotherserverorVMware product,youmustregistertheconfigurationfileasdescribedbelow.Formore informationaboutmigratingvirtualdisksandvirtualmachines,seeImporting, Upgrading,andExportingVirtualMachinesonpage 60. Ifyoudonotneedavirtualmachine,youcanunregisterit.Thisisusefulifyouhave morethan80virtualmachinesontheserveranddonotwanttodeleteanyexcess virtualmachines.Anunregisteredvirtualmachinenolongerappearsinthe managementinterfaceandcannotbeconnectedtobyaremoteconsole. Youmusthavefullpermissionstothevirtualmachinesconfigurationfile(.vmx)to registerorunregisterit.

VMware, Inc.

145

Administration Guide

Registering a Virtual Machine


Virtualmachinescreatedontheserverareautomaticallyregistered.Ifyouimporteda virtualmachinefromanotherserverorfromanotherVMwareproduct,orifyou unregisteredavirtualmachine,youcanregisteritbycompletingthefollowingsteps. To register a virtual machine 1 Logintothemanagementinterfaceastheuserwithfullpermissionstothevirtual machinesconfigurationfile. Onlytherootusercanregisterandunregistervirtualmachinesthroughthe managementinterface.However,regularuserscanregisterandunregister virtualmachinesusingthescriptingAPI.

NOTE

OntheStatusMonitor,clickManageFiles. Thefilemanagerappears.

Browsetothedirectorycontainingtheconfigurationfile(thefilewiththe.vmx extension)andclicktheconfigurationfileicon. TheVirtualMachineRegistrationStatuspaneappears,indicatingthatthevirtual machineisnotregistered.

Clicktheregisterlink.

146

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Amessageindicatesthatthevirtualmachineisregistered.

ClickCloseWindow. ThevirtualmachineappearsontheStatusMonitorandyoucanconnecttoitwith aremoteconsole.

Unregistering a Virtual Machine


Registeredvirtualmachinescanbeaccessedandmanagedremotely.Unregisterthe virtualmachinetopreventremotemanagement. To unregister a virtual machine 1 2 3 Logintothemanagementinterfaceastheuserwithfullpermissionstothevirtual machinesconfigurationfile. OntheStatusMonitor,ontherowforthevirtualmachine,clickthearrowtothe rightoftheterminalicon( ). ClickUnregisterVirtualMachine. TheVirtualMachineRegistrationdialogboxappears.

ClicktheUnregisterlinktounregisterthevirtualmachine. ThevirtualmachinenolongerappearsontheStatusMonitorandcannotbe managedremotely.

VMware, Inc.

147

Administration Guide

Running Many Virtual Machines on ESX Server


Torunorregistermorethan60virtualmachines,youmustchangesomesettingsinthe serviceconsole.Bychangingthesesettings,youprovideadditionalCPUandmemory resourcestotheserviceconsole,allowingESXServertooperatemoreefficientlyunder thishigherload. NOTE Ifyoudecreasethenumberofregisteredorrunningvirtualmachinestolessthan60, revertthesettingsbacktotheirdefaultsthroughthemanagementinterfaceorthrough theserviceconsole.

Increasing the Reserved Memory for the Service Console


Increasingthememoryintheserviceconsoleallowstheserviceconsoletooperatemore efficientlywhenagreaternumberofvirtualmachinesareactive. To increase the memory allocation in the service console 1 2 3 4 5 LogintotheVMwareManagementInterfaceasroot. ClicktheOptionstabandclickStartupProfile. IncreasetheReservedMemorytoatleast512MB,andupto800MB(themaximum recommendedsetting). ClickOKtosavethechanges. ClickOKandrebootESXServer. Formoreinformation,seeServiceConsoleMemoryonpage 364.

Allocating CPU Resources to the Management Interface


If,afterchangingthesesettings,youareunabletoopentheVMwareManagement Interfacetoyourserver,thenumberofoutstandingprocessesthatarewaitingtobe executedistoohigh.AllocatethenecessaryCPUresourcestothemanagementinterface byincreasingthepriorityforthevmwareserverdandhttpdprocesses. To increase the priority for the vmware-serverd and httpd processes 1 2 Loginastherootuserontheserviceconsole. Typeps auxwandfindtheprocessIDsofthehttpdandvmware-serverd processes. Iftherearemultiplehttpdprocesses,typetop.PressShiftp(P)tosorttheoutput byCPUusage.NotetheprocessIDforthehttpdprocessusingthemostCPU.

148

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Raisethevmwareserverdprocesspriorityto15sothatitcanconnecttoall runningvirtualmachines:
renice -15 -p <vmware-serverd_process_ID>

Raisethehttpdprocesspriorityto15:
renice -15 -p <httpd_process_ID>

5 6

VerifythatyoucanlogintotheVMwareManagementInterfaceandviewcorrect informationaboutthevirtualmachines,andcontinuewiththenextstep. Changethevmware-serverdprocessprioritybacktothedefaultofzero(0).


renice 0 -p <vmware-serverd_process_ID>

Changethehttpdprocessprioritybacktothedefaultofzero(0).
renice 0 -p <httpd_process_ID>

Changing Default Parameters in the config File


YoucanchangedefaultparametersfortheApacheprocess,thevmwareauthdprocess, thevmwareserverdprocess,andforthecpuresourcesavailabletotheServiceConsole inthe/etc/vmware/configfile. NOTE Ifyoudecreasethenumberofregisteredorrunningvirtualmachinestolessthan60, commentoutthenewlinesyouaddedordeletethemfrom/etc/vmware/config.

Increasing Memory to the Apache Process


Bydefault,Apacheallocatesasharedmemorysegmentof24MBtocontainallthe virtualmachinesdata.Thisvalueof24MBissufficientfor80virtualmachines.Ifyou havemorethan80(uptothemaximumof200)registeredvirtualmachines,Apache mightrunoutofmemory.YoumightseeaPanicoutofmemorymessagein /usr/lib/vmware-mui/apache/logs/error_logandtheVMwareManagement Interfaceshutsdown. To increase memory to the Apache Process 1 Useatexteditorandaddthefollowingoptionto/etc/vmware/config:
mui.vmdb.shmSize = 37748736

where37748736represents36MB(36multipliedby1024,multipliedby1024). 2 RestarttheApacheserver:
/etc/rc.d/init.d/httpd.vmware restart

VMware, Inc.

149

Administration Guide

NOTE

Increasingthisvaluemighthaveanimpacttheperformanceofthevirtualmachines, becausetheApacheprocesseswillrequiremorememoryintheserviceconsole.

Increasing the Timeout Value for the vmware-authd Process


Asroot,useatexteditorandaddthefollowingconfigurationparametertothe /etc/vmware/configfile:
vmauthd.connectionSetupTimeout = 120

Thisincreasesthetimeoutvalueto2minutesfromthedefaultof30seconds.

Increasing Memory for the vmware-serverd Process


Asroot,useatexteditorandaddthefollowingconfigurationparametertothe /etc/vmware/configfile:
vmserverd.limits.memory = 49152 vmserverd.limits.memhard = 65536

Thesechangesraisethesoftmemorylimitforthevmware-serverdprocessto48MB(48 multipliedby1024)andthehardmemorylimitto64MB(64multipliedby1024). NOTE Restartthevmware-serverdprocessbyrebootingESXServerorbyloggingintothe serviceconsoleasrootandissuingthecommand:


killall -HUP vmware-serverd

Running Many Virtual Machines with a Significant CPU Load


Torunalargenumberofvirtualmachineswithapplicationsthatuseasignificant amountofCPU,increasetheserviceconsolesharesto10000. To increase the service console shares through the VMware Management Interface 1 2 LogintotheVMwareManagementInterfaceastherootuser. ClicktheOptionstab,andclickServiceConsoleSettings. TheCPUpageshouldappear.Ifnot,clicktheCPUtab. 3 4 ClickEdit. Type10000intheSharesfieldandclickOK.

Ifthemanagementinterfaceisunresponsive,youneedtomakethesechangesthrough theserviceconsole.

150

VMware, Inc.

Chapter 3 Using the VMware Management Interface

To increase service console shares through the service console 1 2 3 Logintotheserviceconsoleastherootuser. Typecat /proc/vmware/sched/cpu. Findthelinethathasconsoleforthename. Forexample:
vcpu 125 126 127 vm 125 126 127 name console idle1 idle2 uptime 71272.378 71272.378 71272.378 status RUN RUN RUN ... ... ... ...

Usetheechocommandtochangethenumberofserviceconsoleshares:
echo 10000 > /proc/vmware/vm/<name>/cpu/shares

Fortheprecedingoutput,type:
echo 10000 > /proc/vmware/vm/125/cpu/shares

Avoiding Management Interface Failures when Many Virtual Machines Are Registered
IfyouhavealargenumberofvirtualmachinesregisteredonasingleESXServer machine,theVMwareManagementInterfacemightshutdownandaPanic out of memorymessageisrecordedin/usr/lib/vmware-mui/apache/logs/error_log. Bydefault,theApacheWebserveruses24MBofmemorytostoreinformationaboutthe virtualmachinesontheserver.Theerrorsdescribedabovecanhappenwhenthis amountofmemoryisnotadequateforthenumberofvirtualmachines. Toworkaroundtheproblem,openthefile/etc/vmware/configinatexteditorand findthelinethatbeginswithmui.vmdb.shmSize =.Increasethenumberinquotation marks,whichisspecifiedinbytesofmemory.RestarttheApacheserverusingthe command:
/etc/rc.d/init.d/httpd.vmware restart

Backing Up Virtual Machines


Yourbackupstrategydependsonhowyouwanttoprotectyourdataandrecoverfrom problems.Therearetwomaingoals:
!

Recoverindividualfilesonthevirtualmachine(forexample,ifauseraccidentally removesafile).

VMware, Inc.

151

Administration Guide

Recoverfromcatastrophicfailuresinwhichyourentirevirtualmachineis damaged.

VMwareESXServerprovidesseveralapproachesforbackingupyourdata,whetherto tapeortoanothersystemoverthenetwork.Thebestdataprotectionforyourvirtual machinesisachievedwithacombinationoftheseapproaches.

Using Tape Drives with VMware ESX Server


Thissectiondescribeshowtomaketapedrivesavailabletobothyourvirtualmachine andyourserviceconsole.ThemanagementinterfaceallowsyoutoallocateaSCSI controllertotheserviceconsole,tooneormorevirtualmachinesorforusebyboth environments.TomakeaSCSItapedriveavailableinavirtualmachine,youmust allocatetheSCSIcontrollertowhichitisattachedforuseonlybyvirtualmachines. YoucanchecktheallocationsettingsfortheserversSCSIcontrollersinthe managementinterface.OntheStatusMonitor,clicktheOptionstab,andclickStartup Profiles. CAUTION DonotreassignaserversonlySCSIcontrolleriftheserviceconsoleis runningfromadriveattachedtothatcontroller.Ifyoursystemisconfigured thisway,youmustaddasecondSCSIcontrollertocontrolthetapedrive.

Backing Up from Within a Virtual Machine


Oneapproachistobackupaparticularvirtualmachinesdataasifitwereonaphysical machine.Youcanruneitheradirectbackuptoolortheclientcomponentofa clientserverbackuptoolwithinthevirtualmachineandconfigureitfordirectaccess tothenetworkortapedrive. NOTE Youcanalsouseavirtualmachinetoruntheservercomponentofaclientserver backupproduct,providedyougiveitaccesstooneormoretapedrives. Backingupfromwithinavirtualmachineallowsfinegrainedrecoveryofyourdata.
! !

Youcanrestorefiledatabytheindividualfile. Youcanrestoredatabasedatausingthenormaldatabasespecificmethod.

Ifyouneedtorestorethevirtualmachinefromabackupmadefromwithinthevirtual machine,recreatethevirtualmachineandloadrecoverysoftwareintoitbefore restoringdatafromthebackups. Toconfigureavirtualmachinesoyoucanuseatapedrivefromwithinit,seeAdding aTapeDrivetoaVirtualMachineonpage 121.

152

VMware, Inc.

Chapter 3 Using the VMware Management Interface

Backing Up Virtual Machines from the Service Console


Youcanbackupyourvirtualmachinesbycopyingtotapetheentirevirtualdiskfiles andanyredologs,alongwiththebackupsoftheserviceconsole.Thisapproachmakes iteasytorestoreyourvirtualmachinesintheeventofafullsystemlossordatalossdue tofailureofunprotecteddisks. Thesefullimagebackupsdonotpermityoutorestoreindividualfiles.Youmust restoretheentirediskimageandanyassociatedlogs,andpoweronavirtualmachine withthesedrivesconnectedtoretrievespecificdata. Thenextsectiondescribeshowtoensuredataintegritywhenbackingupvirtual machinesfromthephysicalcomputerortheserviceconsole.

Providing Optimum Data Integrity In Virtual Machine Backups Without Downtime


YoucanusetheVMwareScriptingAPIincludedwithESXServer2.5inconjunction withbackupproductstoprovidesnapshotsorstablediskorredologimages.The appropriatefunctionscanbecalledfromwithinmanybackupproductstoestablisha safebasisforbackingupimagesorlogs.Youcanusethisapproachwithanydiskmode: persistent,undoable,nonpersistent,orappend. ForinformationontheScriptingAPI,seetheVMwareScriptingAPIdocumentationat http://www.vmware.com/support/developer/.

Using Hardware or Software Disk Snapshots


Youcanusethesnapshotcapabilitiesofferedbyyourdisksubsystem,filesystem,or volumemanagertoprovidestablecopiesofdiskimages.Aswithphysicalservers, considerusingsomelevelofapplicationintegrationsoyoucanbesureyourbackups havethelevelofdataintegrityyouwant. YoucancombinetheseapproacheswiththeESXServerredologAPI(describedin ProvidingOptimumDataIntegrityInVirtualMachineBackupsWithoutDowntime, previously)tokeeptheintervalduringwhichanextralogisusedtoaminimum.Todo this,takethefollowinggeneralsteps:
! !

Addthenewredolog. Takeasnapshotofthemirrorusingyourdisksubsystemsorvolumemanagers interfaces. Committhechangestothelivelog.

Youcanstillbackupfromthestablediskimageonthesnappedmirror,andreconnect themirrortohaveitpickupthelatestchangesintimeforyournextbackup.

VMware, Inc.

153

Administration Guide

Using Network-Based Replication Tools


Youcanconfigureanyenterprisediskstoragesubsystemstoreplicate,ormirror,their datatoanothersubsystematalocalorremotelocation.Thisreplicationcanoccureither synchronouslyorasynchronously,asdescribedbelow:
!

Ifthereplicationissynchronous,awriteoperationdoesnotappeartobe completedlocallyuntilthedataiscommittedtodiskattheremotelocation. Synchronousreplicationimprovesdataintegritybutpresentsapotential performancebottleneck.

Ifthereplicationisasynchronous,theremotecopyispermittedtobesomenumber ofwriteoperationsbehindthemostcurrentlocaldata. Asynchronousreplicationacceptsahigherpotentialofinconsistentdataatthe remotesiteinexchangeforincreasedperformance.

YoucanuseeitherofthesehardwarebasedapproacheswithESXServer. Inaddition,somedisasterprotectionsoftwareproductsimplementremotemirroring insoftware.Thesetoolsprovideprotectionanddataintegritysemanticssimilartothose ofthehardwarebasedsolutions.However,theymightbemorecosteffectivefor configurationswithlowtomediumperformancerequirements. Thesesoftwaretoolscanbeusedinsideguestoperatingsystems. NOTE VMwarerecommendsthatyoudonotusesoftwareremotemirroringtoolsforservice consoledrivenreplicationonVMwareESXServer.Thisisbecausethesesoftwaretools usuallyrequirefilesystemformatawareness,addsignificantlytothenetworkI/Olevel andtheCPUrequirementstoservicethatnetworkI/O,andaremorecommonon WindowsandUNIXoperatingsystemsthanonLinux.

154

VMware, Inc.

Using the VMware Service Console

Inthischapter,thefollowingsectionsdescribeaspectsofusingtheVMwareService Console:
! ! ! ! ! !

CharacteristicsoftheVMwareServiceConsoleonpage 167 UsingDHCPfortheServiceConsoleonpage 168 ManagingtheServiceConsoleonpage 168 AuthenticationandSecurityFeaturesonpage 180 UsingDevicesWithESXServeronpage 184 EnablingUserstoViewVirtualMachinesThroughtheVMwareRemoteConsole onpage 185

Characteristics of the VMware Service Console


ThepurposeoftheVMwareserviceconsoleistostartupandadministeryourvirtual machines.ItisacustomizedversionofLinuxbasedontheRedHat7.2distribution.It hasbeenmodifiedsoitcanbemanagedbytheVMkernel. Theserviceconsolehasbeencustomizedtodisableunneededservices.Mostnetwork serviceshavebeendisabled,exceptforauth.Forremoteaccesstotheserviceconsole, sshisenabledbydefault.Therootusercanmodifysettingsforssh,Telnet,andFTP usingthesecurityconfigurationpageinthemanagementinterface (http://<servername>/security-config). TheserviceconsoleisscheduledbytheVMkernellikeanyothervirtualmachine.Do notrunheavyworkloadsontheserviceconsole,becauseitmighttakeprocessorcycles awayfromyourvirtualmachines.

VMware, Inc.

167

Administration Guide

Using DHCP for the Service Console


TherecommendedsetupistousestaticIPaddressesfortheserviceconsole.Itisalso possibletosetuptheserviceconsoletouseDHCP,aslongasyourDNSservercanmap theserviceconsoleshostnametothedynamicallygeneratedIPaddress. IfyourDNSservercannotmapthehostsnametoitsDHCPgeneratedIPaddress, determinetheserviceconsolesnumericIPaddressandusethatnumericaddresswhen accessingthemanagementinterfacesWebpages. ThenumericIPaddressmightchangeasDHCPleasesrunoutorwhenthesystemis rebooted.VMwaredoesnotrecommendusingDHCPfortheserviceconsoleunless yourDNSservercanhandlethehostnametranslation. CAUTION Donotusedynamic(DHCP)addressingwhensharingthenetworkadapter assignedtotheServiceConsolewithVirtualMachines.ESXServerrequires astaticIPaddressfortheServiceConsolewhensharinganetworkadapter.

Managing the Service Console


Thecommandsummaryinthissectionprovidesanintroductiontothecommandsyou aremostlikelytouseattheserviceconsole.SomearespecifictoESXServer.Mostare commandsthatarethesameasthoseyouwoulduseataLinuxcommandline.

Connecting to the Service Console


IfyouhavedirectaccesstothecomputerwhereESXServerisrunning,youcanlogin tothephysicalconsoleonthatcomputer.PressAltF2togettotheloginscreen. DependingonthesecuritysettingsforyourESXServercomputer,youmightbeableto connectremotelytotheserviceconsoleusingSSHorTelnet.Forinformationonthe securitysettings,seeAuthenticationandSecurityFeaturesonpage 180. Detailedusagenotesformostserviceconsolecommandsareavailableasmanualfiles (manpages).Toviewthemanpageforacommand,usethemancommandfollowedby thenameofthecommandforwhichyouwanttoseeinformation.SeeGettingHelpfor ServiceConsoleCommandsonpage 180. Whetheryouusetheserviceconsolelocallyorthrougharemoteconnection,youmust loginusingavalidusernameandpassword.

168

VMware, Inc.

Chapter 5 Using the VMware Service Console

Commands Specific to ESX Server


Identifying Network Cards
Thefindniccommandletsyousendnetworktrafficfromaspecifiednetworkadapter soyoucanobservetheLEDsontheadaptersandseewhichphysicaladapteris associatedwiththatdevicename.Theformatofthecommandis:
findnic <options> <nic-name> <local-ip> <remote-ip> Option -f -i <seconds> Explanation Doafloodping. Sendpingsatspecifiedinterval.

Example:
findnic -f vmnic1 10.2.0.5 10.2.0.4

BindsVMkerneldevicevmnic1toIPaddress10.2.0.5,andtriestofloodpingtheremote machinewiththeIPaddress10.2.0.4. SeeVMkernelNetworkCardLocatoronpage 314.

Managing a VMware ESX Server File System


ThevmkfstoolscommandletsyoucreateandmanipulatefilesonSCSIdisksmanaged byESXServer. NOTE Youmustbeloggedinastherootusertorunthevmkfstoolscommand. Theformatforthevmkfstoolscommand,whenspecifyingaSCSIdevice,is:
vmkfstools <options> <device_or_VMFS_volume>[:<file>]

where<device_or_VMFS_volume>specifiesaSCSIdevice(aSCSIdiskorapartition onaSCSIdisk)beingmanipulatedoraVMFSvolume,and<options>specifiesthe operationtobeperformed. If<device_or_VMFS_volume>isaSCSIdevice,itisspecifiedinaformsuchas:


vmhba1:2:0:3

<device_or_VMFS_volume>canalsobeaVMFSvolumename,assetinthe managementinterfaceorwiththevmkfstools --setfsnamecommand. Thevariable<file>isthenameofafilestoredintheVMFSvolumeonthespecified device.

VMware, Inc.

169

Administration Guide

Theformatforthevmkfstoolscommand,whenspecifyingaVMFSvolumeorfile,is:
vmkfstools <options> <path>

where<path>isanabsolutepaththatnamesadirectoryorafileunderthe/vmfs directory. Foranexplanationonusingthiscommand,seeUsingvmkfstoolsonpage 249.

Automatically Mounting VMFS Volumes


VMFSvolumesareautomaticallymountedinthe/vmfsdirectoryontheservice consolewhentheVMkernelisloadedasthecomputerboots.

Loading VMkernel Device Modules


Usetheprogramvmkload_modtoloaddevicedriverandnetworkshapermodulesinto theVMkernel.Youcanalsousevmkload_modtounloadamodule,listtheloaded modules,andlisttheavailableparametersforeachmodule. Theformatforthecommandis:
vmkload_mod <options> <module-binary> <module-tag> <parameters>

SeeVMkernelModuleLoaderonpage 240.

Common Linux Commands Used on the Service Console


ManyofthecommandsavailableonLinuxorUNIXarealsoavailableontheservice console.Thissectionsummarizesthemostcommonlyusedcommands.Formore information,seeGettingHelpforServiceConsoleCommandsonpage 180orconsult aLinuxreferencebook.

Manipulating Files
Tonavigatethroughthedirectorystructureandmanipulatefilesanddirectories,you musthaveproperpermissions.Insomeareasofthefilesystem,yourabilitymaybe restrictedwhenyouareloggedinasanordinaryuser.Youmightneedtologinasroot toperformsometasks.Table 51explainssomeofthecommonLinuxcommands availableintheserviceconsole.

170

VMware, Inc.

Chapter 5 Using the VMware Service Console

Table 5-1. Linux commands used on the service console

Command cd

Example and Explanation Changedirectories. cd /home/user Changetothedirectory /home/user(thehomedirectoryforauserwiththe usernameuser). cd .. Gouponelevelfromthecurrentdirectory.

cp

Copyafile. cp oldfile newfile Makeacopyofthefileoldfileinthecurrentdirectory.Thecopyisnamed newfile. cp oldfile /home/user Makeacopyofthefileoldfileinthecurrentdirectory.Thecopyhasthename oldfileandisinthedirectory/home/user.

ln

Createalinkfromonefileordirectorytoanotherfileordirectory. ln -s /bin/program prolink Createasoftlink(shortcut)fromtheexistingfile/bin/programtoprolink. Thelinkprolinkiscreatedinthecurrentworkingdirectory.Ifyouenterthe commandprolink,youruntheprogram/bin/program.

ls

Listthefilesinthecurrentdirectory. ls -al Listall(-a)thefilesinthecurrentdirectoryinlong(-l)format. ls *.html Listfilesinthecurrentdirectorythatendwith.html.The*isawildcard characterthatrepresentsanynumberofcharacters.The?isawildcard characterthatrepresentsasinglecharacter. ls /home/user Listthefilesinthedirectory/home/user.

mkdir

Makeanewdirectory. mkdir newdir Makeanewdirectorycallednewdirbeneaththecurrentdirectory. mkdir /home/newdir Makeanewdirectorycallednewdirbeneaththe/homedirectory.

mv

Moveafiletoanewdirectoryorrenamethefile. mv myfile /home/user Movethefilemyfilefromthecurrentdirectorytothedirectory/home/user. mv myfile yourfile Renamethefilemyfile.Thenewfilenameisyourfile.

pwd

Showthepathtothepresentworkingdirectory.

VMware, Inc.

171

Administration Guide

Table 5-1. Linux commands used on the service console (Continued)


Command rm Example and Explanation Removeafile. rm deadfile Removethefiledeadfilefromthecurrentdirectory. rmdir Removeadirectory. rmdir gone Removethedirectorygone,whichexistsbeneaththecurrentdirectory.

Finding and Viewing Files


Table 52describessomecommonLinuxcommandsforfindingandviewingfilesthat canalsobeusedintheESX Serverserviceconsole. Table 5-2. Linux commands used on the service console
Command cat Example and Explanation Concatenatethecontentsoffilesanddisplaythecontentonthescreen. cat /proc/vmware/mem Displaythecontentsofthefile /proc/vmware/mem. find Findfilesunderaspecifieddirectorythatmatchconditionsyouspecify. find / -name myfil* Findfilesintherootdirectoryandalldirectoriesunderitthathavefilenames beginningwithmyfil.The*isawildcardcharacterthatrepresentsany numberofcharacters.The?isawildcardcharacterthatrepresentsasingle character. find -name '*.vmx' -print -exec chown User2 {} \; Findfilesinthisdirectoryandsubdirectoriesthatendwith.vmx,displaythe namesofallfilesthatarefoundonthescreenand,foreachfile(indicatedby curlybraces{}),changeitsownertoUser2. -printisnotnecessary,butithelpstotracktheprogressofthefind command.Ifyoudonotuse-print,thefindcommandissilentexceptfor errormessagesfromfindorfromchown. find -name '*.vmx' -exec grep -il 'SOMETHING' {} \; Findallfilesinthisdirectoryandallsubdirectoriesthatendwith.vmxandlook forthepatternSOMETHINGineachofthefiles.The-ioptiontogrepmakes thesearchcaseinsensitive.The-loptiontogrepcausesgreptodisplaythe namesofthefilesthathaveSOMETHINGinthem.Whenafileisfoundthat containsSOMETHING,thiscommanddisplaysthefullpathtothefilefromthe currentdirectory(forexample, ./virtualmachines/Linux/RedHat71Test/redhat71.vmx).

172

VMware, Inc.

Chapter 5 Using the VMware Service Console

Table 5-2. Linux commands used on the service console (Continued)


Command grep Example and Explanation Searchforaspecifiedtextpatterninaspecifieddirectoryorlistoffilesand displaythelinesinwhichthepatternisfound. grep "log file" * Searchallthefilesinthecurrentdirectoryforthetextstringlog file. less Displaythecontentsofaspecifiedfileonescreenatatime.Usethearrowkeys tomoveupanddownthroughthefile. less myfile Displaythecontentsofthefilemyfile. grep "log file" * | less Searchallthefilesinthecurrentdirectoryforthetextstringlog fileanduse lesstodisplaytheresultssoyoucanscrollupanddownthroughthem.

Managing the Computer and Its Users


Therootuserorsuperuser(su)canrunallthesecommands.Someofthecommands, thosethatprovideinformation,areavailabletootherusers. Table 5-3. Linux commands used on the service console
Command apropos Example and Explanation Findcommandswithdescriptionsthatincludeaspecifiedword.Displaysthe nameofthecommandandthefirstlineofthedescription. apropos file Findcommandswithdescriptionsthatincludethewordfile. apropos file | less Findcommandswithdescriptionsthatincludethewordfileanduselessto displaytheresultssoyoucanscrollupordownthroughthem. du Displayusageinkilobytesforcontentsofthecurrentdirectoryorforaspecified fileordirectory. du /bin Showhowmuchdiskspaceisusedbythe/bin directory. du -h $HOME Displayhowmuchdiskspaceisusedbytheusershomedirectory,using familiarfilesizeterms. vdf vdfisanESXServercustomizedversionofthedfcommand.Usevdfinplace ofthedfcommand.vdfworkswithallthestandarddfoptions. Displaysfreespaceforallmountedfilesystems.Thelistalsoshowsthetotal space,amountofspaceused,andpercentageofspaceusedforeachfilesystem. vdf -h Displaythefreespaceinfamiliarfilesizeterms.

VMware, Inc.

173

Administration Guide

Table 5-3. Linux commands used on the service console (Continued)


Command fdformat Example and Explanation Doafloppydiskformat. fdformat /dev/fd0 Formatafloppydiskinthefirstfloppydiskdrive. groupadd Addanewgroup. groupadd newgroup Addagroupnamednewgrouptothesystem. hostname ifconfig Displaythesystemshostname. Displaythenetworkinterfaceconfigurationinformationforallnetworkdevices. NICsallocatedtothevmkernelareshownasvmnic<N>,whereNisthenumber oftheNIC(forexample,vmnic0,vmnic1,andsoforth.) Installaloadablemoduleintotherunningkernel. insmod parport Installtheloadablemodulenamedparportintotherunningkernel. kill Killaspecifiedprocess. kill 3456 KilltheprocesswithaprocessIDof3456. kill -9isthesurestwaytokillaprocess;however,useitonlyasalastresort becauseitwillnotsaveeditorbuffers. lsmod lspci Listallloadedmodules. ListPCIdevicesavailabletotheserviceconsole. lspci -v ListPCIdevicesinverbosemode. mount Mountaspecifiedstoragedeviceataspecifiedlocationinthefilesystem. mount /dev/fd0 /mount/floppy Mountthefirstphysicalfloppydrivesoitscontentsarevisibleinthedirectory /mount/floppy.Thedirectory/mount/floppymustalreadyexist. passwd Changeyourpassword. passwd user Changethepasswordforausernameduser.Youmustbeloggedinastheroot user(su)tochangeanotheruserspassword. ps Shownames,processIDsandotherinformationforrunningprocesses. ps -ef Showfull(-f)informationaboutevery(-e)runningprocess. shutdown Shutdownthecomputer. shutdown -h 5 Completelyhalt(-h)thecomputerin5minutes. shutdown -r now Shutdownandrestart(-r)thecomputerimmediately.

insmod

174

VMware, Inc.

Chapter 5 Using the VMware Service Console

Table 5-3. Linux commands used on the service console (Continued)


Command umount Example and Explanation Unmountaspecifieddevice. umount /mount/floppy Unmountthedevicecurrentlymountedat/mount/floppy. useradd Addanewusertothesystem. useradd newuser Addanewuserwithausernameofnewusertothesystem. who whoami Showtheusernamesofallusersloggedintothesystem. Showtheusernameyouarecurrentlyusingonthesystem.

Setting File Permissions and Ownership


Filesanddirectoriesontheserviceconsolecanhaveread,write,andexecute permissions.Thosepermissionscanbeonorofffortheownerofthefile(generally,the userwhocreatedit),thespecifiedgroup(generally,agrouptowhichthecreator belongs),andallotherusersonthesystem.Permissionsareindicatedforeachfilewhen youdisplayalongdirectorylisting,asshowninExample 51.
[User@vmwareserver win2000]$ ls -la total 104 drwxr-xr-x 2 User User drwxr-xr-x 5 User User -rw------1 User User -rw-r--r-1 User User -rwxr-xr-1 User User

4096 4096 8664 77763 1307

Jul Jul Jul Jul Jul

17 17 17 18 17

11:15 09:51 16:17 14:14 11:20

. .. nvram vmware.log win2000.vmx

Example 5-1. File permissions InExample 51,inthetoptwolinesofthedirectorylisting,thefirstcharacteristhe letterdindicatingthelistingonthelineisforadirectory.Thesingledotattheendof thefirstlineindicatesthislistingisforthecurrentdirectory.Thetwodotsattheendof thesecondlineindicatethislistingisfortheparentofthecurrentdirectory. Thefirstcharacterinthelastlineisa-.Thisindicatesthatwin2000.vmxisanordinary file.ThewordUserinthethirdcolumnindicatesthefileisownedbyausernamed User.ThewordUserinthefourthcolumnindicatesthefilesownerisamemberofa groupnamedUser. Permissions Permissionsfortheowner,thespecifiedgroup,andallotherusersareindicatedinthe firstcolumn:-rwxr-xr--.Theownerspermissionsarespecifiedfirst:rwx(read,write, andexecute).PermissionsforothermembersofthegroupUserarer-x(readand

VMware, Inc.

175

Administration Guide

execute).Thefinalclusterofthreecharacters(r--)indicatesthatallotherusershave permissiontoreadthefilebutnottowritetoitorexecuteit. Changepermissionsforafileusingthechmodcommand,showninTable 54.Oneway tospecifypermissionsisbyusinganumericalshorthand:


! ! !

Read=4 Write=2 Execute=1

Specifycombinationsofthesepermissionsbyaddingthenumbersforthepermissions youwanttoset.Forexample,readandexecuteis5.Read,write,andexecuteis7. Permissionsarespecifiedinthesameorderastheyareshowninthedirectorylisting owner,group,allotherusers. Youcanalsoaddordeletepermissionsbyspecifyingthembythesymbolsdisplayedin thelongdirectorylistingsdiscussedpreviously:


! ! !

Read=r Write=w Execute=x

Identifythesetofpermissionsyouwanttomodifybytheirsymbol:
! ! ! !

User=u Group=g Other=o All=a

Table 54listspermissionsandcommands.

176

VMware, Inc.

Chapter 5 Using the VMware Service Console

Table 5-4. Permissions and ownership commands


.

Command chmod

Example and Explanation Changemode(permissions)foraspecifiedfile,groupoffilesordirectory. chmod 755 *.vmx Setpermissionsonallfilesinthecurrentdirectorythatendwith.vmxtobe -rwxr-xr-x. chmod 660 nvram Setpermissionsonthefilenvraminthecurrentdirectorytoberwrw. chmod g+x /usr/local/bin Changepermissionsonallfilesin/usr/local/binsothattheycanbeexecutedby otherusersbelongingtothegroup.

chown

Changetheownerofaspecifiedfile.Changetheownerandthegroupforafile atthesametime. chown User2 win2000.vmx Changetheownerofthefilewin2000.vmxtoUser2. chown User2:VMUsers win2000.vmx Changetheownerofthefilewin2000.vmxtoUser2andchangethegroupto VMUsers.

chgrp

Changethegroupforaspecifiedfile. chgrp VMUsers win2000.vmx Changethegroupforthefilewin2000.vmxtoVMUsers.

Switching User Names


Table 55describesthecommonLinuxcommandsforswitchingusernamesthatare alsoavailableintheESX Serverserviceconsole. Table 5-5. Commands for switching user names
Command su Example and Explanation Switchuser.Bydefault,thiscommandletsyouloginastherootuserifyou knowtherootuserspassword.Youcanalsousethecommandtologinasany otheruserifyouknowtheusernameandpassword.Enterthecommandand enterthepasswordwhenprompted. su User2 LoginasUser2.

exit

Logout.Ifyouusedsutologinasadifferentuser,thiscommandreturnsyou toyourprevioususername.

The proc File System


Theprocfilesystemisasetofdirectories,beginningwith/proc,thatexistinmemory whileESXServerisrunning.Thecontentsofthesedirectoriesarenotstoredondisk.

VMware, Inc.

177

Administration Guide

The/proc/vmwaredirectorycontainsinformationspecifictotherunningoftheESX Servervirtualizationlayerinvirtualmachines. Youcanusethecatcommandtocheckstatusandusetheechocommandtowrite valuestocertainfilesintheprocfilesystemtochangetheconfigurationofESXServer. NOTE MostofthisinformationisavailablethroughtheVMwareManagementInterface. VMwarerecommendsthatyouobtainandsetinformationthroughthismanagement interface.Donotaddorchangeanyoptionsinthisdirectoryunlessyouareinstructed tobyVMwaresupporttosolveanissuewithESXServer. CAUTION Donotusetheprocinterfacetosetanyvaluesotherthanthosementioned inthesesections:
! ! ! !

ManagingCPUResourcesfromtheServiceConsoleonpage 337 ManagingMemoryResourcesfromtheServiceConsoleonpage 352 ManualNUMAOptimizationsonpage 361 ManagingDiskBandwidthfromtheManagementInterfaceon page 372 ManagingDiskBandwidthfromtheServiceConsoleonpage 374

NOTE

Thecontentsandformatofthe/proc/vmwaredirectorymaychangebetweenreleases ofESXServer. Table 5-6. procfilesystementriesanddescriptions


/proc/vmware Entry chipset config debug filters interrupts log loglevels Description Stateofinterruptcontrollers. AdvancedESXServerparametersavailablethroughtheVMware ManagementInterface. Debugginginformation. Networktrafficshaping.SeeTrafficShapingwithnfshaperon page 369. Used,togetherwithchipset,todeterminethestateofinterrupt controllers. VMkernellogoutput. Amountofdebuglogging.

178

VMware, Inc.

Chapter 5 Using the VMware Service Console

Table 5-6. procfilesystementriesanddescriptions (Continued)


/proc/vmware Entry mem migration net pci procstats pshare Description Memoryparameters.SeeMemoryResourceManagementon page 345 Reservedforfutureuse. ConfigurationandstatisticsforvirtualNICsandbonddevices.See BindingPhysicalAdaptersonpage 320. StateofPCIadaptersinthesystem(whattheyareandhowtheyre partitioned). Statisticsforthe/proc/vmwaredirectory. Pagesharingstatisticsformemoryresourcemanagement.See SharingMemoryAcrossVirtualMachinesonpage 350 and MemorySharingonpage 365. Statisticsonremoteprocedurecalls(RPCs). SchedulerstatisticsonmemoryandCPU. InformationonSCSIdevicesandmappingsbetweenstorage controllersandvirtualmachines. Statisticsonshareddevices. CountsofvariouslowleveleventsinESXServer. Swapstatistics. ThermalmonitoringinformationforeachPentium4processor. StateofESXServerinternaltimedeventscheduler. ESXServeruptime. StatisticsforindividualvirtualmachinesbyVMID. StatisticsonESXServerperformance. Statisticsfordebugging.

rpcstats sched scsi shrdev stats swap thermmon timers uptime vm vmkperf watchpoints

VMware, Inc.

179

Administration Guide

Getting Help for Service Console Commands


Detailedusagenotesformostserviceconsolecommandsareavailableasmanfiles.To viewthemanpageforacommand,usethemancommandfollowedbythenameofthe commandforwhichyouwanttoseeinformation. Table 5-7. man command
Command man Example and Explanation Displaysthemanpageforaspecifiedcommand.Pressthespacebartogotothe nextscreenoftext.Pressqtoexitfromthedisplay. man cat Displaythemanualpageforthecommandcat. man -f cat Displayabriefdescriptionofthecommandcat.

Authentication and Security Features


Thissectioncontainsthefollowingtopics:
! ! !

AuthenticatingUsersonpage 180 DefaultPermissionsonpage 182 TCP/IPPortsforManagementAccessonpage 182

TherearethreekeyaspectstosecuritywithVMwareESXServer:
!

VMwareESXServerauthenticatesallremoteuserswhoconnecttoaserverusing theVMwareManagementInterfaceortheVMwareRemoteConsole. Securityfornetworktraffictoandfromtheserverdependsonthesecuritysettings intheserverconfiguration. ThreeormoreTCP/IPportsareusedforaccess,dependingonthesecuritysettings inyourESXServerconfiguration. Dependingonyourremoteaccessrequirements,youmightneedtoconfigureyour firewalltoallowaccessononeormoreoftheseports.Fordetailsonwhichports areused,seeTCP/IPPortsforManagementAccessonpage 182.

Authenticating Users
VMwareESXServerusesPluggableAuthenticationModules(PAM)foruser authenticationintheremoteconsoleandtheVMwareManagementInterface.The defaultinstallationofESXServeruses/etc/passwdauthentication,asLinuxdoes,but

180

VMware, Inc.

Chapter 5 Using the VMware Service Console

itcanbeconfiguredeasilytouseLDAP,NIS,Kerberos,oranotherdistributed authenticationmechanism. ThePAMconfigurationisin/etc/pam.d/vmware-authd. EverytimeaconnectionismadetotheserverrunningESXServer,theinetdprocess runsaninstanceoftheVMwareauthenticationdaemon(vmware-authd).The vmware-authdprocessrequestsausernameandpassword,andhandsthemoffto PAM,whichperformstheauthentication. Afterauserisauthenticated,vmware-authdacceptsapathnametoavirtualmachine configurationfile.Accesstotheconfigurationfileisrestrictedinthefollowingways. Theusermusthave:
!

readaccesstotheconfigurationfiletoseeandcontrolthevirtualmachineinthe VMwareManagementInterfaceandtoviewthevirtualmachinedetailspages. readaccesstotheconfigurationfiletousethelocalconsoleontheserviceconsole ortoconnecttothevirtualmachinewiththeVMwarePerlAPI. readandexecuteaccesstotheconfigurationfiletoconnecttoandcontrol(start, stop,reset,orsuspend)avirtualmachineinaremoteconsole,withtheVMware PerlAPIorwiththemanagementinterface. readandwriteaccesstotheconfigurationfiletochangetheconfigurationusing theConfigureVMpageinthemanagementinterface.

NOTE

Ifyouhaveuserswithlistaccess,butnotreadaccess,theymightencountererrorsinthe VMwareManagementInterface. Ifavmwareprocessisnotrunningfortheconfigurationfileyouaretryingtouse, vmware-authdexamines/etc/vmware/vm-list,thefilewhereyouregisteryour virtualmachines.Iftheconfigurationfileislistedinvm-list,vmware-authd(not necessarilytheuserwhoiscurrentlyauthenticated)startsVMwareESXServeras ownerofthisconfigurationfile. Registeredvirtualmachines(thoselistedin/etc/vmware/vm-list)alsoappearinthe VMwareManagementInterface.ThevirtualmachineslistedontheStatusMonitor mustbelistedinvm-list,andyoumusthavereadaccesstotheirconfigurationfiles. Thevmware-authdprocessexitsassoonasaconnectiontoavmwareprocessis established.Eachvmwareprocessshutsdownautomaticallyafterthelastuser disconnects.

VMware, Inc.

181

Administration Guide

Using Your Own Security Certificates when Securing Your Remote Sessions
WhenusingtheVMwareRemoteConsoleortheVMwareManagementInterfaceover anetworkconnection,theusername,password,andnetworkpacketssenttoESX ServerareencryptedinESXServerbydefaultwhenyouchooseMediumorHigh securitysettingsfortheserver. WithSSLenabled,securitycertificatesarecreatedbyESXServerandstoredonthe server.However,thecertificatesusedtosecureyourmanagementinterfacesessionsare notsignedbyatrustedcertificateauthority;theydonotprovideauthentication.Ifyou useencryptedremoteconnectionsexternally,considerpurchasingacertificatefroma trustedcertificateauthority. YoucanuseyourownsecuritycertificateforyourSSLconnections. TheVMwareManagementInterfacecertificatemustbeplacedin /etc/vmware-mui/ssl.Themanagementinterfacecertificateconsistsoftwofiles:the certificateitself(mui.crt)andtheprivatekeyfile(mui.key).Theprivatekeyfile shouldbereadableonlybytherootuser. Whenyouupgradethemanagementinterface,thecertificateremainsinplace.Ifyou removethemanagementinterface,the/etc/vmware-mui/ssl directoryisnot removedfromtheserviceconsole.

Default Permissions
WhenyoucreateavirtualmachinewithVMwareESXServer,itsconfigurationfileis registeredwiththefollowingdefaultpermissions,basedontheuseraccessingit:
!

Read,execute,andwriteFortheuserwhocreatedtheconfigurationfile(the owner). ReadandexecuteFortheownersgroup. ReadForusersotherthantheowneroramemberoftheownersgroup.

! !

TCP/IP Ports for Management Access


TheTCP/IPportsavailableformanagementaccesstoyourESXServermachinevary, dependingonthesecuritysettingsyouchoosefortheserver.TomanageESXServer machinesfromoutsideafirewall,youmightneedtoreconfigurethefirewalltoallow accessontheappropriateports.Thelistsbelowshowwhichportsareavailablewhen youuseeachofthestandardsecuritysettings.

182

VMware, Inc.

Chapter 5 Using the VMware Service Console

ThekeyportsforuseoftheVMwareManagementInterfaceandtheVMwareRemote ConsolearetheHTTPorHTTPSportandtheportusedbyvmware-authd.Useofother portsisoptional. NOTE ForcompatibilitywithGSXServer,TCPports8222and8333arehandledasHTTP redirectstoTCPports80or443.

High Security
Thefollowinglistshowstheportnumbersanduseforhighsecurity:
! ! !

443HTTPS,usedbytheVMwareManagementInterface. 902vmware-authd,usedwhenyouconnectwiththeremoteconsole. 22SSH,usedforasecureshellconnectiontotheserviceconsole.

Medium Security
Thefollowinglistshowstheportnumbersanduseformediumsecurity:
! ! ! ! ! !

443HTTPS,usedbytheVMwareManagementInterface. 902vmware-authd,usedwhenyouconnectwiththeremoteconsole. 22SSH,usedforasecureshellconnectiontotheserviceconsole. 23Telnet,usedforaninsecureshellconnectiontotheserviceconsole. 21FTP,usedfortransferringfilestoandfromothermachines. 111portmap,usedbytheNFSclientwhenmountingadriveonaremote machine.

Low Security
Thefollowinglistshowstheportnumbersanduseforlowsecurity:
! ! ! ! ! !

80HTTP,usedbytheVMwareManagementInterface. 902vmware-authd,usedwhenyouconnectwiththeremoteconsole. 22SSH,usedforasecureshellconnectiontotheserviceconsole. 23Telnet,usedforaninsecureshellconnectiontotheserviceconsole. 21FTP,usedfortransferringfilestoandfromothermachines. 111portmap,usedbytheNFSclientwhenmountingadriveonaremote machine.

VMware, Inc.

183

Administration Guide

Using Devices With ESX Server


Inthissection,wediscussconsiderationswhenusingdeviceswithESXServer.

Supporting Generic Tape and Media Changers


Fortheguestoperatingsystemtoseeandcontrolthemediachanger,theSCSIIDinthe targetrawdevicesconfigurationfilemustmatchtheSCSIIDthatESXServerseesfor thatdevice.ChecktheSCSIIDseenbyESXServerbyviewingtheoutputofthefiles /proc/vmware/scsi/vmhba<x>/<y>:<z>,where<x>istheHBAIDassignedbyESX Server,<y>istheSCSItargetID,and<z>istheSCSILUNID. SeeAddingaTapeDrivetoaVirtualMachineonpage 121.

Editing the vmware-device.map.local File


The/etc/vmware/vmware-device.mapfilecontainsalistofdevicessupportedby ESXServer.Thisreleaseincludessupportforalocalversionofthisfile, /etc/vmware/vmware-device.map.local. Modifythevmware-device.map.localtoselectdifferentdevicedrivers.Thisfileis notmodifiedduringanESXServerupgrade,preservingyourcustomizations.The vmware-device.map.localisreadwhentheVMkernelisloaded:
!

Anychangestothevmware-device.map.localfilerequirearebootoratleastan unload/reloadoftheVMkerneltotakeeffect. Entriesinthevmware-device.map.localfilesareusedinadditiontotheentries inthevmware-device.mapfile.Thevmware-device.map.localfiledoesnot needtomirrorthevmware-device.mapfile. Anyvmware-device.map.localfileentriesthatcorrespondtothe vmware-device.mapfileentriessupersedethevmware-device.mapfileentries.

Finding Disk Controllers


UsethevmkpcidivycommandtolistphysicaldiskcontrollersrecognizedbyESX ServerandthedevicenameslinkedtothemintheServiceConsole.Physicaldisk controllersmaybeSCSIorblockdevices,suchasdiskarraycontrollers. The-queryoptionofvmkpcidivyreportsESXServerconfigurationdetails. Forexample,displaydiskcontrollersandtheirdevicenameswithvmhba_devsquery:
$ vmkpcidivy -q vmhba_devs vmhba0:0:0 /dev/ida/c0d0 vmhba1:0:0 /dev/sda vmhba1:0:1 /dev/sdb
184 VMware, Inc.

Chapter 5 Using the VMware Service Console

Youcanalsofindthedevicenamelinkedtoaspecificcontrollerwiththesingular vmhba_devquery:
$ vmkpcidivy -q vmhba_dev vmhba0:0:0 /dev/ida/c0d0

Thevmhba_devqueryacceptsoneormorecontrollernamesasarguments.

When You Change Storage Adapters


WheneveryouchangestorageadaptersonanESXServersystem,runthevmkpcidivy utilitytoensureproperloadingofthekernelmodules. To run the utility after changing storage adapters 1 2 Afterinstallingthenewhardware,boottheESXServersystemtoLinuxmode. Runvmkpcidivybytyping:
vmkpcidivy -i

ReboottheESXServersystem.

Enabling Users to View Virtual Machines Through the VMware Remote Console
ThedefaultsecuritysettingforESXServeristhatusersmusthaveread(r)andexecute (x)accesspermissionstoconnectaremoteconsoletoavirtualmachine.Toallowaccess touserswithonlyreadpermissions,usethefollowingglobalconfigurationsetting:
authd.policy.allowRCForRead = TRUE

Addtheprecedinglinetothe/etc/vmware/configfile.Thissettingallowsuserswith onlyreadpermissionstoconnecttoavirtualmachinethroughtheremoteconsole. NOTE ThisconfigurationsettingaffectsallvirtualmachinesonanESXServermachine.You cannotchangethissettingforindividualvirtualmachines.

VMware, Inc.

185

Administration Guide

186

VMware, Inc.

Administering ESX Server

YoucanmodifyESXServerconfigurationoptionsbyloggingintotheVMware ManagementInterfaceasrootandclickingtheOptionstab.Thesettingsyoucan changeandactivitiesyoucanperformincludeupdatingthestartupprofile,configuring storageandnetworksettings,andconfiguringotherserveroptions. RefertotheVMwareESXServerInstallationGuideforadditionalinformationabout serverconfigurationduringinstallation. Thischapterprovidesanoverviewoftheconfigurationmodificationoptions:


! ! ! ! ! ! ! ! ! ! ! !

StartupProfileonpage 188 NetworkConnectionsonpage 188 UsersandGroupsonpage 192 SecuritySettingsonpage 194 SNMPConfigurationonpage 196 LicensingandSerialNumbersonpage 196 StorageManagementonpage 196 AdvancedSettingsonpage 205 ServiceConsoleSettingsonpage 206 SystemLogsandAvailabilityReportonpage 209 VirtualMachinesStartupandShutdownonpage 217 RebootingorShuttingDowntheServeronpage 221

VMware, Inc.

187

Administration Guide

Startup Profile
FromtheOptionstaboftheVMwareManagementInterface,usetheStartupProfiles optiontocreateandmodifyESXServerbootconfigurations.Foreachconfiguration, youcanspecifyhowyouwanttoallocateyourdevices:tothevirtualmachines,tothe serviceconsole,orsharedbetweenthem. IfyouaddnewhardwaretoyourESXServersystem,suchasextraSCSIcontrollersor networkadapters,youcanspecifyherewhethertoallocatethenewhardwaretothe vmkernelandvirtualmachines,orallocateittotheserviceconsole. YoualsoenableHyperThreadingforyourserverwiththestartupprofile. HyperThreadingallowsESXServertooperatewithtwologicalCPUsforeachphysical CPUyouhaveinstalledinyoursystem.SelecttheEnableHyperThreadingoptionto enablethisfeature.SeeUsingHyperThreadingonpage 335. Formoreinformationonthechangesanadministratorcanexpecttoseewhenrunning ESXServeronaHTsystemanddetailsontheadvancedalgorithmsandconfiguration optionsusedtomaximizeperformanceofESXServeronaHyperThreadedsystem, refertoHyperThreadingSupportinVMwareESXServer2.1at http://www.vmware.com/support/resources/esx_resources.html. Ifyoumakeanychangestothestartupprofile,youmustreboottheserverforyour changestotakeeffect.

Network Connections
FromtheOptionstaboftheVMwareManagementInterface,usetheNetwork Connectionsoptiontoconfigurethenetworkconnections.

Figure 6-1. Virtual Switches tab: Network Connections

188

VMware, Inc.

Chapter 6 Administering ESX Server

Creating and Editing Virtual Switches


Youcancreatenewvirtualswitchesoreditexistingswitches. To create a virtual switch 1 LogintotheVMwareManagementInterfaceasroot. TheStatusMonitorappears. 2 ClicktheOptionstab,andclicktheNetworkConnectionstab. TheCreateVirtualSwitchdialogboxopensanddisplaysconfigurationoptionsfor thenewswitch. 3 EnteranameforthevirtualswitchintheNetworkLabelfield. TheNetworkLabelfeatureletsyouspecifyanetworklabelforswitchesandport groupsthatareusedbyvirtualmachines. 4 5 IntheBindOutboundAdapterslist,selectanadaptertoassignittothenew switch. IntheOtherOutboundAdapterslist,selectanadaptertoreassignittothenew switch. Thislistshowstheadapterscurrentlyassignedtootherswitches. 6 ClickCreateSwitchtocreatethenewvirtualswitchandclosethewindow.

To edit an existing virtual switch and its adapters 1 ClickEdit. TheEditVirtualSwitchdialogboxopensanddisplaysexistingconfigurationand adaptersettingsfortheswitch. 2 EditthenetworklabeloftheswitchintheNetworkLabelfield. TheNetworkLabelfeatureletsyouspecifyanetworklabelforswitchesandport groupsusedbyvirtualmachines. NOTE Ifvirtualmachinesareconfiguredtousetheswitchandyouchangethename ofthelabel,thevirtualmachineswillnotpoweron. 3 4 IntheBindOutboundAdapterslist,selectanadaptertoassignittothenew switch. Toroutenetworktrafficlocally,deselectalltheadaptersandclickOK.

VMware, Inc.

189

Administration Guide

Aninternaladapteriscreatedforthevirtualswitch.Anotificationmessageshows Nooutboundadapters.Trafficroutedlocally. 5 SelectanadaptertoassignittotheswitchfromtheBindUnassignedAdapterslist. UnderOtherOutboundAdapters,BindUnassignedAdapterslistsany unassignedadapters.Youcantransferanylistedadaptersfromotherswitchesto thevirtualswitchyouareconfiguring. 6 7 ClickOKtosavethenewswitchconfigurationandclosethewindow. Toremovetheswitch,clickRemoveSwitch. Thisactionremovesthevirtualswitchanddoesnotsaveanyconfiguration changesmadetotheeditpage.

Creating Port Groups


Portgroupsareextensionsofnetworks,usingVirtualLocalAreaNetworks(VLANs). VLANsallowconfigurednetworkstocommunicatesecurelyamongthemselvesasif connectedtoacommonisolatedphysicalnetwork.Tocreateaportgroup,anexisting networkmustbeconfigured. To create a port group 1 LogintotheVMwareManagementInterfaceasroot. TheStatusMonitorappears. 2 ClicktheOptionstab,andclicktheNetworkConnectionstab. TheVirtualSwitchesdialogboxopens. 3 Tocreateaportgroupforaswitch,clickAddnexttoPortGroups. TheCreatePortGroupsdialogboxopensanddisplaysconfigurationoptionsfora portgroup. 4 5 6 EnteranamefortheportgroupinthePortGroupLabelfield. IntheVLANIDfield,enteranumberbetween1and4095. ClickCreatePortGrouptocreatethenewportgroupandclosethewindow.

Disabling vmkernel VLAN Tagging


WhenVLANsarecreatedwithinyourESXServer,thevmkernel,bydefault,manages theVLANprocessingofEthernetframes.Ifyoudonotwantthevmkerneltomanage VLANprocessing,configurethevmkerneltopassallEthernetframesbetweenguest operatingsystemsandtheoutsidenetwork.
190 VMware, Inc.

Chapter 6 Administering ESX Server

To change your VLAN processing settings 1 FromtheOptionstab,selectAdvancedSettings. TheAdvancedSettingspaneappearsanddisplaysalistofconfiguration parameters. 2 3 Locatetheparameter:Net.VlanTrunking. Clickthevaluefortheparameter. TheModifyVMkernelParameterdialogboxopens. 4 5 IntheValueentryfield,enter1(one)toenabletheparameteror0(zero)todisable theparameter. ClickOKtoclosethewindowandsavethesetting.

Configuring Physical Adapters


FromtheOptionstaboftheVMwareManagementInterface,usetheNetwork Connectionsoptiontoviewandconfigurethephysicaladaptersassignedtovirtual machines.Thisoptionletsyouchangethespeedandduplexsettingsoftheadapters.

Figure 6-2. Physical Adapters tab

VMware, Inc.

191

Administration Guide

Configuring Network Speed and Duplex Settings


WhenyouusetheVMwareManagementInterfacetoconfigurenetworksettingsforthe Ethernetadaptersassignedtovirtualmachines,youseetheactualspeedandduplex settingsforeachadapter.IftheadapterisconfiguredtoAutonegotiate,thesesettings areautomaticallynegotiatedbytheadapter.Ifthesesettingsarenotappropriate,click Editnexttothephysicaladapteryouwanttochange. FromthePhysicalAdapterstab,choosethesettingsyouwantfromtheConfigured Speed,Duplexpulldownlist.ClickOKtosavetheupdatedconfiguredspeed.

Users and Groups


FromtheOptionstaboftheVMwareManagementInterface,usetheUsersandGroups optiontoadd,modify,andremoveESXServerusersandgroups.Thisdialogboxlists eachuser,thegroupstowhichtheuserbelongs,eachgroup,andtheusersthatarepart ofeachgroup.

Adding Users and Groups


Thissectiondescribeshowtoaddnewusersorgroupsthatcanbeusedtomanage virtualmachinesintheVMware Management Interface. To add a new user 1 Clickthe+(plus)signnexttoUserstoexpandtheUserslistandclickAdd. TheEditUsersandGroupsdialogboxappears.

IntheUserNamefield,typethenameofthenewuser.

192

VMware, Inc.

Chapter 6 Administering ESX Server

3 4 5 6

IntheHomeDirectoryfield,typethenameofthedefaultdirectoryfortheuserin theserviceconsole. IntheNewPasswordfield,typethepasswordfortheusersaccount. IntheConfirmNewPasswordfield,typethesamepassword. Toaddtheusertooneormoregroups,clickAddandselectagroupfromthelist. Repeatthisstepforeachgrouptowhichyouwanttoaddtheuser.

NOTE

Ifyoudonotwanttheusertobepartofagroup,clickRemovenexttothe groupname.

ClickOKtosavethenewuserinformationandclosethewindow.

To add a new group 1 Clickthe+(plus)signnexttoGroupstoexpandtheGroupslistandclickAdd. TheEditUsersandGroupsdialogboxappears.

2 3

IntheGroupNamefield,typethenameofthenewgroup. Toaddoneormoreuserstothegroup,clickAdd,andselectauserfromthelist. Repeatthisstepforeachuseryouwanttoaddtothegroup.

NOTE 4

Toremoveauserfromthegroup,clickRemovenexttotheusername.

ClickOKtosavethenewgroupinformationandclosethewindow.

Editing and Removing Users and Groups


Thissectiondescribeshowtoeditorremoveexistingusersorgroupsfromthe VMware Management Interface.

VMware, Inc.

193

Administration Guide

To change information for or remove a user 1 Clickthe+(plus)signnexttoUserstoexpandtheUserslistandclicktheuseryou wanttoeditorremove. TheEditUsersandGroupsdialogboxappears. 2 Doanyofthefollowing:


!

Tochangetheusershomedirectory,intheHomeDirectoryfield,typethe nameofthedefaultdirectoryfortheuserintheserviceconsole. Tochangetheuserspassword,intheNewPasswordfield,typethepassword fortheusersaccount,andintheConfirmNewPasswordfield,typethesame password. Toaddtheusertooneormoregroups,clickAdd,andselectagroupfromthe list.Repeatthisstepforeachgrouptowhichyouwanttoaddtheuser. Toremovetheuserfromanygroup,clickRemovenexttothegroupname. Toremovetheuser,clickRemovenexttotheusersname.Youareprompted toconfirmyouwanttoremovetheuser.Thewindowcloses.

! !

ClickOKtosaveyourchangesandclosethewindow.

To change information for or remove a group 1 Clickthe+(plus)signnexttoGroupstoexpandtheGroupslistandclickthegroup youwanttoeditorremove. TheEditUsersandGroupsdialogboxappears. 2 Doanyofthefollowing:


!

Toaddoneormoreuserstothegroup,clickAdd,andselectauserfromthe list.Repeatthisstepforeachuseryouwanttoaddtothegroup. Toremoveanyuserfromthegroup,clickRemovenexttotheusername. Toremovethegroupcompletely,clickRemovenexttothegroupsname.You arepromptedtoconfirmyouwanttoremovethegroup.Thewindowcloses.

! !

ClickOKtosaveyourchangesandclosethewindow.

Security Settings
FromtheOptionstaboftheVMwareManagementInterface,usetheSecuritySettings optiontoconfigureESXServersecurityproperties.YoucansetupunencryptedWeb

194

VMware, Inc.

Chapter 6 Administering ESX Server

accessandenableSSH,telnet,andFTPaccesstotheserverandenableNFSfilesharing. Thefollowingstandardsecuritysettingsareavailable:
!

TheserverissettoHighsecuritybydefault,whichdoesnotallowunencrypted VMwareManagementInterfaceandRemoteConsolesessions.Highsecurity enablesSSHaccessforsecureremoteloginsessions,butitalsodisablesFTP,Telnet, andNFSfilesharingservices. ChooseMediumsecuritytodisallowunencryptedVMwareManagement InterfaceandRemoteConsolesessions.NormalaccessenablesFTP,Telnet,NFSfile sharing,andsecureremotelogin(SSH)services. ChooseLowsecuritytoallowunencryptedVMwareManagementInterfaceand VMwareRemoteConsolesessions,FTP,Telnet,NFSfilesharing,andsecureremote login(SSH)services.

Using Custom Security Settings


Bycustomizingyoursecuritysettings,youcanenableordisablesettingsthatprovide accesstotheserver,suchasunencryptedWebaccess,SSH,telnet,FTP,andNFSfile sharing.Tocustomizeyoursecuritysettings,clickCustom.TheSecuritySettingsdialog boxchangestoallowyoutochoosespecificsecuritysettings.

Figure 6-3. Security Settings dialog box Selectthecheckboxesforitemsyouwanttoenable,andclickOK.

VMware, Inc.

195

Administration Guide

SNMP Configuration
FromtheOptionstaboftheVMwareManagementInterface,usetheSNMP ConfigurationoptiontoconfiguretheESXServerSNMPagentandsubagent.These agentsallowyoutomonitorthehealthoftheserverandofvirtualmachinesrunning ontheserver. ToconfiguretheSNMPagents,seeConfiguringtheESXServerAgentThroughthe VMwareManagementInterfaceonpage 227.ForinformationaboutSNMP,seeUsing SNMPwithESXServeronpage 223.

Licensing and Serial Numbers


FromtheOptionstaboftheVMwareManagementInterface,usetheLicensingand SerialNumbersoptiontoviewthecurrentlicenseinformationforthisproduct.Ifyou haveanewserialnumberforeitherESXServerorVMwareVirtualSMPforESXServer, enterthemhere. NOTE Ifyouenteranewserialnumberforalicensethatchangesthemaximumnumberof processorsallowedontheserver,youarepromptedtoreboottheserverforthenew licensetotakeeffect.

Storage Management
FromtheOptionstaboftheVMwareManagementInterface,usetheStorage Managementoptiontomanageyourstorageareanetworkandattachedstorage devicesforyourESXServersystemanditsvirtualmachines. BecausethedisksontheSANscanpotentiallybeaccessedbymultipleESXServer computers,therearesomeconfigurationissuesthatareuniquetoSANs. ForinformationaboutSANs,seeUsingStorageAreaNetworkswithESXServeron page 266. NOTE MakesurethatonlyoneESXServersystemhasaccesstotheSANwhileyouareusing theVMwareManagementInterfacetoconfigureitbyformattingtheVMFS2volumes. Afteryoufinishtheconfiguration,makesurethatallpartitionsontheshareddiskare setforpublicorsharedaccessforaccessbymultipleESXServers(seeVMFS Accessibilityonpage 248).

Configuring Storage: Disk Partitions and File Systems


TheDisksandLUNSwindowallowsyoutoviewandmodifythepartitionsandfile systemsonyourdisks.CreatediskpartitionsthatusetheVMFSfilesystem,suitablefor

196

VMware, Inc.

Chapter 6 Administering ESX Server

storingdisksforvirtualmachines.Youcanalsoedit,label,andremoveexisting partitions. WhenyoueditaVMFSpartition,youcanchangethevolumelabel,maximumfilesize, accessmode,andwhetheryouwanttospanthepartition.

Figure 6-4. Disks and LUNs tab NOTE YoucanhaveonlyoneVMFSvolumeperLUN.

Creating a Disk Partition


YoucanuseexistingfreespaceonyourVMFSvolumestocreatenewdiskpartitions. ForbackgroundonhowSCSIdevicesareidentified,seeDeterminingSCSITargetIDs onpage 263. NOTE YoucannotchangeanypartitionssetupwhenyouinstalledESXServer.Theseinclude anyvolumeswithaLinuxfilesystemorthatareusedforLinuxswapspace.

VMware, Inc.

197

Administration Guide

Ifacoredumpfiledoesnotexistonthedisk,youarepromptedtocreateone.Creating anewvolumeconsumesallthefreespaceremainingonadisk.ESXServerdetermines theoptimumsettingforthemaximumfilesizebasedonthevolumesfilesystem. To create a new partition 1 IntheDisksandLUNstab,clickCreateVolume. TheVolumeCreationMethodoptionsappear.

ClickTypical. Ifitdoesnotexist,youareaskedifyouwanttocreateacoredumppartition.The coredumppartitionstoresinformationgeneratediftheVMkernelcrashes.The informationisimportantindebugginganyproblemswiththeVMkernel. TherestofthediskorarrayisusedasaVMFSpartition,whereyoustorevirtual machinediskfiles.TheVMFSpartitionprovideshighperformanceaccesstothe virtualmachinesfilesthesameperformanceyouwouldgetifthevirtual machinewereinstalledonarawSCSIpartition. YoucanhaveonlyoneVMFSvolumeperLUN.

NOTE

Onlyfourprimarypartitionscanexistonadrive.Anextendedpartition(to containlogicalpartitions)countsasoneofyourfourprimarypartitions.

ClickYestocreatethecoredumppartition. ESXServeralsocreatestheVMFSpartition.

Afteryoucreatethepartition,youcanaddavolumelabel,determineaccessmodeand themaximumfilesize,andspanthediskwithanypublicextents.Forinformation aboutaccessmodes,seeVMFSAccessibilityonpage 248.

198

VMware, Inc.

Chapter 6 Administering ESX Server

Editing a Disk Partition


SelectapartitiontoeditandclickEdit.

Figure 6-5. Disks and LUNs tab IfthispartitionisformattedforVMFS1,youcanconvertittothenewerVMFS2 format.SeeFileSystemManagementonSCSIDisksandRAIDonpage 245for informationontheVMFS2filesystem. Thechangesyoucanmaketothepartitionmayinclude:
! ! ! !

Settingthevolumestype. Changingthenameofthevolumelabel. Settingthevolumesaccessmode. Settingthevolumesmaximumfilesize.

Certainpartitionsdonotallowyoutomakeallofthesechanges.

VMware, Inc.

199

Administration Guide

Setting the Volumes Access Mode


TherearetwomodesforaccessingVMFSvolumes:publicorshared.
!

PublicmodeDefaultmodeforESXServer.VMwarerecommendsthismode. WithapublicVMFSversion1(VMFS1)volume,multipleESXServercomputers havetheabilitytoaccesstheVMwareESXServerfilesystem,aslongastheVMFS volumeisonasharedstoragesystem(forexample,aVMFSonastoragearea network).OnlyoneESXServercanaccesstheVMFSvolumeatatime. WithapublicVMFSversion2(VMFS2)volume,multipleESXServercomputers canaccesstheVMwareESXServerfilesystemconcurrently.VMwareESXServer filesystemswithapublicmodehaveautomaticlockingtoensurefilesystem consistency.

SharedmodeUsedforaVMFSvolumethatisusedforfailoverbasedclustering amongvirtualmachinesonthesameordifferentESXServers.

NOTE

TochangetheaccessibilitymodeforaVMFSvolume,youmustdeactivatetheswapfile ifitexists.SeeConfiguringaSwapFileonpage 203.

Changing the Maximum Size of a File Allowed by VMFS


Tocreatevirtualmachineswithvirtualdiskslargerthanthedefaultmaximumsizeof 144GB,changethevalueintheMaxFileSizefield.

Spanning a VMFS volume.


YoucanspanonlyVMFS2volumes.Spanningavolumeallowsthevolumetocomprise multipleVMFSdiskpartitions.Eachdiskorpartitiontowhichthisvolumeisspanned iscalledanextent.Thiscreatesasinglevolumethatislargerthanwouldbepossible fromonepartition.Also,inthespannedvolumeorextent,youcannotchangethe maximumsizeoffiles. Afteryouspanavolume,youcannotremovethevolumeifitisspannedorifitspans othervolumes.Tospantoanothervolume,selecttheboxnexttothatvolumelabel. CAUTION AnydataontheextentislostwhentheVMFSvolumespanstoit,sospanto newlycreatedpartitions.

Converting a Partition to VMFS-2


ToconvertthepartitiontoVMFS2,clicktheConverttoVMFS2link.Toconvertthe filesystem,youmustdeactivatetheswapfileifitexists.SeeConfiguringaSwapFile onpage 203.
200 VMware, Inc.

Chapter 6 Administering ESX Server

CAUTION MetadataonVMFS2volumesutilizemorespacethanmetadataonVMFS1 volumes.Tosuccessfullyconvertafilepartition,youmightneedtomove filestoallowformorediskspace.

Removing a Disk Partition


ToconvertthepartitiontoVMFS2,clicktheConverttoVMFS2link.Toconvertthe filesystem,youmustdeactivatetheswappartitionifitexists.SeeConfiguringaSwap Fileonpage 203. Toremovethepartition,clickRemove.Youareaskedtoconfirmthatyouwantto removethepartition.Todeletecertainpartitions,clickEditandRemove. NOTE Ifthevolumeisspannedtoothervolumes,youcannotremoveit. SeeFileSystemManagementonSCSIDisksandRAIDonpage 245.

Viewing Failover Paths Connections


TheFailoverPathstabletsyoureviewthecurrentstateofpathsbetweenyoursystem andSANLUNs.Multipathingsupportallowsyoursystemtomaintainaconstant connectionbetweentheservermachineandthestoragedeviceincaseofthefailureof ahostbusadapter(HBA),switch,storagecontroller,oraFibreChannelcable.

Figure 6-6. Failover Paths tab ForeachSANLUN,thispagedisplaystheavailablepathsandthepreferredpath.By default,ESXServerselectsthelastpathusedtoaccessaLUN. Thefailoverpathsshowtheadapter,target,LUN,andtheSANtargetfortheLUN. EachSANtargetisidentifiedbyitsWorldWidePortName.

VMware, Inc.

201

Administration Guide

Thestatusofeachpathisindicatedbyasymbolthatcorrespondstoitscurrentstatus: Indicatesthatthepathisactiveanddataisbeingtransferredsuccessfully. Indicatesthatthepathissettodisabledandisavailableforactivation. Indicatesthatthepathshouldbeactive,butthesoftwarecannotconnecttothe LUNthroughthispath. IfyouconfiguredaLUNtouseapreferredpath,thatpathwillbeidentifiedwiththe labelPreferredaftertheSANTargetlisting.

Configuring Failover Policies


ThefailoverpathseditfeatureallowsyoutoconfigurethepolicyfortransferringLUN accessfromonepathtoanother. To edit the failover policy for a LUN 1 FromtheFailoverPathstab,clickEdit. Theconfigurationpageappearsanddisplaysinformationaboutthecurrentstate ofthepathsandfailoverpolicyoptions.

Chooseoneofthefollowingfailoverpolicies:
!

FixedAlwaysusethepreferredpathwhenavailable.Requiresyoutoselect thepreferredpathbyselectingPreferredintheAdaptericonpulldownmenu forthatpath MostRecentlyUsedAlwaysusethelastactivepath


VMware, Inc.

202

Chapter 6 Administering ESX Server

ClickOKtosaveyoursettingsandreturntotheFailoverPathstab. ThenameofthefailoverpolicyappearsnexttoeachSANLUNinthefailoverpaths list.

Formoreinformationonfailoverpolicies,seeSettingYourMultipathingPolicyfora LUNonpage 275.

Configuring Failover Paths


Youcanenableordisableindividualfailoverpathsbychangingtheirstatusinthe Adaptericonpulldownmenu.

Configuring a Swap File


UsetheSwapConfigurationoptiontocreateandconfigureaswapfile,whichenables yourvirtualmachinestousemorememorythanisphysicallyavailableontheserver. Forbackground,seeMemoryResourceManagementonpage 345.

Figure 6-7. Swap Configuration pane Youcanmanageasingleswapfilewiththemanagementinterface.ESXServercan manageuptoeightswapfiles,butyoumustusevmkfstools.SeeUsingvmkfstools onpage 249. ClickEdittochangethefollowingswapfilesettings:
! !

Volumeonwhichtolocatetheswapfile. Nameoftheswapfile,whichdefaultstoSwapFile.vswp.Tochangethenameof theswapfile,selectOtherfromtheFileNamelist,andtypethenameoftheswap file.Thefilemusthavea.vswpextension. CapacityoftheswapfileinMB.Arecommendedvalueisprovided.


203

!
VMware, Inc.

Administration Guide

Activationpolicy.Theswapfilecanbeactivewhenthesystemboots,oritcanbe activatedmanually.Todeactivatetheswappartition,settheactivationpolicyto Activatedmanually,andrestarttheserver.Theswapfileisnotdeactivateduntil youreboot.

NOTE

Becauseyouaremakingchangestotheamountofswapspaceaftertheinitial configuration,youmustrestarttheserverforthechangestakeeffect.Iftheswapfileis settobeactivatedmanually,afteryoureboot,theswapfileisnotactivated.Toactivate itmanually,usevmkfstools -w.

Adapter Bindings
FromtheOptionspaneoftheVMwareManagementInterface,theAdapterBindings tabdisplaystheWorldWidePortNamesboundtoeachFibreChannelHBAinthe system.YoucanviewthepersistentbindingstatusforeachHBA.Withpersistent bindings,ESXServerassignsspecifictargetIDstospecificSCSIdevices.ThetargetID associationisretainedfromreboottorebootunlessyouchangeit. PersistentbindingsareusefulifyouareusingrawdiskswithESXServer.Arawdiskis directlymappedtoaphysicaldiskdriveonyourSAN.ESXServerdirectlyaccessesthe dataonthisdiskasarawdevice(andnotasafileonaVMFSvolume).

204

VMware, Inc.

Chapter 6 Administering ESX Server

Advanced Settings
FromtheOptionstaboftheVMwareManagementInterface,usetheAdvanced SettingsoptiontoviewandmodifytheconfigurationparametersoftheVMkernel.

Figure 6-8. Advanced Settings: Configuration Parameters of the VMkernel WhenyouconfiguretheVMwareESXServercomputer(seetheVMwareESXServer InstallationGuide),somesystemparametersareassigneddefaultvalues.These parameterscontrolsettingsformemory,theprocessor,andnetworking,forexample, andaffecttherunningofvirtualmachines.Youcanviewthesesettingsfromthe managementinterface. Ifyouareloggedinastherootuser,youcanchangethevaluesfortheseparametersto finetunetherunningofvirtualmachines. CAUTION DonotchangethesesettingsunlessyouareworkingwiththeVMware supportteamoryouhavethoroughinformationaboutwhichvaluesyou shoulduse.

VMware, Inc.

205

Administration Guide

NOTE

SomeconfigurationsettingsshownonthispagearedescribedintheESXServermanual andmaybechangedasdescribedinthemanual.Inmostcases,donotmodifythese settingsunlessaVMwaretechnicalsupportengineertellyoudoso. TochangethesettingforaVMkernelconfigurationparameter,clickthelinkforthe value.TheVMkernelParameterUpdatedialogboxopensontopoftheVMware ManagementInterfacewindow.

Figure 69.VMkernelParameterUpdatedialogbox IntheValuefield,typethevaluefortheparameterandclickOK.Thedialogboxcloses andtheupdatedparameterappearsontheAdvancedSettingstab.

Service Console Settings


FromtheOptionstaboftheVMwareManagementInterface,usetheServiceConsole Settingstoconfiguretheserverprocessoranddiskresourcesfortheserviceconsole. Theseresourcesaredividedamongtheserviceconsoleandallvirtualdisksonany VMFSpartitionslocatedonthesamediskontheESXServersystem.

206

VMware, Inc.

Chapter 6 Administering ESX Server

Configuring the Service Consoles Processor Usage


Toreviewandconfiguretheserviceconsolesprocessorusage,clicktheCPUtab.

Figure 6-10. CPU tab TheCPUtabshowshowmuchoftheserverprocessororprocessorstheserviceconsole isutilizingandhowCPUresourcesareallocatedtotheserviceconsole. ThevaluesunderResourcesindicatearangeofpercentagesofaprocessortowhichthe serviceconsoleisentitled:


!

MinimumMinimumamountofprocessorcapacitythatisalwaysavailabletothe serviceconsole. MaximumHighestamountofprocessorcapacitytheserviceconsolecanever consume,eveniftheprocessorisidle. SharesRelativemetricforallocatingprocessorcapacity,wherethisvalueis comparedtothesumofallsharesofallvirtualmachinesontheserverandthe serviceconsole.

Forexample,avirtualmachineisstoredonthesamedriveastheserviceconsoleand hasaminimumCPUpercentageof20%,andamaximumCPUpercentageof50%. Meanwhile,theserviceconsolehasaminimumpercentageof30%andnospecified maximumpercentage.Youcangivethevirtualmachine3000CPUsharesandthe serviceconsole1000CPUshares. ESXServerinterpretsthisallocationsothatthevirtualmachineneverhaslessthan20% ofthetotalphysicalCPUresources,whiletheserviceconsoleneverhaslessthan30% ofthetotalphysicalCPUresources. Ifothervirtualmachinesonthesamediskareidling,ESXServerredistributesthisextra CPUtimeproportionally,basedonthevirtualmachinesandserviceconsolesCPU shares.Activevirtualmachinesbenefitwhenextraresourcesareavailable.Inthis example,thevirtualmachinegetsthreetimesasmuchCPUtimeastheserviceconsole, subjecttothespecifiedCPUpercentages.
VMware, Inc. 207

Administration Guide

Thatis,thevirtualmachinehasthreetimesasmuchCPUtimeastheserviceconsole, aslongasthevirtualmachinesCPUpercentageisbetween20%and50%.Inactuality, thevirtualmachinemightgetonlytwicetheCPUtimeoftheserviceconsole,because threetimestheCPUtimeexceeds50%,orthemaximumCPUpercentageofthevirtual machine. To modify CPU resource values: 1 ClickEdit. TheEditCPUResourceswindowappears. 2 3 Changethesettings. ClickOKtosavethesettingsandclosethewindow.

Ifyouarerunningalargenumberofvirtualmachinesonthesamediskastheservice console,considerincreasingtheminimumprocessorpercentage.Otherwise,youmight seeperformanceproblemswiththeserviceconsole,evenifthevirtualmachinesare idle. ClicktheDisktabtoviewinformationabouttheserviceconsoleprocessorusage.

Configuring the Service Consoles Disk Usage


Toreviewandconfiguretheserviceconsolesdiskusage,clicktheDisktab.

Figure 6-11. Disk tab TheDisktabshowsharddiskperformanceinformationandresourcesallocatedtothe serviceconsole.Diskbandwidthrepresentstheamountofdatathatiswrittentoorread fromtheserversphysicaldisks. ThevaluesunderPerformanceindicatehowmuchbandwidthisbeingusedwhenthe serviceconsoleisreadingfromorwritingtothephysicaldiskontheserver.

208

VMware, Inc.

Chapter 6 Administering ESX Server

TheSharesvaluerepresentsarelativemetricforcontrollingdiskbandwidth,where thisvalueiscomparedtothesumofallsharesofallvirtualmachinesonthesamedisk astheserviceconsoleandtheserviceconsoleitself. Forexample,theserviceconsoleandtwoVMFSpartitions,VMFSAandVMFSB,are locatedonthesameharddiskontheESXServersystem.Iftheserviceconsolehas2000 sharesandVMFSAandVMFSBeachhave1000shares,theserviceconsolehastwice thediskbandwidthofbothVMFSAandVMFSB. To modify the number of shares. 1 ClicktheEditlink.

2 3 4

Changethenumberofshares. ClickOKtosavethechangeandclosethewindow. ClicktheCPUtabtoviewinformationaboutserviceconsoleprocessorusage.

System Logs and Availability Report


FromtheOptionstaboftheVMwareManagementInterface,usetheSystemLogsand AvailabilityReportoptionstoviewthefollowinglogfilesandreportthroughthe managementinterface:
!

VMkernelwarningsandserioussystemalerts,thedataforwhichisgatheredfrom /var/log/vmkwarningintheserviceconsole.SeeViewingVMkernelWarnings onpage 210. VMkernelmessages,thedataforwhichisgatheredfrom/var/log/vmkernelin theserviceconsole.SeeViewingVMkernelMessagesonpage 211.

VMware, Inc.

209

Administration Guide

ServiceConsolemessages,thedataforwhichisgatheredfrom /var/log/messagesintheserviceconsole.SeeViewingServiceConsoleLogs onpage 212. Theavailabilityreport,whichcontainsinformationandstatisticsaboutserver uptimeanddowntime.SeeViewingtheAvailabilityReportonpage 213.

PeriodicallychecktheVMkernelwarningandalertmessagesforoutofmemoryerrors, hardwarefailures,andsoon. To view system log files and the availability report 1 2 3 Makesureyouareloggedintothemanagementinterfaceastherootuser. ClickOptions,andclickSystemLogs. Clicktheappropriatetabforthelogfileyouwanttoview.

Viewing VMkernel Warnings


ToviewVMkernelwarningsandserioussystemalerts,clicktheVMkernelWarnings tab.

Figure 6-12. VMkernel Warnings tab ThisinformationisusefulifyouareexperiencingproblemswithESXServeroryour virtualmachines.Ifyourlogcontainsanyalerts,checktheVMwareKnowledgeBaseat http://kb.vmware.comorcontactyourVMwaresupportrepresentative.

210

VMware, Inc.

Chapter 6 Administering ESX Server

Viewing VMkernel Messages


ToviewtheVMkernelmessagelog,clicktheVMkernelLogtab.

Figure 6-13. VMkernel Log tab ThisinformationisusefulifyouareexperiencingproblemswithESXServeroryour virtualmachines.Ifyourlogcontainsanyalerts,checktheVMwareKnowledgeBaseat http://kb.vmware.comorcontactyourVMwaresupportrepresentative.

VMware, Inc.

211

Administration Guide

Viewing Service Console Logs


Toviewserviceconsolemessages,clicktheServiceConsoleLogtab.

Figure 6-14. Service Console Log tab ThisinformationisusefulifyouareexperiencingproblemswithESXServeroryour virtualmachines.Ifyourlogcontainsanyalerts,checktheVMwareKnowledgeBaseat http://kb.vmware.comorcontactyourVMwaresupportrepresentative.

212

VMware, Inc.

Chapter 6 Administering ESX Server

Viewing the Availability Report


Toviewtheserveravailabilityreport,clicktheAvailabilityReporttab.

Figure 6-15. Availability Report tab Theavailabilityreportcontainsusefulinformationaboutserveruptimeanddowntime. Thisincludesdetailedstatisticsregardinguptimehistoryandananalysisofdowntime.

VMware, Inc.

213

Administration Guide

How Memory Is Utilized


TheMemoryUtilizationpaneshowshowmuchmemoryisbeingusedbytheESX Serverandhowmemoryresourcesareallocatedtovirtualmachines.SeeMemory ResourceManagementonpage 345.

Figure 6-16. Memory tab

System Summary: Physical Memory


Thislistshowsthecurrentallocationofphysicalmemoryontheserver:
! !

VirtualMachinesMemorycurrentlyallocatedtovirtualmachines. SharedCommonMemoryrequiredforthesinglecopyofmemoryshared betweenvirtualmachines. VirtualizationTotalvirtualizationoverheadforallvirtualmachinesandthe vmkernel. ServiceConsoleMemoryallocatedtotheServiceConsole. FreeMemorycurrentlyavailabletobeusedbythesystemorvirtualmachines. TotalTotalphysicalmemoryontheserver.

! ! !

Memory
!

MemorySavingsDuetoSharingAmountofmemorysavedbysharingmemory betweenvirtualmachines.

214

VMware, Inc.

Chapter 6 Administering ESX Server

ManyVMwareESXServerworkloadspresentopportunitiesforsharingmemory acrossvirtualmachines.Forexample,severalVMsmightberunninginstancesof thesameguestoperatingsystem,mighthavethesameapplicationsorcomponents loaded,ormightcontaincommondata.Insuchcases,VMwareESXServerusesa proprietarytransparentpagesharingtechniquetosecurelyeliminateredundant copiesofmemorypages.Withmemorysharing,aworkloadrunningasvirtual machinesoftenconsumeslessmemorythanitwouldwhenrunningonphysical machines.Asaresult,higherlevelsofovercommitmentcanbesupported efficiently.

System Summary: Reserved Memory


Thislistshowsthecurrentallocationofreservedmemoryandswapspaceontheserver. RAM
!

ReservedMemorycommittedforguaranteedallocationstoexistingvirtual machines. UnreservedUncommittedmemoryavailableforguaranteedallocationsto poweronnewvirtualmachines. TotalTotalreservedandunreservedRAMmemory.

Swap
! !

ReservedSystemswapfilespacecommittedforexistingvirtualmachines. UnreservedTotalunreservedswapfilespacecurrentlyavailabletobeusedby virtualmachines. TotalTotalreservedandunreservedspaceinsystemswapfiles.

Memory
!

MemoryAvailabletoPowerOnaVirtualMachineMaximummemorysizethat canbespecifiedwhenpoweringonthenextsingleordualprocessorvirtual machine.

Virtual Machines: Virtual Machine Summary


Foreachrunningvirtualmachine,thislistshowsabreakdownofthevirtualmachines memoryallocation. Memory
! !

PrivateTotalmemoryallocatedtovirtualmachinesthatisnotshared. SharedTotalmemoryallocatedtovirtualmachinesandsecurelysharedwith othervirtualmachines.


215

VMware, Inc.

Administration Guide

SwappedTotalmemoryforciblyreclaimedfromvirtualmachinesandstoredin systemswapfiles. BalloonDriverMemoryreclaimedfromvirtualmachinesbycooperationwith theVMwareTools(vmmemctldriver)andguestoperatingsystems. Thisisthepreferredmethodforreclaimingmemoryfromvirtualmachines, becauseitreclaimsthememorythatisconsideredleastvaluablebytheguest operatingsystem.Thesysteminflatestheballoondrivertoincreasememory pressurewithinthevirtualmachine,causingtheguestoperatingsystemtoinvoke itsownnativememorymanagementalgorithms.Whenmemoryistight,theguest operatingsystemdetermineswhichpagesofmemorytoreclaim,andswapsthem toitsownvirtualdisk.Thisproprietarytechniqueprovidespredictable performancethatcloselymatchesthebehaviorofanativesystemundersimilar memoryconstraints.

UnusedMemorythathasneverbeenaccessedbythevirtualmachines,andhas notyetbeenallocated. TotalTotalmemoryallocatedtovirtualmachines.

Virtual Machines: Virtual Machine Name


Foreachrunningvirtualmachine,thislistincludesabreakdownofthevirtual machinesmemoryallocation.
!

RAMMaximumamountofmemoryconfiguredforusebytheguestoperating systemrunninginthevirtualmachine.Thisvalueisoftenlargerthantheactual amountofmemorycurrentlyallocatedtothevirtualmachine,whichmayvary dependingonthecurrentlevelofmemoryovercommitment. PrivateMemoryallocatedtothevirtualmachinethatisnotshared. SharedMemoryallocatedtothevirtualmachinethatisshared. SwappedMemoryforciblyreclaimedfromthevirtualmachineandstoredinthe systemswapfiles. BalloonDriverMemoryreclaimedfromvirtualmachinesbycooperationwith theVMwareTools(vmmemctldriver)andtheguestoperatingsystem. UnusedMemorythathasneverbeenaccessedbythevirtualmachine,andhas notyetbeenallocated. ActiveMemorythathasbeenaccessedrecentlybythevirtualmachine. SwapI/ORateatwhichthevirtualmachineisreadingfromandwritingto systemswapfiles,inbytespersecond.

! ! !

! !

216

VMware, Inc.

Chapter 6 Administering ESX Server

Toadjusttheallocationofservermemorytoavirtualmachine,clickthevirtualmachine name.ThistakesyoutotheStatusMonitor,whereyouviewdetailsaboutthevirtual machine.ClickthevirtualmachinesMemorytabtosetthenumberofmemoryshares grantedtothevirtualmachine.

Virtual Machines Startup and Shutdown


FromtheOptionstaboftheVMwareManagementInterface,usethesystemwide VirtualMachineStartupandShutdownoptiontodothefollowing:
!

Configureyourservertodeterminewhethervirtualmachinesstartuporshut downwhenthesystemstartsorshutsdown. Setadelayforstartingorstoppingonevirtualmachinebeforestartingorstopping thenext.Thisdelayhelpspreventoverburdeningthesystemduetotheprocessor andmemorycapacitiesrequiredtosimultaneouslystartorstopmultipleguest operatingsystems. Determinetheglobalorderinwhichvirtualmachinesstartandstop.

Afterthesesettingsareenabledforthesystem,youcancustomizethesettingsforeach virtualmachine.SeeSettingStartupandShutdownOptionsforaVirtualMachineon page 123.

System Configuration Settings


Thesystemwidevirtualmachinestartupandshutdownoptionsinclude:
!

StartUpandShutdownVirtualMachinesWhethervirtualmachinesshouldbe startedandstoppedwiththesystem.Ifenabled,defaultstartupandshutdown policiesareappliedtoallvirtualmachinesonyoursystem(wherenovirtual machinesarepoweredonwhenthehostsystemstartsandallvirtualmachinesare shutdownwhenthehostsystemshutsdown).Youcancustomizeeachvirtual machinesstartupandshutdownpolicies. Ifdisabled,youcannotsetstartupandshutdownpoliciesforanyvirtualmachines onyoursystem.

ContinueStartingVirtualMachinesAfterSetsthetypeofdelaybetween startingupvirtualmachines.Youcansetthisto:
! ! !

DontWaitStartthenextvirtualmachineimmediately. <n>MinutesWait<n>numberofminutestostartthenextvirtualmachine. OtherSpecifyalongerintervaltowaitbeforestartingthenextvirtual machine.

VMware, Inc.

217

Administration Guide

whenVMWareToolsstartsWaituntilVMWareToolsisoperatinginthe currentvirtualmachinebeforestartingupthenextvirtualmachine. Thisoptionappliesanadditionalconditionforstartingupthenextvirtual machine.Itdoesnotoverridethedelayperiodsetinthepulldownmenu.

AttempttoContinueStoppingVirtualMachinesAfterSetsthedelaylimit betweeninitiatingshutdownsofvirtualmachines.Theserverwillstopthenext virtualmachineassoonasthecurrentvirtualmachineshutsdown.Ifthecurrent virtualmachinedoesnotshutdownwithinthedelaylimit,theserverattemptsto stopthenextvirtualmachine.Youcansetthisto:


! !

DontWaitStopthenextvirtualmachineimmediately. <n>MinutesatmostWait<n>numberofminutesforthecurrentvirtual machinetoshutdownbeforestoppingthenextvirtualmachine. OtherSpecifyalongerintervaltowaitforthecurrentvirtualmachinetoshut downbeforestoppingthenextvirtualmachine.

Enabling the Systems Configuration Settings


To enable the system-wide configuration settings for virtual machines 1 FromtheOptionstab,selectVirtualMachineStartupandShutdown. TheSystemConfigurationpaneappearsanddisplaysalistofconfiguration parameters.

UnderSystemConfiguration,clickEdit.

218

VMware, Inc.

Chapter 6 Administering ESX Server

TheSystemStartupandShutdownDefaultsdialogboxappears.

3 4

Toenablesystemwidestartupandshutdownpolicies,selecttheStartUpand ShutDownVirtualMachinescheckbox. ToconfigurewhenESXServershouldstartthenextvirtualmachineafteravirtual machinestarts,dooneorbothofthefollowing:


!

Tospecifyaperiodoftimebeforethenextvirtualmachinestarts,inthe ContinueStartingVirtualMachinesAfterlist,choosefromthenumberof minuteslistedorwhetherESXServershouldnotwaitbeforestartingthenext virtualmachine.Setadelaybetweenstartingvirtualmachinestoavoid placingaburdenonthehostsserversprocessorsandmemory. TospecifythatVMwareToolsshouldstartinavirtualmachinebeforethenext virtualmachinestarts,selectthewhenVMwareToolsstartcheckbox.If VMwareToolsdoesnotstartinthevirtualmachinebeforethespecifiedtime elapses,ESXServerstartsthenextvirtualmachine.

ToconfigurewhenESXServershouldstopthenextvirtualmachineafteravirtual machinestops,intheAttempttoContinueStoppingOtherVirtualMachines Afterlist,choosethenumberofminutesorwhetherESXServershouldnotwait beforestartingthenextvirtualmachine. ClickOKtosaveyoursettings. ClickCloseWindowtoreturntothemanagementinterfaceOptionspane.

6 7

VMware, Inc.

219

Administration Guide

Disabling the Systems Configuration Settings


To disable the system-wide configuration settings 1 UnderSystemConfiguration,clickEdit. TheSystemStartupandShutdownDefaultsdialogboxappears.

2 3

DeselecttheStartUpandShutDownVirtualMachinescheckboxandclickOK. ClickCloseWindowtoreturntothemanagementinterfacesOptionspane.

Specifying the Order In Which Virtual Machines Start


Afteryousetwhethervirtualmachinesshouldstartandstopwiththesystem,setthe orderinwhichthevirtualmachinesstartandstopandspecifythepositionofavirtual machineinthesystemwidestartupandshutdownsequence.Ifset,virtualmachines arelistedunderoneofthefollowingcategories:
!

SpecifiedOrderListsthevirtualmachinesintheorderinwhichtheyare configuredtostartandstop. AnyOrderListsthevirtualmachinesspecifiedtostartandstopinanyorder.

Editing the Startup Sequence for Virtual Machines


Toeditthestartupsequenceforvirtualmachines,clickEditunderStartupSequence. TheVirtualMachineStartupSequenceconfigurationpaneappearsanddisplaysthe virtualmachinesonyoursystem.

220

VMware, Inc.

Chapter 6 Administering ESX Server

Figure 6-17. Virtual Machine Startup Sequence configuration pane Tospecifythestartuporderforvirtualmachines,selectthecheckboxnexttooneor moremachines.Navigationarrowsbecomeactive,allowingyoutomovemachines betweenthethreelists.Virtualmachinescanbesettooneofthefollowingoptions:
!

OtherContainsvirtualmachinesthatarenotconfiguredtostartandstopwith thesystem. SpecifiedOrderListsvirtualmachinesintheorderinwhichtheyareconfigured tostart.Theorderinwhichthevirtualmachinesstopisthereverseoftheorderin whichtheystart,sothelastvirtualmachinetostartonsystemstartupisthefirstto stopwhenthesystemshutsdown.Tospecifythestartuporder,selectmachines andusethearrowstomovethemupordownwithinthelist. AnyOrderListsvirtualmachinesthatareconfiguredtostartandstopinany order.Movevirtualmachinestothiscategoryifyouwantthemtostartandstop withthesystem,butyoudonotwanttosettheorderforthosevirtualmachines. Thevirtualmachinesinthiscategorydonotstartorstopuntilallthevirtual machineslistedintheSpecifiedOrderlisthavestartedorstopped.

Rebooting or Shutting Down the Server


FromtheOptionstaboftheVMwareManagementInterface,usetheShutDownand RestartoptionstoshutdownandreboottheESXServersystem.Toshutdownorrestart avirtualmachine,seeShuttingDownandRestartingaVirtualMachineonpage 50.

VMware, Inc.

221

Administration Guide

To reboot the computer where ESX Server is running 1 Logintothemanagementinterfaceasroot. TheURLtoconnecttotheserverishttp://<hostname>. 2 3 4 OntheStatusMonitor,makesureallvirtualmachinesareshutdownor suspended. ClicktheOptionstab. ClickRestartreboottheserver. Apromptappears.

Enterthereasonforthereboot,andclickOK. Thisinformationisloggedforreliabilitymonitoring. Youareloggedoutofthemanagementinterfaceandthesystemreboots.

To shut down the computer where ESX Server is running 1 Logintothemanagementinterfaceasroot. TheURLtoconnecttotheserverishttp://<hostname>. 2 3 4 OntheStatusMonitor,makesureallvirtualmachinesareshutdownor suspended. ClicktheOptionstab. ClickShutDowntoshutdowntheserver.

Enterthereasonfortheshutdown,andclickOK. Thisinformationisloggedforreliabilitymonitoring. Youareloggedoutofthemanagementinterfaceandthesystemshutsdown.

222

VMware, Inc.

Using SNMP with ESX Server

Simplenetworkmanagementprotocol(SNMP)isacommunicationprotocolbetween anSNMPclient(forexample,aworkstation)andanSNMPagent(management softwarethatexecutesonaremotedeviceincludinghosts,routers,Xterminals,andso on).TheSNMPclientqueriestheSNMPagentthatprovidesinformationtotheclient regardingthedevicesstatus.TheSNMPagentcontrolsadatabasecalledtheSNMP ManagementInformationBase(MIB),astandardsetofstatisticalandcontrolvalues. SNMPallowstheextensionofthesestandardvalueswithvaluesspecifictoaparticular device. ThischaptercontainsthefollowingsectionsaboutusingSNMPwithESXServer:


! ! ! ! ! !

UsingSNMPtoMonitortheComputerRunningESXServeronpage 223 OverviewofSettingUpESXServerSNMPonpage 226 ConfiguringtheESXServerAgentonpage 227 ConfiguringSNMPonpage 230 UsingSNMPwithGuestOperatingSystemsonpage 231 VMwareESXServerSNMPVariablesonpage 231

Using SNMP to Monitor the Computer Running ESX Server


ESXServershipswithanSNMPagentthatallowsyoutomonitorthehealthofthe physicalmachinewhereESXServerisrunningandofvirtualmachinesrunningonit. ThisagentisbasedonNetSNMPwithenhancementstosupportdataspecifictoESX Server.BackgroundinformationonNetSNMPisavailableat http://netsnmp.sourceforge.net.
VMware, Inc. 223

Administration Guide

YoucanusetheESXServerSNMPagentwithanymanagementsoftwarethatcanload andcompileamanagementinformationbase(MIB)inSMIv1formatandcan understandSNMPv1trapmessages. ThelocationoftheVMwaresubtreeintheSNMPhierarchyis:


.iso.org.dod.internet.private.enterprises.vmware (.1.3.6.1.4.1.6876)

YoucanchoosetouseSNMPwithorwithoutanyspecificESXServerMIBitems.

Information About the Physical Computer


SNMPgetvariablesallowyoutomonitorawidevarietyofitemsaboutthephysical computerandhowvirtualmachinesareusingitsresources.Someofthekeytypesof informationavailableare:
! !

NumberofCPUsonthephysicalcomputer. CPUresourcesonthephysicalcomputerbeingusedbyparticularvirtual machines. AmountofRAMinstalledonthephysicalcomputer. Physicalmemoryusedbytheserviceconsole. Physicalmemoryusedbyparticularvirtualmachines. Physicalmemorythatisnotbeingused. Usagedatafordisksonthephysicalcomputer,includingnumberofreadsand writesandamountofdatareadandwritten. Usagedataonthephysicalcomputersnetworkadapters,includingpacketssent andreceivedandkilobytessentandreceived. StateoftheVMkernel(loadedornotloaded).

! ! ! ! !

NOTE

IfthevariableshowingwhethertheVMkernelisloadedisno,regardvaluesreported foranyothervariableasinvalid.

Information About the Virtual Machines


SNMPgetvariablesallowyoutomonitoranumberofitemsaboutparticularvirtual machinesrunningonthecomputer.Someofthekeytypesofinformationavailableare:
! ! !

Pathtothevirtualmachinesconfigurationfile Guestoperatingsystemrunningonthevirtualmachine Amountofmemorythevirtualmachineisconfiguredtouse

224

VMware, Inc.

Chapter 7 Using SNMP with ESX Server

! ! ! ! ! ! ! !

Stateofthevirtualmachinespowerswitch:onoroff Stateoftheguestoperatingsystem:onoroff(runningornotrunning) Diskadaptersseenbythevirtualmachine Networkadaptersseenbythevirtualmachine Floppydiskdrivesseenbythevirtualmachine Stateofthefloppydrive:connectedordisconnected CDROMdrivesseenbythevirtualmachine StateoftheCDROMdrive:connectedordisconnected

NOTE

SNMPinformationisprovidedforvirtualmachinesiftheirconfigurationfilesare storedlocallyontheESXServercomputer.Iftheconfigurationfilesarestoredonan NFSmounteddrive,informationforthevirtualmachinesdoesnotappearintheSNMP tables.

SNMP Traps
FourSNMPtrapsnotifyyouofcriticaleventsinparticularvirtualmachines.The affectedvirtualmachineisidentifiedbyIDnumberandconfigurationfilepath.The trapsnotifyyou:
! ! ! ! !

Whenavirtualmachineispoweredonorresumedfromasuspendedstate. Whenavirtualmachineispoweredoff. Whenthevirtualmachinedetectsalossofheartbeatintheguestoperatingsystem. Whenavirtualmachineissuspended. Whenthevirtualmachinedetectsthattheguestoperatingsystemsheartbeathas startedorresumed.

VMwareToolsmustbeinstalledintheguestoperatingsystemtosupportthetrapsthat detectlossandresumptionoftheguestsheartbeat. NOTE TrapsarenotgeneratedwhenvirtualmachinesareregisteredusingtheVMware ManagementInterface.Toenabletrapgeneration,restartvmware-serverd.Youcan restartvmware-serverdbyrebootingtheserverorbyloggingintotheserviceconsole asrootandissuingthecommandkillall -HUP vmware-serverd.

VMware, Inc.

225

Administration Guide

Overview of Setting Up ESX Server SNMP


ESXServer2.5includestwodaemons,amaster(snmpd),andasubagent (vmware-snmpd),asillustratedinFigure 71.Themastersnmpddaemoniseitherthe defaultsnmpddaemonshippedwithESXServerorathirdpartySNMPapplication daemon.Thesubagentvmware-snmpdexportsESXServerMIBinformationtothe masterthatcommunicatesdirectlywiththeSNMPclientapplication.
Master Subagent vmware-snmpd Third party snmpd or Default snmpd

Client

ESX Server service console

Figure 7-1. ESX Server 2.5 setup

Installing the ESX Server SNMP Agents


ThedefaultmastersnmpddaemonandtheVMwarespecificvmware-snmpd daemon areautomaticallyinstalledwhenyouinstallESXServer. ToseeESXServerMIBitems,configuretheESXServerSNMPsubagent (vmware-snmpd).IfyouarentinterestedinESXServerspecificSNMPitems,donot configurethatparticularsubagent. ConfiguretheESXServerSNMPsubagentafteryouhaveinstalledandconfiguredESX ServerthroughtheVMwareManagementInterface.YoucanconfiguretheESXServer SNMPsubagentbyusingascriptorthroughtheVMwareManagementInterface. Dependingonyourpreference,completeoneofthefollowing:
!

ConfiguringtheESXServerAgentThroughtheVMwareManagementInterface onpage 227 ConfiguringtheESXServerAgentfromtheServiceConsoleonpage 228

ConfigureyourSNMPtrapdestinations.SeeConfiguringSNMPTrapDestinations onpage 230.

226

VMware, Inc.

Chapter 7 Using SNMP with ESX Server

Configuring the ESX Server Agent


YoucanconfiguretheESXServeragentintwoways,describedinthesesections:
!

ConfiguringtheESXServerAgentThroughtheVMwareManagementInterface, next ConfiguringtheESXServerAgentfromtheServiceConsoleonpage 228

Configuring the ESX Server Agent Through the VMware Management Interface
ThissectiondescribeshowtousetheVMware Management Interfacetoconfigurethe ESX Server Agent.Toconfiguretheagentusingtheserviceconsole,referto ConfiguringtheESXServerAgentfromtheServiceConsoleonpage 228. To configure the ESX Server SNMP subagent 1 LogintotheVMwareManagementInterfaceasroot. TheStatusMonitorappears. 2 3 ClicktheOptionstab. ClickSNMPConfiguration. Theoptionsonthistabtogglebetweentwochoices.Tochangeanoption,clickthe link.

VMware, Inc.

227

Administration Guide

Makesurethepathstothesnmpddaemonstartupscriptanditsconfigurationfile arecorrect. Ifeitheroftheseisincorrect,clickChangeandtypethecorrectpath.

5 6 7

MakesurethatthestatusofthemasterSNMPagentisRunning. IfyoureinterestedinVMwarespecificSNMPMIBs,makesurethestatusand VMwaretrapsoftheVMwareSNMPsubagentisEnabled. Optional:IfyouwantthemasterSNMPagent(andtheVMwareSNMPsubagent, ifitsstatusisEnabled)tostartautomaticallyuponbooting,makesuretheStartup TypeisAutomatic. Configureyourtraps.SeeConfiguringSNMPTrapDestinationsonpage 230.

Configuring the ESX Server Agent from the Service Console


Usethesnmpsetup.shscripttoconfiguretheESXServerSNMPsubagenttoworkwith thedefaultsnmpdorwithathirdpartymanagementapplication. NOTE IfyourenotinterestedinVMwarespecificSNMPmodules,dontrunthisscript.This scriptsetsupaconnection,betweenthemastersnmpddaemonandthevmware-snmpd daemon,whichenablesaccesstoESXServerMIBitems. CAUTION Donotusethesnmpsetup.shscripttosetupthirdpartySNMPdaemons.

Configuring the Default SNMP Daemon


ConfigureESXServertouseeitherthedefaultSNMPdaemonoryourselectionofthird partymanagementapplications.ConfigurethedefaultSNMPdaemonthroughthe serviceconsoleusingoneofthefollowingprocedures. To use the VMware SNMP daemon with the default SNMP daemon 1 2 Logintotheserviceconsoleastherootuser. Typethefollowingtorunthescript:
snmpsetup.sh default

Thedefaultoptionsetsupthesnmpd.conffileforthedefaultmasterSNMP daemon.Thisconnectssnmpdtovmware-snmpd,enablingyoutoqueryforESX ServerMIBitems. ThescriptstartsboththemasterandsubagentSNMPdaemons.

228

VMware, Inc.

Chapter 7 Using SNMP with ESX Server

To use the VMware SNMP Daemon with Third Party Management Applications 1 Installyourthirdpartymanagementapplication. RefertoyourmanagementapplicationdocumentationandtheESXServerrelease notesatwww.vmware.com/support/pubs/esx_pubs.html. 2 3 Logintotheserviceconsoleastherootuser. Typethefollowingtorunthescript:
snmpsetup.sh connect

TheconnectoptionconfiguresexportingESXServerMIBitemsthroughyour thirdpartySNMPdaemon.UsethisoptiontoenabletheexportofESXServerMIB itemsafterinstallingthethirdpartymanagementapplication. Thescriptconnectsthethirdpartyapplicationsnmpddaemonwiththe vmware-snmpdsubagentdaemon. Thescriptstartsbothdaemons.

Starting the SNMP Agents Automatically


YoucansetthemasterandsubagentSNMPdaemonstostartwheneverESXServer bootsbylogginginastherootuserintheserviceconsoleandrunningthechkconfig commands:
chkconfig snmpd on chkconfig vmware-snmpd on

ThefirstcommandenablesstartingthemasterSNMPdaemon(eitherthedefault SNMPdaemonshippedwithESXServeroryourthirdpartymanagementapplication SNMPdaemon)onstartup. Thesecondcommandenablesstartingthesubagentvmware-snmpddaemononstartup. NOTE Themastersnmpddaemoncanrunbyitselfortogetherwiththesubagent vmware-snmpddaemon.However,thesubagentdaemoncannotrunalone.

Starting the SNMP Agents Manually


TostarttheSNMPagentsmanually,loginasrootintheserviceconsoleandrunthe followingcommands:
/etc/rc.d/init.d/snmpd start /etc/rc.d/init.d/vmware-snmpd start

ThefirstcommandstartsthemasterSNMPdaemon(eitherthedefaultSNMPdaemon shippedwithESXServeroryourthirdpartymanagementapplicationSNMPdaemon).

VMware, Inc.

229

Administration Guide

Thesecondcommandstartsthesubagentvmware-snmpddaemon. Bydefault,theagentsstartandrunasbackgroundprocesses. NOTE Themastersnmpddaemoncanrunbyitselfortogetherwiththesubagent vmware-snmpddaemon.However,thesubagentdaemoncannotrunalone.

Configuring SNMP
ThefollowingsectionsdiscussSNMPconfigurationoptionsforsettingtrap destinations,configuringmanagementclientsoftware,securitysettings,andguest operatingsystemconfiguration.

Configuring SNMP Trap Destinations


YoucannotconfiguretrapdestinationsthroughtheVMwareManagementInterface. To configure traps 1 2 Logintotheserviceconsoleastherootuserandmodifythe /etc/snmp/snmpd.conffile. Usingatexteditor,addthefollowingline,replacingmercury.solar.comwiththe nameofthehostonyournetworkthatwillreceivetraps.
trapsink mercury.solar.com

Repeatthislinetospecifymorethanonedestination. 3 Addthefollowingline,replacingpublicwithacommunitynameofyourchoice.
trapcommunity public

Therecanbeonlyoneinstanceofthisline. 4 Saveyourchanges. Ifyouuseafileotherthan/etc/snmp/snmpd.conf,makesurethefilename iscorrectlyspecifiedontheSNMPconfigurationpageinthemanagement interface.

NOTE

Configuring SNMP Management Client Software


TouseyourSNMPmanagementsoftwarewiththeESXServeragent,takethesteps neededtoaccomplishthefollowing:
!

Inyourmanagementsoftware,specifytheESXServermachineasanSNMPbased manageddevice.

230

VMware, Inc.

Chapter 7 Using SNMP with ESX Server

Setupappropriatecommunitynamesinthemanagementsoftware.Thesemust correspondtothevaluessetinthemasterSNMPagentsconfigurationfile,for example,rocommunity,trapcommunity,andtrapsink. LoadtheESXServerMIBsintothemanagementsoftwaresoyoucanviewthe symbolicnamesfortheESXServervariables.YoucanfindtheMIBfileson VMwareESXServer,inthe/usr/lib/vmware/snmp/mibsdirectory.

Configuring SNMP Security


TheESXServerSNMPpackagetakesthesimplestapproachtoSNMPsecurityinthe defaultconfiguration.Itsetsupasinglecommunitywithreadonlyaccess.Thisis denotedbytherocommunityconfigurationparameterintheconfigurationfileforthe mastersnmpddaemon,snmpd.confwhichissetupforyoubyrunningsnmpsetup.sh default. Bydesign,SNMPisnotasecureprotocol,andthecommunitybasedsecuritymodelis aretrofittotheprotocol.OtherenhancementstotheSNMPsecuritymechanismallow anadministratortosetupamoreelaboratepermissionsscheme.Seethe snmpd.conf(5)manpagefordetails.

Using SNMP with Guest Operating Systems


TouseSNMPtomonitorguestoperatingsystemsorapplicationsrunninginvirtual machines,installtheSNMPagentsyouwouldnormallyuseintheguestoperating systems.NospecialconfigurationisrequiredonESXServer. Thevirtualmachineusesitsownvirtualhardwaredevices.Donotinstallinthevirtual machineagentsintendedtomonitorhardwareonthephysicalcomputer.

VMware ESX Server SNMP Variables


The VMware enterprise tree consists of several groups and is located at .iso.dod.org.internet.private.enterprises.vmware. (.1.3.6.1.4.1.6876.)

Thevariablesineachgroupappearinthetablesbelow. NOTE Allvariablesarereadonly. ThedatatypefieldreferstotheSNMPtypedescribedbythestructureofmanagement information(SMI).

vmware.vmwSystem
Thisgroupconsistsofthreevariablesprovidingbasicinformationaboutthesystem.

VMware, Inc.

231

Administration Guide

Table 7-1. vmware.vmwSystem variables


Name vmwProdName vmwProdVersion vmwProdOID Data type Displaystring Displaystring ObjectID Description Productname. Productversion. AuniqueidentifierforthisproductintheVMware MIB.ThisIDisuniquealsowithinversionsofthe sameproduct. Productbuildnumber.

vmwProdBuild

Displaystring

vmware.vmwVirtMachines
Thisgroupconsistsofvirtualmachineconfigurationinformationinsixtables. vmTable Containsinformationonvirtualmachinesthathavebeenconfiguredonthe system.Eachrowprovidesinformationaboutaparticularvirtualmachine. Table 7-2. vmTable
Name vmIdx (Indexfield) vmDisplayName vmConfigFile vmGuestOS vmMemSize vmState vmVMID Data type Integer Displaystring Displaystring Displaystring Integer Displaystring Integer Description Dummynumberforanindex. Namebywhichthisvirtualmachineisdisplayed. Pathtotheconfigurationfileforthisvirtual machine. Operatingsystemrunningonthisvirtualmachine. MemoryconfiguredforthisvirtualmachineinMB. Virtualmachineonoroff. Ifavirtualmachineisactive,anIDisassignedtoit (likeapid).Notallvirtualmachinesmaybeactive, sothiscannotbeusedastheindex. Guestoperatingsystemonoroff.

vmGuestState

Displaystring

hbaTable Containsdiskadaptersseenbythisvirtualmachine. Table 7-3. hbaTable


Name hbaVmIdx (Indexfield) hbaIdx (Indexfield) Data type Integer Integer Description Correspondstotheindexofthevirtualmachinein vmTable. AcorrespondencetotheorderoftheSCSIdevice moduleloadedintotheVMkernel.

232

VMware, Inc.

Chapter 7 Using SNMP with ESX Server

Table 7-3. hbaTable (Continued)


Name hbaNum hbaVirtDev Data type Displaystring Displaystring Description Devicenumber(format:scsi*). Virtualdevicenameforthisadapter.

hbaTgtTable ContainsSCSItargetsseenbythisvirtualmachine. Table 7-4. hbaTgtTable


Name hbaTgtVmIdx (Indexfield) hbaTgtIdx (Indexfield) hbaTgtNum Data type Integer Integer Displaystring Description Correspondstotheindexofthevirtualmachine invmTable. Dummytargetindex. Targetdescription(format:scsi<hba>:<tgt>).

netTable Containsnetworkadaptersseenbythisvirtualmachine. Table 7-5. netTable


Name netVmIdx (Indexfield) netIdx (Indexfield) netNum netName Data type Integer Integer Displaystring Displaystring Description Correspondstotheindexofthevirtualmachinein vmTable. Indexforthistable. Devicenumber.(format:ethernet*) DevicenameofVMkerneldevicethatthisvirtual networkadapterismappedto.(format:vmnic*or vmnet*) Connectiontype(userorvirtualmachinemonitor device).

netConnType

Displaystring

floppyTable Containsfloppydrivesseenbythisvirtualmachine. Table 7-6. floppyTable


Name fdVmIdx (Indexfield) fdIdx (Indexfield) Data type Integer Integer Description Correspondstotheindexofthevirtualmachine invmTable. Indexintofloppytable.Orderofthefloppy deviceonthisvirtualmachine.

VMware, Inc.

233

Administration Guide

Table 7-6. floppyTable (Continued)


Name fdName fdConnected Data type Displaystring Displaystring Description Devicenumber/name(/dev/fd0,etc.NULLifnot present). Isthefloppydriveconnected(mounted)?

cdromTable ContainsCDROMdrivesseenbythisvirtualmachine. Table 7-7. cdromTable


Name cdVmIdx (Indexfield) cdromIdx (Indexfield) cdromName cdromConnected Data type Integer Integer Displaystring Displaystring Description Correspondstotheindexofthevirtualmachine invmTable. IndexintoCDROMtable.OrderoftheCDROM deviceonthisvirtualmachine. Devicenumber/name(/dev/CDROM,etc.NULL ifnotpresent). IstheCDROMdriveconnected(mounted)?

vmware.vmwResources
Thisgroupcontainsstatisticsonthephysicalmachinesresourcescategorizedinto severalsubgroups. vmware.vmwResources.vmwCPU ThisgroupcontainsCPUrelatedinformationinonevariableandonetable. Table 7-8. vmware.vmwResources.vmwCPU
Name numCPUs Data type Integer Description NumberofphysicalCPUsonthesystem.

cpuTable CPUusagebyvirtualmachine. Table 7-9. cpuTable


Name cpuVMID (Indexfield) Data type Integer Description IDallocatedtorunningvirtualmachinebythe VMkernel.

234

VMware, Inc.

Chapter 7 Using SNMP with ESX Server

Table 7-9. cpuTable (Continued)


Name cpuShares cpuUtil Data type Integer Integer Description ShareofCPUallocatedtovirtualmachineby VMkernel. Amountoftimethevirtualmachinehasbeen runningontheCPU(seconds).

vmware.vmwResources.vmwMemory
ThisgroupcontainsRAMinformationinthreevariablesandonetable. Table 7-10. vmware.vmwResources.vmwMemory
Name memSize memCOS memAvail Data type Integer Integer Integer Description Amountofphysicalmemorypresenton machine(KB). Amountofphysicalmemoryusedbytheservice console(KB). Amountofphysicalmemoryavailable/free(KB).

memTable Containsmemoryusagebyvirtualmachine. Table 7-11. memTable


Name memVMID (Indexfield) memShares memConfigured memUtil Data type Integer Integer Integer Integer Description IDallocatedtorunningvirtualmachinebythe VMkernel. Sharesofmemoryallocatedtovirtualmachineby VMkernel. Amountofmemorythevirtualmachinewas configuredwith(KB). Amountofmemoryutilizedbythevirtual machine(KB;instantaneous).

vmware.vmwResources.vmwHBATable
Thisgroupcontainsphysicaldiskadapterandtargetsinformationinonetable.

VMware, Inc.

235

Administration Guide

vmwHBATable Diskadapterandtargetinformationtable. Table 7-12. vmwHBATable


Name hbaIdx (Indexfield) hbaName hbaVMID diskShares numReads kbRead numWrites kbWritten Data type Integer Displaystring Integer Integer Integer Integer Integer Integer Description IndexintotableforHBA(correspondstotheorder oftheadapteronthephysicalcomputer). Stringdescribingthedisk.(format: <devname#>:<tgt>:<lun>) IDassignedtorunningvirtualmachinebythe VMkernel. Shareofdiskbandwidthallocatedtothisvirtual machine. Numberofreadstothisdisksincediskmodule wasloaded. KBreadfromthisdisksincediskmodulewas loaded. Numberofwritestothisdisksincediskmodule wasloaded. KBwrittentothisdisksincediskmodulewas loaded.

vmware.vmwResources.vmwNetTable
Thisgroupcontainsnetworkstatisticsorganizedbynetworkadapterandvirtual machine,inonetable. vmwNetTable Networkadapterstatistics. Table 7-13. vmwNetTable
Name netIdx (Indexfield) netName netVMID ifAddr netShares Data type Integer Displaystring Integer Displaystring Integer Description IndexintotableforNet(correspondstotheorderofthe adapteronthephysicalcomputer). Stringdescribingthenetworkadapter(format:vmnic* orvmnet*). IDassignedtorunningvirtualmachinebythe VMkernel. MACaddressofvirtualmachinesvirtualnetwork adapter. Shareofnetbandwidthallocatedtothisvirtual machine.(reservedforfutureuse)

236

VMware, Inc.

Chapter 7 Using SNMP with ESX Server

Table 7-13. vmwNetTable (Continued)


Name pktsTx kbTx pktsRx kbRx Data type Integer Integer Integer Integer Description Numberofpacketstransmittedonthisnetwork adaptersincenetworkmodulewasloaded. KBsentfromthisnetworkadaptersincenetwork modulewasloaded. Numberofpacketsreceivedonthisnetworkadapter sincenetworkmodulewasloaded. KBreceivedonthisnetworkadaptersincesystemstart.

vmware.vmwProductSpecific
Thisgroupcontainsvariablescategorizedintoproductspecificsubgroups.

vmware.vmwProductSpecific.vmwESX
ThisgroupcontainsvariablesspecifictoVMwareESXServer.

vmware.vmwProductSpecific.vmwESX.esxVMKernel
ThisgroupcontainsvariablesspecifictoVMwareESXServersVMkernel.Itcontains onevariable. Table 7-14. vmware.vmwProductSpecific.vmwESX.esxVMKernel
Name vmkLoaded Data type Displaystring Description HastheVMkernelbeenloaded?(yes/no)

NOTE

IfthevariableshowingthestateoftheVMkernelisno,anyvaluesreportedfor quantitativevariablesshouldberegardedasinvalid.

vmware.vmwTraps
ThisgroupcontainsthevariablesdefinedforVMwaretrapsandrelatedvariablesfor usebythetrapreceiver(forexample,snmptrapd). Table 7-15. vmware.vmwTraps
Name vmPoweredOn vmPoweredOff vmSuspended Data type Trap Trap Trap Description Sentwhenavirtualmachineispoweredonor resumedfromasuspendedstate. Sentwhenavirtualmachineispoweredoff. Sentwhenavirtualmachineissuspended.

VMware, Inc.

237

Administration Guide

Table 7-15. vmware.vmwTraps (Continued)


Name vmHBLost vmHBDetected vmID Data type Trap Trap Integer Description Sentwhenavirtualmachinedetectsalossinguest heartbeat. Sentwhenavirtualmachinedetectsorregainsthe guestheartbeat. ThevmIDoftheaffectedvirtualmachineinthe precedingtraps.IfthevmIDisnonexistent,(suchas forapowerofftrap)1isreturned. Theconfigurationfileoftheaffectedvirtualmachine intheprecedingtraps.

vmConfigFile

Displaystring

vmware.vmwOID
Therearenovariablesinthisgroup.Thisgroupisusedtoallocateauniqueidentifier fortheproductdenotedbythevmwSystem.vmwOIDvariable.

vmware.vmwExperimental
Therearenovariablesinthisgroup.ThisgroupisreservedforVMwareephemeral, experimentalvariables.

238

VMware, Inc.

Using VMkernel Device Modules

TheESXServervirtualizationlayer,alsoknownastheVMkernel,runsonthenative hardware.Itmanagesalltheoperatingsystemsonthemachine,includingboththe serviceconsoleandtheguestoperatingsystemsrunningoneachvirtualmachine. TheVMkernelsupportsdevicedrivermodules.Usingthesemodules,theVMkernel canprovideaccesstoalldevicesontheserver. Thischapterincludesthefollowingsections:


! !

ConfiguringYourServertoUseVMkernelDeviceModulesonpage 239 ControllingVMkernelModuleLoadingDuringBootuponpage 243

Configuring Your Server to Use VMkernel Device Modules


Throughtheserviceconsole,youcanconfigureyourservertouseVMkerneldevice modules.

Loading VMkernel Device Modules


TheinstallationprocessshoulddetectthedevicesthatareassignedtotheVMkernel andautomaticallyloadappropriatemodulesintotheVMkerneltomakeuseofthese devices. YoumightwanttoloadVMkerneldevicemodulesexplicitly.Modulessupportedinthis releasearelocatedin /usr/lib/vmware/vmkmod.Thecommandvmkload_mod(1) loadsVMkernelmodules.

VMware, Inc.

239

Administration Guide

VMkernel Module Loader


Theprogramvmkload_modisusedtoloaddevicedriverandnetworkshapermodules intotheVMkernel.vmkload_modcanalsobeusedtounloadamodule,listtheloaded modulesandlisttheavailableparametersforeachmodule. Theformatforthecommandis: vmkload_mod <options> <module-binary> <module-tag> <parameters> where<module-binary>isthenameofthemodulebinarythatisbeingloaded. <module-tag>isthenamethattheVMkernelassociateswiththeloadedmodule.The tagcanbeanystringoflettersandnumbers.Ifthemoduleisadevicedriver,the VMkernelnamesthemodulewiththe<module-tag>plusanumberstartingfrom zero.Iftherearemultipledeviceinstancescreatedbyloadingthemoduleormultiple devicedrivermodulesloadedwiththesametag,eachdevicegetsauniquenumber basedontheorderinwhichdeviceinstancesarecreated. The<module-binary>and<module-tag>partsofthecommandlinearerequired whenamoduleisloadedandareignoredwhenthe --unload,--listand --showparamoptionsareused.The<parameters>partofthecommandlineis optionalandisusedonlywhenamoduleisbeingloaded.

Options
-l --list Liststhecurrentmodulesloaded.Ifthe-loptionisgiven,otherargumentsonthe commandlineareignored. -u <module-binary> --unload <module-binary> Unloadthemodulenamed<module-binary>. -v --verbose Beverboseduringthemoduleloading. -d <scsi-device-name> --device <scsi-device-name> ThemodulebeingloadedisforaSCSIadapterthatiscurrentlybeingusedbythe serviceconsole.AfterthemoduleisloadedtheSCSIadapteriscontrolledbythe VMkernelbuttheserviceconsolecontinuestobeabletoaccessallSCSIdevices.

240

VMware, Inc.

Chapter 8 Using VMkernel Device Modules

Theformatof<scsi-device-name>is<PCI-Bus>:<PCI-slot>. -e --exportsym Exportallglobalexportedsymbolsfromthismodule.Thisallowsothermodulestouse exportedfunctionsandvariablesfromtheloadedmodule.Donotusethisoptionfor normaldevicedriverandshapermodulesbecausetheremightbesymbolconflicts. -s --showparam Listallavailablemoduleparametersthatcanbespecifiedinthe<parameter>section ofthecommandline.

Parameters
Modulescanspecifyparametersthatcanbesetonthecommandline.Alistofthese parametersisshownviathe--showparamoption.Inordertosetoneofthese parameters,youmustspecifyanamevaluepairattheendofthecommandline.The syntaxisoftheform<name>=<value>.Anynumberofparameterscanbespecified.

Examples
vmkload_mod ~/modules/e100.o vmnic debug=5 Loadsthemodule~/modules/e100.ointotheVMkernel.Thetagforthismoduleis vmnic.EachEEProcardthatwasassignedtotheVMkernelisgiventhename vmnic<#>,where<#>startsat0.Forexample,iftherearetwoEEProcardsassignedto theVMkernel,theyhaveVMkernelnamesofvmnic0andvmnic1.Themodule parameterdebugissettothevalue5. vmkload_mod --device 0:12 ~/modules/aic7xxx.o vmhba Loadsthemodule~/modules/aic7xxx.ointotheVMkernel.Thetagforthismodule isvmhba.TheAdaptecSCSIadapteriscurrentlybeingusedbytheserviceconsole.The SCSIadapterislocatedonPCIbus0,slot12. vmkload_mod --exportsym ~/modules/vmklinux linuxdrivers Loadsthemodule~/modules/vmklinuxintotheVMkernel.Allexportedsymbols fromthismoduleareavailabletoothermodulesthataresubsequentlyloaded.The vmklinuxmoduleisthemodulethatallowsLinuxdevicedriverstoruninthe VMkernelsoitisoneofthefewmodulesforwhichthe--exportsymoptionmakes sense. Followingareseveralexamplesofcommandlinesthatloadvariousmodules.

VMware, Inc.

241

Administration Guide

Preparing to Load Modules


vmkload_mod -e /usr/lib/vmware/vmkmod/vmklinux linux Thiscommandmustbegivenbeforeyouloadotherdevicemodules.Itloadscommon codethatallowstheVMkerneltomakeuseofmodulesderivedfromLinuxdevice driverstomanageitshighperformancedevices.The-eoptionisrequiredsothatthe vmklinuxmoduleexportsitssymbols,makingthemavailableforusebyother modules.

Loading Modules
vmkload_mod /usr/lib/vmware/vmkmod/e100.o vmnic vmkload_mod /usr/lib/vmware/vmkmod/aic7xxx.o vmhba ThefirstofthesecommandsloadsamoduletocontroltheEEProEthernetdevice(s) reservedfortheVMkernel.ThesecondloadsamoduletocontroltheAdaptecSCSI device(s).Thelastargumentsupplied(vmnicandvmhbaintheaboveexamples) determinesthebasenamethatVMwareusestorefertothedevice(s)intheVMware virtualmachineconfigurationfile. Forexample,supposeyourmachinehastwoEEProEthernetcardsandthreeAdaptec SCSIcards,andyouassignedoneEthernetcardandtwoSCSIcardstotheVMkernel duringtheinstallationprocess.Afteryouissuethetwocommandsabove,theEEPro EthernetcardassignedtotheVMkernelisgiventhenamevmnic0andthetwoSCSI cardsassignedtotheVMkernelaregiventhenamesvmhba0andvmhba1. NOTE YouneedtoloadtheAdaptecVMkernelmoduleonce,eventhoughtwoAdaptecSCSI cardsareassignedtotheVMkernel. TheVMkernelcanalsoshareSCSIadapterswiththeserviceconsole,ratherthan exclusivelycontrollingthem.TheinstallationprocessallowsyoutospecifySCSI adaptersthataresharedandloadthedevicemoduleappropriately.However,ifyou wishtocontrolthesharingexplicitly,assigntheSCSIdevicetotheserviceconsole duringtheinstallationprocess.LoadtheVMkernelSCSImoduleusingthefollowing syntax: vmkload_mod -d bus:slot /usr/lib/vmware/vmkmod/aic7xxx.o vmhba Toobtainthebusandslot(alsoknownasdeviceorcardnum)information,examine /proc/pci,outputfromthescanpcicommand,orboth. NOTE Thedevicemustbecorrectlyassignedtotheserviceconsole.Devicesassigned exclusivelytotheVMkernelduringtheinstallationprocessnolongerappearin /proc/pci.

242

VMware, Inc.

Chapter 8 Using VMkernel Device Modules

AfteryouloadaVMkerneldevicemodule,anentryappearsin/proc/vmware/netor /proc/vmware/scsi.Forexample,whene100.oisloadedasdescribedabove,the entry/proc/vmware/net/vmnic0appears,indicatingthereisoneEEProcard controlledbytheVMkernelandavailableasvmnic0tothevirtualmachines.See CreatingandConfiguringVirtualMachinesonpage 39forinformationonhowto configurevirtualmachinestouseVMkerneldevices.

Other Information about VMkernel Modules


TheonlynondeviceVMkernelmoduleavailableinthisreleaseofVMwareESXServer isthenfshapermodule,whichprovidessupportfornetworkfiltering,asdescribedin ManagingNetworkBandwidthonpage 367. Loadnfshaperusingthefollowingsyntax: vmkload_mod /usr/lib/vmware/vmkmod/nfshaper.o nfshaper VMkernelmodulesmustbereloadedeachtimetheVMkernelisloaded(asdescribed inLoadingVMkernelDeviceModulesonpage 239).

Controlling VMkernel Module Loading During Bootup


YoucancustomizetheloadingofVMkerneldevicedrivermodulesduringstartupby editingoneofthefollowingfiles:
!

/etc/vmware/hwconfigAutomaticallysupplyextraparameterstoadriver whenitisloadedduringbootup. /etc/vmware/vmkmodule.confSupplyextraparameterstoadriver,addor preventadrivermodulefromloading,ordeterminetheorderinwhichthedriver modulesareloadedduringbootup.

CAUTION Editingthesefilesisrecommendedforadvancedusersonly.Ifyouhaveany questions,contactyourauthorizedserviceproviderbeforeeditingthese files.

Customizing Parameters of VMkernel Device Driver Modules on Startup


Youcansupplyextraparameterstobepassedtoadriverwhenitisloadedduring bootup.Youdothisbyeditingthefile/etc/vmware/hwconfig.Thisfilecontains informationaboutthehardwareonyoursystem,includingdevicedrivermodules.

VMware, Inc.

243

Administration Guide

CAUTION Donotmodify/etc/vmware/hwconfigexcepttoaddparameters,as describedinthissection.UsetheVMwareManagementInterfacetomanage yourhardware. AsanexampleofpassingaparametertotheEmulexdevicedriver,identifythebus, slot,andfunctionholdingthefirst(oronly)Emulexcard.(Findthisinformationinthe StartupProfilepaneoftheOptionstab.)Addalinewiththeformat: device.vmnix.6.14.0.options = "lpfc_delay_rsp_err=0" totheendof/etc/vmware/hwconfig.Thenumbers6.14.0specifythebus,slot,and functionwheretheEmulexcardislocated.IfyouhavemorethanoneEmulexcard,you shouldhaveonlyalinereferencingthefirstcard.

Customizing Loading of VMkernel Device Driver Modules on Startup


Youcancustomizetheloadingofmodulesatstartupbyeditingthe /etc/vmware/vmkmodule.conffile.Byaddingorremovingentriesfromthisfile,you canaddorpreventadevicedrivermodulefromloading.Also,byrearrangingtheorder ofthedevicedrivermodulesinthisfile,youcanspecifytheorderinwhichthese modulesareloadedduringstartup.Youcanalsosupplyextraparameterstoadriver whenitisloadedonstartup. NOTE Ifyouusethisfiletocustomizetheloadingofdevicedrivermodules,youmust manuallyupdatethisfilewheneveryouaddnewhardware.VMwarerecommends usingtheVMwareManagementInterfacetomanageyourhardware,orifyouneedto addparameters,editingthehwconfigfileasdescribedintheprevioussection. Thevmkmodule.conffiletakeseffectonlyifitcontainsacommentlinecontainingthe keywordMANUAL-CONFIG.Otherwise,theconfigurationisobtainedautomaticallyfrom themanagementinterface. Eachnonblanklinethatdoesnotbeginwith#shouldcontainthenameofamodule file,thetagtobeassociatedwiththemoduleintheVMkernelandpossiblyasharing specification(theargumentspecifiedwiththe-dflagabove).Themodulefileshould justbethebasefilename,withoutthe /usr/lib/vmware/...path. Asamplevmkmodule.conffileis:
# MANUAL-CONFIG vmklinux.o linux nfshaper.o nfshaper e100.o vmnic aic7xxx.o vmhba -d 0:1

244

VMware, Inc.

Storage and File Systems

ThischaptercontainsinformationaboutSCSIdisks,accessedbylocalSCSIadapters,or onaStorageAreaNetwork(SAN)byFibreChanneladapters.Instructionsgivenfor usingSCSIadaptersapplytobothlocalandFibreChanneladapters. ForadditionalinformationaboutconfiguringSANs,seetheVMwareSANConfiguration Guideatwww.vmware.com/support/pubs/esx_pubs.html. Thischapterprovidesthefollowinginformation:


! ! ! ! ! ! ! !

FileSystemManagementonSCSIDisksandRAIDonpage 245 Usingvmkfstoolsonpage 249 AccessingRawSCSIDisksonpage 261 DeterminingSCSITargetIDsonpage 263 SharingtheSCSIBusonpage 264 UsingStorageAreaNetworkswithESXServeronpage 266 UsingPersistentBindingsonpage 270 UsingMultipathinginESXServeronpage 272

File System Management on SCSI Disks and RAID


VMFS(VMwareESXServerFileSystem)isasimple,highperformancefilesystemon physicalSCSIdisksandpartitions,usedforstoringlargefilessuchasthevirtualdisk imagesforESXServervirtualmachinesand,bydefault,thememoryimagesof suspendedvirtualmachines.TheVMFSalsostorestheredologfilesforvirtual

VMware, Inc.

245

Administration Guide

machinesinnonpersistent,undoable,orappenddiskmodes.Forinformationondisk modes,seeCreatingaNewVirtualMachineonpage 39. ESXServer2.5supportstwotypesoffilesystems:VMFSversion1(VMFS1)orVMFS version2(VMFS2).VMFS1isthesameVMFSshippedwith1.xversionsofESXServer. TheVMFS2filesystemcontainsthefollowingfeaturesthatarenotavailablewith VMFS1:


! !

AbilitytospanmultipleVMFS2partitionsonthesameordifferentSCSIdisks. AbilityformultipleESXServers(andthevirtualmachinesontheseservers)to accessfilesonaVMFS2volumeconcurrently(nonclusteringsetup). VMwareESXServer2.5includesanautomaticperfilelockingmechanismthat allowstheseconcurrentaccesseswithoutfilesystemcorruption.

! !

LargerfilesystemvolumesandlargerfilesontheVMFSvolumes. RawdiskscanbemappedasVMFSfiles.

NOTE

UnlikeVMFS1,VMFS2isnotbackwardlycompatiblewithpreviouslyreleased(1.x) versionsofESXServer. AserversVMFSvolumesaremountedautomaticallybytheserviceconsole,assoonas thestorageadapterdriversareloaded,andappearinthe/vmfsdirectory. Thevmkfstoolscommandprovidesadditionalfunctionsthatareusefultocreatefiles ofaparticularsizeandtoimportfilesfromandexportfilestotheserviceconsolesfile system.Inaddition,vmkfstoolsisdesignedtoworkwithlargefiles,overcomingthe 2GBlimitofsomestandardfileutilities.

Viewing and Manipulating Files in the /vmfs Directory


Youcanviewandmanipulatefilesunder/vmfsinthesemountedVMFSvolumeswith filecommandssuchaslsandcp.MountedVMFSvolumesmightappearsimilarto otherfilesystemsuchasext3,butVMFSisprimarilyintendedtostorelargefilessuch asdiskimages.Theserviceconsole(whichisbasedonaLinux2.4kernel)doesnot supportfilesgreaterthan2GB. Useftp,scp,andcpforcopyingfilestoandfromaVMFSvolume,aslongasthehost filesystemsupportstheselargefiles.nfsisknowntorunintothislimitation,while ftp,scp,andcparenotaffectedbyit.

246

VMware, Inc.

Chapter 9 Storage and File Systems

NOTE

Ifyouusethelscommandinsideaftpsession,thefilesizemightbedifferentfromthe outputofthels-lcommandorvmkfstools-lcommand.Thisisbecauseftpuses 32bitvaluesforfilesizes,andthemaximumfilesizeitcandisplayis4GB.Youcan safelytransferanylargefilesbetweenESXServermachineswithaftpsession.

VMFS Volumes
InESXServer2.5,aVMFS2volumecanspanmultiplepartitions,acrossthesameor multiple(upto32)LUNsorphysicaldisks.AVMFS2volumeisalogicalgroupingof physicalextents.Eachphysicalextentispartofadisk,forexample,aphysicaldisk partition.Thatis,aphysicalextentisadiskpartitionthatispartofaVMFS2volume. Bycontrast,VMFS1volumesarelimitedtoasinglephysicalextent. YoucanviewtheVMFSvolumesonyourESXServeratanytimebychanging directoriestothe/vmfsdirectory,thenlistingitscontents.Youcanusevmkfstools -P <VMFS_volume_label>,toobtainmoredetailsaboutyourVMFSvolume.
# cd /vmfs # ls vmhba0:0:0:2 vmhba0:0:0:6

Theentriesinthe/vmfsdirectoryareupdateddynamically.Anychangesyoumaketo VMFS2volumesthroughtheVMwareManagementInterfaceareimmediately reflectedinthisdirectory. Formoredetailsonvmkfstools,seeUsingvmkfstoolsonpage 249.

Labelling VMFS Volumes


IfyoucreateaVMFSvolumeonaSCSIdiskorpartition,givealabeltothatvolumeand usethatlabelwhenspecifyingVMFSfilesonthatvolume.Forexample,supposeyou haveaVMFSvolumeontheSCSIpartitionvmhba0:3:0:1andhavecreatedaVMFS filent4.vmdk.Youcanlabelthatvolumeusingavmkfstoolscommandsuchas: vmkfstools -S mydisk vmhba0:3:0:1 Youcanthenrefertothent4.vmdkfileasmydisk:nt4.vmdk(insteadof vmhba0:3:0:1:nt4.vmdk)inavirtualmachineconfigurationfileandinother vmkfstoolscommands.SeevmkfstoolsOptionsonpage 250. Ifthereisnopersistentbinding,labellingVMFSvolumesisusefulifyoumightadd SCSIadaptersordiskstoyoursystem.Theactualdiskandtargetnumbersspecifying aparticularVMFSmaychange,butthelabelstaysthesame.Also,otherESXServerssee thesamelabel,whichisusefulforLUNIDbetweenservers. Formoreinformation,seeUsingPersistentBindingsonpage 270.
VMware, Inc. 247

Administration Guide

VMFS Accessibility
TherearetwomodesforaccessingVMFSvolumes:publicandshared.
!

publicThedefaultmodeforESXServer. WithapublicVMFSversion1(VMFS1)volume,multipleESXServercomputers canaccesstheVMwareESXServerfilesystem,aslongastheVMFSvolumeison asharedstoragesystem(forexample,aVMFSonastorageareanetwork).Only oneESXServercanaccesstheVMFSvolumeatatime. WithapublicVMFSversion2(VMFS2)volumes,multipleESXServercomputers canaccesstheVMwareESXServerfilesystemconcurrently.VMwareESXServer filesystemswithapublicmodehaveautomaticlockingtoensurefilesystem consistency.

sharedUsedforaVMFSvolumethatisusedforfailoverbasedclusteringamong virtualmachinesonthesameordifferentESXServers. FormoreinformationonclusteringwithESXServer,seeConfigurationfor Clusteringonpage 279.

NOTE

InESXServer2andlater,privateVMFSvolumesaredeprecated.Ifyouhaveexisting VMFSversion1(VMFS1)orVMFSversion2(VMFS2)privatevolumes,youcan continuetousethem,butVMwarerecommendsthatyouchangetheaccessmodeto public.Thereisnoperformancepenaltyinmakingthischange.

VMFS Accessibility on a SAN


AnyVMFSvolumeonadiskthatisonaSANshouldhaveVMFSaccessibilitysetto publicorshared.Public,thedefaultandrecommendedaccessibilitymode,makesthe VMFSvolumeavailabletomultiplephysicalservers,andtothevirtualmachineson thoseservers.WithVMFS2volumes,publicaccessisconcurrenttomultiplephysical servers,whereasforVMFS1volumes,publicaccessislimitedtoasingleserverata time.SeeUsingStorageAreaNetworkswithESXServeronpage 266.

Changing Storage Configuration Options


To create or modify disk partitions through the VMware Management Interface 1 LogintotheVMwareManagementInterfaceasroot. TheStatusMonitorappears. 2 3 ClicktheOptionstab. ClickStorageConfiguration.

248

VMware, Inc.

Chapter 9 Storage and File Systems

4 NOTE

Maketheappropriatechanges,andclickOK.

YoucannotchangeVMFSaccessibilityifanyfilesareopenontheVMFSvolume.The attemptedoperationreturnserrors.Closeanyopenfiles,andedittheVMFSvolume. SeeConfiguringStorage:DiskPartitionsandFileSystemsonpage 196foradditional information.

Using vmkfstools
ThevmkfstoolscommandsupportsthecreationofaVMwareESXServerfilesystem (VMFS)onaSCSIdisk.Usevmkfstoolstocreate,manipulateandmanagefilesstored inVMFSvolumes.YoucanstoremultiplevirtualdiskimagesonasingleVMFSvolume. YoucanalsoperformmostofthevmkfstoolsoperationsthroughtheVMware ManagementInterface.

vmkfstools Command Syntax


Youmustbeloggedinastherootusertorunthevmkfstoolscommand.

vmkfstools Syntax When Specifying a SCSI Device


Theformatforthevmkfstoolscommand,whenspecifyingaSCSIdevice,is: vmkfstools <options> <device_or_VMFS_volume>[:<file>] where<device_or_VMFS_volume> specifiesaSCSIdevice(aSCSIdiskorapartition onaSCSIdisk)beingmanipulatedoraVMFSvolume,and<options>specifiesthe operationtobeperformed. If<device_or_VMFS_volume>isaSCSIdevice,itisspecifiedinaformsuchas: vmhba1:2:0:3 Here,vmhba1specifiesthesecondSCSIadapteractivatedbythecommand vmkload_mod .../XXX.o vmhba.(SeeVMkernelModuleLoaderonpage 240for detailsonvmkload_mod.)Thesecondnumberspecifiesthetargetontheadapter,the thirdnumberspecifiestheLUN(logicalunitnumber)andthefourthnumberspecifies thepartition.Partition0(zero)impliesthewholedisk.Otherwise,thenumberspecifies theindicatedpartition. <device_or_VMFS_volume>canalsobeaVMFSvolumelabel,assetinthe managementinterfaceorwiththevmkfstools --setfsnamecommand. <file>isthenameofafilestoredinthefilesystemonthespecifieddevice.

VMware, Inc.

249

Administration Guide

vmkfstools Syntax When Specifying a VMFS Volume or File


Theformatforthevmkfstoolscommand,whenspecifyingaVMFSvolumeorfile,is: vmkfstools <options> <path> where<path>isanabsolutepaththatnamesadirectoryorafileunderthe/vmfs directory. Forexample,youcanspecifyaVMFSvolumebyapathsuchas: /vmfs/vmhba1:2:0:3 YoucanalsospecifyasingleVMFSfile: /vmfs/lun1/rh9.vmdk

vmkfstools Options
Thissectionincludesalistofalltheoptionsusedwiththevmkfstoolscommand. Someofthetasksinthissectionincludeoptionsthataresuggestedforadvancedusers only.TheseadvancedoptionsarenotavailablethroughtheVMwareManagement Interface. NOTE Thelongandshort(singleletter)formsofoptionsareequivalent.Forexample,the followingcommandsareidentical: vmkfstools --createfs vmfs2 --blocksize 2m --numfiles 32 vmhba1:3:0:1 vmkfstools -C vmfs2 -b 2m -n 32 vmhba1:3:0:1 Ifthevmkfstoolscommandfails,andyoudontknowwhy,checkthelogfilesin /var/log/vmkernelorusethemanagementinterfacetoviewthelatestwarning. To view the system log warnings 1 LogintotheVMwareManagementInterfaceasroot. TheStatusMonitorappears. 2 3 ClicktheOptionstab. ClickSystemLogs.

Basic vmkfstools Options


Basicoptionsarecommontasksthatyouperformfrequently.Youcanalsoperform thesetasksthroughthemanagementinterface.

250

VMware, Inc.

Chapter 9 Storage and File Systems

Create a VMFS on the specified SCSI device


-C --createfs [vmfs1|vmfs2] -b --blocksize #[gGmMkK] -n --numfiles # ThiscommandcreatesaVMFSversion1(vmfs1)orversion2(vmfs2)filesystemonthe specifiedSCSIdevice. NOTE WhencreatingaVMFSvolumeonaLUN,youcanhaveonlyoneVMFSvolumeper LUN. Foradvancedusers:
!

Specifytheblocksizeusingthe-boption.Theblocksizemustbe2x(apowerof2) andatleast1MB.(Thedefaultfileblocksizeis1MB.)Youcanspecifythesizein kilobytes,megabytes,orgigabytesbyaddingasuffixofk(kilobytes),m (megabytes),g(gigabytes)respectively. Specifythemaximumnumberoffilesinthefilesystemwiththe-noption.The defaultmaximumnumberoffilesis256files.

List the attributes of a VMFS volume or a raw disk mapping


-P --querypartitions <VMFS_volume_name> -P --querypartitions <VMFS_volume:fileName> ForaVMFS_volume_name,thelistedattributesincludetheVMFSversionnumber (VMFS1orVMFS2),thenumberofphysicalextents(partitions)comprisingthe specifiedVMFSvolume,thevolumelabel(ifany),theUUID(ifany),andalistingofthe SCSIdevicenamesofallthephysicalextentscomprisingtheVMFSvolume. ForaVMFS_volume:fileName,thelistedattributesincludethevmhbanameoftheraw diskorpartition,correspondingtothemappingreferencedbyfileName,andany identificationinformationfortherawdisk.

VMware, Inc.

251

Administration Guide

Create a file with the specified size on the file system of the specified SCSI device
-c --createfile #[gGmMkK] Thesizeisspecifiedinbytesbydefault,butyoucanspecifythesizeinkilobytes, megabytes,orgigabytesbyaddingasuffixofk(kilobytes),m(megabytes),g (gigabytes)respectively.

Export the contents of the specified file on the specified SCSI device to a virtual disk on the file system of the service console
-e --exportfile <dstFile> Aftertheexport,youmaytransferthevirtualdisktoanotherservermachineand importittoaSCSIdeviceontheremotemachine. Ifyourvirtualdiskhasredologs,youhavethefollowingoptions:
!

Tousetheexportfileoptiononthebasevirtualdisk,onlythebasevirtualdisk isexported.Anyuncommittedredologsarenotexported,butcanbecopied separately. TousetheexportfileoptiononaESXServerredolog,theexportedvirtualdisk containstheredolog,anypreviouslycreatedredologs,andthebasevirtualdisk. Thatis,thenewlycreatedexportedvirtualdiskappearsasiftheredolog(s)was committedtoitsbasevirtualdisk. Youroriginalsourceredolog(s)andbasevirtualdiskremainunchanged.

Toexportyourredologsandbasevirtualdiskseparately,usetheexportfile optiontoexportthebasevirtualdisk,andthecpcommandtoexporteachredolog separately.

UsethecombinationofexportfileandimportfiletogethertocopyVMFSfilesto remotemachines.ThevirtualdiskshouldtakelessspacethanthefullsizeoftheVMFS file,becausethevirtualdiskdoesnotincludezeroedsectorsoftheVMFSfile.

Import the contents of a VMware virtual, plain, or raw disk on the service console to the specified file on the specified SCSI device
-i --importfile <srcFile> ThiscommandisoftenusedtoimportthecontentsofaVMwareWorkstationor VMwareGSXServervirtualdiskontoaSCSIdevice.Runthiscommandtoimporta virtualdiskthatwascreatedbyexportingthecontentsofadiskfromanotherSCSI device.

252

VMware, Inc.

Chapter 9 Storage and File Systems

NOTE

Thedestinationdevicemusthavespacefortheentiresizeofthevirtualdisk,evenifit ismostlyfreespace,asthecompletecontentsofthesourcediskarecopied. CAUTION Thevmkfstoolscommandmayfailwhenattemptingtoimportplaindisks createdwithversion2.5orearlierofGSXServer.Ifvmkfstoolsreturnsan errorwhenimportingaplaindisk,seePathNameFailuresWhen ImportingGSXServerVirtualMachinesonpage 66.

List the files on the file system on the specified device


-l --list -h --human-readable Mverbosemappings Theoutputincludespermissions,sizesandthelastmodificationtimeforredologs, virtualdiskfiles,andswapfiles.Usethe-hoptiontoprintthesizesinaneasiertoread format;forexample,5KB12.1MB,andsoon. The-Moptionliststhevmhbanamethatcorrespondstoeachrawdiskmapping.

Set the name of the VMFS on the specified SCSI device


-S --setfsname <fsName> YoucanseetheVMFSnamebyrunningthevmkfstoolscommandwiththe-loption, vmkfstools -l.

Advanced vmkfstools Options


Advancedoptionsaretasksthatyoucanperforminfrequently.Thesetasksarenot availablethroughthemanagementinterface,orareavailableinalimitedform,andare suggestedforadvancedusersonly.

Commit the redo log of the specified file, making the associated changes permanent
-m --commit Ifavirtualmachineisinundoableorappendmode,theredologiscreated automatically.Thenameoftheredologisderivedbyappending.REDOtothenameof thefilethatcontainsthebasediskimage.Youcancommitthechangestothediskthat arestoredintheredologusingthecommitoptionoreliminatethechangesusingthe rmcommandtodeletetheredologfile.

VMware, Inc.

253

Administration Guide

Set the VMFS on the specified SCSI device to the specified mode
-F --config [public|shared|writable] NOTE InESXServer2andlater,privateVMFSvolumesaredeprecated.Ifyouhaveexisting VMFSversion1(VMFS1)orVMFSversion2(VMFS2)privatevolumes,changethe accesstopublic. Public WithpublicVMFS2volumes,multipleESXServercomputerscanaccessthe sameVMwareESXServerVMFSvolumeconcurrently.VMwareESXServerfile systemswithapublicaccessmodeuseanautomaticperfilelockingtoensurefile systemconsistency. WithapublicVMFS1volume,multipleESXServercomputerscanaccesstheVMware ESXServerVMFSvolume,aslongastheVMFSvolumeisonasharedstoragesystem (forexample,aVMFSonastorageareanetwork).OnlyoneESXServercanaccessthe VMFS1volumeatatime. NOTE ESXServercreatesVMFSvolumesaspublicbydefault. Shared Thesharedaccessmodeallowsvirtualmachinesonmultipleserverstoaccess thesamevirtualdiskonaVMFS2volumesimultaneously.(Inpublicmode,virtual machinescanaccessonlythesameVMFSvolume,neverthesamevirtualdisk,atthe sametime.) NOTE AVMFSvolumethatisusedforfailoverbasedclusteringshouldhaveitsmodesetto shared. Writable WhenvirtualmachinesaccessafileonasharedVMFS,thefilesystem metadatabecomesreadonly.Thatis,novirtualmachineorusercommandcancreate, delete,orchangetheattributesofafile. Tocreate,remove,orchangethelengthofafile(vmkfstools-X),changethevolume towritable.MakesurethatnovirtualmachinesareaccessingtheVMFSvolume(all virtualmachinesarepoweredofforsuspended),andchangethefilesystemmetadata towritablewiththecommand,vmkfstools --config writable.Afteryoupoweron orresumeavirtualmachine,thefilesystemmetadatarevertstobeingreadonly.

Extend an existing logical VMFS-2 volume by spanning multiple partitions


-Z --extendfs <extension-SCSIDevice> -n --numfiles #

254

VMware, Inc.

Chapter 9 Storage and File Systems

Thisoptionaddsanotherphysicalextent(designatedby<extension-SCSIDevice>), startingatthespecifiedSCSIdevice.Byrunningthisoption,youlosealldataon <extension-SCSIDevice>. NOTE AlogicalVMFS2volumecanhaveatmost32physicalextents. ThisoperationisnotsupportedontheVMFS1filesystemandinfact,returnsanerror ifthespecifiedSCSIdeviceisformattedasVMFS1.Eachtimeyouusethisoptionand extendaVMFS2volumewithaphysicalextent,theVMFSvolumesupports,by default,anadditional64files.Youcanchangethisdefaultnumberoffilesbyusingthe -noption.

Map a Raw Disk or Partition to a File on a VMFS-2 Volume


-r --maprawdisk <raw-SCSI-device> Afterthismappingisestablished,youcanaccesstherawdisklikeanormalVMFSfile. Thefilelengthofthemappingisthesameasthesizeoftherawdiskorpartition.The mappingcanbequeriedfortherawSCSIdevicenamebyusingthe-Poption. Bymappingarawdiskorpartitiontoafile,youcanmanipulatethisrawdiskor partitionasanyotherfile. AllVMFS2filelockingmechanismsapplytorawdisks.

Display Disk Geometry for a VMware Workstation or GSX Server Virtual Disk
-g -- geometry <virtual-disk> Theoutputisintheform:Geometry information C/H/S is 1023/128/32,whereC representsthenumberofcylinders,Hrepresentsthenumberofheads,andSrepresents thenumberofsectors. WhenimportingVMwareWorkstationorVMwareGSXvirtualdiskstoVMwareESX Server,youmayseeadiskgeometrymismatcherrormessage.Adiskgeometry mismatchmayalsobethecauseifyouhaveproblemsloadingaguestoperatingsystem, orrunninganewlycreatedvirtualmachine. ViewtheeventslogthroughtheVMwareManagementInterface(UsersandEvents pageforthevirtualmachine)orthroughtheserviceconsole(thevmware.logfile, found,bydefault,inthe<user>/vmware/<guest_operating_system>directory). LookforC/H/Sandcomparethiswiththeoutputofthevmkfstools-gcommand. Ifthediskgeometryinformationisdifferent,thenspecifythecorrectinformation,from theoutputofthevmkfstools-gcommand,intheconfigurationfileofthenewly createdvirtualmachine.
VMware, Inc. 255

Administration Guide

SeeMigratingVMwareWorkstationandVMwareGSXServerVirtualMachineson page 63fordetailsonspecifyingthediskgeometryinavirtualmachinesconfiguration file.

Extend the specified VMFS to the specified length


-X --extendfile #[gGmMkK] Usethiscommandtoextendthesizeofadiskallocatedtoavirtualmachine,afterthe virtualmachinehasbeencreated.Thevirtualmachinethatusesthisdiskfilemustbe poweredoffwhenyouenterthiscommand.Also,theguestoperatingsystemmustbe abletorecognizeandusethenewsizeofthedisk,forexample,byupdatingthefile systemonthedisktotakeadvantageoftheextraspace. Specifythesizeinkilobytes,megabytes,orgigabytesbyaddingasuffixofk(kilobytes), m(megabytes),g(gigabytes)respectively.

Manage SCSI reservations of physical targets or LUNs


Llock[reserve|release|reset] CAUTION Thereserve,release,andresetcommandscaninterrupttheoperations ofotherserversonastorageareanetwork(SAN),sousethesecommands withgreatcaution. The-Lreservecommandreservesthespecifiedrawdisk,orthediskcontainingthe specifiedVMFSvolume.Afterthereservation,otherserverswillgetaSCSIreservation erroriftheyattempttoaccessthatdisk,buttheserverthatdidthereservationwillbe abletoaccessthedisknormally. The-Lreleasecommandreleasesthereservationonthespecifieddisk,ordisk containingthespecifiedVMFSvolume.Anyotherservercanaccessthediskagain. The-LresetcommanddoesaSCSIresettothespecifieddisk.Anyreservationheld byanotherserverisreleased.

Recovers a VMFS
-R --recover ThiscommandenablesyoutorecoveraVMFS(accessiblebymultipleESXservers) whenothervmkfstoolscommandsindicatethatthefilesystemislockedbyanother ESXServermachine,but,infact,nootherserveriscurrentlyaccessingthisfilesystem. ThissituationmayoccuriftheVMFSwasbeingaccessedbyaserver(forexample, runningavirtualmachine)andthatservercrashed.

256

VMware, Inc.

Chapter 9 Storage and File Systems

NOTE

UsethiscommandifyouarecertainthatnootherESXServerisaccessingthefile system.

Scans the specified vmhba adapter for devices and LUNs


sscan<FC_SCSI_adapter> NOTE VMwarerecommendsthatyouusethecos-rescan.shcommandratherthanthis optiontovmkfstools. Thisoptionisusefulforadaptersconnectedtostorageareanetworks,particularlyif youarereconfiguringyourSAN.IfanewdeviceorLUNbecomesaccessiblethrough theadapter,ESXServerregistersthisnewvirtualdeviceforusebyvirtualmachines.If anexistingdeviceorLUNisnolongerusedandappearstobegone,itisremovedfrom usebyvirtualmachines. NOTE Usethe-soptiononlyforFibreChanneladapters. Youcanseetheresultsofthescanbyusingls/vmfsorlookingatthecontentsof /proc/vmware/scsi.

Create or Resize a Swap File in a VMFS Volume of the specified SCSI device
-k --createswapfile #[gGmMkK] Thesizeisspecifiedinbytesbydefault,butyoucanspecifythesizeinkilobytes, megabytes,orgigabytesbyaddingasuffixofk(kilobytes),m(megabytes),org (gigabytes),respectively. NOTE YoumustbeloggedintotheServiceConsolewithrootuserpermissionstocreatea swapfile. Youcanresizeanexistingswapfilebyspecifyingthenewfilesizeasanargumentto the-koption. To resize the swap file 1 2 3 Deactivatetheswapfile,ifitisactive,with vmktools -y. Resizetheswapfilewiththe-k option. Activatetheswapfilewith vmktools -wfilename.

Ifyoutrytoresizeanactiveswapfile,ESXServerreturnsanerrormessage.

VMware, Inc.

257

Administration Guide

ESXServerdoesnotactivateaswapfileafteritiscreated.Usevmkfstoolswiththe-w optiontoactivateaswapfile.Youcansetaswapfiletobeactivatedautomaticallyafter asystemrebootwiththeActivationPolicyoptionoftheSwapManagementpanein theOptionstaboftheManagementInterface.

Activate a Swap File


-w --activateswapfile Thiscommandactivatesthespecifiedswapfile. NOTE YoumustbeloggedintotheServiceConsolewithrootuserpermissionstoactivatea swapfile.

Deactivate a Swap File


-y --deactivateswapfile <fileID> ESXServerassignsafileIDtagtoaswapfilewhenitisactivated.Youmustidentifya swapfilebyitsfileIDtagwhenspecifyingwhichswapfiletodeactivatewiththe-y option. NOTE YoumustbeloggedintotheServiceConsolewithrootuserpermissionstoactivatea swapfile. YoucanfindthefileIDtagassignedtoaswapfileintheswapstatusfile, /proc/vmware/swap/stats. NOTE Youmustshutdownallvirtualmachinesbeforedeactivatingaswapfile.Enteringa vmkfstools -ycommandreturnsanerrormessageifanyvirtualmachinesare poweredon.

Migrate a VMFS from VMFS-1 to VMFS-2


-T --tovmfs2 ThiscommandconvertstheVMFSvolumeonthespecifiedpartitionsfromVMFS1to VMFS2,whilepreservingallfilesinthevolume.ESXServerslockingmechanism attemptstoensurethatnoremoteESXServerorlocalprocessisaccessingtheVMFS volumethatisbeingconverted. NOTE Ifyouhaveanactiveswappartition,deactivateitbeforerunningthiscommand. DeactivateswapthroughtheVMwareManagementInterfaceandrebootyourserver. Afterthisvmkfstools-Tcommandcompletes,youcanreactivateyourswapfile.

258

VMware, Inc.

Chapter 9 Storage and File Systems

Thisconversionmaytakeseveralminutes.Whenyourpromptreturns,theconversion iscomplete. NOTE InESXServer2.5,privateVMFSvolumesaredeprecated.IfyouhaveanexistingVMFS version1(VMFS1)privatevolume,thenewlycreatedVMFS2volumesaccessmodeis changedtopublic. Beforestartingthisconversion,checkthefollowing:


! ! ! !

BackuptheVMFS1volumethatisbeingconverted. MakesurenovirtualmachinesarepoweredonusingthisVMFS1volume. (SANonly)MakesurenootherESXServerisaccessingthisVMFS1volume. (SANonly)MakesurethisVMFS1volumeisnotmountedonanyotherESX Server. TheVMFS1toVMFS2conversionisaonewayprocess.AftertheVMFS volumeisconvertedtoVMFS2,youcannotreverttoaVMFS1volume.

Caution

NOTE

ThefirsttimeyouaccessanewlyconvertedVMFS2volume,theaccesswillbeslow becauseofinternalvolumeconsistencychecking.

Examples Using vmkfstools


Thissectionincludesexamplesusingthevmkfstoolscommandwiththedifferent optionsdescribedpreviously.

Create a new file system


vmkfstools -C vmfs2 -b 2m -n 32 vmhba1:3:0:1 ThisexampleillustratescreatinganewVMFSversion2(vmfs2)onthefirstpartitionof target3,LUN0ofSCSIadapter1.Thefileblocksizeis2MBandthemaximumnumber offilesis32.

Extends the new logical volume by spanning two partitions


vmkfstools -Z vmhba0:1:2:4 vmhba1:3:0:1 Thisexampleillustratesextendingthenewlogicalfilesystembyaddingthe4th partitionoftarget1(andLUN2)ofvmhbaadapter0.Theextendedfilesystemsupports amaximumof64(2X32)files,andspanstwopartitionsvmhba1:3:0:1and vmhba0:1:2:4.

VMware, Inc.

259

Administration Guide

Youcanaddressthefilesystembyusingthenameofitsheadpartition,forexample, vmhba1:3:0:1.

Names a VMFS volume


vmkfstools -S mydisk vmhba1:3:0:1 Thisexampleillustratesassigningthenameofmydisktothenewfilesystem.

Creates a new VMFS virtual disk file


vmkfstools -c 2000m mydisk:rh6.2.vmdk Thisexampleillustratescreatinga2GBVMFSfilewiththenameofrh6.2.vmdkonthe VMFSvolumenamedmydisk.Therh6.2.vmdkfilerepresentsanemptydiskthatcan beaccessedbyavirtualmachine.

Imports the contents of a virtual disk to the specified file on a SCSI device
vmkfstools -i ~/vms/nt4.vmdk vmhba0:2:0:0:nt4.vmdk Theexampleillustratesimportingthecontentsofavirtualdisk(whichcontains WindowsNT4.0)fromtheserviceconsolesfilesystemtoafilenamednt4.vmdkon target2ofSCSIadapter0. Configureavirtualmachinetousethisvirtualdiskbyaddingthefollowinglinestoits configurationfile:
scsi0.virtualDev = vmxbuslogic scsi0:0.present = TRUE scsi0:0.name = vmhba0:2:0:0:nt4.vmdk

Migrate virtual machines to VMware GSX Server or VMware Workstation, then back to VMware ESX Server
ThisexampleillustratesmigratingavirtualmachinesvirtualdiskfilefromESXServer toVMwareGSXServerorVMwareWorkstation,andmigratingthevirtualdiskbackto ESXServer.
vmkfstools -e winXP.vmdk vmhba0:6:0:1:winXP.vmdk

NOTE

Theexamples,illustratingthe-eand-ioptions,resultintheexportorimportofa virtualdisk. ThecommandexportsthewinXP.vmdkvirtualdiskfiletooneormore.vmdkfiles, maximumsize2GB,thatyoucanuseasavirtualdiskinavirtualmachineonGSX ServerorWorkstation.TheresultantwinXP.vmdkfile(s)canresideonaVMFSvolume, oran/ext2,/ext3,orNFSfilesystem.

260

VMware, Inc.

Chapter 9 Storage and File Systems

ThefollowingexampleimportsaGSXServerorWorkstationvirtualdiskfileintothe VMFSvolumeonthespecifiedSCSIdevice:
vmkfstools -i winXP.vmdk vmhba0:6:0:1:winXP.vmdk

Bycontrast,ifyouareimportingdirectlyintoarawpartition,theexamplebecomes:
vmkfstools -i winXP.vmdk vmhba0:6:0:1

Lists the files on the VMFS of the specified device


vmkfstools -l vmhba0:2:0:0 Thiscommandillustrateslistingthecontentsofthefilesystem,includingredologs, virtualdiskfiles,andswapfilesontarget2ofSCSIadapter0.

Accessing Raw SCSI Disks


Youcanaccessrawdisksdirectlyorusethevmkfstools -rcommandtomapthemto filesonVMFS2volumes.Afterthismappingisestablished,youaccesstherawdiskor partitionlikeanormalfile.Forinformationaboutthismapping,seeUsing vmkfstoolsonpage 249,inparticular,thevmkfstools -roption. NOTE SeealsotheVMwaretechnicalnoteESXServerRawDeviceMapping,availableat www.vmware.com/support/resources/esx_resources.html.

Using a Physical Disk in a Virtual Machine


ForthevirtualmachinetoaccessaphysicaldiskorLUN,youmustaddthedisktothe virtualmachine.Thisexampleassumesthatthevirtualmachinesfirstdiskisavirtual diskandyouareaddingthephysicaldiskastheseconddisk. Ifyouwantthevirtualmachinesfirstdisktobeaphysicaldisk,seeCreatingaNew VirtualMachineonpage 39andselectSystemLUN/Diskforyourvirtualdisk. To configure the virtual machine to use a physical disk 1 LogintotheVMwareManagementInterfaceastheuserwhoownsthevirtual machineorastherootuser. TheStatusMonitorappears. 2 Clickthearrowtotherightoftheterminalicon( )forthevirtualmachineyou wanttochangeandchooseConfigureHardware.

VMware, Inc.

261

Administration Guide

TheHardwaretabforthisvirtualmachineappears.

ClickAddDevicetostarttheAddDevicewizard.

ClickHardDisk. TheVirtualDiskTypepageappears.

ClickSystemLUN/Disktoallowthevirtualmachinetoaccessaphysicaldisk storedonaLUN.

262

VMware, Inc.

Chapter 9 Storage and File Systems

Specifythefollowing: a b c d e SelectUseMetadatatoenableaccesstothedisksmetadatafileinformation. ChoosetheMetadataFileLocation. EnteranameintheMetadataFileNamefield. SelecttheappropriateSCSIIDintheVirtualSCSINodelist. ChoosetheCompatibilityoftheguestoperatingsystem: PhysicalGivestheguestoperatingsystemdirectdiskaccess. VirtualAllowsyoutochooseadiskmodefortheguestoperatingsystem.

ClickOKtoaddthedisk.

Determining SCSI Target IDs


ToassignSCSIdiskstoavirtualmachine,youneedtoknowwhichcontrollerthedrive isonandwhattheSCSItargetIDofthecontrolleris.Thissectionhelpsyoudetermine thesevalueswithoutphysicallylookingattheSCSItargetIDsettingsonthedrives. SCSIdiskscanbeaccessedbylocalSCSIadaptersoronaSANbyFibreChannel adapters.DescriptionsofSCSIadaptersinthissection,alsoapplytoFibreChannel adapters,althoughtheyarenotexplicitlymentioned. OnastandardLinuxsystem,orforaVMwareserviceconsolethathasSCSIorFibre Channel(FC)controllersassignedtotheserviceconsoleratherthantheVMkernel, informationonattachedSCSIdevices,includingSCSItargetIDsisavailableintheboot log(usually/var/log/messages),orfromexamining/proc/scsi/scsi. InformationabouttheSCSIcontrollersassignedtotheVMkernelandaboutthedevices attachedtothesecontrollersisavailableinthe/proc/vmware/scsidirectorywhenthe VMkernelandtheVMkerneldevicemodule(s)fortheSCSIcontroller(s)havebeen loaded. Eachentryinthe/proc/vmware/scsidirectorycorrespondstoaSCSIcontroller assignedtotheVMkernel.Forexample,assumeyouissuedavmkload_modcommand withthebasenamevmhbaandasingleSCSIcontrollerwasfound. Toidentifythecontroller,typethiscommand: ls -l /proc/vmware/scsi Theoutputofthelscommandis:
total 0 dr-xr-xr-x 2 root root 0 Jun 22 12:44 vmhba0

VMware, Inc.

263

Administration Guide

EachSCSIcontrollerssubdirectorycontainsentriesfortheSCSIdevicesonthat controller,numberedbySCSItargetIDandLUN(logicalunitnumber).Runcaton eachtargetID:LUNpairtogetinformationaboutthedevicewiththattargetIDand LUN.Forexample,typethiscommand: cat /proc/vmware/scsi/vmhba0/1:0 Thefollowinginformationisdisplayed:


Vendor: SEAGATE Model: ST39103LW Rev: 0002 Type: Direct-Access ANSI SCSI revision: 02 Size: 8683 Mbytes Queue Depth: 28 Partition Info: Block size: 512 Num Blocks: 17783240 num: Start Size Type 4: 1 17526914 fb Partition 0: VM 11 Commands 2 Kbytes read 0 Kbytes written 0 Commands aborted 0 Bus resets 0 Partition 4: Commands 336 Kbytes read 857 Kbytes written 488 Commands aborted 0 Bus resets 0

ThisinformationhelpsyoudeterminetheSCSItargetIDtouseinthestorage configurationpage,asdisplayedbytheVMwareManagementInterface.See ConfiguringStorage:DiskPartitionsandFileSystemsonpage 196.

Sharing the SCSI Bus


Normally,VMwareESXServerenforceslockinganddoesnotallowtwovirtual machinestoaccessthesamevirtualdisk(VMFSfile)atthesametime.Ifasecond virtualmachinetriestoaccessaVMFSfile,itgetsanerroranddoesnotpoweron. Itisoftenusefultohavemorethanonevirtualmachineshareadisktoprovidehigh availability.Thisconfigurationiscommonlyusedfordiskbasedfailover,inwhichone machinetakesoverrunninganapplicationwhentheprimarymachinefails.Thedata requiredfortheapplicationistypicallystoredonashareddisk,sothebackupmachine
264 VMware, Inc.

Chapter 9 Storage and File Systems

canimmediatelyaccessthenecessarydatawhenthefailoveroccurs.See ConfigurationforClusteringonpage 279forinformationonclusteringwithESX Server. Thebussharingsettingisusedtodeterminewhethervirtualmachinesareallowedto accessthesamevirtualdisksimultaneously.

Setting Bus Sharing Options


UsetheVMwareManagementInterfacetochangethebussharingsettingsforeach virtualmachinethatwillaccessthesamevirtualdisksimultaneously. Therearethreebussharingoptions:
! ! !

NoneDiskscannotbesharedbyothervirtualmachines. VirtualDiskscanbesharedbyvirtualmachinesonsameserver. PhysicalDiskscanbesharedbyvirtualmachinesonanyserver.

Toenablesharingofvirtualdisks,chooseVirtualorPhysical.Allvirtualdisksonthe specifiedvirtualbuswillbesharableandhavethespecifiedmode.
!

VirtualbussharingOnlyvirtualmachinesonthesamephysicalmachinewillbe abletosharedisks.Thissettingallowsforaclusterinaboxconfiguration,in whichallmembersofahighavailabilityclusterareonthesamephysicalmachine. Thissetupisusefulforprovidinghighavailabilitywhenthelikelyfailuresaredue tosoftwareoradministrativeerrors. PhysicalbussharingVirtualmachinesondifferentphysicalmachineswillbe abletosharedisks.Inthiscase,theVMFSholdingthevirtualdisksmustbeona physicallyshareddisk,soallofthephysicalmachinescanaccessit.Thissetupis usefulforprovidinghighavailabilitywhenthelikelyfailuresalsoinclude hardwareerrors.

Whenashareddiskisusedforhighavailability,thecurrentmachinerunningthe applicationandusingtheshareddataoftenreservesthediskusingaSCSIcommand. Also,ifthebussharingisPhysical,commandsthatreserve,resetorreleaseashared virtualdiskaretransmittedthroughtothephysicaldisk,soothermachinessharingthe diskcanproperlydetectwhenavirtualdiskhasbeenreservedorreset. Whenyouaresharingdisksamongvirtualmachinesacrossphysicalmachinesforhigh availabilitypurposes,itisoftenbesttoputonlyasingleVMFSwithasinglevirtualdisk oneachshareddisk,thatis,haveonlyonevirtualdiskperphysicaldisk.Insucha configuration,eachvirtualdiskcanbereservedandreleasedindependently.

VMware, Inc.

265

Administration Guide

To change the bus sharing setting 1 2 3 4 Logintothemanagementinterfaceastheappropriateuserandbesurethevirtual machineyouwanttoconfigureispoweredoff. Pointtotheterminaliconforthevirtualmachineyouwanttoconfigureandclick ConfigureHardware. ClickEditnexttotheappropriateSCSIcontroller. Choosethebussharingsettingyouwantfromthedropdownlist,andclickOK.

Using Storage Area Networks with ESX Server


VMwareESXServercanbeusedeffectivelywithstorageareanetworks(SANs).ESX ServersupportsQlogicandEmulexhostbusadapters,whichallowanESXServer computertobeconnectedtoaSANandtoseethediskarraysontheSAN. TheSCSIconfigurationinformationcontainedinthissectionalsoappliestoFC adapters,butFCadaptersmayrequireadditionalconfigurationaswell. ForinformationonsupportedSANhardware,downloadtheVMwareESXServerSAN CompatibilityListfromtheVMwareWebsiteat http://www.vmware.com/support/resources/esx_resources.html.

Understanding Storage Arrays


Largestoragesystems(alsoknownasdiskarrays)combinenumerousdisksintoarrays foravailabilityandperformance.Typically,acollectionofdisksisgroupedintoa RedundantArrayofInexpensiveDisks(RAID)arraytoprotectthedatabyeliminating diskdrivesasapotentialsinglepointoffailure. DiskarrayscarvethestorageRAIDsetintologicalunits(LUNs)thatarepresentedto theserverinamannersimilartoanindependentsingledisk.Typically,LUNsarefew innumber,relativelylarge,andfixedinsize. YoucancreateLUNswiththestoragemanagementapplicationofyourdiskarray.

Installing ESX Server with Attached SANs


WithESXServer2.5,youcaninstallthesystemonaSANandbootfromtheSAN.This isdescribedintheVMwareSANConfigurationGuide,availableat http://;www.vmware.com/support/pubs/esx_pubs.html. IfyouarenotinstallingESXServersothatitcanbebootedfromaSAN,VMware recommendsthatFCadaptersarededicatedexclusivelytothevirtualmachines.Even

266

VMware, Inc.

Chapter 9 Storage and File Systems

thoughtheseFCadaptersarededicatedtovirtualmachines,theLUNsontheSANsare visibletosystemmanagementagentsontheserviceconsole.

Configuring VMFS Volumes on SANs


MakesurethatonlyoneESXServersystemhasaccesstotheSANwhileyouareusing theVMwareManagementInterfacetoconfiguretheSANandformattheVMFS2 volumes. NOTE YoucanhaveonlyoneVMFSvolumeperLUN. Afteryoufinishtheconfiguration,makesureallpartitionsonthephysicallyshared SANdiskaresetforpublicorsharedaccessforaccessbymultipleESXServersystems. SeeVMFSAccessibilityonpage 248. ForinformationonconfiguringSANs,scanningforLUNs,andsettingpersistent bindingsthroughtheVMwareManagementInterface,seeStorageManagementon page 196.

Scanning for Devices and LUNs


ESXServerscansfordevices,andLUNsonthesedevices,wheneveraFibreChannel driverisloaded.YoucanmanuallyinitiateascanthroughtheVMwareManagement Interfaceorbyusingthecos-rescan.shcommand. VMwarerecommendsusingcos-rescan.sh,becauseitiseasiertousewithcertainFC adaptersthanvmkfstools. Tousecos-rescan.sh,enterthecommandatashellprompt. YoumaywanttorescandevicesorLUNswheneveryouaddanewdiskarraytothe SANorcreatenewLUNsonadiskarray.YoumayalsowanttorescanLUNswhenyou changetheLUNmaskingonadiskarray. NOTE IfyouareusingmultipathingwithmultipleFCHBAs,runthiscommandonallofthe FCHBAs.If,afteryourrescan,youseenewLUNsandtheyhaveVMFSvolumes,you willseetheappropriatesubdirectorieswhenyouviewthecontentsofthe/vmfs directory.

Changing VMkernel Configuration Options for SANs


TouseallstoragedevicesonyourSAN,youmightneedtochangesomeVMkernel configurationoptions.

VMware, Inc.

267

Administration Guide

To change VMkernel configuration options 1 LogintotheVMwareManagementInterfaceasroot. TheStatusMonitorappears. 2 3 4 5 ClicktheOptionstab. ClickAdvancedSettings. Tochangeanoption,clickthecurrentvalue. EnterthenewvalueinthedialogboxandclickOK. Forinformationonchangingthesesettings,seeAdvancedSettingsonpage 205.

Detecting All LUNs


Bydefault,theVMkernelscansforonlyLUN0toLUN7foreverytarget.Ifyouare usingLUNnumberslargerthan7youmustchangethesettingfortheDiskMaxLUN fieldfromthedefaultof8tothevaluethatyouneed.Forexample,ifyounowhaveLUN numbers0to15active,setthisoptionto16.Currently,anESXServermachinecansee amaximumof128LUNsoveralldiskarraysonaSAN. Bydefault,theVMkernelisconfiguredtosupportsparseLUNs,thatis,acasewhere someLUNsintherange0toN1arenotpresent,butLUNNispresent.Ifyoudonot needtousesuchaconfiguration,changetheDiskSupportSparseLUNfieldto0.This changedecreasesthetimeneededtoscanforLUNs. TheDiskMaskLUNsconfigurationoptionallowsthemaskingofspecificLUNson specificHBAs.MaskedLUNsarenottouchedoraccessiblebytheVMkernel,even duringinitialscanning.TheDiskMaskLUNsoptiontakesastringcomprisedofthe adaptername,targetIDandcommaseparatedrangelistofLUNstomask.Theformat isasfollows:
<adapter>:<target>:<comma_separated_LUN_range_list>;

Forexample,youwanttomaskLUNs4,12,and5465onvmhba1target5,andLUNs 312,15,and1719onvmhba3target2.Toaccomplishthis,settheDiskMaskLUNs optiontothefollowing:


"vmhba1:5:4,12,54-65;vmhba3:2:3-12,15,17-19;"

NOTE

LUN0cannotbemasked. TheDiskMaskLUNsoptionsubsumestheDiskMaxLUNoptionforadaptersthathave aLUNmask.Continuingtheprecedingexample,therearefouradapters,vmhba0, vmhba1,vmhba2,andvmhba3,andtheDiskMaxLUNoptionissetto8.

268

VMware, Inc.

Chapter 9 Storage and File Systems

Inthisexample,vmhba0andvmhba2onlyscanLUNs07,butvmhba1andvmhba3scan allLUNsthatarenotmasked,uptoLUN255,orthemaximumLUNsettingreported bytheadapter,whicheverisless. Foradministrativeorsecuritypurposes,useLUNmaskingtopreventtheserverfrom seeingLUNsthatitdoesntneedtoaccess.Refertoyourdocumentationondiskarrays formoreinformation.

Using IBM FAStT Disk Arrays


AnIBMFAStTdiskarraysometimesreturnsvendorspecificstatuscodesthatESX Serverinterpretsaserrors.Thesestatuscodesaretemporaryindicating,forexample, thatthefirmwarehasbeenupgradedorthatthebatteryforthediskcacheneedstobe charged.ESXServer,initsdefaultconfiguration,mightinterpretthesestatuscodesto meanthataLUNexistsbutisnotaccessible. AvoidthisproblembyusingaspecialESXServerconfigurationoption.Logintothe managementinterfaceastherootuser,clickAdvancedSettings,andclickVMkernel Configuration.FindtheoptionDiskRetryUnitAttentionandmakesureitisenabled (thedefault). Withthisoptionenabled,ESXServerretriesSCSIcommandswhenthese vendorspecificstatuscodesarereceived. UsingIBMFAStTdiskarrayswithESXServerrequiresadditionalconfiguration optionsthataredescribedinmoredetailintheVMwareKnowledgeBaseat http://kb.vmware.com/vmtnkb/supportcentral/supportcentral.do?id=m1.

Troubleshooting SAN Issues with ESX Server


YoucanviewLUNsthroughtheVMwareManagementInterfaceorviewtheoutputof ls /proc/vmware/scsi/<FC_SCSI_adapter>.Iftheoutputdiffersfromwhatyou expect,checkthefollowing:
!

DiskMaxLUNMaximumnumberofLUNspervmhbathatarescannedbyESX Server. ViewandsetthisoptionthroughtheVMwareManagementInterface(Advanced SettingsintheOptionspage)orthrough/proc/vmware/config/Disk.

DiskSupportSparseLUNIfthisoptionison,ESXServerscanspastanymissing LUNs.Ifthisoptionisoff,ESXServerstopsscanningforLUNsifanyLUNis missing. ViewandsetthisoptionthroughtheVMwareManagementInterface(Advanced SettingsintheOptionspage)orthrough/proc/vmware/config/Disk.

VMware, Inc.

269

Administration Guide

LUNmaskingWithLUNmasking,eachLUNisassignedandaccessedbya specificlistofconnections.BesurethatLUNmaskingisimplementedproperly andthattheLUNsarevisibletotheHBAsonESXServer. ZoningLimitsaccesstospecificstoragedevicesandincreasessecurityand decreasestrafficoverthenetwork.Ifyouusezoning,besurethatzoningonthe SANswitchissetupproperlyandthatallvmhbaandthecontrollersofthedisk arrayareinthesamezone. StoragecontrollerIfadiskarrayhasmorethanonestoragecontroller,makesure thattheSANswitchhasaconnectiontothecontrollerthatownstheLUNsyou wanttoaccess.Onsomediskarrays,onecontrollerisactiveandtheother controllerispassiveuntilthereisafailure.Ifyouareconnectedtothewrong controller,youmightnotseetheexpectedLUNs;oryoumightseetheLUNs,but mightgeterrorswhentryingtoaccessthem.

FormoreinformationonusingSANswithESXServer,checktheKnowledgeBaseon theVMwareWebsiteathttp://kb.vmware.com/vmtnkb/supportcentral.

Using Persistent Bindings


YoucanspecifypersistentbindingsforyourFibreChannelHBAs.Withpersistent binding,ESXServerassignsspecifictargetIDstospecificFCSCSIdevices.Thistarget IDassociationisretainedfromreboottorebootunlesschangedbyyou. PersistentbindingisusefulifyouareusingrawdiskswithESXServer.Arawdiskis directlymappedtoaLUNorphysicaldiskdriveonyourstorageareanetwork(SAN). ESXServerdirectlyaccessesthedataonthisdiskasarawdevice(andnotasafileona VMFSvolume). YoucanpersistbindingsthroughtheVMwareManagementInterfaceorthroughthe serviceconsole.Forinformationonpersistingbindings,seeStorageManagementon page 196.

Determining Target IDs Through the Service Console


Tousetheserviceconsole,typecat /proc/scsi/<FC_SCSI_driver>/<adapter_number>todeterminethetargetIDs.

Example Output for an Emulex HBA


#cat /proc/scsi/<FC_SCSI_driver>/<adapter_number> . . . Portname: 10:00:00:00:c9:32:23:49 Nodename: 20:00:00:00:c9:32:23:49

270

VMware, Inc.

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 Nodename: 20:00:00:00:c9:32:23:49 lpfc0t00 WWPN 20:00:00:60:16:3c:ad:13 WWNN 20:00:00:60:16:3c:ad:13

Adapterportname Adapternodename 0(lpfc0)isthehostbusadapterand00 isthetarget Targetworldwideportname(WWPN) Targetworldwidenodename(WWNN)

Example Output for a QLogic HBA


# cat /proc/scsi/<FC_SCSI_driver>/<adapter_number> . . . SCSI Device Information: scsi-qla0-adapter-node=200100e08b229b53; scsi-qla0-adapter-port=210100e08b229b53; scsi-qla0-target-0=20000060163cad13; . . .

where:
200100e08b229b53 210100e08b229b53 qla0 target-0 20000060163cad13

Adapterworldwideportname (adapter-port) Adapterworldwidenodename (adapter-node) 0isthehostbusadapter 0isthetarget Worldwideportname

VMware, Inc.

271

Administration Guide

pbind.pl Script
Thepbind.plscriptislocatedinthe/usr/sbindirectory.Asroot,typepbind.plto seethelistofoptionsforthiscommand. Table 9-1. pbind.pl options
pbind.pl Option pbind.pl -A pbind.pl -D pbind.pl -a <path> pbind.pl -d <path> pbind.pl -r pbind.pl -s pbind.pl -q Description

Persistsbindingsforalladapters. Deletesbindingsforalladapters. Addsbindingsforalladaptersspecifiedin<path>. Deletesbindingsforalladaptersspecifiedin<path>. Showsyoutheresultwithoutmakinganychange. Displayssupportedadaptersandtheirpaths. Quietmode;suppressesnormalstatusoutput.

Examples Using the pbind.pl Script


ThisexampleaddsbindingsforallQLogic2200hosts.
pbind.pl -a /proc/scsi/qla2200/

ThisexampleaddsbindingforQLogic2200host2.
pbind.pl -a /proc/scsi/qla2200/2

NOTE

Typingawildcardcharacter,forexample,pbind.pl -a /proc/scsi/qla2200/*is invalid.

Using Multipathing in ESX Server


ESXServer2.5includesmultipathingsupporttomaintainaconstantconnection betweentheservermachineandthestoragedeviceincaseofthefailureofaHBA, switch,storagecontroller(orstorageprocessor;abbreviatedasSPinthefollowing diagram),oraFibreChannelcable.UnlikepreviousversionsofESXServer,thisversion ofmultipathingsupportdoesnotrequirespecificfailoverdrivers.

272

VMware, Inc.

Chapter 9 Storage and File Systems

Storage

SP1

SP2

FC Switch

FC Switch

HBA 1 Server 1

HBA 2

HBA 3 Server 2

HBA 4

Figure 9-1. HBA failover paths InthediagraminFigure 91,therearemultiple,redundantpathsfromeachserverto thestoragedevice.Forexample,ifHBA1,orthelinkbetweenHBA1andtheFibre Channel(FC)switchbreaks,HBA2takesoverandprovidestheconnectionbetweenthe serverandtheswitch.ThisprocessiscalledHBAfailover. Similarly,ifSP1,orthelinkbetweenSP1andtheswitchbreaks,SP2takesoverand providestheconnectionbetweentheswitchandthestoragedevice.Thisprocessis calledSPfailover.VMwareESXServer2.5providesbothHBAandSPfailoverwithits multipathingfeature.(SPfailovermaynotbesupportedbyalldiskarrays.) ForinformationonsupportedSANhardware,downloadtheVMwareESXServerSAN CompatibilityListfromtheVMwareWebsiteat http://www.vmware.com/support/resources/esx_resources.html.

Choosing Path Management Tools


ESXServerallowsyoutoconfigureandmanagemultipathaccesstostoragedevices throughboththeManagementInterfaceandtheServiceConsole.Thefollowing sectionsdescribehowtomanagemultipathingintheServiceConsolewiththe vmkmultipathcommand.Forinstructionsonconfiguringmultipathingwiththe ManagementInterface,seeViewingFailoverPathsConnectionsonpage 201.

VMware, Inc.

273

Administration Guide

Viewing the Current Multipathing State


Youcanviewyourcurrentmultipathingconfigurationwiththevmkmultipath -q command.The-qoptiondisplaysthestateofallorselectedpathsrecognizedbyESX Server.Thereportdisplayedbyvmkmultipathshowsthecurrentmultipathingpolicy foradiskandtheconnectionstateandmodeforeachpathtothedisk. Thereportidentifiesdisksbytheircanonicalname.Thecanonicalnameforadiskisthe firstpathESXServerfindstothedisk.BecauseESXServerbeginsitsscansatthefirst controllerandthelowestdevicenumber,thefirstpath(andthecanonicalnameofthe disk)isthepathwiththelowestnumbercontrolleranddevicenumber.Forexample,if thepathstoadiskarevmhba0:0:2,vmhba1:0:2,vmhba0:1:2andvmhba1:1:2,the canonicalnameofthediskisvmhba0:0:2. Toseeareportforalldisks,type: # vmkmultipath -q BelowisatypicalreportdisplayedforaconfigurationofESXServermanagingaSAN.
Disk and multipath information follows: Disk vmhba0:0:1 (34,326 MB) has 6 paths. vmhba0:0:1 on (active, preferred) vmhba0:1:1 on vmhba0:2:1 on vmhba1:0:1 on vmhba1:1:1 on vmhba1:2:1 on Disk vmhba0:0:2 (100,319 MB) has 6 paths. vmhba0:0:2 on (active, preferred) vmhba0:1:2 on vmhba0:2:2 on vmhba1:0:2 on vmhba1:1:2 on vmhba1:2:2 on Policy is fixed.

Policy is fixed.

Disk vmhba0:0:4 (0 MB) has 6 paths. Policy is fixed. vmhba0:0:4 on (active, preferred) vmhba0:1:4 on vmhba0:2:4 on vmhba1:0:4 on vmhba1:1:4 on vmhba1:2:4 on Disk vmhba0:0:6 (0 MB) has 6 paths. Policy is fixed. vmhba0:0:6 on (active, preferred) vmhba0:1:6 on vmhba0:2:6 on
274 VMware, Inc.

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

Inthissystemconfiguration,thediskvmhba0:0:2hasafixedpolicy.Sixpathstothe diskarerecognizedbyESXServer.Thelistofpathsindicatesthedifferentphysical routesbywhichthediskcanbeaccessed. Thestatusofeachpathtothediskisindicatedinthesecondcolumn.Thereportlists eachpathason,off,ordead:


!

onIndicatesthatthepathisfunctionalandthatdataisbeingtransferred successfully. offIndicatesthatthispathhasbeendeliberatelyturnedoff. deadIndicatesthatthepathshouldbeactive,butthesoftwarecannotconnectto thediskthroughthispath.

! !

Thereportliststhemodeofeachpathinthethirdcolumn:
! !

preferredIdentifiestheprimarypathESXServerusestoaccessthedisk. activeIdentifiestheactualpathusedbyESXServertoaccessthedisk.

ThepreferredmodeisusedonlybyESXServertoaccessfixedpolicydisks.Ifadiskhas amostrecentlyused(MRU)policy,thepreferredmodeisdisplayedinthereport above,butESXServerdoesnotuseittoaccessthedisk. NOTE Reportsreturnedbyvmkmultipathlistpathstobothphysicaldisksandstorage controllers.Intheexampleabove,thediskslistedashavingnospaceavailableare actuallystorageprocessors. Youcandisplaythemultipathingstatusforasinglediskbyspecifyingitinthequery command.Forexample,todisplaythereportfordiskvmhba0:0:6,type: # vmkmultipath -q vmhba0:0:6

Setting Your Multipathing Policy for a LUN


Youcanspecifythedefaultpolicyforthemultipathingfeature.Therearetwopolicies:
!

fixedESXServeralwaysusesthepreferredpathtothedisk.Ifitcannotaccessthe diskthroughthepreferredpath,ittriesthealternatepaths.Fixedisthedefault policyforactive/activestoragedevices.


275

VMware, Inc.

Administration Guide

Typethefollowingcommandtoselectthefixedpolicyforadisk,inthisexample, vmhba0:0:0. # vmkmultipath -s vmhba0:0:0 -p fixed


!

mruESXServerusesthemostrecentpathtothediskuntilthispathbecomes unavailable.Thatis,ESXServerdoesnotautomaticallyrevertbacktothepreferred path.Mostrecentpath(mru)isthedefaultpolicyforactive/passivestoragedevices.

NOTE

UsetheMRUpathpolicyfordisksonactive/passivestoragedevices. Typethefollowingcommandtoselectthemrupolicyforadisk,inthisexample, vmhba0:0:0. # vmkmultipath -s vmhba0:0:0 -p mru Youcanselectadifferentpolicyforeachdisk.

NOTE

UsetheMRUpolicyfordisksonactive/passivestoragedevices.Usingthefixedpolicy cancausepaththrashingandsignificantlyreducedperformance.

Specifying Paths
Usethevmkmultipathcommandtodisableandenablepaths,settheactivepath,and setthepreferredpath,asillustratedinthefollowingexamples.Configurepathsby settingpathmodeswiththe-soption.

Enabling a Path
Usethe-eoptiontoenablepathswithvmkmultipath.Inthisexample,youare enablingthepathfromcontrollervmhba1:0:1todiskvmhba0:0:1. # vmkmultipath -s vmhba0:0:1 -e vmhba1:0:1

Disabling a Path
Usethe-doptiontodisablepathswithvmkmultipath.Inthisexample,youare disablingthepathfromcontrollervmhba1:0:1todiskvmhba0:0:1. # vmkmultipath -s vmhba0:0:1 -d vmhba1:0:1

Setting the Preferred Path


Usethe-r optiontospecifythepreferredpathtoadisk.Inthisexample,youare settingaspreferredthepathfromcontrollervmhba1:0:1todiskvmhba0:0:1. # vmkmultipath -s vmhba0:0:1 -r vmhba1:0:1

276

VMware, Inc.

Chapter 9 Storage and File Systems

NOTE

ESXServerignoresthepreferredpathwhenthemultipathingpolicyissettomru.

Saving Your Multipathing Settings


YourmultipathingsettingsaresavedwhenshuttingdownESXServer.However, VMwaresuggeststhatyourunthefollowingcommand,asroot,toensureyoursettings aresaved,incaseofanabnormalshutdown. # /usr/sbin/vmkmultipath -S Byrunningthiscommand,yourmultipathingsettingsarerestoredautomaticallywhen yourestartyoursystem.

In Case of Failover
Whenacableispulled,I/Ofreezesforapproximately3060seconds,untiltheSAN driverdeterminesthatthelinkisdown,andfailoveroccurs.Duringthattime,the virtualmachines(withtheirvirtualdisksinstalledonaSAN)mightappear unresponsive,andanyoperationsonthe/vmfsdirectorymightappeartohang.After thefailoveroccurs,I/Oshouldresumenormally. EventhoughESXServersfailoverfeatureensureshighavailabilityandprevents connectionlosstoSANdevices,allconnectionstoSANdevicescanbelostdueto disastrousevents,thatincludemultiplebreakages. Ifallconnectionstothestoragedevicearenotworking,thevirtualmachineswillbegin toencounterI/OerrorsontheirvirtualSCSIdisks.Also,operationsinthe/vmfs directorymayeventuallyfailafterreportinganI/Oerror.

Settings for QLogic Adapters


ForQLogiccards,youcanadjustthePortDownRetryCountvalueintheQLogicBIOS. Thisvaluedetermineshowquicklyafailoveroccurswhenalinkgoesdown. IfthePortDownRetryCountvalueis<n>,afailovertypicallytakesalittlelongerthan <n>multipliedby2seconds.Atypicalrecommendedvaluefor<n>is15,sointhiscase, failovertakesalittlelongerthan30seconds. FormoreinformationonchangingthePortDownRetryCountvalue,refertoyour QLogicdocumentation.

VMware, Inc.

277

Administration Guide

Failover in Windows 2000 and Windows Server 2003 Guest Operating Systems
FortheWindows2000andWindowsServer2003guestoperatingsystems,youcan increasethestandarddiskTimeOutValue sothatWindowswillnotbeextensively disruptedduringfailover. To increase the TimeOutValue 1 2 3 SelectStart>Run,typeregedit.exe,andclickOK. Intheleftpanelhierarchyview,doubleclickHKEY_LOCAL_MACHINE, System,CurrentControlSet,Services,andDisk. SelecttheTimeOutValueandsettheDatavaluetox03c(hexadecimal)or60 (decimal). Bymakingthischange,Windowswaitsatleast60seconds,fordelayeddisk operationstocomplete,beforegeneratingerrors. 4 ClickOKandexittheRegistryEditorprogram.

278

VMware, Inc.

10

Configuration for Clustering

10

Inthischapter,thefollowingsectionsdescribehowtouseVMwareESXServerto provideclusteredvirtualmachinesinavarietyofenvironments.
! ! !

WhatIsClustering?onpage 279 ClusteringVirtualMachinesonpage 280 NetworkLoadBalancingonpage 302

What Is Clustering?
Clusteringprovidesaservicethroughagroupofserverstogethighavailability, scalability,orboth. Forexample,allnodesinaclusterserveaWebsitethatservesstaticcontent.Themain gatewaydistributesrequeststoallnodesaccordingtoload.Itredirectsrequeststo remainingnodesifonecrashes.Thisgivesbetteravailabilityandbetterperformance. NetworkLoadBalancinginWindows2000providessuchaservice. Anotherexampleofamorecomplexconfiguration:Asinglenodeservesadatabase.If thatnodecrashes,theclusteringsoftwaremustrestartthedatabaseonanothernode. Thedatabaseapplicationknowshowtorecoverfromacrash.Innormaloperation, othernodesareusedforrunningotherapplications.MicrosoftClusterServiceand VeritasClusterServiceprovidesuchaservice.

VMware, Inc.

279

Administration Guide

Applications that Can Use Clustering


Totakeadvantageofclusteringservices,applicationsneedtobeabletorecongnize clustering. Suchapplicationscanbe:
! !

Stateless,asareWebserversandVPNservers. Withbuiltinrecoveryfeatures,likethoseindatabaseservers,mailservers,file servers,orprintservers.

Clustering Software
Availableclusteringsoftwareincludes:
!

MicrosoftClusteringService(MSCS) Providesfailoversupportforapplicationssuchasdatabases,fileservers,andmail servers

MicrosoftNetworkLoadBalancing(NLB) LoadbalancesincomingIPtrafficacrossaclusterofnodesforapplicationssuchas Webserversandterminalservices.

VeritasClusteringService(VCS)

Clustering Hardware
Atypicalclusteringsetupincludes:
!

Disksthataresharedbetweennodes.Needediftheapplicationusesdynamicdata asmailserversordatabaseserversdo. TheshareddiskscanbesharedSCSIdisksorastorageareanetworkusingFibre Channel.

! !

Extranetworkconnectivitybetweennodesformonitoringheartbeatstatus. Amethodforredirectingincomingrequests.

Clustering Virtual Machines


ESXServerhostscanutilizeclusteringservicestoenabletheclusteringofvirual machinesthatarerunningonESX Serverhosts.Clusteringvirtualmachinesallowsthe virtualmachinestosharedataorapplicationsacrossmultiplevirtualmachines.Useof clusteringservicesinvirtualmachinesprovideshighavailabilitywithlesshardware (suchasmachinesandnetworkadapters).

280

VMware, Inc.

Chapter 10 Configuration for Clustering

Clustering Software in Virtual Machines


NetworkLoadBalancing,MicrosoftClusteringService,andVeritasClusteringService runwithoutmodificationinvirtualmachinesonESXServer2.5.

Clustering Scenarios
Severalscenariosarepossibleforclusteringinvirtualmachines. Cluster in a Box Thisscenarioprovidessimpleclusteringtodealwithsoftwarecrashesor administrativeerrors.Theclusterconsistsofmultiplevirtualmachinesonasingle physicalmachine.ItsupportsshareddiskswithoutanysharedSCSIhardware.It supportsheartbeatnetworkwithoutanyextranetworkadapters.

Virtual machine
Cluster software

Virtual machine
Cluster software

.vmdk Requests Physical machine

Figure 10-1. Two-node cluster on a single physical machine; each node running clustering software. Cluster Across Boxes Thistypeofclusterconsistsofvirtualmachinesonmultiplephysicalmachines.The virtualdisksarestoredonshared,physicaldisks,soallvirtualmachinescanaccess them.Usingthistypeofcluster,youcandealwiththecrashofaphysicalmachine.

VMware, Inc.

281

Administration Guide

Virtual machine
Cluster software

Virtual machine
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 Thistypeofclustercombinesfeaturesoftheprevioustwotypes.Forexample,youcan consolidatefourclustersoftwomachineseachtotwophysicalmachineswithfour virtualmachineseachforprotectionfromhardwareandsoftwarefailures.

VM1

VM2

VM3 3 4

VM4

VM5 5 6

VM6

VM7 7 8 Physical machine

VM8 Physical machine

Figure 10-3. Four two-node clusters moved from eight physical machines to two. Cost-Effective Standby Host Provideastandbyhostformultiplephysicalmachinesononestandbyboxwith multiplevirtualmachines.

282

VMware, Inc.

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.

Configuring Virtual Machine Clusters with Shared Disks


Tocreateasetofclusteredvirtualmachines,configureeachsetwiththefollowing:
! !

PrimaryvirtualSCSIhostadapterwithoneSCSIvirtualdisk. Atleasttwovirtualnetworkadapters:
!

Publicnetworkadapterconnectedtovmnicx(thatis,tovmnic0orhigher).A vmnicisavirtualmachinedevicethatusesanetworkadapterdedicatedtothe virtualmachines. Privatenetworkadapterconnectedtovmnicx(thatis,tovmnic0orhigher)or tovmnet_x(thatis,tovmnet_0orhigher).Thisdeviceselectionmustmatch inallvirtualmachinesinaclusterset.Thisisthenetworkadapterthatthe clusteringservicewillusetomonitortheheartbeatbetweennodes.

Remainingdefaultvirtualmachinedevices(suchastheCDROMdriveandthe floppydiskdrive).

Inadditiontotheabovedevices,thefollowingisrequiredforsharedstorage:
! !

AsecondaryvirtualSCSIhostadapter OneormorevirtualdisksthatwillbesharedattachedtothesecondarySCSIhost adapter.

VMware, Inc.

283

Administration Guide

QLogicandEmulexHBAsinaclusteredenvironmentmustbededicatedto VMkernel.

Important Notes
!

EachvirtualmachinebydefaulthasfivePCIslotsavailable.Inthisconfiguration (twonetworkadaptersandtwoSCSIhostbusadapters),fouroftheseslotsare used.ThisleavesonemorePCIslotforathirdnetworkadapterifneeded. VMwarevirtualmachinesemulateonlytheSCSI2diskreservationprotocoland donotsupportapplicationsusingSCSI3diskreservations.However,allpopular clusteringsoftware(includingMSCSandVCS)currentlyusesSCSI2reservations. Youmayclusteronlytwonodes. YoucannotuseVMotionwithclusteredvirtualmachines.

! !

Two Node Cluster with Microsoft Cluster Service on a Single ESX Server Machine
ThisprocedurecreatesatwonodeclusterusingMicrosoftClusterServiceonasingle ESXServermachineandusesthefollowing:
! ! ! ! !

Portsaid=hostnameofnode1ofthecluster Kena=hostnameofnode2ofthecluster Arish=publichostnameofthecluster sharedfs=VMFSvolumelabelofthesharedstorage vms=VMFSvolumelabelofthelocalstorage

NOTE

Virtualdisksstoredonvmsandsharedfscanalsobestoredonthesamepartition.In thiscase,usethepartitionlabelonwhichthesevirtualdisksreside.

Creating the First Nodes Base Virtual Machine


Toeasethetaskofcreatingeachnodeinthecluster,createabasevirtualmachineand clonethatvirtualmachineforeachnodeinthecluster.Createthevirtualmachine, configurethevirtualhardware,andinstalltheoperatingsystem.Afterthosetaskshave allbeencompleted,thevirtualmachinecanbeclonedeasilytocreateeachnodeinthe cluster.

284

VMware, Inc.

Chapter 10 Configuration for Clustering

To create a base virtual machine in the first node 1 2 3 4 AccesstheVMwareManagementInterfaceat: https://<hostname>/ Logonastheuserwhowillownthevirtualmachine. ClickAddVirtualMachine. KeepthedefaultGuestOperatingSystemselectionofMicrosoftWindows2000 Server.

NOTE

ThisexampleusesMicrosoftWindows2000Serverastheguestoperatingsystem.You canuseanotherWindowsoperatingsystemthatsupportsMicrosoftClusterService. 5 6 7 8 9 10 11 12 13 14 15 ChangetheDisplayNamefieldtodescribethevirtualmachine,forexample,MSCS Node 1 (Portsaid). ChangetheLocationofthevirtualmachineconfigurationfileto /home/<user>/vmware/cluster1/cluster1.vmx. ClickNext. Selectthenumberofprocessorsyouwanttheguestoperatingsystemtouse(upto 2). ChangeMemorytoshowtheamountofRAMyouwanttoallocatetothisvirtual machineandclickNext. ClickBlanktocreateanewvirtualdisk. ChoosetheVMFSvolumeonwhichyouwanttostorethevirtualdisk. Givethevirtualdiskimageauniquename,forexample,cluster1.vmdk. IfyouneedaprimarySCSIdisklargerthan4GB,enterthevalueintheCapacity field. ChoosethevirtualSCSInodetowhichyouwanttoattachthevirtualdisk. ClickPersistenttoverifythediskmodeandclickNext. Bydefault,thediskmodeissettoPersistent. Youhavesuccessfullycreatedthevirtualmachine. Thehardwaretabforthisvirtualmachineappears.Fromthattab,youaddadditional hardwaredevices.

VMware, Inc.

285

Administration Guide

Virtual Disk Configuration YouneedasharedSCSIcontrollerandsharedSCSIdisksforsharedaccesstoclustered servicesanddata. To add a shared SCSI controller and shared SCSI disks 1 2 3 4 5 6 7 8 9 AccesstheVMwareManagementInterface. ClicktheHardwaretab. ClickAddDevice. ClickHarddisk. ClickBlanktocreateanewvirtualdisk. ChoosetheVMFSvolumeonwhichyouwanttostorethevirtualdisk. Givethevirtualdiskimageauniquename,forexample,quorum.vmdk. EntertheappropriatevalueintheCapacityfield. ChoosethevirtualSCSInodetowhichyouwanttoattachthevirtualdisk. ShareddisksmustbeattachedtoaseparatevirtualSCSIcontroller. 10 11 SelectSCSI1:1. ClickPersistenttoverifythediskmodeandclickOK. Bydefault,thediskmodeissettoPersistent. 12 13 14 AnewvirtualdiskandSCSIController1arenowvisibleontheHardwaretab. ClickEditnexttoSCSIController1,andchangethebussharingfromnoneto virtual. FromtheBusSharingdropdownlist,selectvirtual,andclickOK.

RepeatStep 1Step 9tocreateanadditionalsharedvirtualdiskusingSCSI1:2withthe filenameshared2.vmdk. Network Device Configuration YouneedanadditionalvirtualnetworkadaptertobeusedbyMicrosoftClusterService tomaintaintheclusterheartbeat. To add an additional network adapter: 1 2 AccesstheVMwareManagementInterface. ClicktheHardwaretab.

286

VMware, Inc.

Chapter 10 Configuration for Clustering

3 4 5

ClickAddDevice. ClickNetworkAdapter. FromtheDeviceBindingdropdownlistchoosevmnet_0. ThisattachesthesecondEthernetadaptertoaprivatenetworkbetweenthecluster nodes.

ClickOK.

Youhavecreatedthefirstclusternodevirtualmachine.

Installing the Guest Operating System


NowyouneedtoinstallWindows2000AdvancedServerinthevirtualmachineyou justcreated. To install Windows 2000 Advanced Server in the virtual machine 1 2 3 4 5 6 InserttheWindows2000AdvancedServerCDintheESXServermachines CDROMdrive. Inthemanagementinterface,clicktheblueterminaliconnexttothevirtual machinesnametolaunchtheremoteconsole. Logonastheuserwhocreatedthevirtualmachineorasroot. ClickPowerOn. InstallWindows2000AdvancedServeronthediskconnectedtoscsi0. Acceptallthedefaultoptionsduringtheinstallation. Donotinstalltheclusteringserviceatthistime. 7 Whentheinstallationiscompleted,installVMwareToolsintheguestoperating system.

Cloning the Virtual Machine


NowthatyouhaveavirtualmachinewithWindows2000AdvancedServerinstalled, youcanclonethisvirtualmachineinsteadofcreatingvirtualmachinesindividually. To clone the virtual machine 1 Runsysprep.exe,whichisavailableontheWindows2000CDinthe \support\tools\deploy.cabfile. ThisstripsthesecurityIDassignedtotheguestoperatingsystemandresetsthe machineinformationaswellastheTCP/IPnetworkconfiguration.

VMware, Inc.

287

Administration Guide

2 3 4 5

Shutdowntheguestoperatingsystemandpoweroffthevirtualmachine. RemovetheWindows2000AdvancedServerCDfromtheserversCDROMdrive. OnthemanagementinterfacesOverviewpage,clickManageFiles. Locatethevmfsfolderandthevmsfolder. Thisactionmighttaketimetorefresh.

6 7 8 9 10 11 12

Selectthecheckboxnexttothecluster1.vmdkfile. ClickCopyandclickPaste. Whenthecopyprocessiscomplete,selectthecheckboxnexttothefilecopy of cluster1.vmdk. ClicktheEditPropertiesbutton. Changethefilenametocluster2.vmdk. ClickOK. ClosetheManageFileswindow.

Thisconcludesthecloningprocess.Nowcontinuewithcreatingthesecondnode virtualmachine

Creating the Second Node Virtual Machine


To create a new virtual machine 1 2 3 OnthemanagementinterfacesOverviewtab,clickAddVirtualMachine. KeepthedefaultGuestOperatingSystemselectionofMicrosoftWindows2000 Server. ChangetheDisplayNamefieldtodescribethevirtualmachine. Forexample,useMSCS Node 2 (Kena). 4 5 6 7 8 ChangetheLocationto home/<user>/vmware/cluster2/cluster2.vmx ClickNext. Selectthenumberofprocessorsfortheguestoperatingsystemtouse,upto2. ChangeMemorytoshowtheamountofRAMyouwanttoallocatetothisvirtual machineandclickNext. ClickExistingtoattachanexistingvirtualdisktothisvirtualmachine.

288

VMware, Inc.

Chapter 10 Configuration for Clustering

9 10

FromtheVirtualDiskImagedropdownlist,choosecluster2.vmdk. ChoosethevirtualSCSInodetowhichyouwanttoattachthevirtualdisk,andclick Next.

Virtual Disk Configuration YouneedasharedSCSIcontrollerandsharedSCSIdisksforsharedaccesstoclustered servicesanddata. To add a shared SCSI controller and shared SCSI disks 1 2 3 4 5 ClicktheHardwaretabforthisvirtualmachine. ClickAddDevice. ClickHardDisk. Addthepreexitingquorumdisk(quorum.vmdk)thatyoucreatedinVirtualDisk Configurationonpage 286. ChoosethevirtualSCSInodetowhichyouwanttoattachthevirtualdisk. ShareddisksmustbeattachedtoaseparateSCSIcontroller.SelectSCSI1:1. 6 ClickPersistenttoverifythediskmode,andclickOK. BydefaultthediskmodeissettoPersistent. AnewvirtualdiskandSCSIController1arenowvisibleontheHardwaretab. 7 8 ClickEditnexttoSCSIController1tochangethebussharingfromnoneto virtual. FromtheBusSharingdropdownlistselectvirtual,andclickOK.

RepeatStep 1Step toaddanadditionalsharedvirtualdiskusingSCSI1:2withthe filenameshared2.vmdk.

Network Device Configuration


YouneedanadditionalvirtualnetworkadaptertobeusedbyMicrosoftClusterService tomaintaintheclusterheartbeat. To add this adapter 1 2 3 4
VMware, Inc.

ClicktheHardwaretabforthisvirtualmachine. ClickAddDevice. ClickNetworkAdapter. FromtheDeviceBindingdropdownlistchoosevmnet_0.


289

Administration Guide

ThisattachesthesecondEthernetadaptertoaprivatenetworkbetweenthecluster nodes. 5 ClickOK.

Youhavecreatedthesecondclusternodevirtualmachine. GotothemanagementinterfacesOverviewpage.Themanagementinterfaceshould listbothvirtualmachinesandshowthempoweredoff.

Installing Microsoft Cluster Service


To install Microsoft Clustering Service 1 2 Startthenode1virtualmachine. FollowtheWindows2000AdvancedServerminisetuppromptstoenter AdvancedServersserialnumber,thehostname(Portsaid),andtheIPaddresses.
!

Forthepublicnetworkadapter,enteranIPaddressthatbelongstothe physicalnetwork. FortheprivateIPaddress,useanaddresslike192.168.x.xwithaclassCsubnet mask(255.255.255.0).

Windowsautomaticallyreboots. 3 4 5 StarttheDiskAdministratorandchangebothshareddiskstobasicdisks. FormatbothsharedvirtualdiskswithNTFS,iftheyarenotformatted. AssignthefirstshareddisktoQ:(quorum)andtheseconddisktoR:. IfyoujoinedthisvirtualmachinetoanexistingActiveDirectorydomain,skipto Step 10. 6 Rundcpromo.exefromthecommandprompt. ThisstartstheActiveDirectorywizard. 7 Setupthecurrentmachineasadomaincontroller. Forthedomainname,use,forexample,vmcluster.domain.comwhere domain.comisyourDNSdomainandvmclusterisyourActiveDirectory domain.Thisnodemaybesetupasanewdomaintreeandalsoanewdomain forest,oritmayjoinexistingones. 8 9 MakesuretheDNSserverisinstalled. Setthedomainpermissionsasmixedmodeunlessyouplanotherwise.

290

VMware, Inc.

Chapter 10 Configuration for Clustering

10 11 12 13 14 15 16 17

Toaddaclusterservicesaccountinthedomain,gotoPrograms>Administrative Tools>ActiveDirectoryUsersandComputers. Addanaccountnamedcluster,checkUsercannotchangepasswordand Passwordneverexpires. InserttheWindows2000AdvancedServerCDintheserversCDROMdrive. GotoControlPanel>Add/RemovePrograms. SelectAdd/RemoveWindowsComponents. ChecktheClusterServicecomponentandclickNext. Followthepromptstoinstalltheservice. ChooseFormaNewCluster.
! !

Specifytheclustername(Arish). SpecifytheclusterIPaddress.Thisaddressmustbeonthesamenetworkas thatofthevmnic0.

18 19 20 21 22 23 24 25

Specifytheclusterserviceaccountcreatedabove. Specifythatbothshareddisksshouldbemanagedbytheclusterservice. Indicatetheshareddisk(Q:)tobethequorumdisk. Specifywhichnetworkadapterispublicandwhichisprivate. Stoptheclusterserviceonthelocalnode(fromClusterManager,rightclickthe nodename),sothesecondvirtualmachinecanaccesstheshareddisks. Startthenode2virtualmachine. StarttheDiskAdministratorandassignthefirstshareddisktoQ:(quorum)and theseconddisktoR:. Startdcpromo.exeandaddthisvirtualmachineasadomaincontrollerinthe samedomaincreatedinStep 7oraddittoanexistingdomain. YoumustmatchthesetupdoneinStep 7.

26 27

Inthenode1virtualmachine,starttheclusterservicebyreversingStep 22. Inthenode2virtualmachine,repeatStep 13Step 21withoneexception:In Step 17,selectJoinaCluster.

ThisconcludestheMicrosoftClusterServiceinstallationandconfiguration.

VMware, Inc.

291

Administration Guide

Running Microsoft Cluster Service


MicrosoftClusterServiceshouldoperatenormallyinthevirtualmachineafteritis installed. NOTE SomediskerrorsarerecordedintheWindowseventloginnormaloperation.These errormessageshaveaformatsimilartothefollowing:
The driver detected a controller error on \Device\Scsi\BusLogic3

Theyshouldbereportedperiodicallyonlyonthepassivenodeoftheclusterandshould alsobereportedwhenthepassivenodeistakingoverduringafailover.Theerrorsare reportedbecausetheactivenodeoftheclusterhasreservedthesharedvirtualdisk(s). ThepassivenodeperiodicallyprobestheshareddiskandreceivesaSCSIreservation conflicterror.Thisisnormaloperation.

Two Nodes with Microsoft Cluster Service on Separate ESX Server Machines
Thisprocedurecreatesatwonodeclusterinvirtualmachinesthatwillrunontwo separateESXServermachines.Itusesthesamenamingconventionsasintheprevious procedure. Inaddition,thephysicalsharedstorageiseither:
! !

SharedSCSI Astorageareanetwork(SAN)

ForthisexercisetheVMFSpartitionfortheinternalstorageoneachESXServer computerislabeledvms.TheVMFSpartitionforthesharedstorageislabeled sharedfs. EachESXServermachinemusthaveanadditionalphysicalnetworkadapterassigned tothevirtualmachinestousefortheprivatenetworkthatmonitorstheheartbeat.The procedureassumesthisnetworkadapterusesthedevicenamedvmnic1.Connectthe privatenetworkadaptertoaseparatenetworkfromthatusedbythepublicnetwork adapter.

Creating the First Nodes Base Virtual Machine


FollowtheprocedureinCreatingtheFirstNodesBaseVirtualMachineonpage 284, withthefollowingchanges:
!

InVirtualDiskConfigurationonpage 286,inStep 8clickEditnexttoSCSI Controller1tochangethebussharingfromnonetophysicalinsteadofvirtual. FromtheBusSharingdropdownlistselectphysical,andclickOK.

292

VMware, Inc.

Chapter 10 Configuration for Clustering

InNetworkDeviceConfigurationonpage 286,inStep 5usevmnic1insteadof vmnet_0asthedeviceusedbyEthernetAdapter1. Accessthevirtualmachinemenubyclickingthearrowtotherightofthevirtual machineicon.ChooseConfigureOptions.UnderVerboseOptions,clicktheclick herelink. Changethespecificationsofscsi1:1.nameandscsi1:2.nametousethestrict vmhbaname(forexample,vmhba0:1:0:1:shared1.vmdk)fortheVMFS partition,ratherthantheVMFSname(forexample,sharedfs:shared1.vmdk). ThereasonforthischangeisthatifoneESXServermachinerebootswhileavirtual machineontheotherphysicalmachineisreservingthesharedSCSIdisk,ESX ServercannotreadtheVMFSnameontheshareddiskwhenitisloadedand initialized.Ifthesharedvirtualdiskisnotspecifiedusingthefullvmhbaname, ESXServercannotdeterminethediskspecifiedbytheVMFSnameandgivesan errorwhenrestartingthevirtualmachine. ClickOK.

Inaddition,changetheaccessrightsoftheVMFSpartitionwhereyoustoretheshared virtualdisks.Bydefault,VMFSpartitionsareconfiguredforpublicaccess.Tosupport clustering,theVMFSpartitionmustbeconfiguredforsharedaccess. To change the access settings for the VMFS partition 1 2 3 4 5 6 Fromthemanagementinterface,clicktheOptionstab ClickStorageManagement. IdentifythediskvolumethatcontainstheVMFSpartitionwherethesharedvirtual disksarestored. ClickEditforthediskvolume. FromtheAccessModedropdownmenu,chooseShared. ClickOK.

Youhavecreatedthefirstclusternodevirtualmachine.

Installing the Guest Operating System


FollowtheprocedureinInstallingtheGuestOperatingSystemonpage 287.

VMware, Inc.

293

Administration Guide

Cloning the Virtual Machine


NowthatyouhaveavirtualmachinewithWindows2000AdvancedServerinstalled, clonethisvirtualmachineinsteadofcreatingvirtualmachinesindividually. To clone the virtual machine 1 Runsysprep.exe,whichisavailableontheWindows2000CDinthe \support\tools\deploy.cabfile. StripstheSecurityIDassignedtotheguestoperatingsystemandresetsthe machineinformationaswellastheTCP/IPnetworkconfiguration. 2 3 Shutdowntheguestoperatingsystemandpoweroffthevirtualmachine. GototheconsoleofthesecondESXServermachine. Thisiswhereyoucopythevirtualdiskthatresultedfromcreatingthefirstnode. 4 5 Logonasroot. Changedirectories:cd /vmfs/vms. AssumesthattheinternalstorageforthesecondserverisinaVMFSpartition labeledvms. 6 7 Usetheftpcommand:ftp <server1-hostname>. Changedirectories:cd/vmfs/vms. ChangesthecurrentdirectorytotheVMFSpartitiononthefirstserverwhereyou createdthefirstnodesvirtualdisk. 8 Setthetype(transfermode)tobinary:bin. Ifyouusetexttransfermode,thevirtualdiskmaynotbeusableonthetarget server. 9 Type:hashon. Turnsonthedisplayofaseriesofhashsignsasatransferprogressindicator. 10 Retrievethevirtualdiskfile:getcluster1.vmdk Initiatesthetransferofthevirtualdiskfiletothecurrentdirectoryonthesecond ESXServermachine. 11 12 Afterthefiletransferiscompleted,typebyetoendtheFTPsession. Renamethefile:mvcluster1.vmdkcluster2.vmdk Thisrenamesthevirtualdisktocluster2.vmdk.

294

VMware, Inc.

Chapter 10 Configuration for Clustering

Thisconcludesthecloningprocess.Continuewithcreatingthesecondnodevirtual machine.

Creating the Second Node Virtual Machine


FollowtheprocedureinCreatingtheFirstNodesBaseVirtualMachineonpage 292, notingthefollowingdifferences:
!

InVirtualDiskConfigurationonpage 286,Step 8,clickEditnexttoSCSI Controller1tochangethebussharingfromnonetophysicalinsteadofvirtual. FromtheBusSharingdropdownlist,choosephysical,andclickOK. InNetworkDeviceConfigurationonpage 286,Step 5,fromtheDeviceBinding dropdownlist,choosevmnic1insteadofvmnet_0.Thisattachesthesecond Ethernetadaptertothesecondphysicaladapterdesignatedforvirtualmachine use.Thisisusedtocreateaprivatenetworkbetweentheclusternodes. Changethespecificationsofscsi1:1.nameandscsi1:2.nameasyoudidwhen creatingthefirstnodesbasevirtualmachine.

Clustering Using a Raw SCSI Disk


TheshareddiskusedforclusteringcanalsobeacompletesharedSCSIdisk,ratherthan aVMFSfileonashareddisk.UsingarawSCSIdiskasashareddiskmightsimplify initialsetup.Itmightbeusefulforimportinganexistingphysicalclusterthatalready hasclusterdataonaSCSIdisk.Inaddition,usingarawSCSIdiskasashareddisk allowsavirtualmachinetoparticipateinaclusterwithaphysicalmachine.For example,thevirtualmachinecanbeusedasthepassivenodeforaphysicalmachine thatistheactivenode. Forthevirtualmachinetoaccessaphysicaldisk,replacetheinstructionsinVirtual DiskConfigurationonpage 286withthefollowingsteps. To add a physical SCSI controller and shared raw SCSI disks 1 2 3 4 5 ClicktheHardwaretab. ClickAddDevice. ClickHarddisk. ClickSystemLUN/DisktogiveyourvirtualmachinedirectaccesstoaSANor sharedstoragevolume. ChoosetheLUN/PartitionyouwanttoattachtothisVMasarawdisk.

VMware, Inc.

295

Administration Guide

NOTE

InESXServer,physicaldisksareidentifiedbyavmhbanumber.Forexample, vmhba0:1:2:1meansphysicaladaptervmhba0,target1,LUN2,partition1. Whenthefinalnumberis:0,thatindicatesyouarespecifyingtheentiredisk, ratherthanaparticularpartition.

ChoosethevirtualSCSInodetowhichyouwanttoattachtherawdisk. ShareddisksmustbeattachedtoaseparateSCSIcontrollerfromthesystem disk.Select,SCSI1:1

NOTE

ClickOK. AnewvirtualdiskandSCSIController1appearontheHardwaretab.

8 9

ClickEditnexttoSCSIController1tochangethebussharingfromnoneto physical. FromtheBusSharingdropdownlistchoosephysical,andclickOK. SettingthebussharingtophysicalmakessurethatalltheSCSIreserveandreset commandsgothroughtothephysicaldisk.

RepeatStep 1Step 8tocreateanadditionalsharedrawdiskusingSCSI1:2. Youhavecompletedthevirtualmachineconfiguration. ForinformationaboutaddingarawSCSIdevice,seetheVMwaretechnicalnoteUsing RawDeviceMappingswithESXServer,availableat http://www.vmware.com/support/resources/esx_resources.html.

Installing Microsoft Cluster Service


FollowtheprocedureinInstallingMicrosoftClusterServiceonpage 290.

Additional Notes for Clustering Across Physical Machines


!

SupplyanextraparametertotheEmulexdriverwhenitisloadedbyeditingthe file/etc/vmware/hwconfig.Identifythebus,slotandfunctionholdingthefirst (oronly)Emulexcard.FindthisinformationattheStartupProfilepage.Addaline withtheformat:


device.vmnix.6.14.0.options = "lpfc_delay_rsp_err=0"

totheendof/etc/vmware/hwconfig.Thenumbers6.14.0specifythebus,slot, andfunctionwheretheEmulexcardislocated.IfyouhavemorethanoneEmulex card,youshouldhaveonlyalinereferencingthefirstcard.

296

VMware, Inc.

Chapter 10 Configuration for Clustering

Table 101summarizesadditional,importantpointsforusingMicrosoftClustering SoftwarewithESXServer. Table 10-1. MSCS Configuration Considerations


Area Nonclustered disks Component Single-Host Clustering Multi-Host Clustering

Virtualmachine ! andswap ! (paging)file Nonclustered virtualdisks (.vmdk) Nonclustered rawdevice (disk)mapping


! ! ! ! ! ! ! !

Mustbeonlocalstorage,notonaSAN. Mustbeanonclustereddisk. MustresideonapublicVMFSvolume. MustuseVMFSlabelnotation. Virtualadaptermustbesettoshared mode = none. RevisionmustbeESX2.5.2orhigher. MustresideonapublicVMFSvolume. MustuseVMFSlabelnotation. Diskmustbeinpersistentmode. DeviceTypemustbescsi-nonpassthru-rdmor scsi-passthru-rdm.

Nonclustered rawdevice (disk) Clustered disks Clustered virtualdisks (.vmdk)

Userawdevicemappinginstead,ifESXServer2.5.2andhigher.

! ! ! ! !

MustuseVMFSlabel notation. Virtualadaptermustbein


shared mode = virtual.

! !

Musthavebeencreatedwith vmkfstoolsz. Mustusethe vmhba<H>:<T><L>:<P>. notation,nottheVMFSlabel notation. Virtualadaptermustbesetto shared mode = physical. Mustresideonitsownphysical LUN. LUNcanhostoneVMFSfile system. Sharedvirtualdiskmustbethe onlyfileonthisVMFSvolume. VMFSvolumemustbein sharedmode. VMFSvolumecanhaveone physicalextent.

LUNmusthostonlyone VMFSfilesystem. VMFSvolumemustbe dedicatedtothecluster.


!

MustresideonpublicVMFS ! volume.
! ! ! !

VMware, Inc.

297

Administration Guide

Table 10-1. MSCS Configuration Considerations (Continued)


Area Clustered disks (Continued) Component Single-Host Clustering RevisionmustbeESX2.5or higher. Mustresideonapublic VMFSvolume. MustuseVMFSlabel notation. Diskmustbeinpersistent mode. DeviceTypemustbe scsi-nonpassthru-rdm. Virtualadaptermustbesetto shared mode = virtual.
! ! ! ! !

Multi-Host Clustering Notsupported

Clustered ! nonpass throughraw ! devicemapping


! ! ! !

Clustered passthrough rawdevice mapping

Notsupported

RevisionmustbeESX2.5.2or higher. MustuseVMFSlabelnotation. Diskmustbeinpersistent mode. DeviceTypemustbe scsi-passthru-rdm.

Virtualadaptermustbesetto: shared mode = physical. Mustuseoneofthefollowing:


!

AsinglePassThruRDM (Physicalcompatibilitymode) onaVMFS2Volumethatisin Sharedmode. TwodifferentRDMfilesusing thesameRAWLUNona VMFS2Volumethatisin Publicmode.Twodifferent Publicvolumescanalsobe used.Thisrequiresusing vmkfstoolsrtocreatethe separateRDMfilesasthe GraphicalInterfacedoesnot provideanoptionforthat. Userawdevicemapping instead,ifESXServer2.5.2or higher.

Or
!

Clusteredraw disk

Notsupported

298

VMware, Inc.

Chapter 10 Configuration for Clustering

Table 10-1. MSCS Configuration Considerations (Continued)


Area ESXServer Configuration Component Single-Host Clustering Multi-Host Clustering

/proc/vmware/config/Disk/UseLunResetmustbesetto1. /proc/vmware/config/Disk/UseDeviceResetmustbesetto0. Swappartitionsmustbelocal,notonaSAN. RDMLUNscannotbeusedwithESX Serverversionsearlierthan2.5.2. QLogicandEmulexHBAsinaclusteredenvironmentmustbededicatedtoVMkernel. Aseparatevirtualadaptermustbeusedforclustereddisks.

Qlogic

Driverrevisionshouldbe7.0.4onESX Server2.5.1orlater,version6.07onESXServer2.5, and6.04onearlierrevisionsofESX Server. BIOSsettings:


! ! !

EnableTargetReset=Yes FullLIPLogin=Yes FullLIPReset=No

Emulex Microsoft Windows

Driverrevisionis2.01gonESXServerand4.20qonearlierrevisions.
! ! ! !

OperatingsystemmustbeWindows2000orWindows2003. Eachclusterislimitedtotwonodes. UsetheVMwareBuslogicdriverratherthanthenativeWindowsdriverifyouuse Buslogicvirtualadapters. MakesuretheI/Otimeoutis60secondsormore: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Disk\TimeOutV alue ClusterServicemustrestartautomaticallyonfailure(forfirst,second,and subsequenttimes)

Running Microsoft Cluster Service


MicrosoftClusterServiceshouldoperatenormallyinthevirtualmachinesafteritis installed. NOTE SomediskerrorsarerecordedintheWindowseventloginnormaloperationandhave aformatsimilarto The driver detected a controller error on \Device\Scsi\BusLogic3 Theyshouldbereportedperiodicallyonlyonthepassivenodeoftheclusterandshould alsobereportedwhenthepassivenodeistakingoverduringafailover.Theerrorsare reportedbecausetheactivenodeoftheclusterhasreservedthesharedvirtualdisk.The passivenodeperiodicallyprobestheshareddiskandreceivesaSCSIreservation conflicterror.

VMware, Inc.

299

Administration Guide

VMFS Locking and SCSI Reservation


ForasharedSCSIdiskthatcanbeaccessedbymultipleESXServermachines,twokinds oflockingmaybeinuse.Thesetwokindsoflockingaresomewhatindependentand cancauseconfusion.ThesharedSCSIdiskmaybeonsharedSCSIbusor,morelikely, onastorageareanetwork(SAN).

VMFS File System Locking


ThefirstkindoflockingisVMFSfilesystemlocking.ESXServerlocksVMFSfile systemsonaserverlevelwhenaVMFSfilesystemisconfiguredasapublicorshared filesystem.Thislockingisdonetoensurethatthereisnocorruptioncausedbymultiple accessestothefilesystembydifferenthosts. IfaVMFS1volumeisconfiguredinpublicmode,onlyoneservercanaccessthatVMFS atatime.IfoneserverisaccessingtheVMFS1volume,throughavirtualmachineora filesystemcommand,afilesystemoperationbyanotherhostfails.Forexample,a vmkfstoolscommandfailswithamessagethatsays:
vmkfstools: file system is locked by another server. Use 'vmkfstools --recover' to unlock file system if no other server is accessing

Typically,donotrunvmkfstools --recover,becauseanotherhostisusingthefile system.TheerrormessageindicatesthatthisservercannotaccesstheVMFSuntilthe otherserverhasfinishedaccessingit.However,ifaserverfailswhileaccessingthefile system,thefilesystemmaystayinthelockedstateandyoumightneedtorun vmkfstools --recover. InapublicVMFS2volume,lockingisataperfilelevel,resultinginfewerlocking issues.Youmightstillgettheprecedingmessageandneedtousevmkfstools --recover,ifaserverfails. IfaVMFSisusedtostoreavirtualdiskthatisaccessedbymultiplevirtualmachines onmultiplephysicalserversforthepurposesoffailoverclustering,theVMFSshould beconfiguredasasharedfilesystem.Thelockingprotocolisrelaxedtoallowmultiple virtualmachinesondifferentserverstoaccessthesameVMFSfileatthesametime. However,filesystemcommandsdothesamelockingaswithpublicfilesystems(that is,perVMFSinVMFS1volumesandperfileinVMFS2volumes). Additionally,whenmultiplevirtualmachinesaccesstheVMFS,theVMFSfilesystem entersareadonlymodeinwhichitisimpossibletocreate,delete,orchangethesizeof files.Thecontentsoftheindividualfilescanstillbemodified.Ifyoulaterwanttocreate orremoveVMFSfiles,youmuststopallvirtualmachinesusingtheVMFSandreenter writablemodeusingthecommand: vmkfstools --config writable vmhba0:1:0:0

300

VMware, Inc.

Chapter 10 Configuration for Clustering

SubstitutethenameoftheappropriatediskorVMFSinplaceofvmhba0:1:0:0.

Locking at SCSI Disk Level


ThesecondkindoflockingislockingattheSCSIdisklevel,whichiscalledSCSIdisk reservation. AnyserverconnectedtoaSCSIdiskcanissueaSCSIcommandtoreservethedisk.If nootherserverisreservingthedisk,thecurrentserverobtainsareservationonthedisk. Aslongasthatreservationexists,nootherservercanaccessthedisk.AllSCSI commandstothatdiskbyotherserversfailwithanappropriateerrorcode. IfavmkfstoolscommandisattemptedonaVMFSonadiskthatisreservedby anotherserver,thevmkfstoolscommandfailswithamessage:
vmkfstools: shared SCSI disk is reserved by another server. Use 'vmkfstools -L release/reset' to end reservation if no other server is using the SCSI reservation

Similarly,avirtualmachinefailstostartifitsvirtualbootdiskisstoredonaphysical diskthatisreservedbyanotherhost. MostapplicationsdonoteverreserveaSCSIdisk.However,failoverclustering softwarereservesSCSIdiskstoensurethatonlytheactivenodeisabletoaccessthe sharedSCSIdisk.Expectthattheshareddiskinaphysicalclusteringsetupisreserved whentheclusterisactive.Similarly,foravirtualmachineclusterthatisrunningacross physicalmachines,reservationsbytheclusteringsoftwarearetransmittedthroughto thephysicalshareddisk. Ifyouencounteradiskthatisreservedunexpectedly,trytodeterminewhethersome clusteringsoftwarehasexplicitlyreservedthedisk.Ifnot,youcanreleasethe reservationontheserverthathasthereservationbyrunningacommandinthisformat: vmkfstools -L release vmhba0:1:0:0 SubstitutethenameoftheappropriatediskorVMFSinplaceofvmhba0:1:0:0. Ifyoucannotdeterminewhichserverholdsthereservation,youmightbeableto eliminatethereservationbyissuingaSCSIbusresetonanyservermachineusinga commandinthisformat: vmkfstools -L lunreset vmhba0:1:0:0 Ifthisfails,trythefollowingcommand: vmkfstools -L reset vmhba0:1:0:0

VMware, Inc.

301

Administration Guide

Using LUN Masking to Avoid Locking Issues


LockingissuesarelikelytohappenonaSAN,wheremultipleusersmaybeaccessing someofthesamedisksormaymistakenlyaccessadiskassignedtoanotheruser. ItishelpfultouseLUNmaskingorzoningtolimitwhichdisksarevisibletoeachserver inthesystemandreducethewaysinwhichoneusercanaffectanotheruser.In particular,theuseofLUNmaskingorzoningcanhelppreventproblemssuchasthose describedaboveinwhichoneserverunexpectedlylocksorreservesthewrongSCSI disk.

Network Load Balancing


NetworkLoadBalancingisaWindows2000AdvancedServerfeature.Byusing NetworkLoadBalancingtobuildaservercluster,youcanenhancetheavailabilityof Internetserverprograms,suchasthoseusedonWeb,proxy,domainnameservice (DNS),FTP,virtualprivatenetwork(VPN),andstreamingmediaservers.Network LoadBalancing(NLB)canhelpyouscaleyourserversperformance. NLBcanbeusedinunicastormulticastmodes.Iftheisclusteroperatinginunicast mode(thedefault),ordinarynetworkcommunicationamongclusterhostsisnot possibleunlesseachclusterhosthasatleasttwonetworkadapters. NOTE SetthevmkernelconfigurationoptionNetNotifySwitchto0whenusingunicast mode. VMwarerecommendsthatyouusemulticastmode,becauseunicastmodeforcesthe physicalswitchesontheLANtobroadcastallNLBclustertraffictoeverymachineon theLAN.

Creating Multinode Network Load Balancing Clusters on ESX Server


ThissectioncoversproceduresforcreatingaNetworkLoadBalancingclusterusing nodesrunninginvirtualmachines.Thesevirtualmachinescanbelocatedononeor moreESXServermachines.

Creating the First Nodes Base Virtual Machine


To create a base virtual machine on the first node 1 2 AccesstheVMwareManagementInterfaceathttps://<hostname>/andlogon astheuserwhowillownthevirtualmachine. ClickAddVirtualMachine.

302

VMware, Inc.

Chapter 10 Configuration for Clustering

KeepthedefaultGuestOperatingSystemselectionofMicrosoftWindows2000 Server.

NOTE ThisexampleusesMicrosoftWindows2000Serverastheguestoperating system.YoucansubstituteanotherWindowsoperatingsystemthatsupports MicrosoftClusterService. 4 ChangetheDisplayNamefieldtodescribethevirtualmachine. Forexample,MSCS Node 1 (Portsaid). 5 6 7 8 9 10 11 12 13 ChangetheLocationofthevirtualmachineconfigurationfileto /home/<user>/vmware/cluster1/cluster1.vmx. ClickNext. Choosethenumberofprocessorsyouwanttheguestoperatingsystemtouse,up to2. ChangeMemorytoshowtheamountofRAMyouwanttoallocatetothisvirtual machineandclickNext. ClickBlanktocreateanewvirtualdisk. ChoosetheVMFSvolumeonwhichyouwanttostorethevirtualdisk. Givethevirtualdiskfileauniquename,forexample,cluster1.vmdk. IfyouneedaprimarySCSIdisklargerthan4GB,enterthevalueintheCapacity field. ChoosethevirtualSCSInodetowhichyouwanttoattachthevirtualdisk. Bydefault,thediskmodeissettoPersistent. 14 ClickPersistenttoverifythediskmodeandclickNext. Youhavecreatedthevirtualmachine. TheHardwaretabforthisvirtualmachineappears.Useittoaddhardware devices. Network Device Configuration Addanothervirtualnetworkadaptertheclusternodeswillusetocommunicatewith eachother.

VMware, Inc.

303

Administration Guide

To add a virtual network adapter 1 2 3 OntheHardwaretabforthisvirtualmachine,clickAddDevice. ClickNetworkAdapter. FromtheDeviceBindingdropdownlist,choosevmnic1. IfallnodesoftheclusterwillresideonthesameESXServermachine,use vmnet_0forthesecondnetworkadapter.Thisallowsallnodesto communicatewitheachotheronaprivatevirtualnetworkconnectedtothe vmnet_0virtualswitch.

NOTE

ClickOK.

Youhavefinishedcreatingandconfiguringthefirstnodevirtualmachine.

Installing the Guest Operating System


NowyouneedtoinstallWindows2000AdvancedServerinthevirtualmachine. To install Windows 2000 Advanced Server 1 2 3 4 5 6 InserttheWindows2000AdvancedServerCDintheESXServermachines CDROMdrive. Inthemanagementinterface,clicktheblueterminaliconnexttothevirtual machinesnametolaunchtheremoteconsole. Logonusingtheuseraccountthatcreatedthevirtualmachineorasroot. ClickPowerOn. InstallWindows2000AdvancedServeronthediskconnectedto scsi0. Acceptallthedefaultoptionsduringtheinstallation. Youcaninstalltheapplicationsatthistime.NetworkLoadBalancingisinstalled bydefault. 7 8 Whentheinstallationiscompleted,installVMwareToolsintheguestoperating system. RemovetheWindows2000AdvancedServerCDfromtheserversCDROMdrive.

Cloning the Virtual Machine


NowthatyouhaveavirtualmachinewithWindows2000AdvancedServerinstalled, clonethisvirtualinsteadofcreatingvirtualmachinesindividually.

304

VMware, Inc.

Chapter 10 Configuration for Clustering

To clone the virtual machine using the management interface 1 Runsysprep.exe,whichisavailableontheWindows2000CDinthe \support\tools\deploy.cabfile. ThisstripsthesecurityIDassignedtotheguestoperatingsystemandresetsthe machineinformationaswellastheTCP/IPnetworkconfiguration. 2 3 4 Shutdowntheguestoperatingsystemandpoweroffthevirtualmachine. OnthemanagementinterfaceOverviewtab,clickManageFiles. Drilldowntothevmfsfolderandtothevmsfolder. Thismighttaketimetorefresh. 5 6 7 8 9 10 Selectthecheckboxnexttothecluster1.vmdkfile. ClickCopyandclickPaste. Whenthecopyprocessiscomplete,selectthecheckboxnexttothefilecopy of cluster1.vmdk. ClickEditProperties. Changethefilenametocluster2.vmdkandclickOK. ClosetheManageFileswindow.

Thisconcludesthecloningprocess.Nowcontinuewithcreatingthesecondnode virtualmachine

Cloning the Virtual Machine, an Alternate Method


To clone the virtual machine using the ESX Server console 1 Runsysprep.exe,whichisavailableontheWindows2000CDinthe \support\tools\deploy.cabfile. ThisstripsthesecurityIDassignedtotheguestoperatingsystemandresetsthe machineinformationaswellastheTCP/IPnetworkconfiguration. 2 3 4 Shutdowntheguestoperatingsystemandpoweroffthevirtualmachine. AttheESXServerconsole,logonasroot. Changedirectories:cd/vmfs/vms Thisdirectoryiswhereyoucreatedthevirtualdisk. 5 Createacopyofthevirtualdisk:cpcluster1.vmdkcluster2.vmdk.

VMware, Inc.

305

Administration Guide

Repeatthiscommandusingadifferenttargetfilenametocreatemorethanone copy. Thisconcludesthecloningprocess.Nowcontinuewithcreatingthesecondnode virtualmachine

Cloning the Virtual Machine to Another ESX Server Machine


Thissectionassumesthatyouareplanningtoruneachnodeofaneightnodecluster onaseparateESXServermachine.TorunadifferentnumberofnodesoneachESX Servermachine,adjusttheprocedure. To clone a virtual machine and move it to another ESX Server physical machine 1 Runsysprep.exe,whichisavailableontheWindows2000CDinthe \support\tools\deploy.cabfile. ThisstripsthesecurityIDassignedtotheguestoperatingsystemandresetsthe machineinformationaswellastheTCP/IPnetworkconfiguration. 2 3 4 Shutdowntheguestoperatingsystemandpoweroffthevirtualmachine. AttheESXServerconsole(onamachineotherthantheonewhereyoucreatedthe firstnode),logonasroot. Changedirectories:cd/vmfs/vms. Thisisthedirectorywhereyouwanttocreatethevirtualdisk. 5 6 7 8 9 Usetheftpcommand:ftp<first-ESX-Server-Hostname>. Changedirectories:cd/vmfs/vms. Setthetypetobinary:bin. Type:hashon. Retrievethevirtualdiskfile:getcluster1.vmdk. ThistransfersacopyofthevirtualdisktothesecondESXServermachinesVMFS partition. 10 11 Quittheftpsession:bye. Renamethevirtualdiskfile:mvcluster1.vmdkcluster9.vmdk. ThisassumesthatthisESXServermachinewillhostnodes9andup. Repeatthiscommandusingadifferenttargetfilenameifyouwanttocreatemore thanonecopy.

306

VMware, Inc.

Chapter 10 Configuration for Clustering

Thisconcludesthecloningprocess.Continuewithcreatingthesecondnodevirtual machine RepeatStep3Step11oneachESXServermachinethatwillparticipateinthecluster.

Creating the Second Node Virtual Machine


To create a new virtual machine 1 2 3 4 5 6 7 8 9 10 11 OnthemanagementinterfaceOverviewtab,clickAddVirtualMachine. KeepthedefaultGuestOperatingSystemselectionofMicrosoftWindows2000 Server. ChangetheDisplayNamefieldtodescribethevirtualmachine,forexample,MSCS Node 2 (Kena). ChangetheLocationofthevirtualmachineto /home/<user>/vmware./cluster2/cluster2.vmx. ClickNext. Choosethenumberofprocessorsyouwanttheguestoperatingsystemtoutilize, upto2. ChangeMemorytoshowtheamountofRAMyouwanttoallocatetothisvirtual machine. ClickNext. ClickExistingtoattachanexistingvirtualdisktothisvirtualmachine. FromtheVirtualDiskImagedropdownlist,choosecluster2.vmdk. ChoosethevirtualSCSInodetowhichyouwanttoattachthevirtualdiskandclick Next.

Network Device Configuration Youneedtoaddanothernetworkadapterthatthe clusternodeswillusetocommunicatewitheachother. To add a virtual network adapter 1 2 3 Onthehardwaretabforthisvirtualmachine,clickAddDevice. ClickNetworkAdapter. FromtheDeviceBindingdropdownlist,choosevmnic1.

VMware, Inc.

307

Administration Guide

NOTE IfallnodesoftheclusterwillresideonthesameESXServermachine,use vmnet_0forthesecondnetworkadapter.Thisallowsallnodestocommunicate witheachotheronaprivatevirtualnetworkconnectedtothevmnet_0virtual switch. 4 ClickOK.

Youhavefinishedcreatingandconfiguringthenewnodesvirtualmachine. GotothemanagementinterfacesOverviewpage.Bothvirtualmachinesshouldbe listedandshownaspoweredoff. RepeatthisprocedureateachESXServermachineonwhichyoucreatedcopiesofthe virtualdisk.

Configuring the Network Load Balancing Cluster


Youcanclusterupto32nodesusingNetworkLoadBalancing.Eachnodemustbe configuredseparately. To configure the cluster 1 2 3 4 5 6 7 UsingthemanagementinterfaceconnectedtothefirstESXServermachine,launch theremoteconsoleforthefirstnode. Poweronthevirtualmachine. FollowtheWindows2000ServerminisetuppromptstoentertheWindows2000 AdvancedServerserialnumberandthehostnameandIPaddresses. Attheendoftheprocess,Windowsreboots. LogontotheWindows2000AdvancedServervirtualmachineasAdministrator. OpenNetworkandDialupConnections. RightclickthelocalareaconnectiononwhichyouwillinstallNetworkLoad BalancingandchooseProperties. TheLocalAreaConnectionPropertiesdialogboxappears. 8 9 10 UnderComponentscheckedareusedbythisconnection,selecttheNetwork LoadBalancingcheckbox. ClickProperties. OntheClusterParameterstab,configureclusteroperationsusingthese parameters:

308

VMware, Inc.

Chapter 10 Configuration for Clustering

PrimaryIPAddress:Addressfortheclusterasawhole.Thisistheaddress thattheclientswillusetoaccessthecluster. SubnetMask:Subnetmaskofthenetworktowhichtheaboveaddress belongs. Multicast:Checkthisboxtoenablemulticastmode. Allmembersoftheclustermustusethesamesettingforthisoption.When youenablemulticastmode,youmightneedtochangetheconfigurationof yourphysicalLANswitches.ConsultyourLANhardwaredocumentationfor information. RefertoNetworkLoadBalancingHelpfortheremainingoptions.

NOTE

11 12 13 14 15

ClickOKtoreturntotheLocalAreaConnectionPropertiesdialogbox. ClickOKagaintoreturntotheLocalAreaConnectionStatusdialogbox. RightclickthelocalareaconnectiononwhichNetworkLoadBalancingistobe installed,andclickProperties. SelectInternetProtocol(TCP/IP),andclickProperties. SetupTCP/IPforNetworkLoadBalancing. Formoreinformationandlinks,seeRelatedTopicsintheNetworkLoadBalancing Help.

NOTE

YoumustaddClustersPrimaryIPAddresstothelistofIPAddressesbound totheadapter.

16

RepeatthesestepsoneachhosttobeusedinyourNetworkLoadBalancingcluster.

Repeatthisprocedureforeachnodethatwilljointhecluster.

VMware, Inc.

309

Administration Guide

310

VMware, Inc.

11

Networking

11

ThischapterguidesyouthroughthebasicconceptsofnetworkingintheESXServer environmentandhowtosetupandconfigureanetwork.Itcontainsthefollowing sections:


! ! ! ! ! !

SettingtheMACAddressManuallyforaVirtualMachineonpage 311 VMkernelNetworkCardLocatoronpage 314 ForcingtheNetworkDrivertoUseaSpecificSpeedonpage 315 EnablingaVirtualAdaptertoUsePromiscuousModeonpage 315 SharingNetworkAdaptersandVirtualNetworksonpage 316 UsingVirtualSwitchesonpage 320

Setting the MAC Address Manually for a Virtual Machine


VMwareESXServergeneratesMACaddressesforthevirtualnetworkadaptersineach virtualmachine.Inmostcases,theseMACaddressesareappropriate.Youmightneed tosetavirtualnetworkadaptersMACaddressmanually.Forexample:
!

Virtualnetworkadaptersondifferentphysicalserverssharethesamesubnetand areassignedthesameMACaddress,causingaconflict. EnsurethatavirtualnetworkadapteralwayshasthesameMACaddress.

ThissectionexplainshowVMwareESXServergeneratesMACaddressesandhowyou cansettheMACaddressforavirtualnetworkadaptermanually.

VMware, Inc.

311

Administration Guide

How VMware ESX Server Generates MAC Addresses


EachvirtualnetworkadapterinavirtualmachinegetsauniqueMACaddress.ESX Serverattemptstoensurethatthenetworkadaptersforeachvirtualmachinethatare onthesamesubnethaveuniqueMACaddresses.ThealgorithmusedbyESXServer limitsthenumberofvirtualmachinesthatcanberunningandsuspendedatonceona givenmachine.Italsodoesnothandleallcaseswhenvirtualmachinesondistinct physicalmachinesshareasubnet. NOTE AddressesgeneratedbyVirtualCenterorbyVMwareGSXServerareinthe00:50:56 range. AMACaddressisasixbytenumber.Eachnetworkadaptermanufacturergetsa uniquethreebyteprefixcalledanOUI(organizationallyuniqueidentifier)thatitcan usetogenerateuniqueMACaddresses.VMwarehastwoOUIs:oneforautomatically generatedMACaddressesandoneformanuallysetaddresses.OneOUI(00:0C:29)is usedonlyforgeneratedaddressesandtheotherOUI(00:50:56)isusedforboth generatedandmanuallysetaddresses. BecausetheVMwareOUIforgeneratedMACaddressesis00:0C:29,thefirstthreebytes oftheMACaddressthatisgeneratedforeachvirtualnetworkadapterhavethisvalue. ESXServerthenusesaMACaddressgenerationalgorithmtoproducetheotherthree bytes.ThealgorithmguaranteesuniqueMACaddresseswithinamachineand attemptstoprovideuniqueMACaddressesbetweenESXServermachines. ThealgorithmthatESXServerusestogenerateMACaddressisthefollowing: ESXServerusestheVMwareUUID(UniversallyUniqueIdentifier)togenerateMAC addressesandthenchecksforanyconflicts.Ifthereisaconflict,anoffsetisaddedand itischeckedagain,untilthereisnoconflict.(TheVMwareUUIDisbasedonthepath tothevirtualmachineandthehostsSMBIOSUUID.) AftertheMACaddresshasbeengenerated,itdoesnotchange,unlessthevirtual machineismovedtoadifferentlocation,forexample,adifferentpathonthesame serveroradifferentESXServermachine.ESXServersavestheMACaddressinthe configurationfileofthevirtualmachine. ESXServerkeepstrackofallMACaddressesthathavebeenassignedtonetwork adaptersofrunningandsuspendedvirtualmachinesonagivenphysicalmachine.ESX Serverensuresthatthevirtualnetworkadaptersofallofthesevirtualmachineshave uniqueMACaddresses. TheMACaddressofapoweredoffvirtualmachineisnotcheckedagainstrunningor suspendedvirtualmachines.ESXServerdoesnotkeeptrackofyourpredetermined generatedMACaddresses.SoyoucanhavemultipleNICs(ofthesamevirtualmachine
312 VMware, Inc.

Chapter 11 Networking

orofdifferentvirtualmachines)havingthesamepredeterminedgeneratedMAC addressesandyourvirtualmachineswillstartup.TheguestOSmustdetectthese duplicateMACaddresses.EnsurethatonyourLAN,yourpredeterminedaddressesdo notconflictwitheachotheranddonotconflictwiththosethatESXServerhas generated.

Setting MAC Addresses Manually


ToavoidpossibleMACaddressconflictsbetweenvirtualmachines,system administratorscanassigntheMACaddressesmanually.VMwareusesadifferentOUI formanuallygeneratedaddresses:00:50:56.TheMACaddressrangeis 00:50:56:00:00:0000:50:56:3F:FF:FF. Settheaddressesbyaddingthefollowinglinetoavirtualmachinesconfigurationfile:
ethernet<number>.address = 00:50:56:XX:YY:ZZ

where<number>referstothenumberoftheEthernetadapter,XXisavalidhexnumber between00and3F,andYYandZZarevalidhexnumbersbetween00andFF.Thevalue forXXmustnotbegreaterthan3FtoavoidconflictwithMACaddressesthatare generatedbytheVMwareWorkstationandVMwareGSXServerproducts. ThemaximumvalueforamanuallygeneratedMACaddressis


ethernet<number>.address = 00:50:56:3F:FF:FF

Youmustalsosettheoptioninavirtualmachinesconfigurationfile:
ethernet<number>.addressType="static"

VMwareESXServervirtualmachinesdonotsupportarbitraryMACaddresses,sothe aboveformatmustbeused.AslongasyouchooseXX:YY:ZZuniquelyamongyour hardcodedaddresses,conflictsbetweentheautomaticallyassignedMACaddresses andthemanuallyassignedonesshouldneveroccur.

Using MAC Addresses


FamiliarizeyourselfwithMACaddressesbysettingtheMACaddressstaticallyand removingthevirtualmachineconfigurationfileoptionsethernet<number>.address, ethernet<number>.addressType,and ethernet<number>.generatedAddressOffset.Verifythatthevirtualmachineis assignedageneratedMACaddress. VMwarecannotguaranteethatahoststayswithinaspecificMACaddressrange. However,VMwareguaranteesthattheMACaddressneverconflictswithanyphysical hostbyusingourOUIs(00:0C:29and00:50:56),whichareuniquetovirtualmachines.

VMware, Inc.

313

Administration Guide

VMkernel Network Card Locator


WhennetworkinterfacecardsareassignedtotheVMkernel,itcanbedifficulttomap fromthenameoftheVMkerneldevicetothephysicalnetworkadapteronthemachine. Forexample,iffourIntelEEProcardsinamachinearededicatedtotheVMkernel, thesecardsarecalledvmnic0,vmnic1,vmnic2,andvmnic3.Thenameofacardis basedonitsorderinthePCIbus/slothierarchyonthemachinethelowerthebusand slot,thelowerthenumberattheendofthename. Ifthereismorethatonetypeofnetworkinterfacecard,thefirstdriverthatisloaded claimsitsvirtualNICs(vmnic)inPCIslotorder,thenextdriverthatisloadedclaims itsvirtualNICs(vmnic)inPCIslotorder,andsoon. Thisnamingpolicyisalsovalidforthefunctionswithinaslotformultifunction devices,forexample,adualportNICwhichoccupiesasingleslotbuthastwo functions:bus1.slot1.function1andbus1.slot1.function2.Thefunctionsareenumerated foreachslotinthesamewaythattheslotsareenumeratedforeachdevicetype.

findnic Command
Ifyouknowthebusandslotorderoftheadapters,youcandeterminewhichadapter haswhichname.Ifyoudont,usethefindnicprogramtomaketheproperassociation ofnetworkadaptertoname. Theformatofthecommandis
findnic <options> <nic-name> <local-ip> <remote-ip>

ThefindnicprogramtakesaVMkernelnetworkdevicename,anIPaddresstogive thedeviceonthelocalmachineandanIPaddressthatfindnicshouldtrytoping. Whenyouissuethecommand,findnicpingstheremoteIPaddress. ThisallowsyoutodeterminewhichadapteriswhichbylookingattheLEDsonthe cardstoseewhichonehasflashinglightsorbyseeingwhetherthepingissuccessful.

Options
-f Doafloodping. -i <seconds> Intervalinsecondsbetweenpings.

314

VMware, Inc.

Chapter 11 Networking

Examples
findnic vmnic0 10.2.0.5 10.2.0.4 BindsVMkerneldevicevmnic0toIPaddress10.2.0.5andtriestopingtheremote machinewiththeIPaddress10.2.0.4. findnic -f vmnic1 10.2.0.5 10.2.0.4 BindsVMkerneldevicevmnic1toIPaddress10.2.0.5,andtriestofloodpingtheremote machinewiththeIPaddress10.2.0.4.

Forcing the Network Driver to Use a Specific Speed


TheVMkernelnetworkdevicedriversstartwithadefaultsettingofAutonegotiate. Thissettingwillworkcorrectlywithnetworkswitchessettoautonegotiate.Ifyour switchisconfiguredforaspecificspeedandduplexsetting,forcethenetworkdriverto usethesamespeedandduplexsetting. Ifyouencounterproblemsinparticular,verylowbandwidthitislikelythattheNIC didnotautonegotiateproperly.Configurethespeedandduplexsettingsmanually. Toresolvetheproblem,changethesettingsonyourswitchorchangethesettingsfor theVMkernelnetworkdeviceusingtheVMwareManagementInterface. To change the settings of the VMkernel network device 1 2 3 4 5 Logintothemanagementinterfaceasroot. ClickontheOptionstab. ClickNetworkConnections. Locatethedeviceyouwanttoreconfigureandchoosetheappropriatesettingfrom thedropdownlistforConfiguredSpeed,Duplex. ClickOK. Thenetworkspeedsettingschangetakeseffectafterareboot.

Enabling a Virtual Adapter to Use Promiscuous Mode


Forsecurity,guestoperatingsystemscannotsettheirvirtualEthernetadapterstouse promiscuousmode.However,youmightneedtousethevirtualEthernetadaptersin promiscuousmode.Toenablethisuse,setthePromiscuousAllowedconfiguration variabletoyes.

VMware, Inc.

315

Administration Guide

To enable the setting of the PromiscuousAllowed configuration variable 1 ClicktheEditConfigurationtaboftheVMwareManagementInterfaceto determinewhichnetworkthevirtualEthernetadapterisusing. Forthisexample,assumethattheNetworkingsectionofthepageshowsthe adapterisusingvmnic0. 2 Logintotheserversserviceconsoleandtypethefollowingcommand:
echo "PromiscuousAllowed yes" > /proc/vmware/net/vmnic0/config

Thisallowstheguestoperatingsystemsinallvirtualmachinesusingvmnic0to enablepromiscuousmode.Iftheadapterisusingadifferentnetwork,suchas vmnet_0,maketheappropriatesubstitutioninthecommand. 3 Taketheappropriatestepsintheguestoperatingsystemtoenablepromiscuous modeonthevirtualnetworkadapter.

Youmightwanttoallowonlysomeadaptersonaparticularnetworktouse promiscuousmode.YoucanselectivelydisablepromiscuousmodebasedontheMAC addressofthevirtualmachinesEthernetadapter. To set the PromiscuousAllowed variable to no 1 Connecttothevirtualmachinewiththeremoteconsoleandusetheguest operatingsystemtoolstodeterminetheMACaddressofthevirtualEthernet adapter. Logintotheserviceconsoleandtypethefollowingcommand: echo "PromiscuousAllowed no" > /proc/vmware/net/vmnic0/<MACAddress> Inplaceof<MACAddress>,substitutethevirtualEthernetadaptersMACaddress inthestandardformat00:05:69:XX:YY:ZZ.Iftheadapterisusingadifferent network,suchasvmnet_0,maketheappropriatesubstitutioninthecommand.

Sharing Network Adapters and Virtual Networks


InmanyESXServerconfigurations,acleardistinctionexistsbetweennetworking resourcesusedbythevirtualmachinesandthoseusedbytheserviceconsole.This mightbeimportantforsecurityreasons,forexample,isolatingthemanagement networkfromthenetworkusedbyapplicationsinthevirtualmachines. Youmightwanttoshareresources,includingphysicalnetworkadaptersandvirtual networks.Thissectionprovidesinstructionsonsharinginbothdirections:makingthe

316

VMware, Inc.

Chapter 11 Networking

virtualmachinesresourcesavailabletotheserviceconsoleandallowingvirtual machinestosharethenetworkadapterusedbytheserviceconsole. Thissharingismadepossiblebythevmxnet_consoledriver,whichisinstalledwith theserviceconsole. CAUTION VMwarerecommendsthatonlyadvancedusersmaketheseconfiguration changes.Thestepsbelowareeasierforsomeonewhoisfamiliarwith administeringaLinuxsystem. NOTE Ifyoubringdownthelocalloopbackinterfacewhileyouarereconfiguringnetwork devices,theVMwareManagementInterfacedoesnotfunctionproperly.Tobringitback up,usethecommandifconfig lo up.

Allowing the Service Console to Use the Virtual Machines Devices


Allnetworkadaptersusedbyvirtualmachines(thatis,assignedtotheVMkernel)and virtualnetworkscanbemadeaccessibletotheserviceconsole.Virtual networksidentifiedasvmnet_<n>ontheEditConfigurationpaneoftheVMware ManagementInterfaceprovidehighspeedconnectionsamongvirtualmachineson thesamephysicalserver. TogivetheserviceconsoleaccesstoVMkernelnetworkadaptersandvirtualnetworks, installthevmxnet_consolemodule.Whenyouinstallit,youprovidealistof VMkernelnetworkadaptersandvirtualnetworksthatthevmxnet_consolemodule shouldattachto.Forexample,iftheVMkernelhadanadapternamedvmnic1anda virtualnetworknamedvmnet_0andyouwantedtoprovideaccesstothemfromthe serviceconsole,usethefollowingcommandtoinstallthevmxnet_consolemodule. insmod vmxnet_console devName=vmnic1;vmnet_0 ThedevNameparameterisasemicolonseparatedlistofnamesofVMkernelnetwork adaptersandvirtualnetworks. Whenyouinstallthemodule,itaddstheappropriatenumberofeth<n>devicesonthe serviceconsoleintheorderthatyoulisttheVMkernelnetworkadapterandvirtual networknamesafterthedevNameparameter.Intheexampleabove,iftheservice consolealreadyhadanetworkadapternamedeth0,whenyouloadvmxnet_console withvmnic1andvmnet_0;vmnic1isseenaseth1ontheserviceconsoleandvmnet_0 isseenaseth2. Aftertheeth<n>devicesarecreatedontheserviceconsole,bringtheinterfacesupin thenormalmanner.Forexample,ifyouwanttheserviceconsoletouseIPaddress

VMware, Inc.

317

Administration Guide

10.2.0.4forthenetworkaccessedthroughthevmnic1adapter,usethefollowing command: ifconfig eth1 up 10.2.0.4 Ifyouwantaneasywaytoseewhicheth<n>devicesareaddedbytheinsmod command,addthetagNameparametertotheinsmodcommand,asshowninthis example:


insmod vmxnet_console devName=vmnic1;vmnet_0 tagName=<tag>

Inthiscase,thevmxnet_consolemoduleaddsthenamesofeachoftheeth<n>devices thatitcreatedto/var/log/messages.Eachmessagebeginswiththestring<tag>. Todeterminethenamesofthedevicesthatwereadded,usethiscommand: grep <tag> /var/log/messages

Starting Shared VMkernel Network Adapters and Virtual Networks when the Service Console Boots
TherearetwowaystoconfiguretheserviceconsoletostartVMkernelnetworkadapters whentheserviceconsoleboots.Thesimplercaseinvolvessharinganetworkadapter otherthaneth0.Sharingeth0ismorecomplicatedandisdescribedlater. Continuingwiththeexamplefromtheprevioussection,youcanappendthefollowing linesto/etc/rc.d/rc.local:
insmod vmxnet_console devName=vmnic1;vmnet_0 ifconfig eth1 up 10.2.0.4 ifconfig eth2 up 63.93.12.47

NOTE

Youmightwanttoaddcommandsthatdependonnetworkingtotheendofrc.local (suchasmount -atomountanyNFSentriesin/etc/fstab). Anothermethodistosetupthefiles /etc/sysconfig/network-scripts/ifcfg-eth1and /etc/sysconfig/network-scripts/ifcfg-eth2withtheappropriatenetwork information.MakesuretheONBOOT=lineisONBOOT=yes.Theifcfg-eth1fileforthis examplewouldbe:


DEVICE=eth1 BOOTPROTO=static BROADCAST=10.255.255.255 IPADDR=10.2.0.4 NETMASK=255.0.0.0 NETWORK=10.0.0.0 ONBOOT=yes

318

VMware, Inc.

Chapter 11 Networking

Thelinesyouaddto/etc/rc.d/rc.localwouldbe:
insmod vmxnet_console devName=vmnic1;vmnet_0 ifup eth1 ifup eth2

Sharing the Service Consoles Network Adapter with Virtual Machines


WhenyouinstallandconfigureESXServer,theVMkernelisnotloaded,sotheservice consoleneedstocontrolthenetworkadapterthatiseth0.WhenyouconfigureESX Server,assigntheadapterthatiseth0totheserviceconsole. CAUTION Tosharetheadapterthatiseth0ontheserviceconsole,becarefulasyou implementthefollowingsteps.ToconfigureESXServerinitially,youmust haveanetworkconnection.Aftertheinitialconfigurationisset,make severalchanges.Atonepoint,thereisnonetworkconnectiontotheservice console,andyoumustworkdirectlyattheserver. AfteryouhavecompletelyconfiguredESXServerandrebootedthemachine,the VMkernelisloaded. To share the Service Consoles network adapter with virtual machines 1 2 3 4 5 UsetheVMwareManagementInterfacetoreconfiguretheserver. OntheOptionstab,clickStartupProfiletoopentheStartupProfilepane. FindthetablerowthatliststheEthernetcontrollerassignedtotheconsoleand clickthelinkIfyoumustreassignthisdevice,clickhere. SelectVirtualMachinesfromtheDedicatedTolist. ClickOKtosaveyourchangesandrebootthemachinewhenprompted. Whenthemachinereboots,nonetworkadapterisassignedtotheserviceconsole, soyoumustdothisstepattheserver. 6 Addtheappropriatelinesto/etc/rc.d/rc.local. Forexample,ifeth0istheonlynetworkadapterthatyouintendtosharebetween theVMkernelandtheserviceconsole,andifitisnamedvmnic0intheVMkernel, addthelines: insmod vmxnet_console devName=vmnic0 ifup eth0

VMware, Inc.

319

Administration Guide

IfyouareunsurewhatnametheVMkernelhasassignedtothenetworkadapter thatformerlywaseth0intheserviceconsole,determineitsnameusingthe findnicprogram(seeVMkernelNetworkCardLocatoronpage 314). Thenexttimeyourebootthesystem,thenetworkadapterissharedbytheservice consoleandthevirtualmachines. 7 Tobeginsharingthenetworkadapterwithoutrebootingthesystem,manually issuethesamecommandsyouaddedto/etc/rc.d/rc.local: insmod vmxnet_console devName=vmnic0 ifup eth0

Using Virtual Switches


ESXServerletsyoucreateabstractednetworkdevicescalledvirtualEthernetswitches. Eachvirtualswitchisanetworkhubthatcanbeusedbyvirtualmachines.Avirtual switchcanroutetrafficinternallybetweenvirtualmachinesorlinktoexternal networks. Usevirtualswitchestocombinethebandwidthofmultiplenetworkadaptersand balancecommunicationstrafficamongthem.Theycanalsobeconfiguredtomaintain persistentnetworkconnectionsdespitelinkfailuresforindividualadapters. AvirtualswitchmodelsaphysicalEthernetswitch.Avirtualswitchcontains32logical ports.Youcanconnectonenetworkadapterofavirtualmachinetoeachport. Eachvirtualswitchcanalsohaveoneormoreportgroupsassignedtoit.SeeCreating PortGroupsonpage 190.

Choosing a Network Label


ESXServerusesnetworklabelstorepresentnetworkconnectionstovirtualmachines. Thenetworklabelisintendedtobeafunctionaldescriptorforthenetworkconnection. ESXServerrepresentsbothvirtualswitchesandportgroupstovirtualmachinesby assigningthemanetworklabel. Youcanchangethenetworklabelforaswitchonlywhenitisnotbeingusedbyavirtual machine.

Binding Physical Adapters


Groupphysicaladaptersbybindingthemtogether.Thisisthefunctionalequivalent forNICteaminginESXServer.CertainoptionsyoucanconfigurethroughtheService Consolerefertogroupedadaptersasabond.

320

VMware, Inc.

Chapter 11 Networking

Bindtogethersimilarphysicaladapterswheneverpossible.ESXServerusesonly featuresorcapabilitiescommontoalladapterswhendefiningthefunctionalityofa bondedswitch.Forexample,ESXServercanuseahardwareaccelerationfeaturefora bondonlyifalladaptersinthebondincludethatfeature. HardwareaccelerationfeaturessupportedbyESXServerinclude:


! ! !

VLANtaghandling Checksumcalculations TCPSegmentationOffloading

BindingtogetheridenticalmodelsofphysicaladaptersensuresthatESXServercanuse allfeaturesoftheadapter. Whenyouchooseanetworkconnectionforavirtualmachine,ESXServerlinksittothe associatedvirtualswitch.Theoperationofthevirtualmachinedependsonthe configurationofitsnetworkconnection.Youcannotbindordetachphysicaladapters whileavirtualswitchisbeingusedbyavirtualmachine. Youcanbinduptotenphysicaladapterstoeachvirtualswitch.

Finding Bonds and Adapters in the Service Console


Whenyoubindtogetheradaptersinavirtualswitch,ESXServerassignsabond numberidentifyingthenewlogicalgroupingofphysicaladapters.Youneedthebond numbertoconfigurethebondoptionsdescribedbelow.Check /etc/vmware/netmap.conftodeterminethebondnumberassignedtoavirtual switch. YoumightalsoneedthedevicenamethatESXServerassignstoaphysicaladapter. Certainoptionsusethedevicenametodesignateaspecificadapter.ESXServerdefines devicenameswiththestringvmnic<n>,forwhich<n>isthesameadapternumber displayedforanadapterintheManagementInterface.Forexample,thephysical adapteridentifiedasOutboundAdapter1wouldhavethedevicenamevmnic1. Youcanalsodeterminethedevicenamebysearching/etc/vmware/devnames.conf forthenamedefinition.ThePCIbusaddressoftheadapterintheManagement Interfaceandsearchforthecorrespondingnamedefinition. To find the device name for the adapter at PCI2:4.0: 1 LogintotheServiceConsole.

VMware, Inc.

321

Administration Guide

Search/etc/vmware/devnames.conf:
$ grep 2:04.0 /etc/vmware/devnames.conf 002:04.0 nic vmnic0

Thedevicenameisvmnic0.

Creating a Virtual Switch


Youcanfindbasicinstructionsforcreatingandmodifyingvirtualswitchesin NetworkConnectionsonpage 188. NOTE Theconfigurationoptionsdescribedbelowareusedforoptimizingvirtualswitchesfor complexoperatingconditions.Youcancreateanduseavirtualswitchwithout changingtheseoptionsformostconfigurations.

Choosing a Load Balancing Mode


YoucanchooseoneofthreemodestodeterminehowESXServerdistributestraffic amongthenetworkadaptersassignedtoavirtualswitch:
! ! !

MACaddressbalancing IPaddressbalancing Standby

Selecttheloadbalancingmodebysettingtheload_balance_modeoptionforavirtual switch.Alloptionsforvirtualswitchesaredefinedin/etc/vmware/hwconfig,which youcanmodifythroughtheServiceConsole. MACaddressloadbalancingdistributesnetworkingtrafficbasedontheMAC hardwareaddressesofthesourcenetworkadapters.SelectMACaddressbalancingby settingload_balance_modetoout-mac. NOTE MACaddressbalancingisthedefaultloadbalancingmodeinESXServer. IPaddressloadbalancingdistributesnetworkingtrafficbasedonIPaddresses.ESX ServerdistributesnetworktrafficnotusingtheIPprotocolonafixedvolume sequentialcycle.SelectIPaddressbalancingbysettingload_balance_modeto out-ip. Standbymodedesignatesaspecificadaptertouseastheprimaryconnection.Use Standbymodeforredundantconnectionswitches,asdescribedinthenextsection.

322

VMware, Inc.

Chapter 11 Networking

To set the load balancing mode for bond1 to IP address load balancing 1 2 3 LogintotheServiceConsoleasroot. Edit/etc/vmware/hwconfig. Definetheloadbalancingmodeforbond1:
nicteam.bond1.load_balance_mode = out-ip

Ifyoupreviouslydefinedtheoptionforthisswitch,changethecurrentmodevalue toout-ip. 4 Savethefileandcloseit.

Configuring the Bond Failure Mode


Youcanselectonephysicaladaptertobetheprimarynetworkconnectionforavirtual switch.Inthisconfiguration,ESXServerroutesalltrafficthroughtheprimaryadapter andreservestheotheradaptersincaseofconnectionfailure.Thistypeofredundant connectionswitchisdefinedasusingafailoverconfiguration. To select a primary adapter by setting the home_link option for a virtual switch 1 2 3 LogintotheServiceConsoleasroot. Edit/etc/vmware/hwconfig. Definetheprimaryadapter. Forexample,tochoosevmnic2forbond1:
nicteam.bond1.home_link = vmnic2

Ifyoupreviouslydefinedtheoptionforthisswitch,changethecurrentmodevalue tovmnic2. 4 NOTE Savethefileandcloseit.

Designatingaprimarylinkforavirtualswitchoverridestheloadbalancingmode.If yousetthehome_linkoption,ESXServerignoresthevalueofload_balance_mode. ESXServermonitorstheprimarylinkforphysicalconnectionfailures.Whenthe primaryadapterlosescontact,ESXServertransfersthenetworktraffictooneofthe secondaryadapterswhilecontinuingtomonitortheprimaryadapter.WhenESXServer detectsthatthephysicalconnectionoftheprimarylinkhasbeenrestored,ittransfers theconnectionforthevirtualswitchbacktotheprimary.

VMware, Inc.

323

Administration Guide

Thisbasicfailuredetectionmodepassivelymonitorsanadapterforlossofphysical connectiontoanexternalswitch.YoucanconfigureESXServertoactivelysearchfor networkfailuresusingbeaconmonitoring.

Using Beacon Monitoring


Thebeaconmonitoringfeaturebroadcastsbeaconpacketsontheexternalnetwork linkedtotheservertodetectdistributedconnectionfailures.ESXServerissuesbeacon packetsfromoneadapteraddressedtootheradaptersassignedtoavirtualswitch.By monitoringbeaconreception,theservercandeterminethestateofconnectionsina multipointnetworkroute.Youcanconfigurebeaconmonitoringforeachvirtual switchandfortheentireserver. Beaconmonitoringisusedinconfigurationswherethemultipleadaptersassignedtoa virtualswitchareconnectedtomorethanoneexternalswitch.Physicallinkmonitoring indicatesonlywhetheranadapteriscommunicatingwithoneexternalswitch.Beacon failurescandetectconnectionfailuresbetweenexternalswitchesorroutingerrors amongswitchesinadistributednetworkdomain. ESXServerusesbeaconmonitoringasavariableindicatorofnetworkconnection failure.Theserverindicatesaconnectionlossafteritfailstoreceiveasetnumberof broadcastbeaconsinsuccession.Onlywhenthenumberoffailedbeaconsexceedsthe failurethresholdwilltheserveridentifyalinkasdisconnectedandswitchtoanother adapter. Bydefault,thebeaconfailurethresholdissettozeroforeachvirtualswitch.Youcan enablebeaconmonitoringbysettingthefailurethresholdtotwoorgreater. ESXServeralsoletsyoudeterminethefrequencywithwhichitissuesbeacons.Therate atwhichtheserverbroadcastsbeacons,inconjunctionwiththefailurethreshold, determinesthetotalmonitoringintervalbeforetheserveridentifiesalinkasisolated: BeaconInterval(inseconds)XBeaconFailureThreshold=TotalBeaconFailure Interval Yousetthefailurethresholdforanindividualswitchwiththe switch_failover_thresholdoption. To set the failure threshold for bond1 to 2 beacons 1 2 3 LogintotheServiceConsoleasroot. Edit/etc/vmware/hwconfig. Setthebeaconfailurethresholdforbond1:
nicteam.bond1.switch_failover_threshold = 2

324

VMware, Inc.

Chapter 11 Networking

Savethefileandcloseit.

ESXserverbroadcastsbeaconswiththesamefrequencyforallswitches.The SwitchFailoverBeaconIntervaloptionsetsthisvalue.Theserveralsodefinesanoverall failurethresholdforallswitcheswiththeSwitchFailoverThresholdoption,but switch_failover_thresholdoverridesthisvalueforeachindividualswitch. YoucansetthevaluesoftheSwitchFailoverBeaconIntervaland SwitchFailoverThresholdoptionsintheAdvancedSettingspaneloftheManagement Interface.SeeAdvancedSettingsonpage 205. Beaconmonitoringcancausefalseindicationsofnetworkconnectionfailure.External switchesmaytrapbeaconpackets,causingESXServertodeclareaswitchfailurefora connectionthatisfunctioningnormally.Whentheserverswitchestoasecondarylink, trafficfromtheprimarymaystillbetransmittedbecausetheconnectionhasnot actuallyfailed.Thiscanresultinanexternalswitchreceivingduplicatepacketsfrom bothlinks. NOTE ESXServerusesbeaconmonitoringasasecondarymethodtodetectnetworkfailures. Whentheserverdetectsaphysicallinkfailurefortheprimaryadapter,itwillswitchto asecondaryadapterwithoutregardtowhetherbeaconmonitoringindicatesafailed connection.

Configuring External Network Switches


ESX Serverhostallowyoutoconfigureexternalnetworkswitchestoensuretheproper interactionofthehostwiththeexternalnetwork.Thefollowingoptionscanbe configured:
!

IPLoadBalancingWiththisloadbalancingmodeenabled,ESXServermay presentduplicateMACaddressestoanexternalnetworkswitch.Theexternal switchshouldbesetstatic802.3ad(EtherChannel)modetoavoidexternalrouting errors. SwitchFailoverBeaconEtherTypeSetstheEthertypeofmonitorbeacons.You canchangethisvaluesothatyourexternalswitchescorrectlyhandlemonitor beacons. BeaconMonitoringwithMultipleSwitchesAllexternalswitchesconnectedto avirtualswitchusingbeaconmonitoringmustbewithinthesamenetwork broadcastdomain. SpanningTreeProtocolIfanadapterlosesthephysicalconnectiontoanexternal switchthatisusingtheSpanningTreeProtocol,theswitchmayinduceadelayin reconnectingthelinkwhileitappliestheprotocoltocheckforduplicateactive

VMware, Inc.

325

Administration Guide

connections.ESXServercandetectonlythatthelinkhasbeenphysicallyrestored, butnotthattheportisblockedbytheSpanningTreecheck.
!

PortfastModeUsetoreduceerrorscausedbySpanningTreechecks.Ifyou cannotdisabletheSpanningTreeProtocolforanexternalswitch,configurethe portsconnectedtotheservertousePortfastmode.ThisreducesSpanningTree delays,resultinginfewerfalseindicationsoflinkfailures.

Troubleshooting
If,whilebootingyourvirtualmachine,youseeanerrormessagestatingthatthe Ethernetdevicecannotbedetected,checkthefollowing:
!

NetworkConnectionspaneBesurethatthecorrectphysicaladaptersare assignedtoabond VMConfigurationpageBesurethecorrectbondisselectedforthespecified Ethernetdeviceandthattheselectedvmnicisnotalreadyassignedtoabond deviceoralreadyinuse.

Maketheappropriatechange(s),andrebootyourvirtualmachinetodetermine whethertheerrormessagepersists.

326

VMware, Inc.

12

VMware ESX Server Resource Management

12

VMwareESXServerallowsyoutooptimizetheperformanceofyourvirtualmachines bymanagingavirtualmachinesresourceallocations.Youmustbetherootuserto managevirtualmachineresources.Youcancontrolavirtualmachinesaccessto:


! ! ! !

CPUtime Memoryspace Networkbandwidth Diskbandwidth

YoucanmanagevirtualmachineresourceallocationsthroughtheVMware ManagementInterface,fromtheprocfsinterfaceontheserviceconsole,andthe VMwareScriptingAPI.Thefirsttwomethodsarecoveredinthischapter.TheScripting APIisdescribedintheVMwareScriptingAPIUsersManualat http://www.vmware.com/support/developer. Thischaptercontainsthefollowingsections:


! ! ! ! ! ! !

VirtualMachineResourceManagementonpage 328 UsingESXServerResourceVariablesonpage 328 ImprovingPerformanceonpage 329 CPUResourceManagementonpage 331 ManagingVirtualMachineCPUResourcesonpage 336 MemoryResourceManagementonpage 345 ManagingVirtualMachineMemoryonpage 351

VMware, Inc.

327

Administration Guide

! ! ! !

UsingYourNUMASystemonpage 358 SizingMemoryontheServeronpage 363 ManagingNetworkBandwidthonpage 367 ManagingDiskBandwidthonpage 371

Virtual Machine Resource Management


ESXServerusesaproportionalsharemechanismtoallocateCPU,memory,anddisk resourceswhenmultiplevirtualmachinesarecontendingforthesameresource. Networkbandwidthiscontrolledwithnetworktrafficshaping. CPUandmemoryresourceeachofferanadditionaldimensionofcontrol.ForCPU management,youcanspecifyaminimumandmaximumpercentageofasingle physicalCPUsprocessingpowerforeachvirtualmachine.YoumayalsospecifyCPU sharesandrestrictavirtualmachinetorunonacertainsetofphysicalCPUs(CPU schedulingaffinity).SeeAdmissionControlPolicyonpage 11. Youcanalsospecifyminimumandmaximummemorysizes,aswellasmemoryshares, foreachvirtualmachine.Yourlevelofcontrolisgreatlyimpairedifyoufailtoinstall VMwareToolsineachvirtualmachineorifyoufailtosetuptheVMkernelswapspace. SeeAllocatingMemoryResourcesonpage 25. NOTE Youdonothavetoadjustresourcesforeveryvirtualmachineyoucreate.Determine whichvirtualmachinesareperformancesensitiveandadjustonlythese.

Service Console Resource Management


Theserviceconsolereceives2000CPUsharesandhasaminimumCPUpercentageof8 percent,bydefault.Inmostcases,thisisanappropriateallocation,becausetheservice consoleshouldnotbeusedforCPUintensivetasks. IfyouneedtoadjusttheserviceconsolesallocationofCPUshares,usetheVMware ManagementInterface.SeeManagingtheServiceConsoleonpage 168. Dependingonthenumberofvirtualmachinesyouplantorunconcurrently,wehave approximateguidelinesforthememoryyoushouldallocatetotheserviceconsole.See ServiceConsoleMemoryonpage 46.

Using ESX Server Resource Variables


ThischapterdescribestheparametersyoucanusetooptimizeresourcesonESXServer. AlsoincludedisinformationthealgorithmsandpoliciesESXServerusetodetermine resourceallocation.
328 VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Improving Performance
Beforedeployingallyourvirtualmachines,wesuggestthatyoucreatealistofallthe virtualmachinesyouplantorunonESXServer.Foreachvirtualmachine,identifyits primaryfunctionsandapplications.Basedonitsprimaryfunction,determineits limitingresources.Forexample,aWebserversmostlimitingresourcemaybememory, whileaterminalservicesserversmostlimitingresourcemaybeCPU.Similarly,a databaseserversmostlimitingresourcemaybediskbandwidth. Inthissection,weprovidesomegeneralguidelinesonimprovingperformanceon VMwareESXServer.However,someoftheseguidelinesmaynotbeappropriatefor you,dependingonyourparticularworkplacesituation. NOTE Determinewhichvirtualmachinesaremoreimportantandwhichoneswillbenefit fromadditionalresources.Youdonotneedtooptimizeeachresourceforeachvirtual machine. Forexample,youmightwanttogivemorememorysharesandahighermemory minimumtoavirtualmachineWebserverforPlatinumcustomers,comparedtoa virtualmachineWebserverforSilvercustomersorforaninternalWebserver. NOTE IfyourunseveralvirtualmachineswithsimilarguestoperatingsystemsonESXServer, youwillhaveahigherovercommitmentofmemory,withoutnoticingaperformance degradationinESXServer.Ingeneral,similarguestoperatingsystemsenablegreater memorysharinginvirtualmachines.SeeManagingVirtualMachineMemoryon page 351

Improving Slow Performance


Ifperformanceseemsslow,determinewhethertheslowperformanceappliestoall virtualmachinesonanESXServerortojustonevirtualmachine.

Improving Slow Performance on ESX Server


Ifyounoticeslowperformanceonallyourvirtualmachines,examineCPUusage. Determinehowmuchidletimeeachprocessorhas.CheckoverallsystemCPU utilizationthroughtheVMwareManagementInterface.Iftheprocessorsarenottaxed, andtotalsystemCPUutilizationisunder80%,theproblemisprobablynotCPUusage. IfCPUresourcesarenottheproblem,checkwhethertheVMkernelisswappingout memory.Checktheoutputof/proc/vmware/sched/memfromtheprocfsinterfacein theserviceconsole.Formoreinformation,seeServiceConsoleCommandson page 353.
VMware, Inc. 329

Administration Guide

IftheproblemisVMkernelswapping,makesureVMwareToolsisinstalled.Placethe swapfileinadifferentphysicaldrivethanthevirtualdisks.Alsoconsideraddingmore physicalmemorytotheserverormigratingsomevirtualmachinesontoanotherESX Server.

Improving Slow Performance on Virtual Machines


Ifslowperformanceisisolatedonafewvirtualmachines,checktheirresource utilizationbeforeexaminingtheserviceconsole. NOTE IfyouseeahighCPUutilizationinaWindows2000SMPvirtualmachine,runthe VMwareIdlerService,availableat www.vmware.com/download/esx/esx2smpidler.html. Determinewhethertheguestoperatingsystemisdoingalotofpaging(swapping).
!

NOTE

InaLinuxguestoperatingsystem,runthevmstatcommand.Seethevmstat(8) manpage. InaWindowsguestoperatingsystem,opentheControlPanel.Doubleclick AdministrativeTools,anddoubleclickPerformance.Checkthevaluefor pages/second.

Ifavirtualmachineispagingalot,increasetheminimummemorysothatexcessive pagingiseliminated.Ifyouareclosetothemaximummemorysize,increasethat resourcesetting.

Optimizing Performance on the Service Console


IftheproblemiswithCPUresources,increasetheCPUminimumoftheserviceconsole anddeterminewhetherthatsolvestheproblem. Youcanalsoimproveperformancebynotconnectingunnecessarilythroughtheremote console.Forexample,unlessyouareperforminganactioninavirtualmachine,close theremoteconsole.Havingaremoteconsolewindowopen,withoutanyactivity,still usesCPUresourcesintheserviceconsole. Tooptimizeperformance,youcanuseotherthirdpartysoftware,suchasVirtual NetworkComputing(VNC)viewerorMicrosoftTerminalServicestoconnecttoyour virtualmachine,withoutconsumingCPUresourcesintheserviceconsole.

330

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

CPU Resource Management


VMwareESXServerprovidesdynamiccontroloverboththeexecutionrateandthe processorassignmentofeachscheduledvirtualmachine.TheESXServerscheduler performsautomaticloadbalancingonmultiprocessorsystems. YoucanmanagetheCPUresourcesonaserverfromtheVMwareManagement Interface,fromtheprocfsinterfaceontheserviceconsole,andfromtheVMware ScriptingAPI. Foreachvirtualmachine,youcandefineaminimumandmaximumamountofCPU thatavirtualmachinecanuse,guaranteeingapercentageoftheCPUresource.Youalso allocateCPUsharestospecifytherelativeimportanceofvirtualmachines. IfyoupurchasedtheVMwareVirtualSMPforESXServerproductandyourguest operatingsystemisSMPcapable,youcancontrolwhetherthevirtualmachinerunson oneortwoCPUsandrestrictavirtualmachinetorunonlyoncertainphysicalCPUs. FormoreinformationontheVMwareVirtualSMPforESXServerproduct,contact VMware,Inc.oryourauthorizedsalesrepresentative. ForinformationonCPUmanagementbyVMwareESXServer,seethecpu(8)man page.

Allocating CPU Resources


ThreeparameterscontroltheallocationofCPUresourcestoeachvirtualmachine:
!

Minimumrate(min) TheminimumCPUpercentagerepresentsanabsolutefixedlowerlimitofasingle physicalCPUsprocessingpower.Thevirtualmachinewillalwaysbeabletouse thisminimumpercentageofaCPUsresources,regardlessofwhatelseis happeningontheserver.Thesystemusesanadmissioncontrolpolicytoenforce thisguarantee.Youcannotpoweronanewvirtualmachineifitcannotreserveits minimumCPUpercentage.

Maximumrate(max) ThemaximumCPUpercentagerepresentsanabsolutefixedupperlimitonthe consumptionofasinglephysicalCPUsprocessingpower.Thevirtualmachine willneverconsumemorethanthismaximumpercentageofaCPUsresources, evenifidletimeisonthesystem.

Sharesallocation CPUsharesentitleavirtualmachinetoarelativefractionofCPUresources.For example,avirtualmachinethathastwiceasmanysharesasanotherisgenerally

VMware, Inc.

331

Administration Guide

entitledtoconsumetwiceasmuchCPUtime,subjecttotheirrespectiveminimum andmaximumpercentages. Youmayspecifysharesbyspecifyinganumericalvalue,orspecifyinghigh, normal,orlow.Bydefault,thesettingfornormalsharesistwicethatoflow.The settingforhighsharesistwicethatofnormal(orfourtimesthatoflow). Youcanspecifyaminimumpercentage,amaximumpercentage,CPUshares,ora combinationofthese.ThesystemautomaticallyallocatesCPUtimetoeachvirtual machinesomewherebetweenitsminimumandmaximumpercentages,refinedbythe numberofshares.

Admission Control Policy


ESXServerusesanadmissioncontrolpolicy.WhileCPUreservationsareusedfor admissioncontrol,actualCPUtimeallocationsvarydynamicallyandunused reservationsarenotwasted. NOTE IfESXServerisunabletoguaranteeavirtualmachinesspecifiedminimumpercentage, itwillnotallowyoutopoweronthatvirtualmachine.

Specifying Minimum and Maximum CPU Percentages


StartingwithESXServer2.0,youcanspecifyaminimumandmaximumpercentageof CPUforeachvirtualmachine.Theminimumpercentagerepresentsanabsolute,fixed lowerlimitwhilethemaximumpercentagerepresentsanabsolute,fixedupperlimit.A virtualmachinewilluseatleastasmuchCPUtimeasspecifiedbytheminimum percentageandneverusemoreCPUtimethanthespecifiedmaximumpercentage. ForasinglevirtualCPUvirtualmachine,thepercentagerangesfrom0%to100%.For adualvirtualCPUmachine,thepercentagerangesfrom0%to200%. NOTE Setavirtualmachinesminimumfortheminimalacceptableperformance. Forexample,ifoneofyourvirtualmachinesisrunninganimportantapplication,you canspecifyahigherminimumpercentageforthisvirtualmachine,comparedtothe othervirtualmachinesonyourESXServer. NOTE YoucansetCPUpercentagesforsome,orallofyourvirtualmachines.Alternately,you cansetonlyminimum,oronlymaximumCPUpercentages.Youdonotneedtosetboth. Forexample,youplantorun20virtualmachinesonyourESXServermachine,buthave currentlydeployedonlyfivevirtualmachines.Thesefivevirtualmachineswould utilizeanyextraCPUtimethatisavailableontheESXServermachine.However,after
332 VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

youdeployanadditional15virtualmachines,thesefiveinitialvirtualmachineswill receiveasmallershareofCPUtimethanwhattheyusedpreviously. Tohavetheusersoftheseoriginalfivevirtualmachinesbecomeaccustomedtothis higherlevelofCPUtime,setamaximumCPUpercentageforthesefivevirtual machinesandlimittheamountofCPUtimetheyreceive.Then,theseuserswontseea differencewhenyoudeploytheadditionalvirtualmachines. NOTE TheCPUpercentage(s)youchooserepresentanabsolutefixedlimitforthatvirtual machine.

Assigning Virtual Machines to Run on Specific Processors


Inmultiprocessorsystems,youcanalsorestricttheassignmentofvirtualmachinesto asubsetoftheavailableprocessorsbyspecifyinganaffinitysetforeachvirtual machine.Thesystemassignseachvirtualmachinetoprocessorsinthespecifiedaffinity settoachievetheCPUallocationsspecifiedbytheminimum,maximum,andshares settingsassociatedwitheachvirtualmachine.Iftheaffinitysetforauniprocessor virtualmachinecontainsasingleprocessor,thevirtualmachineisplacedthere. TheschedulerperformsautomaticloadbalancingofCPUtime.Tooptimizethis automaticloadbalancing,avoidmanuallyspecifyingaffinityforavirtualmachine. Instead,setaCPUminimumtoguaranteetheminimalacceptableperformancefora virtualmachine.SeeCPUResourceManagementonpage 331. NOTE Byspecifyingaminimum(insteadofspecifyingaffinity),ESXServerhasthemaximum flexibilityforautomaticoptimizations. YoucanmodifyCPUsharesandaffinitysetsatanytimeusingtheprocfsinterfaceon theserviceconsoleorusingtheVMwareManagementInterface.Initialvaluesfora virtualmachinecanbespecifiedinitsconfigurationfile.

Using Proportional-share Scheduling by Allocating Shares


Withproportionalshareprocessorscheduling,youcanallocateanumberofsharesto eachscheduledvirtualmachine.CPUsharesarerelative. Forexample,avirtualmachinethatisallocated2000sharesisentitledtoconsumetwice asmanyCPUcyclesasavirtualmachinewith1000shares.Similarly,avirtualmachine thatisallocated200sharesisentitledtoconsumetwiceasmanyCPUcyclesasavirtual machinewith100shares.Thenumberofsharesmayvary,butthefirstvirtualmachine hastwiceasmanysharesasthesecondvirtualmachine.

VMware, Inc.

333

Administration Guide

Bydefault,thesettingforhighistwicethatofnormal,orfourtimesthatoflow.For example,avirtualmachinewithhighsharescanconsumetwiceasmanyCPUcyclesas avirtualmachinewithnormalshares,orfourtimesasmanyCPUcyclesasavirtual machinewithlowshares.Tochangethesedefaults,seeUsingprocfsonpage 339. Youcanuseproportionalshareschedulingbyitself,orincombinationwithCPU percentages.SeeManagingCPUTimewithPercentagesandSharesonpage 334 Forexample,ifyouarerunningthreevirtualmachines,eachstartswithadefault allocationofnormalshares.TogiveonevirtualmachinehalftheCPUtimeandgive eachoftheothertwovirtualmachinesonequarteroftheCPUtime,assignhighshares tothefirstvirtualmachineandleavetheothertwoattheirdefaultallocations.Because theseshareallocationsarerelative,thesameeffectcanbeachievedbygiving500shares tothefirstvirtualmachineand250toeachoftheothertwovirtualmachines.

Controlling Relative CPU Rates


YoucancontrolrelativeCPUratesbyspecifyingthenumberofsharesallocatedtoeach virtualmachine.Increasingthenumberofsharesallocatedtoavirtualmachinedilutes theeffectivevalueofallsharesbyincreasingthetotalnumberofshares. Theserviceconsolereceives2000sharesandhasaminimumCPUpercentageof8 percent,bydefault.Inmostcases,thisshouldbeanappropriateallocation,becausethe serviceconsoleshouldnotbeusedforCPUintensivetasks. IfyouneedtoadjusttheserviceconsolesallocationofCPUshares,usetheVMware ManagementInterfaceortheprocfsinterfaceontheserviceconsole,asdescribedin thissection.Throughthemanagementinterface,youcanincreasetheminimumCPU percentageorthenumberofCPUsharestoallocatedmoreCPUtotheserviceconsole. SeeManagingtheServiceConsoleonpage 168. NOTE CPUshareallocations,bythemselves,donotguaranteetherateofprogresswithina virtualmachine. Forexample,supposevirtualmachineAisallocatedhighshares,whilevirtualmachine Bisallocatednormalshares.IfbothvirtualmachinesareCPUboundthatis,bothare runningthesamecomputeintensivebenchmarkvirtualmachineAshouldruntwice asfastasvirtualmachineB.IfvirtualmachineAinsteadrunsanI/Oboundworkload thatcausesittostopasitwaitsforotherresources,itdoesnotruntwiceasfastasvirtual machineB,eventhoughitisallowedtousetwiceasmuchCPUtime.

Managing CPU Time with Percentages and Shares


YoucanusebothCPUpercentagesandsharestomanageCPUresourcesforyour virtualmachines.CPUpercentagesspecifyabsolutes,anabsoluteminimumor
334 VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

maximumusagebyavirtualmachine.Sharesrepresentrelativeimportanceorpriority. Yousetsharestospecifywhichvirtualmachineswillgetpreferentialtreatmentwhen ESXServerisconstrained. Forexample,virtualmachineAhasaminimumCPUpercentageof20%,anda maximumCPUpercentageof50%,whilevirtualmachineBhasaminimumpercentage of30%andnospecifiedmaximumpercentage.YougivevirtualmachineAhighCPU sharesandvirtualmachineBlowCPUshares. ESXServerinterpretsthisallocationsothatvirtualmachineAwillneverhavelessthan 20%ofasinglephysicalCPU,andvirtualmachineBwillneverhavelessthan30%ofa singlephysicalCPU,inanysituation. However,ifoneormorevirtualmachinesareidling,ESXServerredistributesthisextra CPUtimeproportionally,basedonthevirtualmachinesCPUshares.Activevirtual machinesbenefitwhenextraresourcesareavailable.Intheexample,virtualmachineA getsfourtimesasmuchCPUtimeasvirtualmachineB,subjecttothespecifiedCPU percentages.(Bydefaultthesettingforhighsharesisfourtimesthatforlowshares.) Thatis,virtualmachineAhasfourtimesasmuchCPUtimeasmachineB,aslongas thevirtualmachineAsCPUpercentageisbetween20%and50%.Actually,virtual machineAmightgetonlytwicetheCPUtimeofvirtualmachineB,becausefourtimes theCPUtimeexceeds50%,orthemaximumCPUpercentageofvirtualmachineA.

Using Hyper-Threading
YoucanenableHyperthreadingtoallowasingleprocessortoexecutetwo independentthreadssimultaneously.Whilethisfeaturedoesnotprovidethe performanceofatruedualprocessorsystem,itcanimproveutilizationofonchip resources,leadingtogreaterthroughputforcertainimportantworkloads.

Enabling Hyper-Threading in ESX Server


EnableHyperThreadingwiththeEnableHyperThreadingoptionforyoursystem startupprofile.SetthisoptionwithOptions>StartupProfileintheManagement Interface.SeeStartupProfileonpage 188. YoucanalsoenableHyperThreadingintheServiceConsole. To edit /etc/vmware/hwconfig and set the hyperthreading option 1 2 LogintotheServiceConsoleasroot. Edit/etc/vmware/hwconfig.

VMware, Inc.

335

Administration Guide

Definethehyperthreadingoption:
hyperthreading = true

Ifyoupreviouslydefinedthisoption,changethecurrentvaluetotrue. 4 Savethefileandcloseit.

Configuring Hyper-Threading Options for Virtual Machines


YoucanconfigurethehtsharingoptionwiththeVerboseOptionsconfiguration panel.Usethecompletenameoftheoption:cpu.htsharing.SeeSettingStartupand ShutdownOptionsbyModifyingtheConfigurationFileDirectly(AdvancedUsers Only)onpage 126fordetailedinstructions. YoucanalsoconfigurehtsharingintheServiceConsole,byeditingthevirtual machineconfigurationfileorbyusingtheprocfscommand.SeeEditingtheVirtual MachineConfigurationFileonpage 337orUsingprocfsonpage 339.

Managing Virtual Machine CPU Resources


YoucanmanageCPUresourcesfromtheVMwareManagementInterfaceorfromthe serviceconsole,asdescribedinthefollowingsections:
! !

ManagingCPUResourcesfromtheManagementInterfacenext ManagingCPUResourcesfromtheServiceConsoleonpage 337

Managing CPU Resources from the Management Interface


Youmayalsoviewandchangesettingsfromthevirtualmachinedetailspagesinthe VMwareManagementInterface. To change CPU resources in the VMware Management Interface 1 OntheserversStatusMonitorpane,clickthenameofanindividualvirtual machine. Thedetailspageforthatvirtualmachineappears.

336

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

ClicktheCPUtab.

ClickEdit. TheCPUResourceSettingsdialogboxappears.

Enterthesettingsyouwant,andclickOK.

Youmustloginasroottochangeresourcemanagementsettingsusingeitherthe managementinterfaceorprocfs.

Managing CPU Resources from the Service Console


YoucanmanageCPUresourcesbyeditingthevirtualmachineconfiguration(.vmx)file orusingprocfs.

Editing the Virtual Machine Configuration File


ThefollowingconfigurationoptionsenableyoutomanageCPUresources.

VMware, Inc.

337

Administration Guide

sched.cpu.shares = <n> Thisconfigurationfileoptionspecifiestheinitialshareallocationforavirtualmachine to<n>shares.Thevalidrangeofnumericalvaluesfor<n>is1to100000.Youcanuse thevalueslow,normal,andhigh.Thesevaluesareconvertedintonumbers,through theconfigurationoptionsCpuSharesPerVcpuLow,CpuSharesPerVcpuNormal,and CpuSharesPerVcpuHigh,describedinthenextsection,Usingprocfs. IfthenumberofCPUsharesisnotspecified,thedefaultallocationisnormal,thatby default,issetto1000sharespervirtualCPU.Thedefaultallocationforauniprocessor virtualmachineis1000sharesor2000sharesforadualvirtualCPU(SMP)virtual machine. sched.cpu.min = <minPercent> ThisconfigurationfileoptionspecifiesaminimumCPUreservation<min>,asa percentage,foravirtualmachine.Thevalidrangeofvaluesfor<minPercent>is0(the defaultminimum)tothenumberrepresentingthetotalphysicalCPUresources.The minimummightbegreaterthan100forSMPvirtualmachinesthatareguaranteed morethanonefullphysicalCPU. NOTE IfESXServerisunabletoguaranteeavirtualmachinesspecifiedminimum percentage(s),youcannotpoweronthatvirtualmachine.Forexample,ifyouhavetwo uniprocessor(UP)virtualmachines,eachhasaCPUminimumof80%,andbothare boundtothesameprocessor,ESXServerdoesnotallowyoutopoweronbothvirtual machines.ThetotalCPUpercentageis160%,greaterthanasingleprocessor. sched.cpu.max = <maxPercent> ThisconfigurationfileoptionspecifiesamaximumCPUpercentage<maxPercent>for avirtualmachine.Thevalidrangeofvaluesfor<maxPercent>is0tothenumber representingthetotalphysicalCPUresources.Themaximummightbegreaterthan100 forSMPvirtualmachinesthatareguaranteedmorethanonefullphysicalCPU.The defaultmaximumis100timesthenumberofvirtualCPUsinthevirtualmachine(100 percentforuniprocessorvirtualmachinesand200percentfordualvirtualCPUvirtual machines). NOTE AvirtualmachinewillneverusemoreCPUtimethanthespecifiedmaximum percentage. sched.cpu.affinity = <set> Thisconfigurationfileoptionspecifiestheinitialprocessoraffinitysetforavirtual machine.If<set>isallordefault,theaffinitysetcontainsallavailableprocessors. ThespecifiedsetcanalsobeacommaseparatedlistofCPUnumberssuchas0,2,3.
338 VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

NOTE

ForSMPvirtualmachines,theaffinitysetappliestoallvirtualCPUsonthevirtual machine. cpu.htsharing = <mode> SettingthehtSharingoptionconfigurestheHyperThreadingoperationmodeforthe virtualmachineidentifiedby<id>.Validmodesare:


!

anyEachCPUofthevirtualmachinecansharetheserverslogicalCPUswithall othervirtualmachines.DefaultvalueforhtSharing. noneEachCPUofthevirtualmachinerequiresanentirephysicalCPU(two logicalCPUs)oftheservertooperate.Thispreventsthevirtualmachinefrom operatingwiththesharedsystemresourcesprovidedbyHyperThreadingand canreduceperformance. internalEachCPUofthevirtualmachinecansharelogicalCPUswiththe secondCPUinthesamevirtualmachine,butnotwithCPUsfromothervirtual machines.ThismodeswitchestononeforvirtualmachineswithoneCPU.

NOTE

OnlySMPvirtualmachinescanusemultiplevirtualCPUs.

Using procfs
YoucanalsouseprocfstomanageCPUresources.Usethefollowingcommand: echo <new_value> > <proc_filename> intheserviceconsole,where<new_value>isthevalueyouwanttosetand <proc_filename>isthefullpathnameoftheconfigurationoptionsprocentry.See Examplesonpage 342formoreinformation. NOTE ForSMPvirtualmachines,usethe<id>ofanyofthevirtualCPUstovieworchange configurationoptionsforthatvirtualmachine. /proc/vmware/vm/<id>/cpu/min ReadingfromthisfilereportstheminimumCPUpercentageallocatedtothevirtual machineidentifiedby<id>. Specifyingapercentage<minPercent>tothisfilechangestheminimumpercentage allocatedtothevirtualmachineidentifiedby<id>to<minPercent>.Thevalidrange ofvaluesfor<minPercent>is0to100multipliedbythenumberofvirtualCPUs;that is,100percentforuniprocessorvirtualmachinesand200percentfordualvirtualCPU virtualmachines.

VMware, Inc.

339

Administration Guide

NOTE

IfnotenoughunreservedCPUtimeisavailableinthesystemtosatisfyademandforan increaseinmin,thereservationwillnotbechanged. /proc/vmware/vm/<id>/cpu/max ReadingfromthisfilereportsthemaximumCPUpercentageallocatedtothevirtual machineidentifiedby<id>. Specifyingapercentage<maxPercent>tothisfilechangesthemaximumpercentage allocatedtothevirtualmachineidentifiedby<id>to<maxPercent>.Thevalidrange ofvaluesfor<maxPercent>is0to100multipliedbythenumberofvirtualCPUs;that is,100percentforuniprocessorvirtualmachinesand200percentfordualvirtualCPU virtualmachines. /proc/vmware/vm/<id>/cpu/shares Readingfromthisfilereportsthenumberofsharesallocatedtothevirtualmachine identifiedby<id>. Writinganumber<n>tothisfilechangesthenumberofsharesallocatedtothevirtual machineidentifiedby<id>to<n>.Thevalidrangeofnumericalvaluesfor<n>is1to 100000.Youcanalsousethevalueslow,normal,andhigh.Thesevaluesareconverted intonumbers,throughtheconfigurationoptionsCpuSharesPerVcpuLow, CpuSharesPerVcpuNormal,andCpuSharesPerVcpuHigh,describedinthissection. /proc/vmware/vm/<id>/cpu/affinity ReadingfromthisfilereportsthenumberofeachCPUinthecurrentaffinitysetforthe virtualmachineidentifiedby<id>. WritingacommaseparatedlistofCPUnumberstothisfile,suchas0,2,3,changesthe affinitysetforthevirtualmachineidentifiedby<id>.Writingallordefaulttothis filechangestheaffinitysettocontainallavailableprocessors. ForSMPvirtualmachines,writingtothisfilechangestheaffinityofallvirtualCPUsin thevirtualmachinetothespecifiedaffinityset. /proc/vmware/vm/<id>/cpu/hyperthreading ReadingfromthisfilereportstheHyperThreadingstateofthevirtualmachine identifiedby<id>. SettingthehtSharingoptionconfigurestheHyperThreadingoperationmodeforthe virtualmachineidentifiedby<id>.Validmodesare:
!

anyEachCPUofthevirtualmachinecansharetheserverslogicalCPUs withallothervirtualmachines.DefaultvalueforhtSharing.

340

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

noneEachCPUofthevirtualmachinerequiresanentirephysicalCPU(two logicalCPUs)oftheservertooperate.Thispreventsthevirtualmachinefrom operatingwiththesharedsystemresourcesprovidedbyHyperThreading, andcanreduceperformance. internalEachCPUofthevirtualmachinecansharelogicalCPUswiththe secondCPUinthesamevirtualmachine,butnotwithCPUsfromother virtualmachines.Thismodeswitchestononeforvirtualmachineswithone CPU.

NOTE

OnlySMPvirtualmachinescanusemultiplevirtualCPUs. /proc/vmware/vm/<vcpuid>/cpu/status ReadingfromthisfilereportscurrentstatusinformationforthevirtualCPUidentified by<vcpuid>,includingthespecifiedsharesandaffinityparameters;andthevirtual machinename,state(running,ready,waiting),currentCPUassignment,and cumulativeCPUusageinseconds. /proc/vmware/sched/cpu Readingfromthisfilereportsthestatusinformationforallvirtualmachinesinthe entiresystem.EachvirtualCPUisdisplayedonitsownline,withinformation includinguptime,timeused,andresourcemanagementparameters. /proc/vmware/config/Cpu/SharesPerVcpuLow Specifiestheanumericalvalueforthelowvalue.Bydefault,thisnumberis500. BecausethisvalueisexpressedinsharespervirtualCPU,theallocationfora uniprocessorvirtualmachineis500shares,or1000sharesforadualvirtualCPU (SMP)virtualmachine. /proc/vmware/config/Cpu/SharesPerVcpuNormal Specifiestheanumericalvalueforthenormalvalue.Bydefault,thisnumberis1000. Forauniprocessorvirtualmachine,thedefaultallocationis1000shares,or2000shares foradualvirtualCPU(SMP)virtualmachine. /proc/vmware/config/Cpu/SharesPerVcpuHigh Specifiestheanumericalvalueforthehighvalue.Bydefault,thisnumberis2000.For auniprocessorvirtualmachine,thedefaultallocationis2000shares,or4000sharesfor adualvirtualCPU(SMP)virtualmachine.

VMware, Inc.

341

Administration Guide

Examples
SupposethatweareinterestedintheCPUallocationforthevirtualmachinewithID 103.Toquerythenumberofsharesallocatedtovirtualmachine103,readthefile.
cat /proc/vmware/vm/103/cpu/shares

Thenumberofsharesisdisplayed.
1000

Thisindicatesthatvirtualmachine103iscurrentlyallocated1,000shares.Tochangethe numberofsharesallocatedtovirtualmachine103,simplywritetothefile.Notethat youneedrootprivilegestochangeshareallocations.


echo 2000 > /proc/vmware/vm/103/cpu/shares

Youcanalsowritetothefilebyspecifyinglow,normal,orhigh.ESXServerwritesthe numericalvalueforthesespecialvalues.
echo high > /proc/vmware/vm/103/cpu/shares

Thechangecanbeconfirmedbyreadingthefileagain.
cat /proc/vmware/vm/103/cpu/shares

Thenumberofsharesisdisplayed.
2000

Toquerytheaffinitysetforvirtualmachine103,readthefile:
cat /proc/vmware/vm/103/cpu/affinity

Theidentifyingnumbersoftheprocessorsintheaffinitysetaredisplayed.
0,1

Thisindicatesthatvirtualmachine103isallowedtorunonCPUs0and1.Torestrict virtualmachine103torunonlyonCPU1,writetothefile.Youneedrootprivilegesto changeaffinitysets.


echo 1 > /proc/vmware/vm/103/cpu/affinity

Thechangecanbeconfirmedbyreadingthefileagain. NOTE TheaffinitysetmustcontainatleastasmanyCPUsasvirtualCPUs;thatis,1CPUfor auniprocessor(UP)virtualmachineand2CPUforaSMPvirtualmachine.

Monitoring CPU Statistics


TheVMwareManagementInterfaceprovidesinformationonthecurrentuseofCPU bythephysicalcomputerandthevirtualmachinesrunningonit.ViewtheStatus Monitortabinthemanagementinterface.SeeFigure 121.
342 VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Figure 12-1. Status Monitor tab TheSystemSummarysectionshowssystemwideinformation.TheVirtualMachines sectionbelowitshowsinformationforparticularvirtualmachines. YoucanreadthecurrentCPUstatisticsforavirtualmachinefromitsstatusfileonthe serviceconsole.Forexample,toviewthestatisticsforthevirtualmachinewithID137, usethiscommand:
cat /proc/vmware/vm/137/cpu/status

Theresultsappearinthefollowingformat:
vcpu 137 wait NONE vm 137 name uptime vmm0:Win2kAS 357.866 cpu 0 affinity 0,1
status costatus usedsec syssec RUN RUN 265.143 3.105 max 200

waitsec 51.783

min 0

shares 2000

emin 72

extrasec 124.758

VMware, Inc.

343

Administration Guide

Theoutputaboveisshownwithadditionallinebreaks,toavoidwrappinglonglines. Alltimesarereportedinseconds,withmillisecondresolution.Minandmax percentagesarereportedasapercentageofasingleprocessor. Figure 12-2. The columns are described in Table 12-1. Table 12-1. CPU statistics
Name vcpu vm name uptime status Description VirtualCPUidentifier. Virtualmachineidentifier. Displaynameassociatedwiththevirtualmachine. Elapsedtimesincethevirtualmachinewaspoweredon. CurrentVCPUrunstate:running(RUN),readytorun(READY),waitingonan event(WAITorWAITB),terminating(ZOMBIE).Thereareadditionalstatesfor SMPvirtualmachines:readywithpendingcoschedule(CORUN),readybut codescheduled(COSTOP). CurrentSMPvirtualmachinecoschedulingstate:uniprocessorvirtual machine(NONE),readytorun(READY),coscheduled(RUN),codescheduled (STOP). CumulativeprocessortimeconsumedbytheVCPU. CumulativesystemtimeconsumedbytheVCPU. CurrentVCPUwaiteventtype:notwaiting(NONE),idle(IDLE),filesystem (FS),swap(SWPA,SWPS),remoteprocedurecall(RPC),waitingforrequest (RQ),andsoon. CumulativeVCPUwaittime. CurrentVCPUprocessorassignment. ProcessoraffinityforVCPU. Minimumprocessorpercentagereservationforthevirtualmachine. Maximumprocessorpercentageallowedforthevirtualmachine. CPUsharesallocationforthevirtualmachine. Effectiveminimumpercentageallocationforthevirtualmachine. Cumulativeprocessorconsumptionaboveeminbythevirtualmachine.

costatus

usedsec syssec wait

waitsec cpu affinity min max shares emin extrasec

Inthisexample,ID137isanSMPvirtualmachinewithtwovirtualCPUs.Theoutput showsstatisticsassociatedwithitsfirstvirtualcpuvmm0,identifiedasvcpu137,witha configureddisplaynamethatbeginswithWin2kAS.ThevirtualCPUiscurrently runningonprocessor0andiscurrentlycoscheduledwiththesecondVCPUassociated withthisvirtualmachine.TheVCPUhasbeenupforabout358seconds,duringwhich


344 VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

timeithasconsumedabout265secondsofprocessortime,includingabout3seconds ofESXServersystemtime(suchasprocessinginterruptsonbehalfofthevirtual machine). ThevirtualCPUisnotcurrentlywaiting,buthaswaitedforatotalofabout52seconds sinceithaspoweredon.Together,bothofthevirtualmachinesvirtualCPUsare allowedtousebetween0and2physicalprocessors(min=0%andmax=200%).The virtualmachinesallocationof2000sharescurrentlyentitlesittoconsumeprocessor timeequivalentto72%ofasingleprocessor.Sincepoweringon,thevirtualmachinehas receivedabout124secondsofCPUtimeaboveitsentitlement,byconsumingextra timeleftoverfromothervirtualmachinesthatdidnotfullyutilizetheirallocations.

Memory Resource Management


VMwareESXServerprovidesdynamiccontrolovertheamountofphysicalmemory allocatedtoeachvirtualmachine.Youcanovercommitmemorysothatthetotalsize configuredforallrunningvirtualmachinesexceedsthetotalamountofavailable physicalmemory.Thesystemmanagestheallocationofmemorytovirtualmachines basedonallocationparametersandsystemload. Youcanspecifyinitialmemoryallocationvaluesforavirtualmachineinits configurationfile.Youcanalsomodifymostmemoryallocationparameters dynamicallyusingtheVMwareManagementInterface,theprocfsinterfaceonthe serviceconsoleortheVMwareScriptingAPI.Reasonabledefaultsareusedwhen parametersarenotspecifiedexplicitly. Youhaveaccesstoinformationaboutcurrentmemoryallocationsandotherstatus informationthroughthemanagementinterface,theprocfsinterfaceontheservice consoleandtheVMwareScriptingAPI. FormoreinformationonmemorymanagementbyVMwareESXServer,seethemem(8) manpage.Youcanalsoviewtheabstractofatechnicalpaperdescribingmemory resourcemanagementatwww.vmware.com/landing/academic.html. IfyouhaveaserverwithNUMAarchitecture,seeUsingYourNUMASystemon page 358.RefertotheVMwareESXServer2NUMASupportWhitePaper,availableat www.vmware.com/pdf/esx2_NUMA.pdfforinformationonsupportedNUMA platforms.

VMware, Inc.

345

Administration Guide

Allocating Memory Resources


Threeparameterscontroltheallocationofmemoryresourcestoeachvirtualmachine:
!

Minimumsizemin Theminimumsizeisaguaranteedlowerboundontheamountofmemorythatis allocatedtothevirtualmachine,evenwhenmemoryisovercommitted.The systemusesanadmissioncontrolpolicytoenforcethisguarantee.Youcannot poweronanewvirtualmachineifthereisntsufficientmemorytoreserveits minimumsize. Setavirtualmachinesminimumfortheminimalacceptableperformanceand abovethethresholdwheretheguestoperatingsystembeginsswappingheavily. Usetheperformancemonitoringtooloftheguestoperatingsystemtoseeifyou areswapping.Forinformationonimprovingguestoperatingsystemperformance, seeImprovingSlowPerformanceonVirtualMachinesonpage 330.

Maximumsizemax Themaximumsizeistheamountofmemoryconfiguredforusebytheguest operatingsystemrunninginthevirtualmachine.Thismaximumsizemustbe specifiedintheconfigurationfileforthevirtualmachine.Bydefault,virtual machinesoperateattheirmaximumallocation,unlessmemoryisovercommitted.

NOTE

Specifyamaximummemorysizeforaguestoperatingsystem,oritwillnotboot.Also, youcanchangeavirtualmachinesmaximummemorysizeonlywhenitispoweredoff.
!

Shareallocation Memorysharesentitleavirtualmachinetoafractionofphysicalmemory.For example,avirtualmachinethathastwiceasmanysharesasanotherisgenerally entitledtoconsumetwiceasmuchmemory,subjecttotheirrespectiveminimum andmaximumconstraints,providedtheyarebothactivelyusingthememorythey havebeenallocated. Youcanspecifysharesbyspecifyinganumericalvalue,orspecifyinghigh, normal,orlow.Bydefault,thesettingfornormalsharesistwicethatoflow. Similarly,highsharesaretwicethatofnormal(orfourtimesthatoflow).

Thesystemallocatesanamountofmemorytoeachvirtualmachinesomewhere betweenitsminimumandmaximumsizesbasedonitssharesandanestimateofits recentworkingsetsize.

346

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Setting Memory Minimum, Maximum, and Shares


Youcansetamemoryminimum,memorymaximum,andsharestomanagememory resourcesforyourvirtualmachines.Memoryminimumsandmaximumsspecify absolutes,anabsoluteminimumormaximummemoryusagebyavirtualmachine. Shares,ontheotherhand,representrelativeimportanceorpriority.Yousetsharesto specifywhichvirtualmachineswillgetpreferentialtreatmentwhenESXServeris overcommitted. Forexample,virtualmachineAhasaminimummemorysizeof192MB,anda maximummemorysizeof256MB,whilevirtualmachineBhasaminimummemory sizeof256MBandamaximummemorysizeof512MB. YouthengivevirtualmachineAhighmemorysharesandvirtualmachineBnormal memoryshares.Bydefault,thesettingforhighistwicethatofnormal,orfourtimes thatoflow.Forexample,avirtualmachinewithhighshareshastwiceasmanyshares asavirtualmachinewithnormalshares,orfourtimesasmanysharesasavirtual machinewithlowshares.Tochangethesedefaults,seeServiceConsoleCommands onpage 353. ESXServerinterpretsthisallocationsothatvirtualmachineAwillneverhavelessthan 192MBmemory,andvirtualmachineBwillneverhavelessthan256MBmemory,inany situation. However,ifoneormorevirtualmachinesarenotactivelyusingtheirallocatedmemory (forexample,thevirtualmachinesareidling),ESXServercanredistributeaportionof unusedmemoryproportionally,basedonthevirtualmachinesmemoryshares.Active virtualmachinesbenefitwhenextraresourcesareavailable.Inthisexample,because virtualmachineAhashighshares,itcangettwiceasmuchmemoryasvirtualmachine B(lowshares),subjecttothespecifiedmemoryminimumormaximum. FordetailedinformationonhowESXServerdynamicallyredistributesmemory,see AllocatingMemoryDynamicallyonpage 348.

Admission Control Policy


VMwareESXServerusesanadmissioncontrolpolicytoensurethatsufficient unreservedmemoryandswapspaceareavailablebeforepoweringonavirtual machine.Memorymustbereservedforthevirtualmachinesguaranteedminimum size;additionaloverheadmemoryisrequiredforvirtualization.Thusthetotalrequired foreachvirtualmachineisthespecifiedminimumplusoverhead. Theoverheadmemorysizeisdeterminedautomatically;itistypically54MBforasingle virtualCPUvirtualmachine,and64MBforadualvirtualCPUSMPvirtualmachine. Additionaloverheadmemoryisreservedforvirtualmachineslargerthan512MB.

VMware, Inc.

347

Administration Guide

NOTE

TocreateSMPvirtualmachineswithESXServer,youmustalsohavepurchasedthe VMwareVirtualSMPforESXServerproduct.FormoreinformationontheVMware VirtualSMPforESXServerproduct,contactVMware,Inc.oryourauthorizedsales representative. Swapspacemustbereservedondiskfortheremainingvirtualmachinememorythat isthedifferencebetweenthemaximumandminimumsettings.Thisswapreservation isrequiredtoensurethesystemisabletopreservevirtualmachinememoryunderany circumstances.Inpractice,onlyasmallfractionoftheswapspacemayactuallybeused. Similarly,whilememoryreservationsareusedforadmissioncontrol,actualmemory allocationsvarydynamically,andunusedreservationsarenotwasted. Theamountofswapspaceconfiguredforthesystemlimitsthemaximumlevelof overcommitment.Adefaultswapfilesizeequaltothephysicalmemorysizeofthe computerisrecommendedinordertosupportareasonable2xlevelofmemory overcommitment.Youmayconfigurelargerorsmallerswapfilesoraddadditional swapfiles. Ifyoudonotconfigureaswapfile,memorymaynotbeovercommitted.Youmay configuretheswapfileusingtheVMwareManagementInterface(SwapConfiguration intheOptionspage)orfromtheserviceconsoleusingthevmkfstoolscommand. Youcancreateadditionalswapfilesusingthevmkfstoolscommand.Youshould consideraddingadditionalswapfilesifyouwanttorunadditionalvirtualmachines butyoureunabletodosobecauseofthelackofswapspace.SeeUsingvmkfstools onpage 249.

Allocating Memory Dynamically


Virtualmachinesareallocatedtheirmaximummemorysizeunlessmemoryis overcommitted.Whenmemoryisovercommitted,eachvirtualmachineisallocatedan amountofmemorybetweenitsminimumandmaximumsizes.Theamountofmemory grantedtoavirtualmachineaboveitsminimumsizecanvarywiththecurrentmemory load.Thesystemdeterminesallocationsforeachvirtualmachinebasedontwofactors: thenumberofsharesithasbeengivenandanestimateofitsrecentworkingsetsize. ESXServerusesamodifiedproportionalsharememoryallocationpolicy.Memory sharesentitleavirtualmachinetoafractionofphysicalmemory.Forexample,avirtual machinethathastwiceasmanysharesasanotherisentitledtoconsumetwiceasmuch memory,subjecttotheirrespectiveminimumandmaximumconstraints,providedthat theyarebothactivelyusingthememorytheyhavebeenallocated.Ingeneral,avirtual machinewithSmemorysharesinasystemwithanoveralltotalofTsharesisentitled toreceiveatleastafractionS/Tofphysicalmemory.

348

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Virtualmachinesthatarenotactivelyusingtheirallocatedmemoryautomaticallyhave theireffectivenumberofsharesreduced,bylevyingataxonidlememory.This memorytaxpreventsvirtualmachinesfromhoardingidlememory.Avirtual machineischargedmoreforanidlepagethanforapagethatitisactivelyusing. TheMemIdleTaxconfigurationoptionprovidesexplicitcontroloverthepolicyfor reclaimingidlememory.Usethisoption,togetherwiththeMemSamplePeriod configurationoption,tocontrolhowthesystemreclaimsmemory.Inmostcases, changesshouldntbenecessary.Forinformationonusingtheseoptions,seeService ConsoleCommandsonpage 369. ESXServerestimatestheworkingsetforavirtualmachinebymonitoringmemory activityoversuccessiveperiodsofvirtualmachinevirtualtime.Estimatesare smoothedoverseveraltimeperiodsusingtechniquesthatrespondrapidlytoincreases inworkingsetsizeandmoreslowlytodecreasesinworkingsetsize.Thisapproach ensuresthatavirtualmachinefromwhichidlememoryhasbeenreclaimedisbeable torampupquicklytoitsfullsharebasedallocationonceitstartsusingitsmemory moreactively.Youcanmodifythedefaultmonitoringperiodof60secondsbyadjusting theMemSamplePeriodconfigurationoption.

Reclaiming Memory from Virtual Machines


ESXServerusestwotechniquesfordynamicallyexpandingorcontractingtheamount ofmemoryallocatedtovirtualmachines:aVMwaresuppliedvmmemctlmodulethatis loadedintotheguestoperatingsystemrunninginavirtualmachine,andswapping pagesfromavirtualmachinetoaserverswapfilewithoutanyinvolvementbythe guestoperatingsystem. Thepreferredmechanismisthevmmemctldriver,whichcooperateswiththeserverto reclaimpagesthatareconsideredleastvaluablebytheguestoperatingsystem.The vmmemctldriverusesaproprietaryballooningtechniquethatprovidespredictable performancethatcloselymatchesthebehaviorofanativesystemundersimilar memoryconstraints.Iteffectivelyincreasesordecreasesmemorypressureontheguest operatingsystem,causingtheguesttoinvokeitsownnativememorymanagement algorithms. Whenmemoryistight,theguestoperatingsystemdetermineswhichpagestoreclaim and,ifnecessary,swapsthemtoitsownvirtualdisk.Theguestoperatingsystemmust beconfiguredwithsufficientswapspace.Someguestoperatingsystemshave additionallimitations.SeethenotesinManagingMemoryResourcesfromtheService Consoleonpage 352.Youcanlimittheamountofmemoryreclaimedusingvmmemctl bysettingthesched.mem.maxmemctloption.Thisoptionspecifiesthemaximum amountofmemorythatyoucanreclaimfromavirtualmachineinmegabytes(MB).

VMware, Inc.

349

Administration Guide

Swappingisusedtoforciblyreclaimmemoryfromavirtualmachinewhenno vmmemctldriverisavailable.Thismightbethecaseifthevmmemctldriverwasnever installed,hasbeenexplicitlydisabled,isnotrunning(forexample,whiletheguest operatingsystemisbooting),oristemporarilyunabletoreclaimmemoryquickly enoughtosatisfycurrentsystemdemands.Standarddemandpagingtechniquesswap pagesbackinwhenthevirtualmachineneedsthem. Usethevmmemctlapproachforoptimumperformance.Swappingisareliable mechanismoflastresortthatthesystemusestoreclaimmemoryonlywhennecessary.

Swap Space and Guest Operating Systems


IfyouovercommitmemorywithESXServer,besureyourguestoperatingsystemshave sufficientswapspace.Thisswapspacemustbegreaterthanorequaltothedifference betweenthevirtualmachinesmaximumandminimumsizes. CAUTION Ifmemoryisovercommitted,andtheguestoperatingsystemisconfigured withinsufficientswapspace,theguestoperatingsysteminthevirtual machinemayfail. Topreventvirtualmachinefailure,increasetheswapsizeinyourvirtualmachines:
!

WindowsguestoperatingsystemsRefertoswapspaceaspagingfiles.Some Windowsoperatingsystemstrytoincreasethesizeofpagingfiles,ifsufficientfree diskspaceisavailable. RefertoyourWindowsdocumentationorsearchtheWindowshelpfilesfor pagingfiles.Followtheinstructionsforchangingthesizeofthevirtualmemory pagingfile.

LinuxguestoperatingsystemReferstoswapspaceasswapfiles.For informationonincreasingswapfiles,seetothemkswap(setsupaLinuxswaparea) andswapon(enablesdevicesandfilesforpagingandswapping)manpagesin yourLinuxguestoperatingsystem.

Guestoperatingsystemswithlargememoryandsmallvirtualdisks(forexample,a virtualmachinewith3.6GBRAManda2GBvirtualdisk)aremoresusceptibletothis problem.

Sharing Memory Across Virtual Machines


ManyESXServerworkloadspresentopportunitiesforsharingmemoryacrossvirtual machines.Forexample,severalvirtualmachinesmayberunninginstancesofthesame guestoperatingsystem,havethesameapplicationsorcomponentsloaded,orcontain commondata.Insuchcases,ESXServerusesaproprietarytransparentpagesharing

350

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

techniquetosecurelyeliminateredundantcopiesofmemorypages.Withmemory sharing,aworkloadrunninginvirtualmachinesoftenconsumeslessmemorythanit wouldwhenrunningonphysicalmachines.Asaresult,higherlevelsof overcommitmentcanbesupportedefficiently. TheESXServerapproachdoesnotrequireanycooperationfromtheguestoperating system.UsetheMemShareScanVMandMemShareScanTotalconfigurationoptionsto controltherateatwhichthesystemscansmemorytoidentifyopportunitiesforsharing memory.SeeServiceConsoleCommandsonpage 353.

Managing Virtual Machine Memory


YoucanmanagevirtualmachinememoryfromtheVMwareManagementInterfaceor fromtheserviceconsole.

Managing Memory Resources from the Management Interface


Youcanalsoviewandchangesettingsfromthevirtualmachinedetailspagesinthe VMwareManagementInterface. To manage memory from the VMware Management Interface 1 OntheserversStatusMonitorpage,clickthenameofanindividualvirtual machine. Thedetailspageforthatvirtualmachineappears. 2 ClicktheMemorytab.

ClickEdit.

VMware, Inc.

351

Administration Guide

TheMemoryResourceSettingsdialogboxappears.

Enterthesettings,andclickOK.

Loginasroottochangeresourcemanagementsettingsusingeitherthemanagement interfaceorprocfs.

Managing Memory Resources from the Service Console


Youcanmanagememoryresourcesbyeditingthefollowingsettingsinthevirtual machinesconfigurationfile.Toedittheconfigurationfile,usetheconfigurationfile editorinthemanagementinterface.SeeEditingtheVirtualMachineConfiguration Fileonpage 337. memsize = <size> Specifiesthemaximumvirtualmachinesizetobe<size>MB. sched.mem.minsize = <size> Specifiestheguaranteedminimumvirtualmachinesizetobe<size>MB.The maximumvalidvaluefor<size>is100percentofthespecifiedmaximumvirtual machinesize.Theminimumvalidvaluefor<size>dependsontheamountofavailable swapspace.Thedefaultminimumsizeis50percentofthespecifiedmaximumvirtual machinesize. sched.mem.shares = <n> Specifiestheinitialmemoryshareallocationforavirtualmachinetobe<n>shares.The validrangeofnumericalvaluesfor<n>is0to100000.Youcanalsousethevalueslow, normal,andhigh.Thesevaluesareconvertedintonumbers,throughtheconfiguration optionsMemSharesPerMBLow,MemSharesPerMBNormal,andMemSharesPerMBHigh, describedinthenextsection.Ifthenumberofsharesforavirtualmachineisnot specified,theassignedallocationisnormal,withadefaultvalueequalto10timesthe virtualmachinesmaximummemory,inMB.

352

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Forexample,ifyoucreatedavirtualmachinewithamaximummemoryof256MB,and withitssharessettingsasnormal,thisvirtualmachinehas10times256,or2560shares. Similarly,avirtualmachinewithamaximummemoryof1GBwithanormalshare setting,has10240shares. sched.mem.maxmemctl = <size> Specifiesthemaximumamountofmemorythatcanbereclaimedfromthevirtual machineusingvmmemctltobe<size>MB.Ifadditionalmemoryneedstobereclaimed, thesystemswapsinsteadofusingvmmemctl.Thedefaultmaximumsizeishalfofthe specifiedmaximumvirtualmachinesize. sched.mem.affinity = <NUMA_node> Specifiesthat,ifpossible,allthevirtualmachinesmemoryshouldbeallocatedonthe specifiedNUMAnode.SeeAssociatingFutureVirtualMachineMemoryAllocations withaNUMANodeonpage 362.

Service Console Commands


/proc/vmware/vm/<id>/mem/min Readingfromthisfilereportstheminimummemorysizeinmegabytesforthevirtual machineidentifiedby<id>. Writinganumber<size>tothisfilechangestheminimummemorysizeforthevirtual machineidentifiedby<id>to<size>MB. /proc/vmware/vm/<id>/mem/shares Readingfromthisfilereportsthenumberofmemorysharesallocatedtothevirtual machineidentifiedby<id>. Writinganumber<n>tothisfilechangesthenumberofmemorysharesallocatedtothe virtualmachineidentifiedby<id>to<n>.Thevalidrangeofnumericalvaluesfor<n> is0to100000.Youmayalsousethespecialvalueslow,normalandhigh.Thesevalues areconvertedintonumbers,throughtheconfigurationoptionsMemSharesPerMBLow, MemSharesPerMBNormal,andMemSharesPerMBHigh,describedbelow. Avalueofzero(0)sharescausesthevirtualmachinememorysizeallocationtobe exactlyequaltoitsspecifiedminimumsize,evenifexcessmemoryisavailable. /proc/vmware/vm/<id>/mem/status Readingfromthisfilereportscurrentstatusinformationforthevirtualmachine identifiedby<id>,includingthespecifiedshares,minimumsizeandmaximumsize parametersaswellasthevirtualmachinename,currentstatus,whetherthevirtual machineiscurrentlywaitingformemorytobereserved,currentmemoryusage,

VMware, Inc.

353

Administration Guide

currenttargetsize,memoryoverheadforvirtualizationandtheamountofallocated memoryactivelyinuse.Allmemorysizesarereportedinkilobytes. /proc/vmware/sched/mem Readingfromthisfilereportsthememorystatusinformationforallnonsystemvirtual machinesintheentiresystemaswellasseveralaggregatetotals. Writingthestringrealloctothisfilecausesanimmediatememoryreallocation. MemoryisnormallyreallocatedperiodicallyeveryMemBalancePeriodseconds.(See /proc/vmware/config/MemBalancePeriodbelowformoreinformation.) Reallocationsarealsotriggeredbysignificantchangesintheamountoffreememory. /proc/vmware/mem Readingfromthisfilereportsthemaximumsizewithwhichanewvirtualmachinecan bepoweredon,admissioncontrolstatusincludingtheamountofunreservedmemory andunreservedswapspaceandthecurrentamountoffreememoryinthesystem. /proc/vmware/pshare/status Readingfromthisfilereportsvariousdetailedstatisticsaboutthecurrentstatusof transparentpagesharing. /proc/vmware/swap/stats Readingfromthisfilereportsvariousdetailedswapstatistics. /proc/vmware/config/Mem/SharesPerMBLow Specifiestheanumericalvalueforthelowsharesvalue.Bydefault,thisnumberis 5.Thisnumberismultipliedbythevirtualmachinesmaximummemorysizetoobtain thenumberofshares. /proc/vmware/config/Mem/SharesPerMBNormal Specifiestheanumericalvalueforthenormalsharesvalue.Bydefault,thisnumberis 10.Thisnumberismultipliedbythevirtualmachinesmaximummemorysizeto obtainthenumberofshares. /proc/vmware/config/Mem/SharesPerMBHigh Specifiestheanumericalvalueforthehighsharesvalue.Bydefault,thisnumberis20. Thisnumberismultipliedbythevirtualmachinesmaximummemorysizetoobtain thenumberofshares. /proc/vmware/config/Mem/BalancePeriod

354

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

ThisESXServeroptionspecifiestheperiodictimeinterval,inseconds,forautomatic memoryreallocations.Reallocationsarealsotriggeredbysignificantchangesinthe amountoffreememory.Thedefaultis15seconds. /proc/vmware/config/Mem/SamplePeriod ThisESXServeroptionspecifiestheperiodictimeinterval,measuredinsecondsof virtualmachinevirtualtime,overwhichmemoryactivityismonitoredinorderto estimateworkingsetsizes.Thedefaultis30seconds. /proc/vmware/config/Mem/IdleTax ThisESXServeroptionspecifiestheidlememorytaxrateasapercentage.Ataxrateof xpercentmeansthatuptoxpercentofavirtualmachinesidlememorymaybe reclaimed.Virtualmachinesarechargedmoreforidlememory,thanformemorythat theyareactivelyusing.Ataxrateof0percentdefinesanallocationpolicythatignores workingsetsandallocatesmemorystrictlybasedonshares.Ahightaxrateresultsin anallocationpolicythatallowsidlememorytobereallocatedawayfromvirtual machinesthatareunproductivelyhoardingit,regardlessofshares.Thedefaultis75 percent. /proc/vmware/config/Mem/ShareScanVM ThisESXServeroptionspecifiesthemaximumpervirtualmachinerateatwhich memoryshouldbescannedfortransparentpagesharingopportunities.Therateis specifiedasthenumberofpagestoscanpersecond.Thedefaultis50pagespersecond pervirtualmachine. /proc/vmware/config/Mem/ShareScanTotal ThisESXServeroptionspecifiesthetotalsystemwiderateatwhichmemoryshouldbe scannedfortransparentpagesharingopportunities.Therateisspecifiedasthenumber ofpagestoscanpersecond.Thedefaultis200pagespersecond. /proc/vmware/config/Mem/CtlMaxPercent ThisESXServeroptionlimitsthemaximumamountofmemorythatmaybereclaimed fromanyvirtualmachineusingvmmemctl,basedonapercentageofitsmaximumsize. Specifying0effectivelydisablesreclamationviavmmemctlforallvirtualmachines. Defaultsto50. /proc/vmware/config/Mem/CtlMax[OSType] TheseESXServeroptionsrestrictthemaximumamountofmemorythatmaybe reclaimedfromavirtualmachineusingvmmemctl,basedonthelimitationsofguest operatingsystemtype.Thevalueisspecifiedinmegabytes.Defaultsto128for OSType=NT4(WindowsNT4.0),2048forOSType=NT5(Windows2000orWindows Server2003),and768forOSType=Linux.
VMware, Inc. 355

Administration Guide

Monitoring Memory Statistics


TheVMwareManagementInterfaceprovidesinformationonthecurrentuseofRAM bythephysicalcomputerandthevirtualmachinesrunningonit.ViewtheStatus Monitorpageinthemanagementinterface.

Figure 12-3. Status Monitor tab TheSystemSummarysectionshowssystemwideinformation.TheVirtualMachines sectionbelowitshowsinformationforparticularvirtualmachines. Youcanreadthecurrentmemorystatisticsforavirtualmachinefromitsstatusfileon theserviceconsole.Forexample,toviewthestatisticsforthevirtualmachinewithID 103,usethiscommand:
cat /proc/vmware/vm/103/mem/status

Theresultsappearinthefollowingformat:
vm 103 mctl? yes shares 2560 min 131072 max 262144 swapin 13289 size/sizetgt 217300/217300 swapout 18961 ovhdpeak 14508 affinity 0

memctl/mctltgt 39168/ 39168 cptread/cpttgt 0/ 0

swapped/swaptgt 5672/ 5672 shared 38164 active 191756

overhd/ovhdmax 14508/ 55296

356

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Theprecedingoutputisshownwithadditionallinebreaks,inordertoavoidwrapping longlines.Allmemorysizesarereportedinkilobytes;1megabyte=1024KB. ThecolumnsaredescribedinTable 122. Table 12-2. Memory statistics


vm mctl? shares min max size sizetgt memctl mctltgt swapped swaptgt swapin swapout cptread cpttgt shared active overhd ovhdmax ovhdpeak affinity Virtualmachineidentifier. vmmemctldriveractive?. Memorysharesassociatedwiththevirtualmachine. Minimumsize. Maximumsize. Currentsize. Targetsize. Currentlyreclaimedusingvmmemctl. Targettoreclaimusingvmmemctl. CurrentlyswappedtoVMFSswapfile. TargettoswaptoVMFSswapfile. TotalnumberofpagesswappedinfromVMFSswapfile. TotalnumberofpagesswappedouttoVMFSswapfile. (Resumedvirtualmachinesonly)Numberofpagesreadfromsuspendfile. (Resumedvirtualmachinesonly)Numberofpagestoreadfromsuspend file. Memorysharedthroughtransparentpagesharing. Currentworkingsetestimate. Currentoverheadmemorysize. Maximumoverheadmemorysize. Maximumoverheadmemoryused. (NUMAmachinesonly)Memoryaffinityforthevirtualmachine.

Inthisexample,thevirtualmachinewithID103isrunningthevmmemctldriverandis notcurrentlyblockedwaitingformemory.Thevirtualmachineisconfiguredtouse between128MBand256MBandhasbeenallocated2560memoryshares.Itiscurrently allocatedabout212MB.Approximately44MBhasbeenreclaimedforusebyother virtualmachines38MBthroughvmmemctlandnearly6MBbyswappingtotheESX serverswapfile.Ofthe212MBallocatedtothevirtualmachine,morethan37MBis shared,forexample,withothervirtualmachines.Thecurrentworkingsetestimatefor


VMware, Inc. 357

Administration Guide

thevirtualmachineisapproximately187MB.About14MBofoverheadmemoryis currentlybeingusedforvirtualization,outofamaximumof54MB.

Cautions
VMwaresuppliesvmmemctldriversforWindowsServer2003,WindowsXP,Windows 2000,WindowsNT4.0,andLinux.Theappropriatevmmemctldriverisinstalledwhen youinstallVMwareToolsintheguestoperatingsystem.Thesystemusesswappingto reclaimmemoryfromvirtualmachinesrunningotherguestoperatingsystemsand fromvirtualmachinesthatdonothaveVMwareToolsinstalled. Themaximumamountofmemorythatthesystemmayattempttoreclaimusing vmmemctlisrestrictedbasedonknownlimitationsofthetypeofguestoperating system.Alternatively,youcanspecifytheconfigurationfileoption sched.mem.maxmemctlmanually.SeethedescriptionoftheESXServeroptions MemCtlMax[OSType]forappropriatelimits.

Using Your NUMA System


ESXServer2.5includesadditionalsupportformachinesthatarebasedonNUMA (NonUniformMemoryAccess)architecture.NUMAmachinesaremadeupof multiplenodes(alsocalledCECsonsomemultiplenodemachines). Eachnodecomprisesonetofourprocessorsandmainmemory.Inanode,eachCPU hasthesamedistancefromitslocalmemory. Eachprocessorcanaccessmemoryonanynode,butaccessingmemoryonadifferent node(referredtoasremotememory)issubstantiallyslowerthanaccessinglocal memorythatliesonthesamenodeastheprocessor.Thatis,thememoryaccessspeed forCPUsonanodevary,dependingonthedistanceofthememoryfromthenode. ForadditionalinformationonNUMAandsupportedNUMAplatforms,refertothe VMwareESXServer2NUMASupportWhitePaper,availableat http://www.vmware.com/pdf/esx2_NUMA.pdf. FormoreinformationonNUMAmanagementbyVMwareESXServer,seethenuma(8) manpage.

NUMA Configuration Information


ThissectiondescribeshowtoobtainstatisticsaboutyourNUMAsystem.

358

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Obtaining NUMA Statistics


ThiscommandchecksforthepresenceofaNUMAsystem.IfitfindsaNUMAsystem, italsoliststhenumberofnodes,theamountofmemory,andthephysicalCPUsonthe NUMAnode:
cat /proc/vmware/NUMA/hardware

Heresanexampleofwhatyoumightsee:
#NUMANodes:2 Totalmemory:8192MB Node ID MachineMem 0 1 00 01 4096MB 4096MB

ManagedMe CPUs m 3257MB 0123 4096MB 4567

Theabsenceofthe/proc/vmware/NUMAdirectoryindicatesthatthissystemisnota NUMAsystem. TherearetwoNUMAnodes.Thefieldsinthetablearedefinedasfollows:


! ! !

NodeNodenumber. IDHardwareIDnumberoftheNUMAnode. MachineMemAmountofphysicalmemorylocatedonthisNUMAnode, includingmemorythatcanbeusedbytheserviceconsole. ManagedMemAmountofphysicalmemorylocatedonthisNUMAnode, excludingmemoryusedbytheserviceconsoleandtheESXServervirtualization layer. CPUsAspaceseparatedlistofthephysicalprocessorsinthisnode. PhysicalCPUs0,1,2,and3areinNUMAnode0,andphysicalCPUs4,5,6,and7 areinNUMAnode1.

TotalmemorytellsyouhowmuchmemoryisphysicallyinstalledoneachNUMA node.However,notallthismemorymaybemanagedbytheVMkernel,becausesome ofthememoryisusedbytheserviceconsole.

Determining the Amount of Memory for Each NUMA Node


Typethefollowing:
cat /proc/vmware/mem/

VMware, Inc.

359

Administration Guide

Heresanexampleofwhatyoumightsee:
. . . 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

Inthisexample,thetotalmemorymanagedbytheVMkernelfortheNUMAnodesis listedintheTotalsrow.Thisamountmightbesmallerthanthetotalamountof physicalmemoryontheservermachine.

Determining the Amount of Memory for a Virtual Machine on a NUMA Node


Typethefollowing:
cat /proc/vmware/vm/<id>/mem/numa

Heresanexampleofwhatyoumightsee:
Node# 0 1 Pages/MB 13250/51 0/0

Theprecedingoutputindicatesthatthevirtualmachine,withthespecifiedID,occupies 51MBofmemoryonnode0,andnomemoryonnode1. NOTE Inthisexample,thememoryaffinityissetsothatonlypagesassociatedwithnode0are allocatedforthisvirtualmachine(sched.mem.affinity = 0).Ifmemoryaffinityhad notbeenset,typicallytheoutputwouldhaveshownamoreevendistributionof memorybetweennodes0and1.SeeAssociatingFutureVirtualMachineMemory AllocationswithaNUMANodeonpage 362.

Automatic NUMA Optimizations


Bydefault,ESXServerbalancesvirtualmachinesandtheirrelateddatabetweenthe availableNUMAnodes.ESXServerattemptstomaximizeuseoflocalmemory,that liesonthesameNUMAnodeasthevirtualmachinethatisrunning. ESXServerassignseachvirtualmachinetoatemporaryhomeNUMAnode.The virtualmachinerunsonlyonCPUsinthehomenode,withaccesstoitslocalmemory. Periodically,ESXServercomparestheutilizationlevelsofallNUMAnodesand attemptstorebalancethenodesifonenodehasahigherutilizationlevelthanthe

360

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

othernodes.ESXServerrebalancesthenodesbychangingavirtualmachineshome NUMAnodefromtheoverutilizednodetoanunderutilizednode. WhentheNUMAnodesarebalanced,ESXServeragainattemptstomaximizeuseof localmemory.Formoreinformation,refertothenumamanpage. Youcanalsosetaffinitymanuallyasdescribedinthenextsection.Ifyoudo,ESXServer wontautomaticallyrebalancethenodes,andyoumustbalancetheNUMAnodesto avoidoverloadinganysinglenode.

Manual NUMA Optimizations


Ifyouhaveapplicationsthatusealotofmemoryorhaveasmallnumberofvirtual machines,youmightwanttooptimizeperformancebysettingyourNUMA optimizationsmanually.Formostusers,ESXServersautomaticNUMAoptimizations, shouldprovideyouwithgoodperformance. YoucansettwoNUMAoptionsmanually:
! !

CPUaffinitySeeAssociatingVirtualMachinestoaSingleNUMANode,next. MemoryaffinitySeeAssociatingFutureVirtualMachineMemoryAllocations withaNUMANodeonpage 362.

Typically,tobindavirtualmachinetoaNUMAnode,setthevirtualmachinesCPU affinitytouseonlytheCPUsonthespecifiednodeandsettheNUMAmemoryaffinity tothesamenode. NOTE Ifyousettheseoptimizationsmanually,ESXServerdoesnotautomaticallyrebalance thenodesifonenodebecomesoverloaded.YoumustbalancetheNUMAnodesto avoidoverloadinganysingleNUMAnode.

Associating Virtual Machines to a Single NUMA Node


Youcanimprovetheperformanceoftheapplicationsonavirtualmachineby associatingittotheCPUnumbersonasingleNUMAnode(manualCPUaffinity). (NUMAConfigurationInformationonpage 358.)
!

VMwareManagementInterfaceAssociateavirtualmachinetoasingleNUMA node.ClickEditintheSchedulingAffinitysectionoftheCPUpageforthevirtual machine.ClicktheappropriatechoicesnexttoRunonProcessor(s)andDonot RunonProcessor(s).ClickOK. SeeManagingCPUResourcesfromtheManagementInterfaceonpage 336.

VirtualmachineconfigurationfileAddthefollowing:
sched.cpu.affinity = <set>

VMware, Inc.

361

Administration Guide

where<set>comprisesCPUnumbersonasingleNUMAnode.Thisentrybinds allvirtualCPUsinthisvirtualmachinetotheNUMAnode. Forexample,typingsched.cpu.affinity = 4,5,6,7bindsthisvirtualmachine totheNUMAnodethathasphysicalCPUs4through7. SeeEditingtheVirtualMachineConfigurationFileonpage 337.


!

procfsinterfaceontheserviceconsole
/proc/vmware/vm/<id>/cpu/affinity

WriteacommaseparatedlistoftheCPUnumbersonasingleNUMAnode.See Usingprocfsonpage 339. NOTE IfyoumanuallysetCPUaffinityusingoneoftheprecedingoptions,ESXServersetsthe virtualmachinesmemorytobeallocatedonthesameNUMAnode.Todisablethis feature,changetheNUMAAutoMemAffinityconfigurationoptionto0(zero).See AdvancedSettingsonpage 205.

Associating Future Virtual Machine Memory Allocations with a NUMA Node


Youcanimproveperformancebyspecifyingthatallfuturememoryallocationsona virtualmachineusepagesassociatedwithasingleNUMAnode(manualmemory affinity).Whenthevirtualmachineuseslocalmemory,theperformanceimproveson thisvirtualmachine.(SeeObtainingNUMAStatisticsonpage 359todeterminethe NUMAnodenumber.) NOTE Specifynodestobeusedforfuturememoryallocationsonlyifyouhavealsospecified CPUaffinity.Ifyoumakemanualchangesonlytothememoryaffinitysettings, automaticNUMArebalancingwillnotworkproperly. Dooneofthefollowing:
!

VMwareManagementInterfaceAssociateavirtualmachinetoasingleNUMA node.ClickEditintheMemoryAffinitysectionoftheMemorypaneforthe virtualmachine.ClicktheappropriatechoicesnexttotheNUMAnodesandclick OK. SeeManagingMemoryResourcesfromtheManagementInterfaceonpage 351.

VirtualmachineconfigurationfileAddthefollowing:
sched.mem.affinity = <NUMA_node>

where<NUMA_node>isthenumberofasingleNUMAnode.

362

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

procfsinterfaceontheserviceconsole:
/proc/vmware/vm/<id>/mem/affinity

WritethenumberoftheNUMAnode.

Binding a Virtual Machine to a Single NUMA Node on an 8-way Server


ThefollowingexampleillustratesmanuallybindingfourCPUstoasingleNUMAnode foravirtualmachine.Youwantthevirtualmachinetorunonlyonnode1. Anexampleoutputofcat/proc/vmware/NUMA/hardwareis:
#NUMANodes:2 Totalmemory:14336MB Node ID MachineMem 0 1 00 01 4096MB 10240MB

ManagedMe CPUs m 1210MB 0123 6143MB 4567

TheCPUsforexample,4,5,6and7arethephysicalCPUnumbers. To manually bind four CPUs to a single NUMA node for a virtual machine 1 Completeoneofthefollowingtobindatwowayvirtualmachinetouseonlythe lastfourphysicalCPUsofaneightprocessormachine:
!

Addthefollowinginthevirtualmachinesconfigurationfile.
sched.cpu.affinity = 4,5,6,7

IntheVMwareManagementInterface,associateavirtualmachinetoasingle NUMAnodebycheckingtheappropriateboxesnexttoRunonProcessor(s) intheCPUtabofthevirtualmachinedetailspage.

Setthevirtualmachinesmemoryaffinitytospecifythatallofthevirtualmachines memoryshouldbeallocatedonnode1. Addthefollowinginthevirtualmachinesconfigurationfile.


sched.mem.affinity = 1

CompletingthesetwostepsensuresthatthevirtualmachinerunsonlyonNUMAnode 1and,whenpossible,allocatesmemoryfromthesamenode.

Sizing Memory on the Server


Theseguidelinesaretohelpsystemadministratorsdetermineanappropriateamount ofhardwarememoryforrunningavirtualmachineworkloadonESXServer2.5. Becausethecharacteristicsofyourworkloadalsoinfluencememoryneeds,followup

VMware, Inc.

363

Administration Guide

withtestingtoconfirmthatmemorysizescomputedaccordingtotheseguidelines achievetheresultsyouwant. ESXServerusesasmallamountofmemoryforitsvirtualizationlayer,additional memoryfortheserviceconsole,andallremainingmemoryforrunningvirtual machines.Thefollowingsectionsexplaineachoftheseusesandprovideaquantitative sizingexample.

Server Memory
ESXServer2.5usesapproximately24MBofsystemmemoryforitsvirtualizationlayer. ThismemoryisallocatedwhentheESXServerisloadedandisnotconfigurable.

Service Console Memory


Therecommendedamountofmemorytoconfigurefortheserviceconsolevaries between192MBand512MB,dependingonthenumberofvirtualmachinesyouplanto runconcurrentlyontheserver:
! ! ! !

192MBfor<=8virtualcpus 272MBfor<=16virtualcpus 384MBfor<=32virtualcpus 512MBfor>32virtualcpus

Themaximumamountofmemorythatcanbereservedis800MB. NOTE Theamountofmemoryrequiredmustalsotakeintoaccounttheamountofmemory requiredbysystemmanagementagentsorbackupagentsthatwillberunninginthe serviceconsole.

Virtual Machine Memory Pool


Theremainingpoolofsystemmemoryisusedforrunningvirtualmachines.ESX Servermanagestheallocationofthismemorytovirtualmachinesautomaticallybased onadministrativeparametersandsystemload.ESXServeralsoattemptstokeepsome memoryfreeatalltimesinordertohandledynamicallocationrequestsefficiently.ESX Serversetsthislevelatapproximately6percentofthememoryavailableforrunning virtualmachines.

Virtual Machine Memory


Eachvirtualmachineconsumesmemorybasedonitsconfiguredsize,plusadditional overheadmemoryforvirtualization.

364

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Thedynamicmemoryallocationforavirtualmachineisboundedbyitsminimumand maximumsizeparameters.Themaximumsizeistheamountofmemoryconfiguredfor usebytheguestoperatingsystemrunninginthevirtualmachine.Bydefault,virtual machinesoperateattheirmaximumallocation,unlessmemoryisovercommitted. Theminimumsizeisaguaranteedlowerboundontheamountofmemorythatis allocatedtothevirtualmachine,evenwhenmemoryisovercommitted.Setthe minimumsizetoalevelthatensuresthevirtualmachinehassufficientmemorytorun efficiently,withoutexcessivepaging. Youcansetthemaximumsizetoahigherleveltoallowthevirtualmachinetotake advantageofexcessmemory,whenavailable. Overheadmemoryincludesspacereservedforthevirtualmachineframebufferand virtualizationdatastructures.Avirtualmachineconfiguredwithlessthan512MBof memoryrequires54MBofoverheadmemoryforasinglevirtualCPUvirtualmachine, and64MBforadualvirtualCPUSMPvirtualmachine.Largervirtualmachines requireanadditional32MBofoverheadmemoryperadditionalgigabyteofconfigured mainmemory.Forexample,asinglevirtualCPUvirtualmachinewithaconfigured maximummemorysizeof2GBrequires102MBofoverheadmemory.

Memory Sharing
Manyworkloadspresentopportunitiesforsharingmemoryacrossvirtualmachines. Forexample,severalvirtualmachinesmayberunninginstancesofthesameguest operatingsystem,havethesameapplicationsorcomponentsloadedorcontain commondata.ESXServerusesaproprietarytransparentpagesharingtechniqueto securelyeliminateredundantcopiesofmemorypages. Withmemorysharing,aworkloadconsistingofmultiplevirtualmachinesoften consumeslessmemorythanitwouldwhenrunningonphysicalmachines.Asaresult, thesystemcansupporthigherlevelsofovercommitmentefficiently. Theamountofmemorysavedbymemorysharingishighlydependentonworkload characteristics.Aworkloadconsistingofmanynearlyidenticalvirtualmachinesmay freeupmorethan30percentofmemory,whileamorediverseworkloadmayresultin savingsoflessthan5percentofmemory. Todeterminetheeffectivenessofmemorysharingforaworkload,runtheworkload, andobservethesavingsbylookingattheoutputofthe/proc/vmware/memfile. ESXServermemorysharingrunsasabackgroundactivitythatscansforsharing opportunitiesovertime.Theamountofmemorysavedmayvaryovertime;forafairly constantworkload,theamountgenerallyincreasesslowlyuntilallsharing opportunitiesareexploited.

VMware, Inc.

365

Administration Guide

Memory Overcommitment
Inmanyconsolidatedworkloads,itisrareforallvirtualmachinestobeactivelyusing alloftheirmemorysimultaneously.Typically,somevirtualmachinesarelightlyloaded, whileothersaremoreheavilyloaded,andrelativeactivitylevelsgenerallyvaryover time.Insuchcases,itmightbereasonabletoovercommitmemorytoreducehardware memoryrequirements. ESXServertransfersmemoryfromidlevirtualmachinestovirtualmachinesthat activelyneedmorememorytoimprovememoryutilization. Youcanalsospecifyconfigurationparameterstopreferentiallydevotespaceto importantvirtualmachines. Theminimumsizeforavirtualmachinedefinesaguaranteedlowerboundonthe amountofmemorythatitisallocated,evenwhenmemoryisovercommitted.Youcan alsousememorysharestospecifytherelativeimportanceofdifferentvirtualmachines. Inanycase,youshouldconfigureanappropriateminimumsizeforeachvirtual machinetoensurethateachvirtualmachinecanfunctioneffectively(withoutexcessive paging),evenwhenallvirtualmachinesareactiveconcurrently. Whenmemoryisscarce,ESXServerdynamicallyreclaimsspacefromsomevirtual machinesbasedonimportanceandcurrentworkingsets.Foroptimalperformance,the serverattemptstoreclaimmemoryfromavirtualmachineviaaVMwaresupplied vmmemctlmodulerunningintheguest.Thisallowstheguestoperatingsystemto invokeitsownnativememorymanagementpolicies,causingittoswaptoitsown virtualdiskonlywhennecessary. ESXServeralsohasitsownswapfileandmayalsoswapmemoryfromavirtual machinetotheESXServerswapfiledirectly,withoutanyinvolvementbytheguest operatingsystem.

Example: Web Server Consolidation


SupposethatyouareusingESXServertoconsolidateeightnearlyidenticalWeb serversrunningIISonWindows2000.EachWindows2000machineisconfiguredwith 512MBofmemory.Thenativememoryrequirementwitheightphysicalserversis8* 512MB=4GB. Toconsolidatetheseserversasvirtualmachines,24MBisneededfortheserver virtualizationlayerand192MBisrecommendedfortheserviceconsole.Eachvirtual machinealsorequiresanadditional54MBofoverheadmemory.Anadditional6 percentshouldbeaddedtoaccountfortheminimumfreememorylevel.Assumingno overcommitmentandnobenefitsfrommemorysharing,thememoryrequiredfor virtualizingtheworkloadis24MB+192MB+(1.06*8*(512MB+54MB))=5016MB.The totaloverheadforvirtualizationinthiscaseis920MB.
366 VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Ifmemorysharingachievesa10percentsavings(410MB),thetotalmemoryoverhead dropstoonly510MB.Ifmemorysharingachievesa25percentsavings(1GB),the virtualizedworkloadactuallyconsumes104MBlessmemorythanitwouldoneight physicalservers. Itmayalsomakesensetoovercommitmemory.Forexample,supposethatonaverage, twooftheeightWebservervirtualmachinesaretypicallyidleandthateachWebserver virtualmachinerequiresonly256MBtoprovideminimallyacceptableservice.Inthis case,thehardwarememorysizecanbereducedsafelybyanadditional2*256MB= 512MB.Intheworstcasewhereallvirtualmachinesareactiveatthesametime,the systemmightneedtoswapsomevirtualmachinememorytodisk. ForadditionalbackgroundinformationonESXServermemoryusage,seeMemory ResourceManagementonpage 345.

Managing Network Bandwidth


VMwareESXServersupportsnetworktrafficshapingwiththenfshaperloadable module.Aloadablepacketfiltermoduledefinesafilterclass;multiplefilterinstances maybeactiveforeachloadedclass.Thecurrentreleasesupportsonlyonefilterclass, nfshaper,whichisatransmitfilterforoutboundbandwidthmanagementthatcanbe attachedtovirtualmachinesusingeitheraprocfsinterfaceontheserviceconsoleor theVMwareManagementInterface.

Using Network Filters


ThissectiondescribeshowtousetheVMwareManagementInterfacetoattachand detachnfshaperandobtainstatisticsfromit.Italsodescribeshowtoattach,detach, andqueryfilterinstancesfromtheprocfsinterfaceontheserviceconsole.

Managing Network Bandwidth from the Management Interface


Youcanviewandchangesettingsfromthevirtualmachinedetailspagesinthe VMwareManagementInterface. To change settings from the VMware Management Interface 1 OntheserversStatusMonitorpane,clickthenameofanindividualvirtual machine. Thedetailspageforthatvirtualmachineappears.

VMware, Inc.

367

Administration Guide

ClicktheNetworktab.

3 4

ClickEdit. TheNetworkResourceSettingsdialogboxappears.

Enterthesettings,andclickOK. Forinformationonthesesettings,seeConfiguringaVirtualMachines NetworkingSettingsonpage 100.

Youmustloginasroottochangeresourcemanagementsettingsusingeitherthe managementinterfaceorprocfs.

Managing Network Bandwidth from the Service Console


Youmustloginasroottochangeresourcemanagementsettingsusingtheprocfs interfaceontheserviceconsole. /proc/vmware/filters/status

368

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Containsnetworkfilteringstatusinformation,includingalistofallavailablefilter classesand,foreachvirtualmachinewithattachedfilters,itslistofattachedfilter instances.Readthefilewithcattoseeaquickreportonnetworkfilteringstatus. /proc/vmware/filters/xmitpush Commandfileusedtoaddanewtransmitfilterinstancetoavirtualmachine.Writing <id> <class> [<args>]tothisfileattachesanewinstanceoffilter<class> instantiatedwith<args>tothevirtualmachineidentifiedby<id>. /proc/vmware/filters/xmitpop Commandfileusedtodetachatransmitfilterfromavirtualmachine.Writing<id>to thisfiledetachesthelastfilterattachedtothevirtualmachineidentifiedby<id>. /proc/vmware/filters/xmit Thisdirectorycontainsafileforeachactivefilterinstance.Eachfilenamed<class.n> correspondstothe<n>thinstanceoffilterclass<class>. Readingfromafilereportsstatusinformationforthefilterinstanceinaclassdefined format.Writingtoafileissuesacommandtothefilterinstanceusingaclassdefined syntax. NOTE Thecurrentreleaseallowsonlyasinglenetworkpacketfiltertobeattachedtoeach virtualmachine.Receivefiltersarenotimplementedinthisrelease.

Traffic Shaping with nfshaper


YoucanmanagenetworkbandwidthallocationonaserverfromtheVMware ManagementInterfaceorfromtheprocfsinterfaceontheserviceconsole. Theshaperimplementsatwobucketcompositetrafficshapingalgorithm.Afirsttoken bucketcontrolssustainedaveragebandwidthandburstness.Asecondtokenbucket controlspeakbandwidthduringbursts.Eachnfshaperinstancecanacceptparameters tocontrolaveragebps,peakbpsandburstsize. Theprocfsinterface,describedinUsingNetworkFiltersonpage 367,isusedto attachannfshaperinstancetoavirtualmachine,detachannfshaperinstancefroma virtualmachine,querythestatusofannfshaperinstanceorissueadynamiccommand toanactivenfshaperinstance.

Service Console Commands


config <bpsAverage> <bpsPeak> <burstSize> [<periodPeak>] Dynamicallyreconfiguretheshapertousethespecifiedparameters:average bandwidthof<bpsAverage>bitspersecond,peakbandwidthof<bpsPeak>bitsper
VMware, Inc. 369

Administration Guide

second,maximumburstsizeof<burstSize>bytes,andanoptionalpeakbandwidth enforcementperiod<periodPeak>inmilliseconds.Eachparametercanoptionallyuse thesuffixk(1k=1024)orm(1m=1024k). maxq <nPackets> Dynamicallysetthemaximumnumberofqueuedpacketsto<nPackets>. reset Dynamicallyresetshaperstatistics.

Examples
Supposeyouwanttoattachatrafficshapertolimitthetransmitbandwidthofthe virtualmachinewithID104.Tocreateandattachanewshaperinstance,issuean xmitpushcommandasdescribedinManagingNetworkBandwidthfromtheService Consoleonpage 368.Youneedrootprivilegesarerequiredtoattachafilter.
echo "104 nfshaper 1m 2m 160k" > /proc/vmware/filters/xmitpush

Thisattachesatrafficshaperwithaveragebandwidthof1Mbps,peakbandwidthof 2Mbpsandmaximumburstsizeof160Kb. Tofindthenumberoftheattachednfshaperinstance,querythenetworkfiltering status,whichcontainsalistofallfiltersattachedtovirtualmachines:


cat /proc/vmware/filters/status

Supposethereportedstatusinformationindicatesthatthefilterattachedtovirtual machine104isnfshaper.2.104.Usetheprocfsnodeforthisfiltertoobtainstatus information:


cat /proc/vmware/filters/xmit/nfshaper.2.104

Youcanusethesameprocfsnodetoissuecommandssupportedbythenfshaperclass. Forexample,youcandynamicallyadjustthebandwidthlimitsbyissuingaconfig command:


echo "config 128k 256k 20k" > /proc/vmware/filters/xmit/nfshaper.2.104

Whenavirtualmachineisterminated,allattachednetworkfiltersareremovedand destroyed.Tomanuallyremoveashaperinstance,issueanxmitpopcommandas describedinManagingNetworkBandwidthfromtheServiceConsoleonpage 368. Youneedrootprivilegestodetachafilter.


echo "104" > /proc/vmware/filters/xmitpop

370

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

Managing Disk Bandwidth


ESXServerprovidesdynamiccontrolovertherelativeamountofdiskbandwidth allocatedtoeachvirtualmachine.Youcancontroldiskbandwidthseparatelyforeach physicaldiskorlogicalvolume.Thesystemmanagestheallocationofdiskbandwidth tovirtualmachinesautomaticallybasedonallocationparametersandsystemload.This isdoneinawaythatmaintainsfairnessandtriestomaximizethroughput. Youcanspecifyinitialdiskbandwidthallocationvaluesforavirtualmachineinits configurationfile.Youcanalsomodifydiskbandwidthallocationparameters dynamicallyusingtheVMwareManagementInterface,theprocfsinterfaceonthe serviceconsole,ortheVMwareScriptingAPI. Reasonabledefaultsareusedwhenyoudonotspecifyparametersexplicitly.Toruna virtualmachinethatwillhavediskintensiveworkloads,suchasadatabase,orfile server,youmightwanttoincreaseitsdiskshares. Informationaboutcurrentdiskbandwidthallocationsandotherstatusisavailable throughthemanagementinterface,theprocfsinterfaceontheserviceconsole,andthe VMwareScriptingAPI.

Allocation Policy
ESXServerusesamodifiedproportionalshareallocationpolicyforcontrollingdisk bandwidthpervirtualmachine.Thispolicyattemptstocontrolthediskbandwidth usedbyavirtualmachinetoaccessadiskwhilealsotryingtomaximizethroughputto thedisk. Diskbandwidthsharesentitleavirtualmachinetoafractionofthebandwidthtoadisk orLUN.Forexample,avirtualmachinethathastwiceasmanysharesasanotherfora particulardiskisentitledtoconsumetwiceasmuchbandwidthtothedisk,provided thattheyarebothactivelyissuingcommandstothedisk. Bandwidthconsumedbyavirtualmachineisrepresentedinconsumptionunits.Every SCSIcommandissuedtothediskeffectivelyconsumesoneunitbydefaultand additionalunitsproportionaltothesizeofthedatatransferassociatedwiththe command. Throughputtothediskismaximizedthroughtheuseofaschedulingquantumfordisk requestsfromavirtualmachinetoadisk.Avirtualmachineisallowedtoissuea numberofrequeststoadisk(theschedulingquantum)withoutbeingpreemptedby anothervirtualmachine.Theissuingofamultiplerequestswithoutpreemptionis applicableonlyiftheserequestsaccesssequentialsectorsonthedisk.

VMware, Inc.

371

Administration Guide

Managing Disk Bandwidth from the Management Interface


Youcanviewandchangesettingsfromthevirtualmachinedetailspagesinthe VMwareManagementInterface.Tochangediskbandwidthsettings,youmustbe loggedinasrootandthevirtualmachinemustberunning. To change disk bandwidth settings 1 OntheserversStatusMonitorpage,clickthenameofanindividualvirtual machine. Thedetailspageforthatvirtualmachineappears. 2 ClicktheDisktab.

ClickEdit. TheDiskResourceSettingsdialogboxappears.

Specifythesharesvalue,andclickOK.

Configuration File Options


Youcanedittheconfigurationfileusingatexteditorontheserviceconsoleorthrough themanagementinterface.

372

VMware, Inc.

Chapter 12 VMware ESX Server Resource Management

To edit configurations parameters in the management interface 1 2 3 4 ClickthearrowtotherightoftheterminaliconandselectConfigureOptionsin theVirtualMachinemenu. IntheOptionspane,intheVerboseOptionssection,clickhere. ClickAddtoaddanewconfigurationparameterorclickinthetextfieldtoeditan existingparameter. ClickOK.

Ifyoueditavirtualmachinesconfigurationfilebyhand,usethefollowingformatsto controldiskbandwidthallocationforthevirtualmachine:
scsi0:1.name = <fsname>:<diskname>.vmdk

ThisisthestandardformatforspecifyingtheVMFSfileunderlyingavirtualdisk:
sched.scsi0:1.shares = n

Thisconfigurationoptionspecifiestheinitialdiskbandwidthshareallocationfora virtualmachineforthediskscsi0:1tobenshares.Thevalidrangeofnumerical valuesfornis1to100000.Youcanalsousethespecialvalueslow,normal,andhigh. Thesevaluesareconvertedintonumbers,throughtheconfigurationoptions DiskSharesLow,DiskSharesNormalandDiskSharesHigh,describedinthenext section.Ifthenumberofsharesforadiskisnotspecified,theassignedallocationis normal,withadefaultvalueof1000shares. NOTE Itispossibleforaconfigurationfiletohavemultiplelinesspecifyingthenumberof shares.Ifthishappens,thelastvaluespecifiedisused.

Configuration File Examples


scsi0.virtualdev = vmxbuslogic scsi0:1.present = TRUE scsi0:1.name = vmhba0:2:0:5:rh6.2.vmdk scsi0:1.mode = persistent sched.scsi0:1.shares = high scsi0:2.present = TRUE scsi0:2.name = scratchfs:scratch1.vmdk sched.scsi0:2.shares = 800

Intheexampleabove,thefirstfourlinesinthefirstgroupandthefirsttwolinesinthe secondgrouparepresentintheconfigurationfilebeforeyoumakeyourchanges.The finallineineachgroupistheaddedlinetospecifythediskbandwidthallocation.

VMware, Inc.

373

Administration Guide

Managing Disk Bandwidth from the Service Console


Usethefollowingguidelinesfortheserviceconsolecommandstomonitorandmanage allocationofdiskbandwidthonanESXServercomputer. /proc/vmware/vm/<id>/disk/vmhba<x:y:z> Readingfromthisfilereportsthenumberofdiskbandwidthsharesallocatedtothe virtualmachineidentifiedby<id>forthediskidentifiedbyvmhba<x:y:z>.Italso reportsdiskusagestatistics. Writinganumber<n>tothisfilechangesthenumberofdiskbandwidthshares allocatedtothevirtualmachineidentifiedby<id>to<n>.Thevalidrangeofvaluesfor <n>is0to100000.Youcanalsousethevalueslow,normal,andhigh.Thesevaluesare convertedintonumbers,throughtheconfigurationoptionsDiskSharesLow, DiskSharesNormal,andDiskSharesHigh,describedinthissection. /proc/vmware/config/Disk/SchedNumReqOutstanding Specifiesthenumberofoutstandingcommandsallowedtoadiskwhenthereare multiplevirtualmachinescompetingforbandwidth.Thedefaultvalueis16;thevalid rangeofnumericvaluesisfrom1to256.Selectinganumberlargerthan16mightaffect theabilityofESXServertoprovidefairallocationofdiskbandwidth. /proc/vmware/config/Disk/SchedQuantum Specifiesthenumberofsequentialrequeststhatavirtualmachinesmayissuetoadisk, withoutbeingpreemptedbyanothervirtualmachine.Thedefaultvalueis8;thevalid rangeofnumericvaluesisfrom1to64. /proc/vmware/config/Disk/SharesLow Thisoptionspecifiestheanumericalvalueforthelowsharesvalue.Bydefault,this numberis500. /proc/vmware/config/Disk/SharesNormal Specifiestheanumericalvalueforthenormalsharesvalue.Bydefault,thisnumberis 1000. /proc/vmware/config/Disk/SharesHigh Specifiestheanumericalvalueforthehighsharesvalue.Bydefault,thisnumberis 2000.

374

VMware, Inc.

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

Build number 164 bus sharing 265266

C
capacity swap file 203 CD-ROM attaching to image file 117 Clone virtual machine 287, 294, 304, 305, 306 Clustering and FAStT storage 309 and SCSI reservation 301 and shared disks 283 basic configuration types 281 configuration to use Microsoft Cluster Service 284, 292 consolidating to ESX Server machine 282 description 279 network adapters needed for 283 on a single ESX Server machine 281 on multiple ESX Server machines 281 sharing virtual disks 264 using an ESX Server machine as a standby host 282 Color depth 111 Command Linux 170177, 180
375

B
Backup 151 creating stable disk images for 153 Beacon monitoring 324 Bind Outbound Adapters list 189 binding adapters 320 Bootup, loading VMkernel device modules 243
VMware, Inc.

Administration Guide

passing from console operating system to guest 52 Commit 253 Communication from console operating system to guest 52 Configuration SNMP agent 230 virtual machine 40, 73, 140 Configuration options for SANs 267269 Configuring a Virtual Machines Startup and Shutdown Options 124 Console operating system 167 Copy in file manager 142 text 165 cp 246 CPU affinity set 333 maximum percentage 331 minimum percentage 331 monitoring with SNMP 224 scheduling virtual machine use of 331 shares 331 CPU resources 331 managing from the management interface 336 managing from the service console 337 CPU statistics 342345 Cut in file manager 142 text 165

notes on adding and removing adapters 185 DHCP 168 Directories managing remotely 141 Directory creating 144 Disk bandwidth managing from the management interface 372 managing from the service console 374 Disk bandwidth management 371 Disk mode 42, 110, 135 append 42, 110 nonpersistent 42, 110 persistent 42, 110 undoable 42, 110 Disks monitoring with SNMP 224 SCSI target IDs 263 shared in clustering configuration 283 using vmkfstools to manipulate files on 249 Display name for virtual machine 40

E
Edit configuration open from file manager 142 ESX Server, configuring 137 Export virtual machine 68, 163, 252

D
Debug monitor 123 Devices 184 devices
376

F
Failover 277 failover policies, configuring 202 Failover switches 323
VMware, Inc.

Index

FAStT storage configuring for failover in a cluster 309 File manager 141 cut, copy and paste 142 renaming files and folders 143 setting permissions 143 Files managing remotely 141 Filters network 367 findnic 169, 314 Floppy disk image file 118 Folder creating 144 For 201 FTP 246 TCP/IP port 183

TCP/IP port 183 HTTPS TCP/IP port 183 Hyper-Threading 97 enabling 335 htSharing option 336 Startup Profile 188 using 335 virtual machines 336

I
ID virtual machine 86 Import virtual machine 252 Installation of guest operating system 43 of Microsoft Cluster Service 290 of software in a virtual machine 164 of the SNMP agent 226229 Internet Explorer 6.0 and management interface 82, 156 Interrupt clustering and network performance 320 parameters 320 ISO disc image file 117

G
Gigabit Ethernet 108 Guest operating system and SNMP 231 installing 43 setting in configuration 40 Guest operating system service 49 Linux reboot commands 51 shutting down and restarting a virtual machine 50

K
Knowledge base 21

H
Heartbeat 281 monitoring with SNMP 225 host bus adapters running vmkpcidivy after changing 185 htSharing option 336 HTTP

L
Legacy mode virtual machines 63 Linux installing VMware Tools in 47 Load balancing 322 logs 209 availability report 213
377

VMware, Inc.

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

managing from the service console 352 Memory statistics 356358 Message passing from console operating system to guest 52 Microsoft Cluster Service 279 configuring cluster to use 284, 292 installing 290 Migration older ESX Server virtual machines 62 MIME type, setting 139 Multipathing 272277 Multiprocessor virtual machines 60, 61

M
MAC address setting manually 311 machine.id 52 Management CPU resources 331 disk bandwidth 371 memory resources 345 network bandwidth 367 registering virtual machines 69 remote management software 69 setting MIME type in browser 139 TCP/IP ports used 182 VMware Management Interface 80 Management Interface Startup Profile 335 Media changer SCSI ID 184 Memory 363 maximum size 346 minimum size 346 monitoring with SNMP 224 reclaiming unused 349 resource management 345 shares 346 Memory resources 345 managing from the management interface 351

N
NDIS.SYS 47 Network adapters for clustering configuration 283 bandwidth management 367 bandwidth, managing from management interface 367 bandwidth, managing from service console 368 driver in virtual machine 65 installing driver in virtual machine 44 locating adapter in use 314 MAC address 311 monitoring with SNMP 224 performance tuning 320 setting virtual adapter to promiscuous mode 315 shaping traffic 369 sharing adapters 316 using Gigabit Ethernet 108 virtual 316
VMware, Inc.

378

Index

vmnet adapter 108 vmnic adapter 107 Network driver manual speed settings 315 vlance 108 vmxnet 108 Network label 320 NFS 246 nfshaper 243 NIC teaming ??326 Node in clustering configuration 279 Nonpersistent disk mode 110 NUMA node 358363 automatic optimization 360 manual optimization 361363

Primary adapter 323 proc interface 178179 Processor affinity set 333 scheduling virtual machine use of 331 SMP virtual machines 61 virtual 61 Promiscuous mode 315 PXE boot 53

R
RAID file system management 245 Raw disks 261263 raw disks 204 Register virtual machines 69 Remote console 87 color depth setting 111 enabling users to view virtual machines 185 installing 70 using 155 Remote management 69 Rename using the file manager 143 Repeatable resume 126 Reservation SCSI, in clustering configuration 301 Restart using guest operating system service 50 Resume 89, 165 repeatable 90

O
Other Outbound Adapters list 189

P
PAM configuration location 181 Paste in file manager 142 text 165 pbind.pl script 272 Performance network 320 Permissions 182 changing in file manager 143 VMware Management Interface 80 Persistent disk mode 110 Persistent bindings 270 portmap TCP/IP port 183
VMware, Inc.

379

Administration Guide

S
SANs 266270 configuration options 267269 persistent bindings 270 troubleshooting 269270 scp 246 Scripts running during power state changes 71 VMware Tools and 162 SCSI 264 bus sharing 265266 file system management 245 reservation in clustering configuration 301 target IDs 263 SCSI disk reservation 301 Security 180 SNMP 231 Server shutting down 221 service console 246 DHCP 168 managing CPU resources 337 managing disk bandwidth 374 managing memory resources 352 managing network bandwidth 368 memory 364 service console messages 212 session lengths VMware Management Interface 81 Set up Microsoft Cluster Service 290 Setting Startup and Shutdown Options for a Virtual Machine 123 Shaping network traffic 369 Shares

CPU 331 memory 346 of CPU time 333 Sharing disks in clustering configuration 283 virtual disks 264 sharing the SCSI bus 264 Shut down server 221 using guest operating system service 50 virtual machine 166 Sizing memory 363 sizing for the server 363 SleepWhenIdle 74 SMBIOS modifying the UUID 75 SMP virtual machines 60 Snapshots of virtual disks for backup 153 SNMP 223 access controls 230 and guest operating systems 231 and VMware Tools 225 configuring management software 230 configuring the agent 230 installing the agent 226229 location of the VMware sub-tree 224 security 231 traps 225 variables 231238 SNMP agent, starting 229 snmpd daemon 226 Software installing in a virtual machine 164

380

VMware, Inc.

Index

Speed setting for network driver 315 SSH 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 volume 203 Switches virtual 320 system logs 209

U
Undoable disk mode 110 User groups 21 UUID modifying 75

V
Variables SNMP 231238 Verbose Options Hyper-Threading 336 Veritas Cluster Service 279 Virtual disk 41 exporting 68, 163 sharing 264 Virtual Machine multiprocessor 60 Virtual machine backing up 151 cloning 287, 294, 304, 305, 306 configuring 73 creating 39 deleting from VMware Management Interface 136137 display name 40 exporting 252 Hyper-Threading 97 ID number 86 importing 252 legacy mode 63 monitoring with SNMP 224 registering 69 shutting down 166 SMP 60 suspending and resuming 89 viewing through remote
381

T
Tape drive 184 adding to virtual machine 121 assigning to virtual machines or service console 152 SCSI ID 184 TCP/IP ports used for management access 182 Telnet TCP/IP port 183 Time synchronizing between guest and console operating systems 50 Troubleshooting virtual switches 326 troubleshooting SANs 269270

VMware, Inc.

Administration Guide

console 185 Virtual Machine Wizard 40 Virtual machines special power options 157 Virtual network 316 Virtual switches 320 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 maximum number of files 251 maximum number per LUN 251 migrating from VMFS-1 to VMFS2 258 mounting 246 naming 247, 253 VMFS-2 converting to 199, 201 VMkernel device modules 239 loading during bootup 243 VMkernel messages 211 VMkernel warnings 210 vmkfstools 249 activating a swap file 258 attributes of a VMFS volume or raw device mapping 251 commit a redo log 253 creating a file on a SCSI device 252 creating a VMFS volume 251 creating and resizing swap files 257 deactivating a swap file 258 display disk geometry for Workstation or GSX Server virtual disk 255
382

example commands 259 export contents of file to a virtual disk 252 extend a VMFS volume 256 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 250 mapping a raw device or partition to a file 255 migrating from VMFS-1 to VMFS2 258 recovering a locked VMFS volume 256 scan a specified vmhba adapter 257 SCSI reservations of physical targets or LUNs 256 set the VMFS volume to a specified mode 254 syntax 249 vmkload_mod 170, 240 vmkpcidivy running after changing adapters 185 vm-list 69, 181 vmnet network adapter 108 vmnic network adapter 107 VMware community forums 21 VMware GSX Server migrating virtual machines 63 VMware guest operating system service VMware Tools 49 VMware Management Interface 80140 and Apache server 138 ASCII characters 39, 81 attaching VMware Remote Console 86
VMware, Inc.

Index

browsers required 84 changing virtual machine power state 88 configuration options 122 configuring for Windows systems 82 connected users 129 controls 8694 creating a new virtual machine 39 42 deleting a virtual machine 136137 editing a configuration 95 event log 130 host status monitor 84 launching remote console 82, 156 logging in 84 logging out 138 permissions 80 proxy servers 83 refresh rate 81 session lengths 81 setting remote console MIME type 139 timeout 138 virtual machine CPU 96 virtual machine details 94 virtual machine hardware 97, 99, 100, 102 virtual machine menu 86 VMware Remote Console attaching from VMware Management Interface 86 enabling users to view virtual machines 185 launching from management interface 82, 156 setting a MIME type 139 special power options 157 VMware Scripting API 52, 153
VMware, Inc.

VMware Tools and SNMP 225 build number 164 choosing scripts 162 installing 43, 44 running scripts during power state changes 71 settings 159 starting automatically in Linux guest 48 VMware guest operating system service 49 VMware Virtual SMP 41, 106 VMware Workstation migrating virtual machines 63 vmware-authd TCP/IP port 183 vmware-authd daemon 181 vmware-device.map.local file 184 vmxnet network driver 108 vmxnet.sys 47 volume swap file 203

W
Web browser and the VMware Management Interface 84 Windows 2000 installing VMware Tools in 46 Windows NT installing VMware Tools in 46

383

Administration Guide

384

VMware, Inc.

Using the VMware Remote Console

TheVMwareRemoteConsolegivesyouadirectwindowfromamanagement workstationintoanindividualvirtualmachinerunningunderVMwareESXServer.In thischapter,thefollowingsectionsdescribeaspectsofusingtheVMwareRemote Console:


! ! ! ! ! ! ! !

StartingtheRemoteConsoleonpage 156 RunningaVirtualMachineUsingtheRemoteConsoleonpage 157 SpecialPowerOptionsforVirtualMachinesonpage 157 VMwareToolsSettingsonpage 159 InstallingNewSoftwareInsidetheVirtualMachineonpage 164 Cutting,Copying,andPastingonpage 165 SuspendingandResumingVirtualMachinesonpage 165 ShuttingDownaVirtualMachineonpage 166

Using the Remote Console


VMwareRemoteConsolesoftwareisavailableforWindowsXP,Windows2000, WindowsNT,andLinuxmanagementworkstations.Forinstructionsoninstallingthe software,seeInstallingtheRemoteConsoleSoftwareonpage 70. Youcanconnectuptothreeremoteconsolestoavirtualmachineatatimeandconnect upto80remoteconsolestotheserveratatime.

VMware, Inc.

155

Administration Guide

Starting the Remote Console


Selecttheappropriateprocedureforyourremoteworkstationoperatingsystem. To start the Remote Console on Windows 1 Starttheremoteconsoleprogram. Select:Start>Programs>VMware>VMwareRemoteConsole 2 Fillinthedialogboxfieldswithinformationtoconnecttothevirtualmachine:
! ! !

Hostname(orIPaddress) Yourusername Yourpassword

ClickConnect. Whentheconnectionismade,adialogboxdisplaysthepathstotheconfiguration filesofvirtualmachinesregisteredontheserver.

SelectthevirtualmachineyouwanttoconnecttoandclickOK.

NOTE Ifyoulaunchtheremoteconsolefromthemanagementinterfacefrom InternetExplorer6.0onasystemwhereSSLisencryptingyourESXServer remoteconnections,configureInternetExplorer.SeeLaunchingtheRemote ConsolefromtheManagementInterfaceonanEncryptedServeronpage 82. To start the Remote Console on Linux 1 Starttheremoteconsoleprogrambytyping: vmware-console 2 Fillinthedialogboxfieldswithinformationtoconnecttothevirtualmachine:
! ! !

Thehostname(orIPaddress) Yourusername Yourpassword

ClickConnect. Whentheconnectionismade,adialogboxdisplaysthepathstotheconfiguration filesofvirtualmachinesregisteredontheserver.

SelectthevirtualmachineyouwanttoconnecttoandclickOK.

156

VMware, Inc.

Chapter 4 Using the VMware Remote Console

Running a Virtual Machine Using the Remote Console


Whenyouviewyourvirtualmachinethrougharemoteconsole,itbehavesmuchlikea separatecomputerthatrunsinawindowonyourcomputersdesktop. Insteadofusingphysicalbuttonstoturnthiscomputeronandoff,usebuttonslocated atthetopoftheVMwareconsolewindow.Youcanalsoresetthevirtualmachine, suspendavirtualmachine,andresumeasuspendedvirtualmachine.

Figure 4-1. Virtual machine is powered off

Figure 4-2. Virtual machine is powered on

Figure 4-3. Virtual machine is suspended


a

NOTE

Figure 41Figure 43showthetoolbarfromaremoteconsolerunningonaWindows managementworkstation.IfyouarerunningtheremoteconsoleonaLinux managementworkstation,theappearanceofthetoolbarisdifferent,butthesame functionsareavailable.

Special Power Options for Virtual Machines


WhenVMwareToolsisrunning,youcanconfigurescriptstorunwheneverthepower stateofavirtualmachineischanged.Thatis,whenyoupoweron,poweroff,suspend, orresumethevirtualmachine.SeeExecutingScriptsWhentheVirtualMachines PowerStateChangesonpage 71. Whenyouresetavirtualmachine,youcanrestarttheguestoperatingsystem,which gracefullyclosesapplicationsandrestartstheguestoperatingsystem,orresetthe virtualmachine,whichisthesameaspressingtheresetbuttononaphysicalcomputer.

VMware, Inc.

157

Administration Guide

Similarly,whenyoupoweroffthevirtualmachine,youcanshutdowntheguest operatingsystem,whichgracefullyclosesapplicationsandshutstheguestoperating systemdown,orturnoffthevirtualmachine,whichisthesameaspressingthepower buttononaphysicalcomputer. AllthepoweroptionsareavailableonthePowermenu.Eachmenuitemcorresponds toabuttononthetoolbarandopensasubmenucontainingtheassociatedoptions.The menuitemsmaynotbeavailable,dependinguponthecurrentpowerstateofthe virtualmachine.Forexample,ifthevirtualmachineispoweredoff,youcannotselect anypoweroff,suspend,resume,orresetoptions. Fromaremoteconsole,choosefromthefollowingoptionswhenpoweringonavirtual machine:
!

PowerOnVirtualMachinePowersonthevirtualmachineintheremoteconsole. ThisisthesameasclickingthePowerOnbuttononthetoolbar. PowerOnThenRunScriptPowersonthevirtualmachineinaremoteconsole, andexecutestheassociatedscript.

Options for Powering Off a Virtual Machine


Choosefromthefollowingoptionswhenpoweringoffavirtualmachine:
!

PowerOffVirtualMachinePowersoffthevirtualmachine.Thisissimilarto turningoffaphysicalcomputerbypressingitspowerbutton,soanyprograms runninginthevirtualmachinecanbeadverselyaffected.ClickthePowerOff buttononthetoolbartopoweroffthevirtualmachine. ShutDownGuestOperatingSystemGracefullyshutsdowntheguestoperating systemand,iftheguestoperatingsystemsupportsAdvancedPowerManagement, powersoffthevirtualmachine.Ifascriptisassociatedwiththispoweroperation, itexecutesaftertheshutdownbegins.ThisisthesameaschoosingStart>Shut Down>ShutDowninaWindowsoperatingsystemorissuingashutdown commandinaLinuxoperatingsystem.

Options for Suspending a Virtual Machine


Choosefromthefollowingoptionswhensuspendingavirtualmachine:
!

RunScriptThenSuspendExecutestheassociatedscript,andsuspendsthe virtualmachine.ThisisthesameasclickingSuspendonthetoolbar,unlessascript isnotassociatedwithsuspendingavirtualmachine. SuspendVirtualMachineSuspendsthevirtualmachine.

158

VMware, Inc.

Chapter 4 Using the VMware Remote Console

Option for Resuming a Virtual Machine


Choosefromthefollowingoptionswhenresumingavirtualmachine:
!

ResumeThenRunScriptResumesthesuspendedvirtualmachine,andexecutes theassociatedscript.ThisisthesameasclickingResumeonthetoolbar,unlessa scriptisnotassociatedwithresumingavirtualmachine. ResumeVirtualMachineResumesthesuspendedvirtualmachine.

Options for Resetting a Virtual Machine


Choosefromthefollowingoptionswhenresettingavirtualmachine:
!

ResetVirtualMachineResetsthevirtualmachine.Thisissimilartoresettinga physicalcomputerbypressingitsresetbutton,soanyprogramrunninginthe virtualmachinemaybeadverselyaffected.ClickingtheResetbuttononthe toolbarresetsthevirtualmachine. RestartGuestOperatingSystemGracefullyrestartsthevirtualmachine.Ifa scriptisassociatedwithshuttingdown,itexecutesaftertheguestoperating systemrestarts.ThisisthesameaschoosingStart>ShutDown>Restartina WindowsoperatingsystemorissuingarebootcommandinaLinuxoperating system.

VMware Tools Settings


ThefollowingdescriptionofthesettingsforVMwareToolsisbasedonaWindows2000 guestoperatingsystem.SimilarconfigurationoptionsareavailableinVMwareTools forotherguestoperatingsystems. ToopentheVMwareToolscontrolpanel,doubleclicktheVMwareToolsiconinthe virtualmachinessystemtray.TheVMwareToolsPropertiesdialogboxappears.

Setting Options with VMware Tools


SpecifytimesynchronizationandtheVMwareToolsicondisplayintheOptionstab.

VMware, Inc.

159

Administration Guide

Figure 4-4. VMware Tools Properties: Options tab


!

TimesynchronizationSpecifywhethertosynchronizethetimeintheguest operatingsystemwiththetimeintheserviceconsole.

NOTE Synchronizethetimeintheguestoperatingsystemwiththetimeintheservice consoleonlywhenthetimeintheguestisearlierthanthetimeintheservice console.


!

ShowVMwareToolsinthetaskbarIfyoudonotdisplaytheVMwareToolsicon inthesystemtray,launchthecontrolpanelfromtheStartmenu(Start>Settings >ControlPanel>VMwareTools).

160

VMware, Inc.

Chapter 4 Using the VMware Remote Console

Connecting Devices with VMware Tools


YoucanenableordisableremovabledevicesintheDevicestab.

Figure 4-5. VMware Tools Properties: Devices tab Thedevicesyoucanenableordisableincludetheservermachinesfloppydiskdrive, theCDROMdrive,andthevirtualnetworkinterfacecard.Youcanalsosetthese optionsfromtheDevicesmenuoftheESXServerremoteconsolewindow.

VMware, Inc.

161

Administration Guide

Choosing Scripts for VMware Tools to Run During Power State Changes
ThroughVMwareTools,youcanrunscriptsthatexecutewhenyoupoweron,power off,suspend,orresumethevirtualmachine.

Figure 4-6. VMware Tools Properties: Scripts tab AdefaultscriptforeachpowerstateisincludedinVMwareTools.Thesescriptsare locatedintheguestoperatingsysteminC:\Program Files\VMware. Table 4-1. Power state default scripts
When You Suspendtheguestoperatingsystem Resumetheguestoperatingsystem Shutdowntheguestoperatingsystem Powerontheguestoperatingsystem This Default Script Runs suspendvmdefault.bat resumevmdefault.bat poweroffvmdefault.bat poweronvmdefault.bat

Foreachpowerstate,youcanusethedefaultscriptoryoucansubstituteascriptyou created.Inaddition,youcantestascriptordisabletherunningofascript. To configure which scripts run 1 2 IntheScriptEventlist,selectthepoweroperationwithwhichtoassociatethe script. Dooneofthefollowing:


!

Toselectadifferentscript,clickCustomScriptandclickBrowsetoselectthe newscript.

162

VMware, Inc.

Chapter 4 Using the VMware Remote Console

Toeditascript,clickEdit.Thescriptopensinyourdefaulteditortomakeyour changes. Totestthescript,clickRunNow. Todisabletherunningofascript,deselecttheUseScriptcheckbox.

! !

ClickApplytosaveyoursettings.

Shrinking Virtual Disks with VMware Tools


TheShrinktabletsyoupreparetoexportavirtualdisktoVMwareGSXServerusing thesmallestpossiblediskfiles.Thisstepisoptional. VirtualdisksonESXServertakeupthefullamountofdiskspaceindicatedbythe virtualdiskssize.Forexample,the.vmdkfilefora4GBvirtualdiskoccupies4GBof diskspace. GSXServerworksdifferently.UnderGSXServer,virtualdiskfilesstartsmallonlyas bigasneededtoholdthedatastoredonthevirtualdiskandgrowasneededuptothe designatedmaximumsize.

Figure 4-7. VMware Tools Properties: Shrink tab ToexportavirtualdisktouseunderGSXServer,clicktheShrinktab.Makesurethere isachecknexttothenameofthedisktoexport,andclickPreparetoshrink. NOTE Whenyouexportthevirtualdisk(usingthefilebrowserinthemanagementinterface orthevmkfstoolscommand),asinglevirtualdiskmaybeexportedtomultiple.dsk (.vmdk)files.

VMware, Inc.

163

Administration Guide

Viewing Information About VMware Tools


OntheAbouttab,youseegeneralinformationaboutVMwareToolsinstalledinthe virtualmachine. Thistabcontainsthefollowinginformation:
!

VMwareToolsbuildnumber,whichletsyouverifythatyourVMwareTools versionmatchestheVMwareESXServerversionyouarerunning.Itisusefulwhen yourequestsupport. AnindicationastowhethertheVMwareguestoperatingsystemserviceis running. AbuttonyouclicktovisittheVMwareWebsite.

Installing New Software Inside the Virtual Machine


InstallingnewsoftwareinanESXServervirtualmachineislikeinstallingitonaregular computer. Ifyouareusingphysicalmedia,youmusthaveaccesstotheESXServercomputerto insertinstallationCDROMdiscsorfloppydisksintotheserversdrives. YoumayuseimagefilesinplaceofphysicalfloppydisksandCDROMdiscs.To connectthevirtualdrivetoafloppyorISOimage,usetheDevicesmenuandeditthe settingsforthedriveyouwanttochange. ThefollowingstepsarebasedonusingaWindowsguestoperatingsystemand physicalmedia.IfyouareusingaLinuxguestoperatingsystemorifyouareusingISO orfloppyimagefiles,somedetailsaredifferent. To install software in a Windows guest operating system 1 2 3 Makesureyoustartedthevirtualmachineand,ifnecessary,loggedon. ChecktheDevicesmenutomakesurethevirtualmachinehasaccesstothe CDROMandfloppydrives. InserttheinstallationCDROMorfloppydiskintotheproperdrive. IfyouareinstallingfromaCDROM,theinstallationprogrammightstart automatically. 4 5 Iftheinstallationprogramdoesnotstart,clicktheWindowsStartbutton,goto Settings>ControlPanel,anddoubleclickAdd/RemovePrograms. ClickAddNewPrograms. Followtheinstructionsonscreenandintheusermanualforyournewsoftware.

164

VMware, Inc.

Chapter 4 Using the VMware Remote Console

Cutting, Copying, and Pasting


MakesureyouinstalledandstartedVMwareToolsinyourvirtualmachine.Ina Windowsguestoperatingsystem,aVMwareToolsiconappearsinthesystemtray whenVMwareToolsisrunning. WhenVMwareToolsisrunning,youcancopyandpastetextbetweenapplicationsin thevirtualmachineandonyourmanagementworkstationorbetweentwovirtual machines.Usethenormalhotkeysormenuchoicestocut,copy,andpaste.

Suspending and Resuming Virtual Machines


Youcansavethecurrentstateofyourvirtualmachine.Theresumefeatureletsyou quicklypickupworkwhereyoustoppedwithallrunningapplicationsinthesame statetheywereatthetimeyoususpendedthevirtualmachine. Youcansuspendavirtualmachinetwoways:
!

Witharemoteconsoleconnectedtothatvirtualmachine,clickSuspendonthe toolbar. WiththeVMwareManagementInterfaceconnectedtothevirtualmachinesserver, clickthepausebutton( )ontherowforthatvirtualmachine.SeeFigure 48.

VMware, Inc.

165

Administration Guide

Figure 4-8. Virtual machine suspended Youcanrestoreasuspendedvirtualmachineintwoways:


!

Witharemoteconsoleconnectedtothatvirtualmachine,clickResumeonthe toolbar. WiththeVMwareManagementInterfaceconnectedtothevirtualmachinesserver, clickthepausebutton( )forthatvirtualmachine. Youcanalsosetyourvirtualmachinesoitalwaysresumesinthesamestate.See EnablingRepeatableResumeonpage 90.

Shutting Down a Virtual Machine


Toshutdownanyvirtualmachine,shutdowntheguestoperatingsystemasyouwould usuallyshutdowntheoperatingsystem.Thevirtualmachinewillpowerdownwhen theoperatingsystemcloses.

166

VMware, Inc.

You might also like