Professional Documents
Culture Documents
Esx25 Admin
Esx25 Admin
Administration Guide
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.
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
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
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
VMware, Inc.
19
Administration Guide
Intended Audience
TheinformationpresentedinthismanualiswrittenforexperiencedWindowsorLinux systemadministratorswhoarefamiliarwithvirtualmachinetechnologyand datacenteroperations.
Document Feedback
Ifyouhavecommentsaboutthisdocumentation,submityourfeedbackto: docfeedback@vmware.com
Monospace
Monospace bold Bold
20
VMware, Inc.
Preface
Self-Service Support
UsetheVMwareTechnologyNetworkforselfhelptoolsandtechnicalinformation:
! ! ! ! ! !
FormoreinformationabouttheVMwareTechnologyNetwork,goto http://www.vmtn.net.
VMware, Inc.
21
Administration Guide
Support Offerings
FindouthowVMwaressupportofferingscanhelpyoumeetyourbusinessneeds.Go tohttp://www.vmware.com/support/services.
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.
!
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.
VMwareESXServerSystemArchitecture,next UsingVMwareESXServeronpage 31
VMware, Inc.
25
Administration Guide
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.
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
vmnet_0
vmnet_1
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.
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
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.
snmpd
mks KVM
Serverdaemon(vmserverd)Performsactionsintheserviceconsoleonbehalfof theVMwareRemoteConsoleandtheWebbasedVMwareManagementInterface.
30
VMware, Inc.
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.
VMware, Inc.
31
Administration Guide
32
VMware, Inc.
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
ConfigureyourSNMP agent.
34
VMware, Inc.
VMware, Inc.
35
Administration Guide
36
VMware, Inc.
SeeChapter 7,UsingSNMPwithESXServer.
VMware, Inc.
37
Administration Guide
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.
38
VMware, Inc.
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
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>
ClickAddVirtualMachine. TheAddVirtualMachinewizardstarts.
40
VMware, Inc.
NOTE
5 6
NOTE
NOTE
Youmightneedtochangeittomeetthedemandsofapplicationsyouplantorun inthevirtualmachine.Youcanchangethissettinglateronthevirtualmachines Memorytabinthemanagementinterface.SeeManagingMemoryResources fromtheManagementInterfaceonpage 351. 7 IntheWorkloadslist,selectCitrixTerminalServicestorunCitrixMetaFrameon thevirtualmachine. DonotselectthisoptionifyoudonotplantorunCitrixMetaFrameonthe virtualmachine.Virtualmachineswiththissettingusemorevirtualization overheadandESXServerwillbeabletorunfewervirtualmachines simultaneously.
NOTE
8 9
ClickNext. Choosethetypeofvirtualdiskyouwanttoaddtothevirtualmachine.
!
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
42
VMware, Inc.
Inmostcases,configureyourvirtualmachinewithablank(unformatted)SCSIvirtual disk.Youcaninstallanoperatingsystemonthisvirtualdiskjustasyouwouldonanew physicalmachine,usingastandardinstallationCDROMandformattingthevirtual diskattheappropriateplaceintheinstallationprocess. YoucanalsoinstallfromimagefilesISOimagefilesofinstallationCDROMsand floppyimagefilesofanyfloppydisksneededfortheinstallation.UsetheVMware ManagementInterfacetoconnectthevirtualmachinesdrivestotheappropriateimage filesbeforeyoubegintheinstallation. AnotherapproachistostartwithavirtualdiskcreatedwithVMwareWorkstation3.2 orhigherorwithVMwareGSXServer2.5orhigher,andconfiguretheguestoperating systemtoworkwithVMwareESXServer. Afteryourguestoperatingsystemisinstalled,followthedirectionsbelowforinstalling VMwareToolsandthenetworkdriver.
Administration Guide
NOTE
Inthecommandabove,deviceisthedevicenameofthephysicaldisk.
SelecttheappropriateprocedurebelowforinstallingVMwareToolsinyourguest operatingsystem.
44
VMware, Inc.
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:
!
4 5
ClickCloseintheAdaptersdialogboxtocompletetheinstallation. WindowsletsyouconfiguretheInternetaddressforthecard.
46
VMware, Inc.
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
VMware, Inc.
47
Administration Guide
NOTE
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
48
VMware, Inc.
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.
Synchronizethetimeoftheguestoperatingsystemwiththetimeonthephysical computer.SeeSynchronizingtheTimeBetweentheGuestandServiceConsoles onpage 50 Gracefullypoweroffandresetavirtualmachine.SeeShuttingDownand RestartingaVirtualMachineonpage 50. Executecommandsinthevirtualmachinewhenitisrequestedtohaltorrebootthe guestoperatingsystem.SeeExecutingCommandstoHaltorRebootaVirtual Machineonpage 51. Passastringfromtheserviceconsoletotheguestoperatingsystem.SeePassing aStringfromtheServiceConsoletotheGuestOperatingSystemonpage 52. SendaheartbeattoVMwareESXServersothatitknowstheguestoperating systemisrunning.
InaWindowsguest,theguestserviceprogramfileiscalledVMwareService.exe.To displayhelp,rightclicktheVMwareToolsiconinthesystemtrayandchooseHelp.
VMware, Inc.
49
Administration Guide
50
VMware, Inc.
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.
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.
<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.
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"
InaWindowsguest,thecommandtoretrievethestringis:
VMwareService --cmd machine.id.get
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.
NOTE
ESXServerdoesnotsupportinstallationofaWindowsXPguestoperatingsystem usingPXE.
VMware, Inc.
55
Administration Guide
To add the LSI Logic SCSI Adapter to the configuration file 1 2 Connecttotheserviceconsoleand,usingatexteditor,openthevirtualmachines configurationfile(.vmx). Dooneofthefollowing:
!
to
scsi<n>.virtualDev = vmxlsilogic !
ToaddtheLSILogicadapter,typethefollowinglinesaftertheBusLogicdevice information:
scsi1.present = TRUE scsi1.virtualDev = vmxlsilogic
Saveyourchanges,andclosetheconfigurationfile.
56
VMware, Inc.
FornewWindowsvirtualmachines,completethestepsinConfiguringtheLSI LogicSCSIAdapterinaWindowsGuestOperatingSystem,next.
Configuring the LSI Logic SCSI Adapter in a Windows Guest Operating System
BeforeyoubeginconfiguringyourWindowsguest,downloadtheLSILogicdriver fromtheLSILogicWebsite,asdiscussedabove.
!
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
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
NOTE
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.
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
VMware, Inc.
59
Administration Guide
NOTE
! !
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.
VMware, Inc.
61
Administration Guide
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.
3 4
ClicktheOptionstaband,underVerboseOptions,clickthelink. ChangethevalueoftheguestOSconfigurationparametertooneofthefollowing:
! ! !
ClickOKtosaveyourchanges.
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
64
VMware, Inc.
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
NOTE
Ifyouimporttheplainfile:
$ vmkfstools -i Win2KSv1.pln vmhba0:0:2:Win2KSv1.vmdk
thecommandlocatesWin2KSv1.datinthesamedirectoryandimportsitintothe specifiedESXServervirtualdiskfile.
66
VMware, Inc.
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.
VMware, Inc.
67
Administration Guide
NOTE
Ifyoudonotseethemessageabouttransferringdisks,aproblemexistswith theimport.Makesureyouarepastingtothecorrectvmfsfolder.
7 8 9 10
11
12
13
68
VMware, Inc.
Workstation4doesnotsupporttheLSILogicSCSIadapter.TousetheSCSIadapterin thevirtualmachine,switchtotheBusLogicadapter. ESXServer2.5doesnotsupportexportingvirtualmachinestoESXServer1.5orearlier, VMwareWorkstation3.2orearlier,orVMwareGSXServer2.5orearlier. UninstallVMwareToolsfromavirtualmachinebeforeexportingitforusein WorkstationorGSXServer. UsethevmktoolscommandintheServiceConsoletoexportvirtualdisksassociated withavirtualmachine.Seethesectiononusingthe-exportfileoptionof vmkfstoolsinBasicvmkfstoolsOptionsonpage 250.Youcanfindanexampleof howtousethe-exportfileoptioninExamplesUsingvmkfstoolsonpage 259.
VMware, Inc.
69
Administration Guide
Toregisterthevirtualmachinesfromtheserviceconsole,usethiscommand:
vmware-cmd -s register /<configpath>/<configfile>.vmx
Toremoveavirtualmachinefromthelist,usethiscommand:
vmware-cmd -s unregister /<configpath>/<configfile>.vmx
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.
Changetothedirectorywherethearchivewasunpacked.
cd vmware-console-distrib
Runtheinstaller.
./vmware-install.pl
Foradditionalinformationonperformancetuning,seearticle869intheVMware KnowledgeBase.
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:
!
Issues to Consider
WhenyoureinstallVMwareToolsafteryouupgradetheVMwareESXServersoftware, anychangesyoumadetothedefaultscriptsareoverwritten.Anyscriptsyoucreated onyourownremainuntouched,butdonotbenefitfromanyunderlyingchangesthat enhancethedefaultscripts.
72
VMware, Inc.
Tomodifythesesettingsintheconfiguration,manuallyedittheconfigurationfileby doingoneofthefollowing:
!
VMware, Inc.
73
Administration Guide
SleepWhenIdle
Theconfigurationfileoptionmonitor.SleepWhenIdledetermineswhetherthe VMkerneldeschedulesanidlevirtualmachine.Bydefault,thisoptionisenabled,a settingthatensuresmuchbetterperformancewhenrunningmultiplevirtualmachines. Whenyouarerunningonlyasinglevirtualmachine(suchasforbenchmarking VMwareESXServer),addthemonitor.SleepWhenIdleoptiontothevirtual machinesconfigurationfileifyouwanttoachievethebestpossibleperformanceinthe virtualmachine(attheexpenseofresponsivenessintheserviceconsole). Createanoptioncalledmonitor.SleepWhenIdleandsetthevalueofthisoptionto0, asdescribedinSettingStartupandShutdownOptionsbyModifyingthe ConfigurationFileDirectly(AdvancedUsersOnly)onpage 126.
targeteddiskisbusy,ratherthanunavailable,maycausemirroringprogramstorepeat theconnectionattemptinsteadofselectingaduplicatedisk. ESXServerdoesnotincludeanexplicitreturnBusyOnNoConnectStatusoption definitionforeachSCSIdiskinavirtualmachineautomatically.Iftheoptionisnot definedforadiskinthevirtualmachineconfigurationfile,ESXServerdefaultstoTRUE. YouneedtobothcreateanoptiondefinitionforeachdiskandsetittoFALSEtooverride thedefaultvalueofTRUE.SeeSettingStartupandShutdownOptionsbyModifying theConfigurationFileDirectly(AdvancedUsersOnly)onpage 126. NOTE UsingreturnBusyOnNoConnectStatusissupportedonlyinvirtualmachinesusinga Windowsguestoperatingsystem.
VMware, Inc.
75
Administration Guide
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.
76
VMware, Inc.
Setting the UUID for a Virtual Machine That Is Not Being Moved
ToassignaspecificUUIDtoavirtualmachinethatisnotbeingmoved,addonelineto theconfigurationfile.UsetheconfigurationfileeditorintheVMwareManagement Interfacebycompletingoneofthefollowing:
!
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.
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.
78
VMware, Inc.
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
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.
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
VMware, Inc.
81
Administration Guide
Tosettheperiodto1minute,addthisline:
PerlSetEnv vmware_STATS_PERIOD 1
Tosettheperiodto15minutes,addthisline:
PerlSetEnv vmware_STATS_PERIOD 15
4 5
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.
To disable the option to launch the remote console automatically 1 2 3 4 IntheInternetExplorer6.0window,chooseTools>InternetOptionstoopenthe InternetOptionscontrolpanel ClicktheAdvancedtab. ScrolldowntotheSecuritysectionanduncheckDonotsaveencryptedpagesto disk. ClickOK.
5 6
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.
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.
84
VMware, Inc.
NOTE
VMware, Inc.
85
Administration Guide
NOTE
86
VMware, Inc.
Dependingonyourpermissionsandthestateofthevirtualmachine,someoptionsmay notbeavailable.
!
NOTE
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.
88
VMware, Inc.
NOTE
VMware, Inc.
89
Administration Guide
ClickOKtosaveyourchanges.
90
VMware, Inc.
4 5 6
7 8 9 10 11 12
VMware, Inc.
91
Administration Guide
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.
92
VMware, Inc.
VMware, Inc.
93
Administration Guide
CloseClosesthecurrentmanagementinterfacewindow.Youcancloseonlywindows thatwereopenedwhileusingthemanagementinterface.
! !
94
VMware, Inc.
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.
! ! ! !
OntheStatusMonitor,clickHardwareorOptions.Thevirtualmachinemustbe poweredoffbeforeyoucaneditmostconfigurationoptions.
VMware, Inc.
95
Administration Guide
Anewbrowserwindowappears,allowingyoutomakechangestothevirtual machinesconfiguration.
96
VMware, Inc.
MinimumMinimumamountofprocessorcapacitythatmustbeavailableto poweronthevirtualmachine. MaximumHighestamountofprocessorcapacitythevirtualmachinecanever consume,eveniftheprocessorisidle.Themaximumvaluecanbelargerthan100% ifthevirtualmachinehasmorethanonevirtualCPU. SharesArelativemetricforallocatingprocessorcapacity.Thevalueslow, normal,andhigharecomparedtothesumofallsharesofallvirtualmachineson theserverandtheserviceconsole.Shareallocationsymbolicvaluescanbeusedto configuretheirconversionintonumericvalues. Formoreinformationonsharevalues,refertotheresourcemanagementman pages:cpu(8),diskbw(8),andmem(8).
NOTE
SchedulingAffinityRepresentswhichESXServerprocessorsthevirtual machinecanrunon,whentheESXServersystemisamultiprocessorsystem.
NOTE
VMware, Inc.
97
Administration Guide
98
VMware, Inc.
Resourceinformationdisplayedincludes:
!
MinimumMinimumamountofmemorythatmustbeavailabletopoweronthe virtualmachine. MaximumAmountofmemoryallocatedtothevirtualmachinewhenitwas configured. SharesArelativemetricforallocatingmemorytoallvirtualmachines.Symbolic valueslow,normal,andhigharecomparedtothesumofallsharesofallvirtual machinesontheserverandtheserviceconsole.Shareallocationsymbolicvalues canbeusedtoconfiguretheirconversionintonumericvalues. Formoreinformationonsharevalues,refertotheresourcemanagementman pages:cpu,diskbw,andmem.
VMware, Inc.
99
Administration Guide
100
VMware, Inc.
Figure 3-6. Network tab TheNetworktabshowsnetworkperformanceinformationandresourcesallocatedto thevirtualmachinesvirtualnetworkcard.Thereceiveandtransmitbandwidths indicatehowfastdataistransferredtoandfromthevirtualmachine. ThevaluesunderPerformancearebasedonthepastfiveminutes.Theperiodoftime thesestatisticscovercanbemodified.SeeConfiguringtheStatisticsPeriodforthe VMwareManagementInterfaceonpage 81. TheNetworktabalsoindicateswhethertrafficshapingisenabled.Thissettingcanbe changed.
VMware, Inc.
101
Administration Guide
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
102
VMware, Inc.
Figure 3-7. Hardware tab TheHardwaretabliststhevirtualhardwareinthevirtualmachineconfigured deviceslikethevirtualdisk,removabledeviceslikefloppy,CDROMorDVDROM drives,virtualnetworkadapter,memoryallocatedtothevirtualmachine,andthe displaysettings.Moreinformationabouteachdeviceislisted,andyoucanconfigure eachvirtualhardwarecomponent. Youcanconfiguremosthardwareonlywhenthevirtualmachineispoweredoff.
VMware, Inc.
103
Administration Guide
NOTE
3 4 5
ClickOKtosaveyourchangesandclosethewindow.
104
VMware, Inc.
NOTE
3 4 5
ClickOKtosaveyourchangesandclosethewindow.
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
106
VMware, Inc.
To configure the virtual machines virtual processors and memory 1 IntheHardwaretab,underProcessorsandMemory,clickEdit. TheProcessorsandMemorydialogboxappears.
vmnicadapterConnectsthevirtualmachinetothephysicalnetworkadapter, allowingthevirtualmachinetolookandactasanothercomputeronthenetwork.
VMware, Inc.
107
Administration Guide
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
108
VMware, Inc.
IntheBusSharinglist,selecthowyouwantthevirtualmachinetoshareitsbus:
! ! !
ClickOKtosaveyourchangesandclosethewindow.
VMware, Inc.
109
Administration Guide
ESXServercanusedisksinfourmodes:
!
PersistentDisksinpersistentmodebehaveexactlylikeconventionaldiskdrives onacomputer.Allwritestoadiskinpersistentmodearewrittenoutpermanently tothediskassoonastheguestoperatingsystemwritesthedata. NonpersistentAllchangestoadiskinnonpersistentmodearediscardedwhen avirtualmachinesessionispoweredoff. UndoableKeepordiscardchangesyoumadeduringaworkingsessionwhen youpoweroffthevirtualmachine.Untilyoudecide,thechangesaresavedina redologfile. AppendStoreschangesinaredolog.Itcontinuallyaddschangestotheredolog untilyouremovetheredologfileorcommitthechangesusingthecommit commandinvmkfstools.SeeUsingvmkfstoolsonpage 249.
UnderDiskMode,clickPersistent,Nonpersistent,Undoable,orAppend.
110
VMware, Inc.
ClickOKtosaveyourchangeandclosethewindow.
VMware, Inc.
111
Administration Guide
2 3 4
112
VMware, Inc.
ClickHardDisk. TheVirtualDiskTypepageappears.
VMware, Inc.
113
Administration Guide
Createoneofthefollowingvirtualdisks:
!
ClickBlanktocreateanewvirtualdisk.
Specifythefollowing:
!
! !
114
VMware, Inc.
ClickExistingtoaddanexistingvirtualdisktothevirtualmachine.
Specifythefollowing:
!
! !
ClickOKtoaddthedisk.
VMware, Inc.
115
Administration Guide
ClickNetworkAdapter. TheNetworkAdapterpageappears.
3 4 5
116
VMware, Inc.
ClickOKtoaddthenetworkadapter.
ClickDVD/CDROM.
VMware, Inc.
117
Administration Guide
Thecdrompageappears.
3 4 5
ClickOKtoaddthedrive.
118
VMware, Inc.
ClickFloppyDrive. TheFloppyDrivepageappears.
3 4 5
ClickOKtoaddthedrive.
VMware, Inc.
119
Administration Guide
ClickGenericSCSIDevice. TheSCSIDevicepageappears.
3 4
120
VMware, Inc.
5 6
SelecttheappropriateSCSIIDintheVirtualSCSINodelist. ClickOKtoaddthedevice.
ClickGenericSCSIDevice. TheSCSIDevicepageappears.
VMware, Inc.
121
Administration Guide
3 4
5 6
SelecttheappropriateSCSIIDintheVirtualSCSINodelist. ClickOKtoaddthedevice.
122
VMware, Inc.
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.
VMware, Inc.
123
Administration Guide
Thevirtualmachinestartupoptionsinclude:
!
Thevirtualmachinestartupoptionsinclude:
!
124
VMware, Inc.
7 8
ClickOKtosaveyoursettings. ClickCloseWindowtoreturntothevirtualmachinesOptionstab.
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.
2 3
EnteravaluefortheoptionyouspecifiedandclickOK.
VMware, Inc.
127
Administration Guide
Forexample,setthevalueofresume.repeatabletoTRUE. 5 ClickOKintheOptionsdialogboxtosavethechangetotheconfigurationfile.
2 3
128
VMware, Inc.
Figure 3-9. Users and Events tab: Remote Console Connections and Permissions ThelistunderRemoteConsoleConnectionsidentifiesusersconnectedtothevirtual machinewitharemoteconsole.ThelistincludesthetimeandIPaddressfromwhich theuserconnectedtothevirtualmachine. ThelistunderPermissionsindicateswhatyoucandowiththevirtualmachine.Youare eitherallowedordeniedthefollowingabilities:
! ! !
VMware, Inc.
129
Administration Guide
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.
VMware, Inc.
131
Administration Guide
2 3 4 5
ClickOKtosaveyourchangesandclosetheconfigurationfile.
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.
134
VMware, Inc.
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.
! ! !
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
136
VMware, Inc.
TheConfirm:Deleting<VirtualMachine>dialogboxappears.Allthefilestobe deletedarelisted.
Foreachdiskfilenotassociatedwithanotherregisteredvirtualmachineonthis host,chooseoneofthefollowing:
! !
NOTE
NOTE
Ifyoudonotwanttodeletethisvirtualmachine,clickCancel.
VMware, Inc.
137
Administration Guide
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
NOTE
3 4
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.
140
VMware, Inc.
3 NOTE
ClickOKtosaveyourchangeandclosetheOptionspane.
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.
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:
!
VMware, Inc.
143
Administration Guide
144
VMware, Inc.
NOTE
Theremoteconsolestillrequiresthattheuserhasexecute(x)permissiononallparent directories.
VMware, Inc.
145
Administration Guide
NOTE
OntheStatusMonitor,clickManageFiles. Thefilemanagerappears.
Clicktheregisterlink.
146
VMware, Inc.
Amessageindicatesthatthevirtualmachineisregistered.
VMware, Inc.
147
Administration Guide
148
VMware, Inc.
Raisethevmwareserverdprocesspriorityto15sothatitcanconnecttoall runningvirtualmachines:
renice -15 -p <vmware-serverd_process_ID>
Raisethehttpdprocesspriorityto15:
renice -15 -p <httpd_process_ID>
5 6
Changethehttpdprocessprioritybacktothedefaultofzero(0).
renice 0 -p <httpd_process_ID>
where37748736represents36MB(36multipliedby1024,multipliedby1024). 2 RestarttheApacheserver:
/etc/rc.d/init.d/httpd.vmware restart
VMware, Inc.
149
Administration Guide
NOTE
Increasingthisvaluemighthaveanimpacttheperformanceofthevirtualmachines, becausetheApacheprocesseswillrequiremorememoryintheserviceconsole.
Thisincreasesthetimeoutvalueto2minutesfromthedefaultof30seconds.
Ifthemanagementinterfaceisunresponsive,youneedtomakethesechangesthrough theserviceconsole.
150
VMware, Inc.
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
Recoverindividualfilesonthevirtualmachine(forexample,ifauseraccidentally removesafile).
VMware, Inc.
151
Administration Guide
Recoverfromcatastrophicfailuresinwhichyourentirevirtualmachineis damaged.
Youcanrestorefiledatabytheindividualfile. Youcanrestoredatabasedatausingthenormaldatabasespecificmethod.
152
VMware, Inc.
Youcanstillbackupfromthestablediskimageonthesnappedmirror,andreconnect themirrortohaveitpickupthelatestchangesintimeforyournextbackup.
VMware, Inc.
153
Administration Guide
YoucanuseeitherofthesehardwarebasedapproacheswithESXServer. Inaddition,somedisasterprotectionsoftwareproductsimplementremotemirroring insoftware.Thesetoolsprovideprotectionanddataintegritysemanticssimilartothose ofthehardwarebasedsolutions.However,theymightbemorecosteffectivefor configurationswithlowtomediumperformancerequirements. Thesesoftwaretoolscanbeusedinsideguestoperatingsystems. NOTE VMwarerecommendsthatyoudonotusesoftwareremotemirroringtoolsforservice consoledrivenreplicationonVMwareESXServer.Thisisbecausethesesoftwaretools usuallyrequirefilesystemformatawareness,addsignificantlytothenetworkI/Olevel andtheCPUrequirementstoservicethatnetworkI/O,andaremorecommonon WindowsandUNIXoperatingsystemsthanonLinux.
154
VMware, Inc.
Inthischapter,thefollowingsectionsdescribeaspectsofusingtheVMwareService Console:
! ! ! ! ! !
CharacteristicsoftheVMwareServiceConsoleonpage 167 UsingDHCPfortheServiceConsoleonpage 168 ManagingtheServiceConsoleonpage 168 AuthenticationandSecurityFeaturesonpage 180 UsingDevicesWithESXServeronpage 184 EnablingUserstoViewVirtualMachinesThroughtheVMwareRemoteConsole onpage 185
VMware, Inc.
167
Administration Guide
168
VMware, Inc.
Example:
findnic -f vmnic1 10.2.0.5 10.2.0.4
VMware, Inc.
169
Administration Guide
Theformatforthevmkfstoolscommand,whenspecifyingaVMFSvolumeorfile,is:
vmkfstools <options> <path>
SeeVMkernelModuleLoaderonpage 240.
Manipulating Files
Tonavigatethroughthedirectorystructureandmanipulatefilesanddirectories,you musthaveproperpermissions.Insomeareasofthefilesystem,yourabilitymaybe restrictedwhenyouareloggedinasanordinaryuser.Youmightneedtologinasroot toperformsometasks.Table 51explainssomeofthecommonLinuxcommands availableintheserviceconsole.
170
VMware, Inc.
Command cd
cp
ln
ls
mkdir
mv
pwd
Showthepathtothepresentworkingdirectory.
VMware, Inc.
171
Administration Guide
172
VMware, Inc.
VMware, Inc.
173
Administration Guide
insmod
174
VMware, Inc.
17 17 17 18 17
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
Identifythesetofpermissionsyouwanttomodifybytheirsymbol:
! ! ! !
Table 54listspermissionsandcommands.
176
VMware, Inc.
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
exit
Logout.Ifyouusedsutologinasadifferentuser,thiscommandreturnsyou toyourprevioususername.
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
178
VMware, Inc.
rpcstats sched scsi shrdev stats swap thermmon timers uptime vm vmkperf watchpoints
VMware, Inc.
179
Administration Guide
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.
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:
!
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:
!
! !
182
VMware, Inc.
High Security
Thefollowinglistshowstheportnumbersanduseforhighsecurity:
! ! !
Medium Security
Thefollowinglistshowstheportnumbersanduseformediumsecurity:
! ! ! ! ! !
Low Security
Thefollowinglistshowstheportnumbersanduseforlowsecurity:
! ! ! ! ! !
VMware, Inc.
183
Administration Guide
Youcanalsofindthedevicenamelinkedtoaspecificcontrollerwiththesingular vmhba_devquery:
$ vmkpcidivy -q vmhba_dev vmhba0:0:0 /dev/ida/c0d0
Thevmhba_devqueryacceptsoneormorecontrollernamesasarguments.
ReboottheESXServersystem.
Enabling Users to View Virtual Machines Through the VMware Remote Console
ThedefaultsecuritysettingforESXServeristhatusersmusthaveread(r)andexecute (x)accesspermissionstoconnectaremoteconsoletoavirtualmachine.Toallowaccess touserswithonlyreadpermissions,usethefollowingglobalconfigurationsetting:
authd.policy.allowRCForRead = TRUE
VMware, Inc.
185
Administration Guide
186
VMware, Inc.
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.
188
VMware, Inc.
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.
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.
VMware, Inc.
191
Administration Guide
IntheUserNamefield,typethenameofthenewuser.
192
VMware, Inc.
3 4 5 6
NOTE
Ifyoudonotwanttheusertobepartofagroup,clickRemovenexttothe groupname.
ClickOKtosavethenewuserinformationandclosethewindow.
2 3
NOTE 4
Toremoveauserfromthegroup,clickRemovenexttotheusername.
ClickOKtosavethenewgroupinformationandclosethewindow.
VMware, Inc.
193
Administration Guide
Tochangetheusershomedirectory,intheHomeDirectoryfield,typethe nameofthedefaultdirectoryfortheuserintheserviceconsole. Tochangetheuserspassword,intheNewPasswordfield,typethepassword fortheusersaccount,andintheConfirmNewPasswordfield,typethesame password. Toaddtheusertooneormoregroups,clickAdd,andselectagroupfromthe list.Repeatthisstepforeachgrouptowhichyouwanttoaddtheuser. Toremovetheuserfromanygroup,clickRemovenexttothegroupname. Toremovetheuser,clickRemovenexttotheusersname.Youareprompted toconfirmyouwanttoremovetheuser.Thewindowcloses.
! !
ClickOKtosaveyourchangesandclosethewindow.
! !
ClickOKtosaveyourchangesandclosethewindow.
Security Settings
FromtheOptionstaboftheVMwareManagementInterface,usetheSecuritySettings optiontoconfigureESXServersecurityproperties.YoucansetupunencryptedWeb
194
VMware, Inc.
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.
VMware, Inc.
195
Administration Guide
SNMP Configuration
FromtheOptionstaboftheVMwareManagementInterface,usetheSNMP ConfigurationoptiontoconfiguretheESXServerSNMPagentandsubagent.These agentsallowyoutomonitorthehealthoftheserverandofvirtualmachinesrunning ontheserver. ToconfiguretheSNMPagents,seeConfiguringtheESXServerAgentThroughthe VMwareManagementInterfaceonpage 227.ForinformationaboutSNMP,seeUsing SNMPwithESXServeronpage 223.
Storage Management
FromtheOptionstaboftheVMwareManagementInterface,usetheStorage Managementoptiontomanageyourstorageareanetworkandattachedstorage devicesforyourESXServersystemanditsvirtualmachines. BecausethedisksontheSANscanpotentiallybeaccessedbymultipleESXServer computers,therearesomeconfigurationissuesthatareuniquetoSANs. ForinformationaboutSANs,seeUsingStorageAreaNetworkswithESXServeron page 266. NOTE MakesurethatonlyoneESXServersystemhasaccesstotheSANwhileyouareusing theVMwareManagementInterfacetoconfigureitbyformattingtheVMFS2volumes. Afteryoufinishtheconfiguration,makesurethatallpartitionsontheshareddiskare setforpublicorsharedaccessforaccessbymultipleESXServers(seeVMFS Accessibilityonpage 248).
196
VMware, Inc.
VMware, Inc.
197
Administration Guide
NOTE
Onlyfourprimarypartitionscanexistonadrive.Anextendedpartition(to containlogicalpartitions)countsasoneofyourfourprimarypartitions.
ClickYestocreatethecoredumppartition. ESXServeralsocreatestheVMFSpartition.
198
VMware, Inc.
Figure 6-5. Disks and LUNs tab IfthispartitionisformattedforVMFS1,youcanconvertittothenewerVMFS2 format.SeeFileSystemManagementonSCSIDisksandRAIDonpage 245for informationontheVMFS2filesystem. Thechangesyoucanmaketothepartitionmayinclude:
! ! ! !
Certainpartitionsdonotallowyoutomakeallofthesechanges.
VMware, Inc.
199
Administration Guide
SharedmodeUsedforaVMFSvolumethatisusedforfailoverbasedclustering amongvirtualmachinesonthesameordifferentESXServers.
NOTE
VMware, Inc.
201
Administration Guide
Chooseoneofthefollowingfailoverpolicies:
!
202
Figure 6-7. Swap Configuration pane Youcanmanageasingleswapfilewiththemanagementinterface.ESXServercan manageuptoeightswapfiles,butyoumustusevmkfstools.SeeUsingvmkfstools onpage 249. ClickEdittochangethefollowingswapfilesettings:
! !
!
VMware, Inc.
Administration Guide
NOTE
Adapter Bindings
FromtheOptionspaneoftheVMwareManagementInterface,theAdapterBindings tabdisplaystheWorldWidePortNamesboundtoeachFibreChannelHBAinthe system.YoucanviewthepersistentbindingstatusforeachHBA.Withpersistent bindings,ESXServerassignsspecifictargetIDstospecificSCSIdevices.ThetargetID associationisretainedfromreboottorebootunlessyouchangeit. PersistentbindingsareusefulifyouareusingrawdiskswithESXServer.Arawdiskis directlymappedtoaphysicaldiskdriveonyourSAN.ESXServerdirectlyaccessesthe dataonthisdiskasarawdevice(andnotasafileonaVMFSvolume).
204
VMware, Inc.
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
206
VMware, Inc.
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.
208
VMware, Inc.
TheSharesvaluerepresentsarelativemetricforcontrollingdiskbandwidth,where thisvalueiscomparedtothesumofallsharesofallvirtualmachinesonthesamedisk astheserviceconsoleandtheserviceconsoleitself. Forexample,theserviceconsoleandtwoVMFSpartitions,VMFSAandVMFSB,are locatedonthesameharddiskontheESXServersystem.Iftheserviceconsolehas2000 sharesandVMFSAandVMFSBeachhave1000shares,theserviceconsolehastwice thediskbandwidthofbothVMFSAandVMFSB. To modify the number of shares. 1 ClicktheEditlink.
2 3 4
VMware, Inc.
209
Administration Guide
PeriodicallychecktheVMkernelwarningandalertmessagesforoutofmemoryerrors, hardwarefailures,andsoon. To view system log files and the availability report 1 2 3 Makesureyouareloggedintothemanagementinterfaceastherootuser. ClickOptions,andclickSystemLogs. Clicktheappropriatetabforthelogfileyouwanttoview.
210
VMware, Inc.
VMware, Inc.
211
Administration Guide
212
VMware, Inc.
VMware, Inc.
213
Administration Guide
! ! !
Memory
!
MemorySavingsDuetoSharingAmountofmemorysavedbysharingmemory betweenvirtualmachines.
214
VMware, Inc.
Swap
! !
Memory
!
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.
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.
ContinueStartingVirtualMachinesAfterSetsthetypeofdelaybetween startingupvirtualmachines.Youcansetthisto:
! ! !
VMware, Inc.
217
Administration Guide
UnderSystemConfiguration,clickEdit.
218
VMware, Inc.
TheSystemStartupandShutdownDefaultsdialogboxappears.
3 4
6 7
VMware, Inc.
219
Administration Guide
2 3
DeselecttheStartUpandShutDownVirtualMachinescheckboxandclickOK. ClickCloseWindowtoreturntothemanagementinterfacesOptionspane.
220
VMware, Inc.
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.
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.
To shut down the computer where ESX Server is running 1 Logintothemanagementinterfaceasroot. TheURLtoconnecttotheserverishttp://<hostname>. 2 3 4 OntheStatusMonitor,makesureallvirtualmachinesareshutdownor suspended. ClicktheOptionstab. ClickShutDowntoshutdowntheserver.
222
VMware, Inc.
UsingSNMPtoMonitortheComputerRunningESXServeronpage 223 OverviewofSettingUpESXServerSNMPonpage 226 ConfiguringtheESXServerAgentonpage 227 ConfiguringSNMPonpage 230 UsingSNMPwithGuestOperatingSystemsonpage 231 VMwareESXServerSNMPVariablesonpage 231
Administration Guide
YoucanchoosetouseSNMPwithorwithoutanyspecificESXServerMIBitems.
NumberofCPUsonthephysicalcomputer. CPUresourcesonthephysicalcomputerbeingusedbyparticularvirtual machines. AmountofRAMinstalledonthephysicalcomputer. Physicalmemoryusedbytheserviceconsole. Physicalmemoryusedbyparticularvirtualmachines. Physicalmemorythatisnotbeingused. Usagedatafordisksonthephysicalcomputer,includingnumberofreadsand writesandamountofdatareadandwritten. Usagedataonthephysicalcomputersnetworkadapters,includingpacketssent andreceivedandkilobytessentandreceived. StateoftheVMkernel(loadedornotloaded).
! ! ! ! !
NOTE
IfthevariableshowingwhethertheVMkernelisloadedisno,regardvaluesreported foranyothervariableasinvalid.
224
VMware, Inc.
! ! ! ! ! ! ! !
NOTE
SNMP Traps
FourSNMPtrapsnotifyyouofcriticaleventsinparticularvirtualmachines.The affectedvirtualmachineisidentifiedbyIDnumberandconfigurationfilepath.The trapsnotifyyou:
! ! ! ! !
VMware, Inc.
225
Administration Guide
Client
226
VMware, Inc.
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
5 6 7
228
VMware, Inc.
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
ThefirstcommandstartsthemasterSNMPdaemon(eitherthedefaultSNMPdaemon shippedwithESXServeroryourthirdpartymanagementapplicationSNMPdaemon).
VMware, Inc.
229
Administration Guide
Configuring SNMP
ThefollowingsectionsdiscussSNMPconfigurationoptionsforsettingtrap destinations,configuringmanagementclientsoftware,securitysettings,andguest operatingsystemconfiguration.
Repeatthislinetospecifymorethanonedestination. 3 Addthefollowingline,replacingpublicwithacommunitynameofyourchoice.
trapcommunity public
NOTE
Inyourmanagementsoftware,specifytheESXServermachineasanSNMPbased manageddevice.
230
VMware, Inc.
vmware.vmwSystem
Thisgroupconsistsofthreevariablesprovidingbasicinformationaboutthesystem.
VMware, Inc.
231
Administration Guide
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
232
VMware, Inc.
netConnType
Displaystring
VMware, Inc.
233
Administration Guide
vmware.vmwResources
Thisgroupcontainsstatisticsonthephysicalmachinesresourcescategorizedinto severalsubgroups. vmware.vmwResources.vmwCPU ThisgroupcontainsCPUrelatedinformationinonevariableandonetable. Table 7-8. vmware.vmwResources.vmwCPU
Name numCPUs Data type Integer Description NumberofphysicalCPUsonthesystem.
234
VMware, Inc.
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).
vmware.vmwResources.vmwHBATable
Thisgroupcontainsphysicaldiskadapterandtargetsinformationinonetable.
VMware, Inc.
235
Administration Guide
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.
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
vmConfigFile
Displaystring
vmware.vmwOID
Therearenovariablesinthisgroup.Thisgroupisusedtoallocateauniqueidentifier fortheproductdenotedbythevmwSystem.vmwOIDvariable.
vmware.vmwExperimental
Therearenovariablesinthisgroup.ThisgroupisreservedforVMwareephemeral, experimentalvariables.
238
VMware, Inc.
VMware, Inc.
239
Administration Guide
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.
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
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.
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.
244
VMware, Inc.
FileSystemManagementonSCSIDisksandRAIDonpage 245 Usingvmkfstoolsonpage 249 AccessingRawSCSIDisksonpage 261 DeterminingSCSITargetIDsonpage 263 SharingtheSCSIBusonpage 264 UsingStorageAreaNetworkswithESXServeronpage 266 UsingPersistentBindingsonpage 270 UsingMultipathinginESXServeronpage 272
VMware, Inc.
245
Administration Guide
! !
LargerfilesystemvolumesandlargerfilesontheVMFSvolumes. RawdiskscanbemappedasVMFSfiles.
NOTE
246
VMware, Inc.
NOTE
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
Administration Guide
VMFS Accessibility
TherearetwomodesforaccessingVMFSvolumes:publicandshared.
!
NOTE
248
VMware, Inc.
4 NOTE
Maketheappropriatechanges,andclickOK.
Using vmkfstools
ThevmkfstoolscommandsupportsthecreationofaVMwareESXServerfilesystem (VMFS)onaSCSIdisk.Usevmkfstoolstocreate,manipulateandmanagefilesstored inVMFSvolumes.YoucanstoremultiplevirtualdiskimagesonasingleVMFSvolume. YoucanalsoperformmostofthevmkfstoolsoperationsthroughtheVMware ManagementInterface.
VMware, Inc.
249
Administration Guide
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.
250
VMware, Inc.
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:
!
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.
NOTE
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.
254
VMware, Inc.
Thisoptionaddsanotherphysicalextent(designatedby<extension-SCSIDevice>), startingatthespecifiedSCSIdevice.Byrunningthisoption,youlosealldataon <extension-SCSIDevice>. NOTE AlogicalVMFS2volumecanhaveatmost32physicalextents. ThisoperationisnotsupportedontheVMFS1filesystemandinfact,returnsanerror ifthespecifiedSCSIdeviceisformattedasVMFS1.Eachtimeyouusethisoptionand extendaVMFS2volumewithaphysicalextent,theVMFSvolumesupports,by default,anadditional64files.Youcanchangethisdefaultnumberoffilesbyusingthe -noption.
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
Recovers a VMFS
-R --recover ThiscommandenablesyoutorecoveraVMFS(accessiblebymultipleESXservers) whenothervmkfstoolscommandsindicatethatthefilesystemislockedbyanother ESXServermachine,but,infact,nootherserveriscurrentlyaccessingthisfilesystem. ThissituationmayoccuriftheVMFSwasbeingaccessedbyaserver(forexample, runningavirtualmachine)andthatservercrashed.
256
VMware, Inc.
NOTE
UsethiscommandifyouarecertainthatnootherESXServerisaccessingthefile system.
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
258
VMware, Inc.
Caution
NOTE
ThefirsttimeyouaccessanewlyconvertedVMFS2volume,theaccesswillbeslow becauseofinternalvolumeconsistencychecking.
VMware, Inc.
259
Administration Guide
Youcanaddressthefilesystembyusingthenameofitsheadpartition,forexample, vmhba1:3:0:1.
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
260
VMware, Inc.
ThefollowingexampleimportsaGSXServerorWorkstationvirtualdiskfileintothe VMFSvolumeonthespecifiedSCSIdevice:
vmkfstools -i winXP.vmdk vmhba0:6:0:1:winXP.vmdk
Bycontrast,ifyouareimportingdirectlyintoarawpartition,theexamplebecomes:
vmkfstools -i winXP.vmdk vmhba0:6:0:1
VMware, Inc.
261
Administration Guide
TheHardwaretabforthisvirtualmachineappears.
ClickAddDevicetostarttheAddDevicewizard.
ClickHardDisk. TheVirtualDiskTypepageappears.
ClickSystemLUN/Disktoallowthevirtualmachinetoaccessaphysicaldisk storedonaLUN.
262
VMware, Inc.
ClickOKtoaddthedisk.
VMware, Inc.
263
Administration Guide
Toenablesharingofvirtualdisks,chooseVirtualorPhysical.Allvirtualdisksonthe specifiedvirtualbuswillbesharableandhavethespecifiedmode.
!
VirtualbussharingOnlyvirtualmachinesonthesamephysicalmachinewillbe abletosharedisks.Thissettingallowsforaclusterinaboxconfiguration,in whichallmembersofahighavailabilityclusterareonthesamephysicalmachine. Thissetupisusefulforprovidinghighavailabilitywhenthelikelyfailuresaredue tosoftwareoradministrativeerrors. PhysicalbussharingVirtualmachinesondifferentphysicalmachineswillbe abletosharedisks.Inthiscase,theVMFSholdingthevirtualdisksmustbeona physicallyshareddisk,soallofthephysicalmachinescanaccessit.Thissetupis usefulforprovidinghighavailabilitywhenthelikelyfailuresalsoinclude hardwareerrors.
VMware, Inc.
265
Administration Guide
To change the bus sharing setting 1 2 3 4 Logintothemanagementinterfaceastheappropriateuserandbesurethevirtual machineyouwanttoconfigureispoweredoff. Pointtotheterminaliconforthevirtualmachineyouwanttoconfigureandclick ConfigureHardware. ClickEditnexttotheappropriateSCSIcontroller. Choosethebussharingsettingyouwantfromthedropdownlist,andclickOK.
266
VMware, Inc.
thoughtheseFCadaptersarededicatedtovirtualmachines,theLUNsontheSANsare visibletosystemmanagementagentsontheserviceconsole.
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.
NOTE
268
VMware, Inc.
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.
270
VMware, Inc.
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
where:
200100e08b229b53 210100e08b229b53 qla0 target-0 20000060163cad13
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
ThisexampleaddsbindingforQLogic2200host2.
pbind.pl -a /proc/scsi/qla2200/2
NOTE
272
VMware, Inc.
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.
VMware, Inc.
273
Administration Guide
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.
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
! !
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
VMware, Inc.
Administration Guide
NOTE
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
276
VMware, Inc.
NOTE
ESXServerignoresthepreferredpathwhenthemultipathingpolicyissettomru.
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.
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
10
Inthischapter,thefollowingsectionsdescribehowtouseVMwareESXServerto provideclusteredvirtualmachinesinavarietyofenvironments.
! ! !
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
Clustering Software
Availableclusteringsoftwareincludes:
!
VeritasClusteringService(VCS)
Clustering Hardware
Atypicalclusteringsetupincludes:
!
! !
Extranetworkconnectivitybetweennodesformonitoringheartbeatstatus. Amethodforredirectingincomingrequests.
280
VMware, Inc.
Clustering Scenarios
Severalscenariosarepossibleforclusteringinvirtualmachines. Cluster in a Box Thisscenarioprovidessimpleclusteringtodealwithsoftwarecrashesor administrativeerrors.Theclusterconsistsofmultiplevirtualmachinesonasingle physicalmachine.ItsupportsshareddiskswithoutanysharedSCSIhardware.It supportsheartbeatnetworkwithoutanyextranetworkadapters.
Virtual machine
Cluster software
Virtual machine
Cluster software
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
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
Figure 10-3. Four two-node clusters moved from eight physical machines to two. Cost-Effective Standby Host Provideastandbyhostformultiplephysicalmachinesononestandbyboxwith multiplevirtualmachines.
282
VMware, Inc.
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.
PrimaryvirtualSCSIhostadapterwithoneSCSIvirtualdisk. Atleasttwovirtualnetworkadapters:
!
Remainingdefaultvirtualmachinedevices(suchastheCDROMdriveandthe floppydiskdrive).
Inadditiontotheabovedevices,thefollowingisrequiredforsharedstorage:
! !
VMware, Inc.
283
Administration Guide
QLogicandEmulexHBAsinaclusteredenvironmentmustbededicatedto VMkernel.
Important Notes
!
! !
Two Node Cluster with Microsoft Cluster Service on a Single ESX Server Machine
ThisprocedurecreatesatwonodeclusterusingMicrosoftClusterServiceonasingle ESXServermachineandusesthefollowing:
! ! ! ! !
NOTE
Virtualdisksstoredonvmsandsharedfscanalsobestoredonthesamepartition.In thiscase,usethepartitionlabelonwhichthesevirtualdisksreside.
284
VMware, Inc.
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.
3 4 5
ClickOK.
Youhavecreatedthefirstclusternodevirtualmachine.
VMware, Inc.
287
Administration Guide
2 3 4 5
6 7 8 9 10 11 12
Thisconcludesthecloningprocess.Nowcontinuewithcreatingthesecondnode virtualmachine
288
VMware, Inc.
9 10
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.
Administration Guide
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.
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.
! !
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
ThisconcludestheMicrosoftClusterServiceinstallationandconfiguration.
VMware, Inc.
291
Administration Guide
Two Nodes with Microsoft Cluster Service on Separate ESX Server Machines
Thisprocedurecreatesatwonodeclusterinvirtualmachinesthatwillrunontwo separateESXServermachines.Itusesthesamenamingconventionsasintheprevious procedure. Inaddition,thephysicalsharedstorageiseither:
! !
SharedSCSI Astorageareanetwork(SAN)
292
VMware, Inc.
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.
VMware, Inc.
293
Administration Guide
294
VMware, Inc.
Thisconcludesthecloningprocess.Continuewithcreatingthesecondnodevirtual machine.
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.
VMware, Inc.
295
Administration Guide
NOTE
NOTE
ClickOK. AnewvirtualdiskandSCSIController1appearontheHardwaretab.
8 9
296
VMware, Inc.
Mustbeonlocalstorage,notonaSAN. Mustbeanonclustereddisk. MustresideonapublicVMFSvolume. MustuseVMFSlabelnotation. Virtualadaptermustbesettoshared mode = none. RevisionmustbeESX2.5.2orhigher. MustresideonapublicVMFSvolume. MustuseVMFSlabelnotation. Diskmustbeinpersistentmode. DeviceTypemustbescsi-nonpassthru-rdmor scsi-passthru-rdm.
Userawdevicemappinginstead,ifESXServer2.5.2andhigher.
! ! ! ! !
! !
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.
MustresideonpublicVMFS ! volume.
! ! ! !
VMware, Inc.
297
Administration Guide
Notsupported
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.
Qlogic
Driverrevisionis2.01gonESXServerand4.20qonearlierrevisions.
! ! ! !
VMware, Inc.
299
Administration Guide
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.
SubstitutethenameoftheappropriatediskorVMFSinplaceofvmhba0:1:0:0.
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
302
VMware, Inc.
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.
304
VMware, Inc.
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
VMware, Inc.
305
Administration Guide
306
VMware, Inc.
Network Device Configuration Youneedtoaddanothernetworkadapterthatthe clusternodeswillusetocommunicatewitheachother. To add a virtual network adapter 1 2 3 Onthehardwaretabforthisvirtualmachine,clickAddDevice. ClickNetworkAdapter. FromtheDeviceBindingdropdownlist,choosevmnic1.
VMware, Inc.
307
Administration Guide
308
VMware, Inc.
PrimaryIPAddress:Addressfortheclusterasawhole.Thisistheaddress thattheclientswillusetoaccessthecluster. SubnetMask:Subnetmaskofthenetworktowhichtheaboveaddress belongs. Multicast:Checkthisboxtoenablemulticastmode. Allmembersoftheclustermustusethesamesettingforthisoption.When youenablemulticastmode,youmightneedtochangetheconfigurationof yourphysicalLANswitches.ConsultyourLANhardwaredocumentationfor information. RefertoNetworkLoadBalancingHelpfortheremainingoptions.
NOTE
11 12 13 14 15
NOTE
YoumustaddClustersPrimaryIPAddresstothelistofIPAddressesbound totheadapter.
16
RepeatthesestepsoneachhosttobeusedinyourNetworkLoadBalancingcluster.
Repeatthisprocedureforeachnodethatwilljointhecluster.
VMware, Inc.
309
Administration Guide
310
VMware, Inc.
11
Networking
11
SettingtheMACAddressManuallyforaVirtualMachineonpage 311 VMkernelNetworkCardLocatoronpage 314 ForcingtheNetworkDrivertoUseaSpecificSpeedonpage 315 EnablingaVirtualAdaptertoUsePromiscuousModeonpage 315 SharingNetworkAdaptersandVirtualNetworksonpage 316 UsingVirtualSwitchesonpage 320
ThissectionexplainshowVMwareESXServergeneratesMACaddressesandhowyou cansettheMACaddressforavirtualnetworkadaptermanually.
VMware, Inc.
311
Administration Guide
Chapter 11 Networking
Youmustalsosettheoptioninavirtualmachinesconfigurationfile:
ethernet<number>.addressType="static"
VMware, Inc.
313
Administration Guide
findnic Command
Ifyouknowthebusandslotorderoftheadapters,youcandeterminewhichadapter haswhichname.Ifyoudont,usethefindnicprogramtomaketheproperassociation ofnetworkadaptertoname. Theformatofthecommandis
findnic <options> <nic-name> <local-ip> <remote-ip>
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.
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
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.
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.
VMware, Inc.
317
Administration Guide
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
318
VMware, Inc.
Chapter 11 Networking
Thelinesyouaddto/etc/rc.d/rc.localwouldbe:
insmod vmxnet_console devName=vmnic1;vmnet_0 ifup eth1 ifup eth2
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
320
VMware, Inc.
Chapter 11 Networking
VMware, Inc.
321
Administration Guide
Search/etc/vmware/devnames.conf:
$ grep 2:04.0 /etc/vmware/devnames.conf 002:04.0 nic vmnic0
Thedevicenameisvmnic0.
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
VMware, Inc.
323
Administration Guide
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.
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.
!
Troubleshooting
If,whilebootingyourvirtualmachine,youseeanerrormessagestatingthatthe Ethernetdevicecannotbedetected,checkthefollowing:
!
Maketheappropriatechange(s),andrebootyourvirtualmachinetodetermine whethertheerrormessagepersists.
326
VMware, Inc.
12
12
VirtualMachineResourceManagementonpage 328 UsingESXServerResourceVariablesonpage 328 ImprovingPerformanceonpage 329 CPUResourceManagementonpage 331 ManagingVirtualMachineCPUResourcesonpage 336 MemoryResourceManagementonpage 345 ManagingVirtualMachineMemoryonpage 351
VMware, Inc.
327
Administration Guide
! ! ! !
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
Administration Guide
NOTE
330
VMware, Inc.
VMware, Inc.
331
Administration Guide
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.
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.
VMware, Inc.
335
Administration Guide
Definethehyperthreadingoption:
hyperthreading = true
Ifyoupreviouslydefinedthisoption,changethecurrentvaluetotrue. 4 Savethefileandcloseit.
336
VMware, Inc.
ClicktheCPUtab.
ClickEdit. TheCPUResourceSettingsdialogboxappears.
Enterthesettingsyouwant,andclickOK.
Youmustloginasroottochangeresourcemanagementsettingsusingeitherthe managementinterfaceorprocfs.
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.
NOTE
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.
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
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
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
timeithasconsumedabout265secondsofprocessortime,includingabout3seconds ofESXServersystemtime(suchasprocessinginterruptsonbehalfofthevirtual machine). ThevirtualCPUisnotcurrentlywaiting,buthaswaitedforatotalofabout52seconds sinceithaspoweredon.Together,bothofthevirtualmachinesvirtualCPUsare allowedtousebetween0and2physicalprocessors(min=0%andmax=200%).The virtualmachinesallocationof2000sharescurrentlyentitlesittoconsumeprocessor timeequivalentto72%ofasingleprocessor.Sincepoweringon,thevirtualmachinehas receivedabout124secondsofCPUtimeaboveitsentitlement,byconsumingextra timeleftoverfromothervirtualmachinesthatdidnotfullyutilizetheirallocations.
VMware, Inc.
345
Administration Guide
Minimumsizemin Theminimumsizeisaguaranteedlowerboundontheamountofmemorythatis allocatedtothevirtualmachine,evenwhenmemoryisovercommitted.The systemusesanadmissioncontrolpolicytoenforcethisguarantee.Youcannot poweronanewvirtualmachineifthereisntsufficientmemorytoreserveits minimumsize. Setavirtualmachinesminimumfortheminimalacceptableperformanceand abovethethresholdwheretheguestoperatingsystembeginsswappingheavily. Usetheperformancemonitoringtooloftheguestoperatingsystemtoseeifyou areswapping.Forinformationonimprovingguestoperatingsystemperformance, seeImprovingSlowPerformanceonVirtualMachinesonpage 330.
NOTE
Specifyamaximummemorysizeforaguestoperatingsystem,oritwillnotboot.Also, youcanchangeavirtualmachinesmaximummemorysizeonlywhenitispoweredoff.
!
346
VMware, Inc.
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.
348
VMware, Inc.
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.
VMware, Inc.
349
Administration Guide
350
VMware, Inc.
ClickEdit.
VMware, Inc.
351
Administration Guide
TheMemoryResourceSettingsdialogboxappears.
Enterthesettings,andclickOK.
Loginasroottochangeresourcemanagementsettingsusingeitherthemanagement interfaceorprocfs.
352
VMware, Inc.
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.
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.
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
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
356
VMware, Inc.
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.
358
VMware, Inc.
Heresanexampleofwhatyoumightsee:
#NUMANodes:2 Totalmemory:8192MB Node ID MachineMem 0 1 00 01 4096MB 4096MB
NodeNodenumber. IDHardwareIDnumberoftheNUMAnode. MachineMemAmountofphysicalmemorylocatedonthisNUMAnode, includingmemorythatcanbeusedbytheserviceconsole. ManagedMemAmountofphysicalmemorylocatedonthisNUMAnode, excludingmemoryusedbytheserviceconsoleandtheESXServervirtualization layer. CPUsAspaceseparatedlistofthephysicalprocessorsinthisnode. PhysicalCPUs0,1,2,and3areinNUMAnode0,andphysicalCPUs4,5,6,and7 areinNUMAnode1.
VMware, Inc.
359
Administration Guide
Heresanexampleofwhatyoumightsee:
. . . Node Total-/MB 0 836022/3265 1 2621440/10240 Totals
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.
360
VMware, Inc.
VirtualmachineconfigurationfileAddthefollowing:
sched.cpu.affinity = <set>
VMware, Inc.
361
Administration Guide
procfsinterfaceontheserviceconsole
/proc/vmware/vm/<id>/cpu/affinity
VirtualmachineconfigurationfileAddthefollowing:
sched.mem.affinity = <NUMA_node>
where<NUMA_node>isthenumberofasingleNUMAnode.
362
VMware, Inc.
procfsinterfaceontheserviceconsole:
/proc/vmware/vm/<id>/mem/affinity
WritethenumberoftheNUMAnode.
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
CompletingthesetwostepsensuresthatthevirtualmachinerunsonlyonNUMAnode 1and,whenpossible,allocatesmemoryfromthesamenode.
VMware, Inc.
363
Administration Guide
Server Memory
ESXServer2.5usesapproximately24MBofsystemmemoryforitsvirtualizationlayer. ThismemoryisallocatedwhentheESXServerisloadedandisnotconfigurable.
364
VMware, Inc.
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.
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.
VMware, Inc.
367
Administration Guide
ClicktheNetworktab.
3 4
ClickEdit. TheNetworkResourceSettingsdialogboxappears.
Youmustloginasroottochangeresourcemanagementsettingsusingeitherthe managementinterfaceorprocfs.
368
VMware, Inc.
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.
Administration Guide
Examples
Supposeyouwanttoattachatrafficshapertolimitthetransmitbandwidthofthe virtualmachinewithID104.Tocreateandattachanewshaperinstance,issuean xmitpushcommandasdescribedinManagingNetworkBandwidthfromtheService Consoleonpage 368.Youneedrootprivilegesarerequiredtoattachafilter.
echo "104 nfshaper 1m 2m 160k" > /proc/vmware/filters/xmitpush
370
VMware, Inc.
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
ClickEdit. TheDiskResourceSettingsdialogboxappears.
Specifythesharesvalue,andclickOK.
372
VMware, Inc.
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.
VMware, Inc.
373
Administration Guide
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
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.
StartingtheRemoteConsoleonpage 156 RunningaVirtualMachineUsingtheRemoteConsoleonpage 157 SpecialPowerOptionsforVirtualMachinesonpage 157 VMwareToolsSettingsonpage 159 InstallingNewSoftwareInsidetheVirtualMachineonpage 164 Cutting,Copying,andPastingonpage 165 SuspendingandResumingVirtualMachinesonpage 165 ShuttingDownaVirtualMachineonpage 166
VMware, Inc.
155
Administration Guide
SelectthevirtualmachineyouwanttoconnecttoandclickOK.
NOTE Ifyoulaunchtheremoteconsolefromthemanagementinterfacefrom InternetExplorer6.0onasystemwhereSSLisencryptingyourESXServer remoteconnections,configureInternetExplorer.SeeLaunchingtheRemote ConsolefromtheManagementInterfaceonanEncryptedServeronpage 82. To start the Remote Console on Linux 1 Starttheremoteconsoleprogrambytyping: vmware-console 2 Fillinthedialogboxfieldswithinformationtoconnecttothevirtualmachine:
! ! !
SelectthevirtualmachineyouwanttoconnecttoandclickOK.
156
VMware, Inc.
NOTE
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:
!
PowerOffVirtualMachinePowersoffthevirtualmachine.Thisissimilarto turningoffaphysicalcomputerbypressingitspowerbutton,soanyprograms runninginthevirtualmachinecanbeadverselyaffected.ClickthePowerOff buttononthetoolbartopoweroffthevirtualmachine. ShutDownGuestOperatingSystemGracefullyshutsdowntheguestoperating systemand,iftheguestoperatingsystemsupportsAdvancedPowerManagement, powersoffthevirtualmachine.Ifascriptisassociatedwiththispoweroperation, itexecutesaftertheshutdownbegins.ThisisthesameaschoosingStart>Shut Down>ShutDowninaWindowsoperatingsystemorissuingashutdown commandinaLinuxoperatingsystem.
158
VMware, Inc.
VMware, Inc.
159
Administration Guide
TimesynchronizationSpecifywhethertosynchronizethetimeintheguest operatingsystemwiththetimeintheserviceconsole.
160
VMware, Inc.
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
Toselectadifferentscript,clickCustomScriptandclickBrowsetoselectthe newscript.
162
VMware, Inc.
! !
ClickApplytosaveyoursettings.
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
164
VMware, Inc.
VMware, Inc.
165
Administration Guide
166
VMware, Inc.