esx25 admin

Post on 03-Aug-2015

25 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Administration GuideVMware ESX Server 2

Administration Guide

Administration Guide Version: 2.5.4 Revision: 20061006 Item: ESX-ENG-Q105-057

You can find the most up-to-date technical documentation on our Web site at http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com

2006 VMware, Inc. All rights reserved. Protected by one or more of U.S. Patent Nos. 6,397,242, 6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156, 6,795,966, 6,880,022, 6,961,941, 6,961,806 and 6,944,699; patents pending. VMware, the VMware boxes logo and design, Virtual SMP and VMotion are registered trademarks or trademarks of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.

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

Contents

Contents

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

1 IntroductiontoVMwareESXServer 25VMwareESXServerSystemArchitecture 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 39CreatingaNewVirtualMachine 39

VMware, Inc.

3

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 694 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 79RunningtheVMwareManagementInterface 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.

5

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

6

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 153VMware, Inc. 7

Administration Guide

UsingHardwareorSoftwareDiskSnapshots 153 UsingNetworkBasedReplicationTools 154

4 UsingtheVMwareRemoteConsole 155UsingtheRemoteConsole 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 167CharacteristicsoftheVMwareServiceConsole 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

8

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 187StartupProfile 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.

9

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

12

VMware, Inc.

Contents

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

VMware, Inc.

13

Administration Guide

SavingYourMultipathingSettings 277 InCaseofFailover 277 SettingsforQLogicAdapters 277 FailoverinWindows2000andWindowsServer2003GuestOperating Systems 278

10 ConfigurationforClustering 279WhatIsClustering? 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 30214 VMware, Inc.

Contents

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

11 Networking 311SettingtheMACAddressManuallyforaVirtualMachine 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 327VirtualMachineResourceManagement 328 ServiceConsoleResourceManagement 328 UsingESXServerResourceVariables 328VMware, 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.

P

Preface

ThisprefacedescribesthecontentsoftheESXServerAdministrationGuideandprovides pointerstotechnicalandeducationalresources. Thisprefacecontainsthefollowingtopics:! ! ! ! !

AboutThisBookonpage 20 IntendedAudienceonpage 20 DocumentFeedbackonpage 20 ConventionsandAbbreviationsonpage 20 TechnicalSupportandEducationResourcesonpage 21

VMware, Inc.

19

Administration Guide

About This BookThismanual,ESXServerAdministrationGuide,describeshowtoadministerand configureESX Server2.5andhowtoaccesstheserverusingtheVMwareManagement Interface.

Intended AudienceTheinformationpresentedinthismanualiswrittenforexperiencedWindowsorLinux systemadministratorswhoarefamiliarwithvirtualmachinetechnologyand datacenteroperations.

Document FeedbackIfyouhavecommentsaboutthisdocumentation,submityourfeedbackto: docfeedback@vmware.com

Conventions and AbbreviationsThismanualusesthestyleconventionslistedinTable P1. Table P-1. Type ConventionsStyle Purpose Usedforcommands,filenames,directories,paths. Applytoindicateuserinput. Usefortheseterms: Interfaceobjects,keys,buttons Itemsofhighlightedinterest Glossaryterms Italic Usedforbooktitles. Anglebracketsindicatevariableandparameternames.

MonospaceMonospace bold Bold

Abbreviations Used in GraphicsThegraphicsinthismanualusetheabbreviationslistedinTable P2. Table P-2. AbbreviationsAbbreviation VC VI Description VirtualCenter VirtualInfrastructureClient

20

VMware, Inc.

Preface

Table P-2. Abbreviations (Continued)Abbreviation server database hostn VM# user# dsk# datastore SAN tmplt Description VirtualCenterServer VirtualCenterdatabase VirtualCentermanagedhosts virtualmachinesonamanagedhost userwithaccesspermissions storagediskforthemanagedhost storageforthemanagedhost storageareanetworktypedatastoresharedbetweenmanagedhosts template

Technical Support and Education ResourcesThefollowingsectionsdescribethetechnicalsupportresourcesavailabletoyou:! ! ! !

SelfServiceSupportonpage 21 OnlineandTelephoneSupportonpage 22 SupportOfferingsonpage 22 VMwareEducationServicesonpage 22

Self-Service SupportUsetheVMwareTechnologyNetworkforselfhelptoolsandtechnicalinformation:! ! ! ! ! !

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

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

VMware, Inc.

21

Administration Guide

Online and Telephone SupportUseonlinesupporttosubmittechnicalsupportrequests,viewyourproductand contractinformation,andregisteryourproducts.Goto http://www.vmware.com/support. Customerswithappropriatesupportcontractsshouldusetelephonesupportforthe fastestresponseonpriority1issues.Goto http://www.vmware.com/support/phone_support.html.

Support OfferingsFindouthowVMwaressupportofferingscanhelpyoumeetyourbusinessneeds.Go tohttp://www.vmware.com/support/services.

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

Reporting ProblemsTheseguidelinesdescribetheinformationyoumaybeaskedtoprovidewhenyou reportproblems. Besuretoregisteryourserialnumber.Ifyouarerequestingsupportdirectlyfrom VMware,thenreportyourproblemsusingthesupportrequestformontheVMware Websiteatwww.vmware.com/requestsupport. WhenrequestingsupportfromVMware,runthe/usr/bin/vm-supportscriptonthe serviceconsoleandsavetheresultingesx--.tgzfile.This scriptcollectsandpackagesallrelevantESXServersystem,configurationinformation, andESXServerlogfiles.Thisinformationisusedtoanalyzetheproblemyouare encountering.!

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

!

22

VMware, Inc.

Preface

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

VMware, Inc.

23

Administration Guide

24

VMware, Inc.

1

Introduction to VMware ESX Server

1

TheVMwareESXServerAdministrationGuideprovidesinformationonhowtouse VMwareESXServerafterithasbeeninstalled.ForinformationoninstallingESXServer, refertotheVMwareESXServerInstallationGuide. Thischaptercontainsthefollowingsections:! !

VMwareESXServerSystemArchitecture,next UsingVMwareESXServeronpage 31

VMware ESX Server System ArchitectureVMwareESXServerincorporatesaresourcemanagerandaserviceconsolethat providesbootstrapping,management,andotherservices. ThedesignoftheESXServercorearchitectureimplementstheabstractionsthatallow hardwareresourcestobeallocatedtomultipleworkloadsinfullyisolated environments. Thekeyelementsofthesystemsdesignare:!

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

!

!

VMware, Inc.

25

Administration Guide

Figure 1-1. ESX Server core architecture

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

26

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

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

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

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

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

VMware, Inc.

27

Administration Guide

Private Virtual Ethernet Networks (VMnets)YoucanuseVMnetconnectionsforhighspeednetworkingbetweenvirtualmachines, allowingprivate,costeffectiveconnections.Theisolationinherentintheirdesign makesthemespeciallyusefulforsupportingnetworktopologiesthatnormallydepend ontheuseofadditionalhardwaretoprovidesecurityandisolation.Physical NIC NIC vmnic0

Virtual machine 2 External Web server

Virtual machine 1 Firewall

vmnet_0

Virtual machine 3 Firewall

vmnet_1

Internal Virtual Network machine 4 On internal Virtual network Machine

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

Virtualization at a GlanceESXServervirtualizestheresourcesofthephysicalsystemforusebythevirtual machines.

28

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

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

Virtual machine 2Memory Mem2 Disk Disk2 NIC NIC2a NIC NIC2b

Mem1

NIC1a

CPU1 CPU2

Mem1

Mem2

CPU

Memory

Disk

NIC NIC1b NIC2b Virtual network

Physical resources

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

Software CompatibilityIntheVMwareESXServerarchitecture,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 ConsoleThissectiondiscussestheserviceconsolefunctions,processes,andfiles.

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

Service Console Processes and FilesTheserviceconsoleprovidesacontrolAPIthatallowsthevirtualmachinesand resourceallocationstobemanaged.Theadministratormayalsoaccessthesecontrols throughpagesaccessedthroughtheWebserverrunningintheserviceconsole.Web browser API Remote console

httpd vmauthd vmserverdvmware vmware

snmpd

mks KVM

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

Serverdaemon(vmserverd)Performsactionsintheserviceconsoleonbehalfof theVMwareRemoteConsoleandtheWebbasedVMwareManagementInterface.

30

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

!

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

!

!

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

Using VMware ESX ServerVMwareESXServercontainsmanyfeaturestohelpyoumanageyourvirtualmachines resources.Inthissection,someofthesefeaturesarehighlightedbylistingtasksthatyou performonyourESXServersystem. Theinformationcontainedinthistablepresumesthatyouhavesuccessfullyinstalled andconfiguredESXServeronyourhardware.Forhelp,refertotheVMwareESXServer InstallationGuide.

VMware, Inc.

31

Administration Guide

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

Decidehowtoorganize yourvirtualmachine configurationfiles. Upgradeanyexisting virtualmachinesfroma previousversionofESX Serveroranother VMwareproduct.

32

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

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

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

VMware, Inc.

33

Administration Guide

Table 1-1. ESX Server Administrator Tasks (Continued)Task Setuserpermissionsto connecttoavirtual machinethroughthe remoteconsole. Description Forausertoconnecttoandpoweronavirtualmachineinthe remoteconsoletheuser,oragrouptowhichtheuserbelongs,must havereadandexecuteaccesstothatvirtualmachinesconfiguration file.Also,theusermusthaveexecute(x)permissiononallparent directories.SeeSettingPermissionsforOwnersofVirtual Machinesonpage 144. ESXServershipswithanSNMPagentthatallowsyoutomonitor thehealthofthephysicalmachinewhereESXServerisrunningand ofvirtualmachinesrunningonit. SeeConfiguringtheESXServerAgentThroughtheVMware ManagementInterfaceonpage 227.

ConfigureyourSNMP agent.

Table 12includestasksfromtheVMwareManagementInterfaceforavirtualmachine user,whocreatesandmodifiesvirtualmachines. Table 1-2. VMware Management Interface TasksTask LogintotheVMware ManagementInterface anddownloadthe remoteconsole package. Description Usetheremoteconsoletopoweronandpoweroffyourvirtual machines,connectordisconnectdevices(includingtheCDdrive andnetworkadapter),andsetpreferences(includingmouse, keyboard,andhotkeybehaviorintheremoteconsolewindow). InstalltheremoteconsolefromtheStatusMonitorofthe managementinterface.Launchtheremoteconsolefromyour desktop(Windowsoperatingsystems)orfromthemanagement interface. Clicktheappropriatelinkfortheoperatingsystemonyour workstation. Learntousethe managementinterface. Afterlogin,thestartingpageofthemanagementinterfaceprovides asummaryofthevirtualmachinesonESXServer.Dependingon yourpermissions,youllbeabletoviewandmodifyvirtual machines.SeeUsingtheStatusMonitoronpage 84. Clickingonavirtualmachinenameopensthedetailspageforthat virtualmachine,whereyoucancheckitsCPU,memory,disk, network,hardware,options,andusersandevents.Familiarize yourselfwiththeinformationcontainedinthesepages.See ConfiguringaVirtualMachineonpage 94

34

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

Table 1-2. VMware Management Interface Tasks (Continued)Task Createavirtual machine. Description TheAddVirtualMachinewizardletsyouaddasmallnumberof devicestoavirtualmachine.Thismakestheinitialcreationprocess simpler.AdddeviceslaterbyclickingAddDeviceintheHardware tabforthevirtualmachine. IfyoupurchasedtheVMwareVirtualSMPforESXServerproduct, youcancreatedualvirtualCPUSMPvirtualmachines. Takeintoaccountthetypeofapplicationsyouplantorunonthis virtualmachinewhenmakingyourchoicesduringitscreation. SeeCreatingaNewVirtualMachineonpage 39. Addadditionaldisks, drives,network adapters,andSCSI devices. Installguestoperating systemandVMware Tools. ClickAddDeviceintheHardwaretabforthevirtualmachine. SeeConfiguringaVirtualMachinesHardwareonpage 102.

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

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

VMware, Inc.

35

Administration Guide

Table 1-3. Maintenance tasks for an Administrator (Continued)Task Usescriptsto schedule frequenttasks. Viewsystemlogs andreports throughthe management interface. Description FormoreinformationonVMwareScriptingAPIs,see http://www.vmware.com/support/developer. Asneeded,viewtheESXServerlogfilesforwarnings,serioussystem alertsandmessagesthroughthemanagementinterface. SeeViewingSystemLogsandReportsonpage 229.

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

36

VMware, Inc.

Chapter 1 Introduction to VMware ESX Server

Table 1-4. Performance-related tasks for an Administrator (Continued)Task Removeunnecessary programsorservices fromyourvirtual machines. Makesurethatthe serviceconsolehas enoughCPUandRAM. Makesurethereis sufficientswapspace foryourguest operatingsystem. Description Removeunnecessaryprogramsorservices,suchasCPUintensive screensavers,fromyourvirtualmachines. RunLinuxvirtualmachineswithouttheXWindowsystem,if possible. IfyouarerunningalotofvirtualmachinesonESXserver,andyou noticeadegradationinsystemperformance,increasetheCPU minimumfortheserviceconsole.SeeManagingtheService Consoleonpage 168 Forresourcemanagementpurposes,ESXServermayincreasethe memoryutilizationwithinaguestoperatingsystem.Ensurethat theguestoperatingsystemhassufficientswapspace. Addadditionalswapspaceintheguestoperatingsystem,equalto thedifferencebetweenthevirtualmachinesmaximumand minimummemorysizes. SeeAdmissionControlPolicyonpage 332. Removeunnecessary programsorservices fromyourservice console. UseSNMPtowatch memory,resource usage,andworkloads onESXServerandits virtualmachines. DonotruntheXWindowsysteminyourserviceconsole.

SeeChapter 7,UsingSNMPwithESXServer.

VMware, Inc.

37

Administration Guide

Table 15includessomegeneraltroubleshootinginformation.\ Table 1-5. TroubleshootingProblem Cantstartavirtual machine. Suggestions Checkpermissionsonthevirtualmachineconfigurationfileandon thevirtualdisk.See Setting Permissions for Owners of Virtual Machines onpage 139.

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

Cantconnecttothe VMwareManagement Interface.

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

Cantconnecttothe VMwareRemote Console.

38

VMware, Inc.

2

Creating and Configuring Virtual Machines

2

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

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

Creating a New Virtual MachineYoucancreatenewvirtualmachinesfromwithintheVMwareManagementInterface. Theprocesssetsupanewconfigurationforeachvirtualmachineyoucreatethisway. NOTE UseonlyASCIIcharactersintheentryfieldswhencreatingavirtualmachinewiththe managementinterface.Thevirtualmachinesdisplaynameandpathcannotcontain nonASCIIcharacters.Inaddition,donotcreatefilenamesanddirectoriesforvirtual machineswithspacecharacters.

VMware, Inc.

39

Administration Guide

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

2

Onthemanagementinterfaceloginpage,enteryourusernameandpasswordand clickLogin. TheStatusMonitorappears.

3

ClickAddVirtualMachine. TheAddVirtualMachinewizardstarts.

4

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

40

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

NOTE

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

5 6

ClickNext. IntheProcessorslist,choosethenumberofvirtualCPUsinyourvirtualmachine. Choose1or2virtualCPUs,buttheymustbelessthanorequaltothenumberof physicalCPUsonyourserver.

NOTE

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

NOTE

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

NOTE

8 9

ClickNext. Choosethetypeofvirtualdiskyouwanttoaddtothevirtualmachine.!

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

a b

VMware, Inc.

41

Administration Guide

c

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

d e

!

a b c d!

a b c d e

10

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

42

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

Installing a Guest Operating System and VMware ToolsThissectiondescribesthefollowing:! ! ! !

InstallingaGuestOperatingSysteminaVirtualMachineonpage 43 InstallingVMwareToolsintheGuestOperatingSystemonpage 44 StartingVMwareToolsAutomaticallyonpage 48 UsingtheVMwareGuestOperatingSystemServiceonpage 49

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

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

Administration Guide

NOTE

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

Installing a Guest Operating System on a Formatted Raw DiskIfyoutrytoinstallaguestoperatingsystemonaraworphysicaldiskthatwas formattedwithafilesystem,youmightseeaNooperatingsystemerrorwhenyou poweronthevirtualmachine.Thisoccursbecausethebootorderspecifiedinthe virtualmachinesBIOSdefaultstothefloppydisk,harddisk,andthentheCDROM drive.InsteadofbootingfromtheinstallationCDROM,thevirtualmachinetriesto bootfromtheharddisk. Toworkaroundthisissue,dooneofthefollowing:!

ChangethebootorderinBIOSsothevirtualmachinebootsfromtheCDROM drivebeforetryingtheharddisk.Whenthevirtualmachineboots,entertheBIOS andchangethebootorderontheBootmenu. Zerooutthefirst64KBoftherawdiskusingddorasimilarutility.Forexample, usingdd:# dd if=/dev/zero of=/dev/ count=64 bs=1024

!

Inthecommandabove,deviceisthedevicenameofthephysicaldisk.

Installing VMware Tools in the Guest Operating SystemThissectiondescribeshowtoinstallVMwareToolsandthenetworkdriverintheguest operatingsystem.Notethefollowing:!

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

!

SelecttheappropriateprocedurebelowforinstallingVMwareToolsinyourguest operatingsystem.

44

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

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

VMware, Inc.

45

Administration Guide

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

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

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

!

4 5

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

6

ClickCloseintheAdaptersdialogboxtocompletetheinstallation. WindowsletsyouconfiguretheInternetaddressforthecard.

46

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

IfyouareinstallingonavirtualmachinethatwascreatedwithVMware Workstationandusednetworking,useanaddressdifferentfromtheonethe originalnetworkconfigurationused(thataddressisassignedtothenow nonexistentvirtualAMDcard).OrchangetheaddressassignedtotheAMDcard. NOTE TheVMwareVirtualEthernetAdapterdriverrunscorrectlyonlyifyouhave ServicePack3orlaterinstalled.Ifyoudonothavethecorrectservicepack installed,youmightgetanerrormessagesuchas:System Process Driver Entry Point Not Found; The \SystemRoot\System32\drivers\vmxnet.sys device driver could not locate the entry point NdisGetFirstBufferFromPacket in driver NDIS.SYS.

7

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

8

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

3

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

4 5 6

Choosedirectoriesforthefiles. EnteradisplaysizeforthevirtualmachineandpressEnter. StartXandyourgraphicalenvironmentandlaunchtheVMwareTools backgroundapplication.vmware-toolbox &

VMware, Inc.

47

Administration Guide

NOTE

Ifyoucreatedthisvirtualmachineusingthevmxnetdriver,runnetconfig oranothernetworkconfigurationutilityinthevirtualmachinetosetupthe virtualnetworkadapter.

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

InthesystemconsoleforaNetWare6.5virtualmachine,type:LOAD CDDVD

!

InthesystemconsoleforaNetWare5.1virtualmachine,type:LOAD CD9660.NSS

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

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

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

Starting VMware Tools AutomaticallyYoumayfindithelpfultoconfigureyourguestoperatingsystemsothatVMwareTools startswhenyoustartX.ThestepsvarydependingonyourLinuxdistributionandthe desktopenvironmentyouarerunning.Checkyouroperatingsystemdocumentation forthestepstotake.

48

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

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

ThenexttimeyoustartX,VMwareToolsstartautomatically.

Using the VMware Guest Operating System ServiceWhenyouinstallVMwareToolsinavirtualmachine,theVMwareguestoperating systemserviceisoneoftheprimarycomponentsinstalled.Theguestservicecandothe following:!

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

!

!

!

!

Theguestservicestartswhenyoustarttheguestoperatingsystem. InaLinuxguest,theguestserviceiscalledvmware-guestd.Todisplayhelpaboutthe guestservice,includingalistofalloptions,usethefollowingcommand:/etc/vmware/vmware-guestd --help

InaWindowsguest,theguestserviceprogramfileiscalledVMwareService.exe.To displayhelp,rightclicktheVMwareToolsiconinthesystemtrayandchooseHelp.

VMware, Inc.

49

Administration Guide

Synchronizing the Time Between the Guest and Service ConsolesTheguestservicecansynchronizethedateandtimeintheguestoperatingsystemwith thetimeintheserviceconsoleonceeverysecond.IntheVMwareToolscontrolpanel, ontheOthertab(OptionsinaLinuxguest),selectTimesynchronizationbetweenthe virtualmachineandthehostoperatingsystem.

Figure 2-1. Options (Other) Tab Inaddition,theguestservicecansynchronizethedateandtimeintheguestwiththe serviceconsoleinresponsetovarioussystemevents,forexample,whenyouresume fromdisk.Disablethisoptionintheconfigurationfilebysetting:time.synchronize.resume.disk = FALSE

Shutting Down and Restarting a Virtual MachineESXServercansignaltheguestservicetoshutdownorrestartavirtualmachine.After theguestservicereceivesarequesttoshutdownorrestart,itsendsan acknowledgmentbacktoESXServer. YoucansendtheserequestsfromtheVMwareManagementInterfaceortheservice consolescommandline. Whetheritispossibletoshutdownorrestartavirtualmachinedependsonthestateof thevirtualmachine.

50

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

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

Shutting Down or Restarting a Virtual Machine from the Command LineYoucanshutdownandrestartavirtualmachinefromtheserviceconsolecommand lineusingthevmware-cmdutility. Thefollowingcommandsreturnyoutothecommandprompt,beforetheyfinish executing,althoughtheshutdownorrestartprocesscantakesometimetocomplete:vmware-cmd stop vmware-cmd reset

wherehard,soft,ortrysoftspecifiesthebehaviorofthepoweroperation .Ifisnotspecified,thedefaultbehaviorissoft.For moreinformation,seetheVMwareScriptingAPIUsersManual,availableat http://www.vmware.com/support/developer.

Executing Commands to Halt or Reboot a Virtual MachineInaLinuxguest,youcanhavetheguestserviceexecutespecificcommandswhenESX Serverasksittohaltorrebootthevirtualmachinesguestoperatingsystem.Ifyouuse nonstandardutilitiesorwanttodoadditionalactionsbeforeshuttingdownor rebootingtheguestoperatingsystem,overridethedefaultcommandstheguestservice

VMware, Inc.

51

Administration Guide

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

whereisthecommandtoexecutewhenESXServeraskstheguestservice tohalttheguestoperatingsystem./etc/vmware/vmware-guestd --reboot-command

whereisthecommandtoexecutewhenESXServeraskstheguestservice toreboottheguestoperatingsystem.

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

Example of Passing a String from the Service Console to the GuestIfyouusemultipleconfigurationfilesthatpointtothesamevirtualdisk,each configurationfilecancontainitsownuniquemachine.idline. .vmxcontains:scsi0:1.present = TRUE scsi0:1.name = my_common_virtual_hard_drive.vmdk scsi0:1.mode = persistent machine.id = the_id_for_my_first_vm

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

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

52

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

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

SeeSettingStartupandShutdownOptionsbyModifyingtheConfigurationFile Directly(AdvancedUsersOnly)onpage 126. 2 3 Launchavirtualmachineusingthisconfigurationfile. Retrievethemachine.idstringinthevirtualmachine. Inyoursystemstartupscript,beforethenetworkstartupsection,addthefollowing command:/etc/vmware/vmware-guestd --cmd 'machine.id.get'

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

Customizethisstartupscriptsoitusesthestringtheguestserviceretrievedduring startuptosetthevirtualmachinesnetworknametoRedHat62VManditsIP addressto148.30.16.24.Thisshouldbelocatedinthescriptbeforethenetwork servicesarestarted. Fromtheserviceconsole,youcanpreventtheserviceconsolefrompassingastringto theguestoperatingsystemthroughtheguestservice.Setthefollowinglineinyour virtualmachinesconfigurationfile:isolation.tools.machine.id.get.disable = TRUE

Using PXE with Virtual MachinesYoucanuseaprebootexecutionenvironment(knownasPXE)tobootavirtualmachine overanetwork. WhenyouusePXEwithavirtualmachine,youcan:!

Remotelyinstallaguestoperatingsystemoveranetworkwithouttheneedforthe operatingsysteminstallationmedia. Deployanimageofavirtualdisktothevirtualmachine.53

!

VMware, Inc.

Administration Guide

!

BootaLinuxvirtualmachineoverthenetworkandrunitdiskless.

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

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

!

!

!

!

!

54

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

NOTE

ESXServerdoesnotsupportinstallationofaWindowsXPguestoperatingsystem usingPXE.

Configuring a Virtual Machine to Use the LSI Logic SCSI AdapterESXServervirtualmachinescanusevirtualBusLogicandvirtualLSILogicSCSI adapters.Bydefault,virtualmachinesusetheBusLogicadapter.However,Windows Server2003virtualmachinesareconfiguredtousetheLSILogicadapterbydefault. YoucanaddtheLSILogicSCSIadaptertoanyvirtualmachinebymodifyingits configurationfile.ForanexistingvirtualmachineorforanewWindowsXPor Windows2000virtualmachine,furtherstepsareneededintheguestoperatingsystem. WindowsXPandWindows2000donotincludeadriverfortheLSILogicSCSIadapter, sotheseguestsusetheBusLogicadapterbydefault.TousetheLSILogicSCSIadapter withaWindowsXPorWindows2000virtualmachine,downloadthedriverfromthe DownloadCenterattheLSILogicWebsite.Gotohttp://www.lsilogic.com/andlook fortheLSI20320SCSIadapterdriverforyourguestoperatingsystem.Thefilesareina WinZiparchive. NOTE Linuxdistributionswithkernelsinthe2.4.18seriesorlaterincludeadriverthat supportstheLSILogicadapter.Ifyourguesthasanolderkernelandyouwanttouse theLSIadapterinsteadoftheBusLogicadapter,VMwarerecommendsthatyou upgradethekernelpackagestothelatestversionavailableforthedistribution.Youdo notneedtodownloadthedriverfromLSILogic.

Adding the Adapter to the Virtual Machines Configuration FileForbothWindowsandLinuxvirtualmachines,modifythevirtualmachines configurationfiletousetheLSILogicSCSIadapter.Foranewvirtualmachine, completethefollowingstepsbeforeyouinstalltheguestoperatingsystem. ForanexistingvirtualmachinewithwhichyouwanttousetheLSILogicadapter,shut downtheguestoperatingsystemandpoweroffthevirtualmachinebeforefollowing thesesteps. CAUTION EventhoughSuSELinux8.1includesthecorrectdriverforLSILogic, becauseofanerrorinaSuSELinuxprocess,theguestoperatingsystem mustfirstbeinstalledwiththeBusLogicdriver.AftertheSuSELinux8.1 guestoperatingsystemhasbeeninstalledandboots,shutdownthevirtual machineandcompletethestepsbelow.

VMware, Inc.

55

Administration Guide

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

IfyouareaddingtheLSILogicadaptertoanewvirtualmachinethatis configuredforaBusLogicadapter,switchtheoriginalBusLogicadaptertothe LSILogicadapterbychangingthisline:scsi.virtualDev = vmxbuslogic

toscsi.virtualDev = vmxlsilogic !

IfyouareaddingtheLSILogicadaptertoanexistingvirtualmachinethatis configuredforaBusLogicadapter,addtheLSILogicadapterwithnodevices aftertheBusLogicdevice.Forexample,ifyouhaveoneSCSIadapterinthe virtualmachine,theconfigurationfilelookssomethinglikethis:### ### SCSI devices ### # SCSI controller scsi0 scsi0.present = TRUE scsi0.virtualDev = vmxbuslogic scsi0:1.present = TRUE scsi0:1.name = vmhba0:6:0:1:win2k.vmdk scsi0:1.mode = persistent

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

3

Saveyourchanges,andclosetheconfigurationfile.

NowthattheLSILogicSCSIadapterhasbeenaddedtothevirtualmachines configuration,itwillberecognizedbytheguestoperatingsystem.Followthe appropriatestepsforeithertheWindowsorLinuxguestoperatingsystems:!

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

56

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

inConfiguringtheLSILogicSCSIAdapterinaLinuxGuestOperatingSystem onpage 58.!

FornewWindowsvirtualmachines,completethestepsinConfiguringtheLSI LogicSCSIAdapterinaWindowsGuestOperatingSystem,next.

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

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

!

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

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

!

3 4

AfteryouinstalltheLSILogicdriver,makesurethevirtualmachineboots completely. ChecktheguestoperatingsystemsDeviceManagertoensuretheLSILogic adapterappearsandisworking.!

IfyouareinstallingtheLSIadapterinanewguestoperatingsystem,youare finished. IfyouareswitchingfromaBusLogicadapterinanexistingvirtualmachine, continuewiththeremainingsteps.

!

VMware, Inc.

57

Administration Guide

Shut down and power off the virtual machine, then edit the configuration file. Switch the original BusLogic adapter to the LSI Logic adapter by changing this line: scsi0.virtualDev = vmxbuslogic

to:scsi0.virtualDev = vmxlsilogic

5

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

6

Saveyourchangestotheconfigurationfileandbootthevirtualmachine. Afterthevirtualmachineboots,verifyintheDeviceManagerthattheguestis usingtheLSILogicdriveronly.

NOTE

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

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

Ifnoerrorsappear,verifywithlsmodthatbothmptscsihandmptbaseareinstalled, andcontinue.Otherwise,youmustdeterminewhythedriverdidnotload.

58

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

ForanexistingLinuxvirtualmachinewiththemodifiedconfiguration,theguestneeds tobootwiththeLSILogicSCSIadapter,soittriestoloadthatdriverfromtheinitial RAMdisk(initrd)beforetherootpartitionismounted. To configure the LSI Logic SCSI Adapter in a Linux guest operating system 1 2 Edit/etc/modules.confandsetscsi_hostadaptertomptscsih. CreateanewinitialRAMdiskfortherunningkernel. mkinitrd --preload mptbase /boot/initrd--lsi.img Whereistheversionoftheguestskernel;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

toscsi0.virtualDev = vmxlsilogic

5

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

6

Saveyourchangestotheconfigurationfileandbootthevirtualmachineagain. Ifthevirtualmachinedoesnotboot,switchtheconfigurationbacktoBusLogicand bootwiththeoriginalconfiguration,andtroubleshootthefollowingissues:!

RAMdiskmightnothavebeencreatedcorrectly.Itmustpreloadmptbase andloadmptscsihasthemainSCSIdriver,whichyouspecifiedinStep 1. Verifythatbothoftheseactivitiesoccurred.

VMware, Inc.

59

Administration Guide

!

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

!

NOTE

Importing, Upgrading, and Exporting Virtual MachinesImporting,upgrading,andexportingvirtualmachinesinvolvesthefollowingtasks:! ! !

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

! !

Configuring a Virtual Machine to Use More than One Virtual ProcessorWhenyoucreateavirtualmachinewithESXServer2.5,youcancreateitwithoneor twovirtualprocessors.Toconfigureavirtualmachinewithmorethanonevirtual processor,youmustmeetthefollowingconditions:!

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

!

60

VMware, Inc.

Chapter 2 Creating and Configuring Virtual Machines

!

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

!

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

Windows Server 2003 Guest Operating SystemsWindowsServer2003upgradestheHALautomatically.Usethemanagementinterface toconfigureth

top related