Professional Documents
Culture Documents
Server VM Manual
Server VM Manual
You can find the most up-to-date technical documentation at: http://www.vmware.com/support/pubs 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
Chapter1IntroductionandSystemRequirements ...............1
VMwareServerOverview ...............................................1 FeaturesofVMwareServer ..............................................2 Supportfor32bitand64bitGuestOperatingSystems ...................2 TwoWayVirtualSMP(ExperimentalSupport) ..........................2 ConnecttoVMwareGSXVirtualMachinesandHosts....................2 UpgradeandUseGSXVirtualMachines ................................3 MoveExistingVirtualMachines.......................................3 CompatiblewithVMwareWorkstation5.xVirtualMachines..............3 ConfigureVirtualHardwareDevicestobeAutomaticallyDetected ........3 TakeandReverttoSnapshotsintheBackground ........................3 SupportforVMwareVirtualMachineImporter ..........................3 SupportforVirtualCenter.............................................4 APIsIncludedwithVMwareServer ......................................4 HostSystemRequirements ..............................................4 ServerHostHardware................................................4 WindowsHostOperatingSystemRequirements .........................6 LinuxHostOperatingSystemRequirements ............................7 RemoteClientRequirements.........................................10 VirtualMachineSpecifications ..........................................12 SupportedGuestOperatingSystems.....................................15 HardwareRequirementsfor64bitGuestOperatingSystems.............15 HardwareRequirementsfor32bitGuestOperatingSystems.............16 TechnicalSupportResources ...........................................19 SelfServiceSupport.................................................20 OnlineandTelephoneSupport.......................................20 SupportOfferings...................................................20 ReportingProblems .................................................20 LogFiles...........................................................21
Chapter2CreatingaNewVirtualMachine......................25
SettingUpaNewVirtualMachine ......................................25
VMware, Inc. iii
Chapter3UsingVMwareTools....................................39
AboutVMwareTools ..................................................39 InstallingVMwareTools...............................................41 InstallingVMwareToolsinaWindowsVirtualMachine .................41 InstallingVMwareToolsinaLinuxVirtualMachine ....................50 InstallingVMwareToolsinaNetWareVirtualMachine .................53 ExecutingScriptsWhentheVirtualMachinesPowerStateChanges.........55 ConfiguringVMwareTools ............................................56 ConfiguringVMwareToolsinaWindowsVirtualMachine ..............57 ConfiguringVMwareToolsinaLinux,FreeBSD,orSolarisVirtualMachine 60 ConfiguringVMwareToolsinaNetWareVirtualMachine ...............64 AbouttheVMwareToolsService........................................68 SynchronizingtheTimeintheGuestOSwiththeHostOS ...............69 ExecutingCommandsAfterYouPowerOfforResetaVirtualMachine....70 PassingaStringfromtheHostOStotheGuestOS......................70 PassingInformationBetweentheGuestOSandaVMwareAPIScript .....73
Chapter4RunningVirtualMachines .............................75
OverviewoftheVMwareServerConsoleWindow ........................75 UsingtheHomeTab ................................................77 UsingTabs.........................................................78 ConfiguringaVirtualMachine .......................................79 UsingtheVirtualMachineInventory ..................................79 DisplayingHints ...................................................80 CheckingtheStatusofVMwareTools.................................80 CreatingaScreenShotofaVirtualMachine ............................81 ConnectingtoVirtualMachinesandVMwareServerHosts .................82 ConnectingtoaVirtualMachinefromaWindowsHostorClient .........82 ConnectingtoaVirtualMachinefromaLinuxHostorClient.............84 ConnectingtoaVirtualMachinefromtheVMwareManagementInterface .85 ConnectingtoaDifferentVMwareServerHost .........................85 ConnectingtoVMwareGSXServerandOlderVirtualMachines..........86 ChangingthePowerStateofaVirtualMachine ...........................88
iv
VMware, Inc.
Contents
UsingPowerOptionsforVirtualMachines.............................88 SuspendingandResumingVirtualMachines ...........................91 ShuttingDownaVirtualMachine.....................................92 PoweringVirtualMachinesOnandOff ................................92 ControllingtheVirtualMachineDisplay.................................95 UsingFullScreenMode .............................................95 UsingQuickSwitchMode ...........................................95 TakingAdvantageofMultipleMonitors...............................96 FittingtheVMwareServerConsoleWindowtotheVirtualMachine .......97 FittingaWindowsGuestOSDisplaytotheConsoleWindow.............97 SimplifyingtheScreenDisplay .......................................98 RunningVirtualMachinesfromDVDsorCDROMDiscs ..................98 UsingPXEwithVirtualMachines......................................100 InstallingSoftwareinaVirtualMachine.................................101 Cutting,Copying,andPastingText.....................................102 UsingDevicesinaVirtualMachine.....................................102 Adding,Configuring,andRemovingDevicesinaVirtualMachine .......103 ConnectingandDisconnectingRemovableDevices ....................104 CommandReference .................................................104 StartupOptionsonaLinuxHost.....................................105 StartupOptionsonaWindowsHost .................................106 UsingKeyboardShortcuts ..........................................106
Chapter5PreservingtheStateofaVirtualMachine ...........109
SuspendingandResumingVirtualMachines ............................109 SettingtheSuspendedStateFileDirectory ............................110 TakingSnapshots ....................................................112 WhatIsCapturedbyaSnapshot? ....................................113 WaysofUsingSnapshots...........................................114 SnapshotsandaVirtualMachinesHardDisks ........................114 SnapshotsandOtherActivityintheVirtualMachine ...................115 SettingsforSnapshots ..............................................115 SnapshotActionsasBackgroundActivity .............................116 RemovingtheSnapshot ............................................116 SnapshotsandLegacyDiskModes ...................................117 SnapshotsandLegacyVirtualMachines..............................117
VMware, Inc.
Chapter6UsingDisksinaVirtualMachine.....................119
ConfiguringHardDiskStorageinaVirtualMachine......................119 DiskTypes:VirtualandPhysical.....................................120 AdditionalInformationaboutDisk,RedoLog,Snapshot,andLockFiles ..122 DefragmentingandShrinkingVirtualDisks ...........................125 ConfiguringOpticalandFloppyDrives.................................128 ConfiguringVirtualDVD/CDROMDrives ...........................128 ConfiguringVirtualFloppyDrives ...................................130 AddingDrivestoaVirtualMachine....................................131 AddingVirtualDiskstoaVirtualMachine ............................132 AddingPhysicalDiskstoaVirtualMachine ...........................134 AddingDVD/CDROMDrivestoaVirtualMachine....................137 AddingFloppyDrivestoaVirtualMachine ...........................138 UsingVMwareVirtualDiskManager...................................139 RunningtheVMwareVirtualDiskManagerUtility ....................140 ShrinkingVirtualDiskswithVMwareVirtualDiskManager............143 ExamplesUsingtheVMwareVirtualDiskManager ....................144 InstallinganOperatingSystemontoaPhysicalPartition ..................146 ConfiguringaWindowsHost .......................................147 ConfiguringaLinuxHost ...........................................149 DiskPerformanceinWindowsNTGuestsonMultiprocessorHosts.........150 ImprovingPerformance ............................................151
Chapter7Networking .............................................153
ComponentsoftheVirtualNetwork ....................................153 CommonNetworkingConfigurations...................................155 BridgedNetworking...............................................156 NetworkAddressTranslation(NAT) .................................157 HostOnlyNetworking .............................................158 CustomNetworkingConfigurations ....................................159 ChangingtheNetworkingConfiguration................................162 AddingandModifyingVirtualNetworkAdapters .....................162 ConfiguringBridgedNetworkingOptionsonaWindowsHost..........164 Enabling,Disabling,Adding,andRemovingHostVirtualAdapters ......168 AdvancedNetworkingTopics.........................................171 SelectingIPAddressesonaHostOnlyNetworkorNATConfiguration...172 AvoidingIPPacketLeakageinaHostOnlyNetwork...................174 MaintainingandChangingtheMACAddressofaVirtualMachine ......176
vi
VMware, Inc.
Contents
ControllingRoutingforaHostOnlyNetworkonaLinuxHost..........177 IssueswithHostOnlyNetworkingonaLinuxHost ....................178 SettingUpaSecondBridgedNetworkInterfaceonaLinuxHost .........179 ConfiguringBridgedNetworkingWhenUsingTeamedNetworkInterface Cards.........................................................180 SettingUpTwoSeparateHostOnlyNetworks ........................182 RoutingBetweenTwoHostOnlyNetworks ...........................185 UsingVirtualEthernetAdaptersinPromiscuousModeonaLinuxHost..189 UnderstandingNAT..................................................190 UsingNAT .......................................................191 TheHostComputerandtheNATNetwork ...........................191 DHCPontheNATNetwork ........................................191 DNSontheNATNetwork ..........................................191 ExternalAccessfromtheNATNetwork ..............................192 AdvancedNATConfiguration ......................................193 CustomNATandDHCPConfigurationonaWindowsHost ............196 ConsiderationsforUsingNAT ......................................198 UsingNATwithNetLogon .........................................198 SampleLinuxvmnetnat.confFile ....................................200 UsingSambaforFileSharingonaLinuxHost ...........................201
Chapter8ConfiguringDevices ...................................211
UsingParallelPorts ..................................................211 AboutParallelPorts................................................211 AddingaParallelPortinaVirtualMachine...........................212 ConfiguringaParallelPortonaLinuxHost...........................213 SpecialNotesfortheIomegaZipDrive...............................216 UsingSerialPorts....................................................216 UsingaSerialPortontheHostComputer .............................217 UsingaFileontheHostComputer...................................218 ConnectinganApplicationontheHosttoaVirtualMachine ............220 ConnectingTwoVirtualMachines...................................221 SpecialConfigurationOptionsforAdvancedUsers ....................223 Examples:DebuggingoveraVirtualSerialPort........................224 KeyboardMappingonaLinuxHost ....................................226 KeyboardMappingforaRemoteServer..............................226 KeyboardMappingSupportforthePC...............................227 VScanCodeTable .................................................229 UsingUSBDevicesinaVirtualMachine ................................232
VMware, Inc. vii
NotesonUSBSupport..............................................233 AddingaUSBController ...........................................233 ConnectingUSBDevices............................................234 UsingUSBwithaWindowsHost....................................235 ReplacingUSB2.0DriversonaWindows2000Host....................235 UsingUSBwithaLinuxHost .......................................235 USBDeviceControl ................................................236 USBDevices ......................................................237 DisconnectingUSBDevicesfromaVirtualMachine ....................237 ConnectingtoaGenericSCSIDevice ...................................237 DeviceSupportinGuestOperatingSystems...........................238 AddingaGenericSCSIDevicetoaVirtualMachine ....................239 GenericSCSIonaWindowsHostOperatingSystem ...................240 GenericSCSIonaLinuxHostOperatingSystem .......................243 UsingTwoWayVirtualSymmetricMultiprocessing(Experimental) ........244
Chapter9VideoandSound.......................................247
SettingScreenColorDepthinaVirtualMachine .........................247 ChangingScreenColorDepthontheHost ............................248 ChangingScreenColorDepthintheVirtualMachine...................248 UsingFullScreenModeonaLinuxHost................................248 ConfiguringSound ...................................................249 InstallingSoundDriversinaWindowsServer2003GuestOS............249 InstallingSoundDriversinWindows9xandNTGuestOS ..............249
Chapter10PerformanceTuningforVirtualMachines .........251
AllocatingMemorytoaVirtualMachine ................................251 ConfiguringVirtualMachineMemoryfromaConsole..................252 ImprovingPerformanceforGuestOperatingSystems.....................253 Windows2000,WindowsXPandWindowsServer2003GuestOSPerformance Tips ..........................................................253 Windows95andWindows98GuestOperatingSystemPerformanceTips .254 LinuxGuestOperatingSystemPerformanceTips......................256
viii
VMware, Inc.
ThischapterintroducesyoutoVMwareServerandcoversthefollowingtopics:
! ! ! ! ! !
! !
WithVMwareServer,youcan:
!
Provisionanewserverwithoutinvestinginmorehardwarebylocatingmultiple virtualmachinesonthesamehost.
VMware, Inc.
Formoreinformation,seeFeaturesofVMwareServeronpage 2.
VMware, Inc.
VMware, Inc.
Compatibleprocessorsinclude:
!
Intel:PentiumII,PentiumIII,Pentium4,PentiumMXeon,andEM64T.
VMware, Inc.
! ! !
Memory
YouneedenoughmemorytoruntheMicrosoftWindowsorLinuxhostoperating system,plusmemoryrequiredforeachguestoperatingsystemandapplicationsonthe hostandeachguest.Seeyourguestoperatingsystemandapplicationdocumentation fortheirmemoryrequirements. Memoryrequirementsinclude:
! !
Minimum:512MB Maximum:
!
Display
!
16bitdisplayadapterorhigher
VMware, Inc.
! !
64bithostcomputerscanrunthefollowingoperatingsystemsfor64bitextended systems:
!
MicrosoftWindowsServer2003Enterprise,Standard,andWebEditions,R2
VMware, Inc.
MicrosoftWindowsServer2003Enterprise,Standard,andWebEditions,Service Pack1
32bithostcomputerscanrunthefollowingoperatingsystems:
!
! !
VmPerlAPIrequiresPerl5.005xorhigher. VMwareManagementInterfacerequiresoneofthesebrowsers:
! ! ! !
NOTE
! ! ! ! ! !
VMware, Inc.
! ! ! ! ! ! !
32bithostcomputerscanrunthefollowingoperatingsystems:
! ! ! ! ! ! ! ! ! ! ! !
MandrivaLinux2006 MandrakeLinux10.1 MandrakeLinux9.0stock2.4.19 RedHatEnterpriseLinux4.0AS,ES,andWS,includingupdates1,2,and3 RedHatEnterpriseLinux4.0update4(experimentalsupport) RedHatEnterpriseLinux3.0,updates1,2,3,4,5,6,and7 RedHatEnterpriseLinux3.0update8(experimentalsupport) RedHatEnterpriseLinux2.1stock2.4.9e3 RedHatLinux9.0,stock2.4.208andupgrade2.4.2020.9 RedHatLinux8.0stock2.4.18 RedHatLinux7.3stock2.4.18 RedHatLinux7.2,stock2.4.710andupgrades2.4.97,2.4.913,2.4.921,and 2.4.931 SUSELinuxEnterpriseServer10(experimentalsupport) SUSELINUXEnterpriseServer9,includingSP1,SP2,andSP3 SUSELinuxEnterpriseServer8stock2.4.19 SUSELINUX9.3 SUSELINUX9.2 SUSELinux10 SUSELinux10.1
! ! ! ! ! ! !
VMware, Inc.
! ! ! ! ! !
SUSELINUX9.1stock2.6.452 SUSELINUX9.0stock2.4.2199 SUSELinux8.2stock2.4.20 SUSELinux7.3 UbuntuLinux5.04and5.10 Ubuntu6.06 AsnewLinuxkernelsanddistributionsarereleased,VMwaremodifiesand testsitsproductsforstabilityandreliabilityonthosehostplatforms.VMware makeseveryefforttoaddsupportfornewkernelsanddistributionsina timelymanner,butuntilakernelordistributionisaddedtothelist,itsuseis notsupported.LookfornewerprebuiltmodulesintheDownloadsectionof VMwareWebsite.Gotohttp://www.vmware.com/download.
NOTE
OtherLinuxhostoperatingsystemrequirementsinclude:
! !
! !
TheVMwareManagementInterfacerequiresoneofthesebrowsers:
! ! !
NOTE
VMware, Inc.
Programming API
VMwareServerincludessupportfortheProgrammingAPI(previouslycalledCAPI). Formoreinformation,gototheVMwareWebSiteat http://www.vmware.com/support/pubs/server_pubs
Hardware Requirements
! ! ! !
10
VMware, Inc.
NOTE
StandardLinuxinstallationisrequiredwithglibcversion2.1orhigherandoneof thefollowingkernels:
!
NOTE
! ! !
Firefox1.x Mozilla1.x
11
VMware, Inc.
NOTE
Programming API
VMwareServerincludessupportfortheProgrammingAPI.Formoreinformation,go totheVMwareWebsiteathttp://www.vmware.com/support/pubs/server_pubs.
Virtual Processor
!
Virtual Chipset
!
Intel440BXbasedmotherboardwithNS338SIOchipand82093AAIOAPIC
Virtual BIOS
! !
PhoenixBIOS4.0Release6withVESABIOS DMI/SMBIOScompliantforsystemmanagementagentsupport
12
VMware, Inc.
Virtual Memory
!
Virtual Graphics
!
VGAandSVGAsupport
! ! !
! !
SixvirtualPCIslots,tobedividedamongthevirtualSCSIcontrollers,virtual Ethernetcards,virtualdisplayadapter,andvirtualsoundadapter.
Uptotwo1.44MBfloppydevices. Physicaldrivesorfloppyimagefiles.
Uptofourserial(COM)ports.
VMware, Inc.
13
Outputtoserialports,Windowsfiles,Linuxfiles,ornamedpipes.
Uptothreebidirectionalparallel(LPT)ports. Outputtoparallelportsorhostoperatingsystemfiles.
Virtual Keyboard
!
104keyWindows95/98enhanced
PS/2mouse Serialtabletsupport
Virtual Networking
!
Soundoutputandinput.
14
VMware, Inc.
CreativeLabsSoundBlasterAudioPCIemulation.MIDIinput,gamecontrollers, andjoysticksarenotsupported.
VMware, Inc.
15
MandrivaLinux2006 RedHatEnterpriseLinux3.0,includingstock2.4.21,update2.4.2115,and updates6,and7 RedHatEnterpriseLinux3.0,update8(experimentalsupport) RedHatEnterpriseLinux4.0,includingupdate3 RedHatEnterpriseLinux4.0,update4(experimenetalsupport) SUSELinux9.1stock2.6.452 SUSELinux9.2,includingSP1 SUSELinux9.3 SUSELinux10 SUSELinux10.1 SUSELinuxEnterpriseServer9,includingSP1,SP2,andSP3 SUSELinuxEnterpriseServer10(experimentalsupport)
! ! ! ! ! ! ! ! ! !
FreeBSD
! !
FreeBSD5.3and5.4 FreeBSD6.0
Sun Solaris
!
Solaris10,includingupdate1andupdate2(experimentalsupport)
Ubuntu
! !
UbuntuLinux5.04and5.10 UbuntuLinux6.06(experimentalsupport)
MicrosoftWindowsServer2003,includingSmallBusiness,Standard,andWeb Editions
16
VMware, Inc.
! ! ! ! ! ! !
MicrosoftWindowsServer2003EnterpriseEdition,includingR2 MicrosoftWindowsXPProfessionalandHomeEditions,includingSP1andSP2 MicrosoftWindowsVista(experimentalsupport) MicrosoftWindows2000Professional,includingSP1,SP2,SP3,andSP4 MicrosoftWindows2000Server,includingSP1,SP2,SP3,andSP4 MicrosoftWindows2000AdvancedServer,SP3andSP4only MicrosoftWindowsNT4.0ServerServicePack6a,WindowsNTWorkstation4.0, includingServicePack6a,andWindowsNT4.0TerminalServerEditionService Pack6a MicrosoftWindowsMe MicrosoftWindows98,includingallservicepacks MicrosoftWindows98SE MicrosoftWindows95,includingSP1andallOSRreleases MicrosoftWindowsforWorkgroups3.11 MicrosoftWindows3.1
! ! ! ! ! !
Microsoft MS-DOS
!
MSDOS6.x
MandrivaLinux2006 MandrakeLinux10.1 MandrakeLinux9.2 MandrakeLinux9stock2.4.19 MandrakeLinux3.2stock2.4.186mdk RedHatEnterpriseLinux3.0AS,ES,andWS,includingupdates1,2,3,4,5,6, and7) RedHatEnterpriseLinux3.0update8(experimentalsupport) RedHatEnterpriseLinux4.0AS,ES,andWS,includingupdates1,2,and3 RedHatEnterpriseLinux4.0update4(experimentalsupport) RedHatEnterpriseLinux2.1AS,ES,andWS,includingstock2.4.9e3
17
! ! ! !
VMware, Inc.
! ! ! !
RedHatLinux9.0,stock2.4.208andupgrade2.4.2020.9 RedHatLinux8.0stock2.4.18 RedHatLinux7.3stock2.4.18 RedHatLinux7.2,stock2.4.710andupgrades2.4.97,2.4.913,2.4.921, and2.4.931 RedHatLinux7.1stock2.4.22andupgrade2.2.312 RedHatLinux7.0stock2.2.1622andupgrade2.2.1714 SUSELinuxEnterpriseServer10(experimentalsupport) SUSELinuxEnterpriseServer9,includingSP1,SP2,andSP3 SUSELinuxEnterpriseServer8stock2.4.19 SUSELinuxEnterpriseServer7stock2.4.7andpatch2 SUSELinux10 SUSELinux10.1 SUSELinux9.0stock2.4.2199 SUSELinux9.1stock2.6.452 SUSELinux9.2,includingSP1 SUSELinux9.3 SUSELinux8.2stock2.4.20 SUSELinux8.1stock2.4.19 SUSELinux8.0stock2.4.18 SUSELinux7.3stock2.4.10 NovellLinuxDesktop9,includingSP2 NovellOpenEnterpriseServer,includingSP1 TurbolinuxEnterpriseServer8.0 TurbolinuxServer7.0 TurbolinuxWorkstation8.0 TurbolinuxDesktop10
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
18
VMware, Inc.
Novell NetWare
! ! ! !
FreeBSD
! ! ! ! ! !
Sun Solaris
! !
Solaris9(experimentalsupport) Solaris10,includingupdate1andupdate2
Ubuntu
! !
UbuntuLinux5.04and5.10 UbuntuLinux6.06
VMware, Inc.
19
Self-Service Support
UsetheVMwareTechnologyNetworkforselfhelptoolsandtechnicalinformation:
! ! ! ! ! !
FormoreinformationabouttheVMwareTechnologyNetwork,goto http://www.vmtn.net.
Support Offerings
FindouthowVMwaressupportofferingscanhelpyoumeetyourbusinessneeds.Go tohttp://www.vmware.com/support/services.
Reporting Problems
IfyouhaveproblemswhilerunningVMwareServer,reportthemtotheVMware supportteam.Youmustregisteryourserialnumberandthenyoucanreportyour problemsbysubmittingasupportrequestat http://www.vmware.com/requestsupport. Thissectiondescribestheinformationneededtodiagnoseandreportproblems.This informationlargelycomesfromlogfiles.Therequiredlogfilesdependuponthe problemyouencounter. Youcansimplifytheprocessofcollectingtheneededinformationbyrunningthe supportscripttocollecttheappropriatelogfilesandsysteminformation.Followthe stepsthatapplytoyourhostcomputer.
20
VMware, Inc.
NOTE
To run the support script on a Windows host 1 2 Openacommandprompt. ChangetotheVMwareServerprogramdirectory. C: cd \Program Files\VMware\VMware Server Ifyoudidnotinstalltheprograminthedefaultdirectory,usetheappropriate driveletterandsubstitutetheappropriatepathinthecdcommandabove. 3 Runthesupportscript. cscript vm-support.vbs Afterthescriptruns,itdisplaysthenameofthedirectorywhereithasstoredits output. 4 UseafilecompressionutilitysuchasWinZiporPKZIPtozipthatdirectory,and includethezipfilewithyoursupportrequest.
To run the support script on a Linux host 1 2 Openaterminal. Runthesupportscriptastheuserwhoisrunningthevirtualmachineorasroot. vm-support Ifyoudonotrunthescriptasroot,thescriptdisplaysmessagesindicatingthatit cannotcollectsomeinformation.Thisisnormal.IftheVMwaresupportteam needsthatinformation,asupportrepresentativemayaskyoutorunthescript againasroot. Thescriptcreatesacompressed.tgzfileinthecurrentdirectory. 3 Includetheoutputfilewithyoursupportrequest.
Log Files
ThefollowinglogfilesaregeneratedbyVMwareServerandarecollectedbythe supportscriptasneeded.BecausetheVMwareServerConsoledoesnotincludea supportscript,youneedtosubmitasupportrequestat
VMware, Inc.
21
http://www.vmware.com/requestsupportforanyissuesyouencounteronaclientand includetheVMwareServerConsoleslogfileoritsinstallationlogfiles.
22
VMware, Inc.
Saveandclosetheconfigurationfile. ThelogisenabledonaLinuxhost.
4 5
VMware, Inc.
23
24
VMware, Inc.
C HAPTER 2
Thischapterdescribeshowtocreateanewvirtualmachineandcoversthefollowing topics:
! !
SettingUpaNewVirtualMachineonpage 25 InstallingaGuestOperatingSystemonpage 37
NOTE
! !
VMware, Inc.
25
<vmname>.vmdk.REDO_xxxxxxAredologfilecreatedautomaticallywhena virtualmachineisinindependentnonpersistentmode.Thisfilestoreschanges madetoavirtualdiskwhilethevirtualmachineisrunning.Morethanonesuch filemightexist.Thexxxxxxindicatesauniquesuffixaddedautomaticallyby VMwareServertoavoidduplicatefilenames. <vmname>.vmssThesuspendedstatefile,whichstoresthestateofasuspended virtualmachine. NOTE SomeearlierVMwareproductsusedtheextension.stdforsuspended statefiles.
<vmname>.vmsnThesnapshotstatefile,whichstorestherunningstateofavirtual machineatthetimeyoutakeasnapshotofit.
Theremightalsobeotherfiles,someofwhicharepresentonlywhileavirtualmachine isrunning.
Virtual Disks
Avirtualdiskismadeupofoneormore.vmdkfiles.Ifyouspecifytosplitthevirtual diskinto2GBfiles,thenumberof.vmdkfilesdependsonthesizeofthevirtualdisk. Bydefault,allvirtualdiskspaceispreallocatedwhenyoucreatethevirtualdisk.Make sureyouhaveenoughdiskspaceonthehostbeforeyoucreateapreallocateddisk. Ifyoudonotallocatealldiskspacewhenyoucreatethevirtualdisk,the.vmdkfiles growinsizeasdataisaddedtothevirtualdisk.Almostallofa.vmdkfilescontentis thevirtualmachinesdata,withasmallportionallottedtovirtualmachineoverhead. Ifthevirtualmachineisconnecteddirectlytoaphysicaldisk,ratherthantoavirtual disk,the.vmdkfilestoresinformationaboutthepartitionsthevirtualmachineis allowedtoaccess. NOTE EarlierVMwareproductsusedtheextension.dskforvirtualdiskfiles.
26
VMware, Inc.
To create a new virtual machine 1 LaunchtheVMwareServerConsole. Windowshosts:SeeConnectingtoaVirtualMachinefromaWindowsHostor Clientonpage 82. Linuxhosts:SeeConnectingtoaVirtualMachinefromaLinuxHostorClient onpage 84. 2 StarttheNewVirtualMachineWizard.ChooseFile>New>VirtualMachineor clicktheNewVirtualMachineiconontheconsoleHometab.
VMware, Inc.
27
Selectthemethodtouseforconfiguringyourvirtualmachine.
IfyouselectTypical,youcanspecifyoracceptdefaultsonlyfor:
! ! ! ! ! !
SelectCustomto:
!
Setthenumberofprocessors,whichisrequiredtoenabletwowayVirtual SMP(experimentalsupport). Allocateanamountofmemorydifferentfromthedefault. ChoosebetweentheLSILogicandBusLogictypesofSCSIadapters.(An ATAPIIDEadapterisalwaysinstalled.) Letotherusersaccessthisvirtualmachine. HavethevirtualmachineautomaticallypoweronoroffwhentheVMware ServerWindowshoststartsuporshutsdown. Specifytheuseraccountthevirtualmachineuseswhenrunning. Useanexistingvirtualdiskoruseaphysicaldiskratherthanavirtualdisk(for advancedusers). UseanIDEvirtualdiskforaguestoperatingsystemthatwouldotherwise haveaSCSIvirtualdiskcreatedbydefaultandviceversa.
! !
! !
! !
28
VMware, Inc.
! ! !
NOTE
VMwareServerperformsaninternalcheck.IfthehostCPUisnotasupported 64bitprocessor,VMwareServerdisplaysanerrormessagethatindicatesthe hardwareonyourhostmachineisincompatiblewith64bitguestoperating systems.Youcan,however,continuetopoweronthevirtualmachine. VMwareServerprovidesastandaloneutilitytousewithoutVMwareServerthat performsthesamecheckanddetermineswhetheryourCPUissupportedfor VMwareServervirtualmachineswith64bitguestoperatingsystems.Youcan downloadthe64bitprocessorcheckutilityfromtheVMwareWebsiteat www.vmware.com/download. Inthisexample,theremainingstepsassumeyouplantoinstallaWindowsServer 2003Enterpriseguestoperatingsystem.Youcanfinddetailedinstallationnotesfor thisandotherguestoperatingsystemsintheVMwareGuestOperatingSystem InstallationGuide,availablefromtheVMwareWebsiteat www.vmware.com/support/guestnotes/doc/index.html.
VMware, Inc.
29
Iftheoperatingsystemyouareusingisnotlisted,selectOtherasboththeguest operatingsystemandversion.
Selectanameanddirectoryforthevirtualmachine.
30
VMware, Inc.
Specifywhetherthisvirtualmachineshouldbeprivate.
ThisuserThevirtualmachinerunsastheuseraccountspecifiedhere.The passwordisnotvalidateduntilyoupoweronthevirtualmachine.Youcan
31
VMware, Inc.
Thefollowingareconsideredtohavetwologicalprocessors:
! ! !
32
VMware, Inc.
TheNewVirtualMachineWizardprovidesadefaultvaluebasedonyourguest operatingsystemselection,aswellastherecommendedrangeandthetotal amountofmemoryallrunningvirtualmachinescanuse. TheWizardalsoindicatestheminimumamountofmemoryrecommendedbythe manufacturerandtheVMwareServerrecommendedmaximumvalueforbest performanceofyourvirtualmachineonthisserverhost. CAUTION Youcannotallocatemorethan2000MBofmemorytoavirtual machineifitisstoredonafilesystemthatcannotsupportfileslarger than2GB,suchasFAT16.Youwillnotbeabletopoweronsucha virtualmachine.Further,youcannotallocatemorethan2000MBof memorytoavirtualmachineifitisstoredonaFAT32filesystem, eventhoughitdoessupportfilesupto4GBinsize.
10
Configurethenetworkingcapabilitiesofthevirtualmachine.
IfyourhostcomputerisonanetworkandyouhaveaseparateIPaddressforyour virtualmachine(orcangetoneautomaticallyfromaDHCPserver),selectUse bridgednetworking. IfyoudonothaveaseparateIPaddressforyourvirtualmachinebutyouwantto beabletoconnecttotheInternet,selectUsenetworkaddresstranslation(NAT). NATisusefulifyouhaveawirelessnetworkadapteronaLinuxhost(asbridged networkingonwirelessnetworkadaptersissupportedonlyonWindowshosts).It alsoallowsforthesharingoffilesbetweenthevirtualmachineandthehost operatingsystem. Toenableyourvirtualmachinetouseavirtualnetworklimitedtothehostandthe virtualmachinesonthehostusingonlythehostonlynetworkadapter,selectUse hostonlynetworking. IfyouselectedTypicalasyourconfigurationpath,gotostep14.
VMware, Inc.
33
YoucannotchangetheSCSIadaptertypeafteryoucreatethevirtualmachine. 12 Selectthedisktousewiththevirtualmachine.
Touseanew,unformattedvirtualdisk,selectCreateanewvirtualdisk. Touseanexistingvirtualdiskwiththisvirtualmachine,selectUseanexisting virtualdisk.Browsetoselectthedisk. Toinstalltheguestoperatingsystemonaphysical(alsocalledraw)IDEdisk,select Useaphysicaldisk.TouseaphysicalSCSIdisk,addittothevirtualmachinelater withthevirtualmachinesettingseditor(VM>Settings).Bootingfromaphysical SCSIdiskisnotsupported. ToinstallyourguestoperatingsystemdirectlyonanexistingIDEdiskpartition, readthereferencenoteInstallinganOperatingSystemontoaPhysicalPartition onpage 146.
34
VMware, Inc.
CAUTION
VMwarerecommendsthatonlyadvancedusersusephysicaldisks withvirtualmachines.
13
SelectwhetheryouwantthevirtualdisktobeanIDEdiskoraSCSIdisk.
VMware, Inc.
35
15
Specifythenameandlocationofthevirtualdisksfiles.
Tospecifywhichvirtualdevicenodeshouldbeusedbyyourvirtualdiskortouse independentdiskmode,clickAdvanced.
CAUTION
Theindependentdiskoptionshouldbeusedonlybyadvancedusers whoneeditforspecialpurposeconfigurations.
Youhavethefollowingoptionsforanindependentdisk:
! !
16
ClickFinish.VMwareServercreatesthevirtualmachine.
36
VMware, Inc.
VMware, Inc.
37
To install Windows Server 2003 as a guest OS 1 2 3 4 InserttheWindowsServer2003CDintheCDROMdrive. PoweronthevirtualmachinetostartinstallingWindowsServer2003. IfyouenabledthevirtualmachinesEthernetadapter,anAMDPCNETFamily EthernetAdapterisdetectedandsetupautomatically. Followtheinstallationstepsasyouwouldforaphysicalcomputer.
38
VMware, Inc.
C HAPTER 3
ThischapterdescribeshowtoinstallandrunVMwareToolsandcoversthefollowing topics:
! ! ! ! !
TheVMwareToolsservice(orvmware-guestdonLinuxguests). AsetofVMwaredevicedrivers,includinganSVGAdisplaydriver,thevmxnet networkingdriverforsomeguestoperatingsystems,theBusLogicSCSIdriverfor someguestoperatingsystems,andtheVMwaremousedriver. TheVMwareToolscontrolpanelthatletsyoumodifysettings,shrinkvirtualdisks, andconnectanddisconnectvirtualdevices. Asetofscriptsthathelpautomateguestoperatingsystemoperations.Thescripts runwhenthevirtualmachinespowerstatechanges. Acomponentthatsupportscopyingandpastingtextbetweentheguestandhost operatingsystems.
synchronizingthetimeintheguestoperatingsystemwiththetimeinthehost operatingsystem.Theservicestartsautomaticallywhentheguestoperatingsystem boots.Formoreinformation,seeAbouttheVMwareToolsServiceonpage 68. WiththeVMwareSVGAdriverinstalled,VMwareServersupportsupto32bit displaysandhighdisplayresolution,withsignificantlyfasteroverallgraphics performance.IfyourunaguestoperatingsystemwithoutVMwareTools,thegraphics environmentwithinthevirtualmachineislimitedtoVGAmodegraphics(640x480,16 color)anddisplayperformancemightbeunsatisfactory. TheVMwarevirtualSCSIdriverisaBusLogicdriver.Somerecentguestoperating systemscontainLSILogicdriversandcantakeadvantageofthevirtualLSILogic adapterforbetterdeviceperformance. Thevmxnetnetworkingdriverimprovesnetworkperformance.Thisdriveris automaticallyinstalledwhenyouinstallVMwareTools. TheVMwaremousedriverimprovesmouseperformanceinsomeguestoperating systems.YoumustusetheVMwaremousedriverwiththirdpartytoolslike MicrosoftsTerminalServices. InaWindowsguest,youcanaccesstheVMwareToolscontrolpanelthroughthe WindowsControlPanel(chooseStart>Settings>ControlPanel>VMwareTools)or throughtheVMwareToolsicon,whichappearsbydefaultinthesystemtray.
InaNetWare5.1orhigherguestoperatingsystem,accesstheVMwareToolscontrol panelbychoosingNovell>Settings>VMwareToolsforNetWare. InaNetWare4.2guestoperatingsystem,useVMwareToolscommandsinthesystem console.TheVMwareToolsprogramiscalledvmwtool.Forinformationaboutusing thiscommand,seeConfiguringVMwareToolsforNetWareGuestsintheSystem Consoleonpage 66. Withsomewindowmanagers,youcanplacethecommandtostartVMwareToolsina startupconfigurationsoVMwareToolsstartsautomaticallywhenyoustartyour graphicalenvironment.Consultyourwindowmanagersdocumentationfordetails.
40 VMware, Inc.
TheinstallersforVMwareToolsforWindows,Linux,FreeBSD,Solaris,andNetWare guestoperatingsystemsarebuiltintoVMwareServerasISOimagefiles.(AnISO imagefilelookslikeaCDROMtoyourguestoperatingsystemandevenappearsasa CDROMinWindowsExplorer.YoudonotuseanactualCDROMtoinstallVMware Tools,andyoudonotneedtodownloadtheCDROMimageorburnaphysical CDROMofthisimagefile.) WhenyouinstallVMwareTools,VMwareServertemporarilyconnectsthevirtual machinesfirstvirtualCDROMdrivetotheISOimagefilethatcontainstheVMware Toolsinstallerforyourguestoperatingsystem,andbeginstheinstallationprocess.(To canceltheinstaller,chooseVM>CancelVMwareToolsInstalltoreturnyourvirtual machinesCDROMdrivetoitsoriginalconfiguration.)
NOTE
ClickYestolaunchtheInstallShieldwizard. Ifautorunisnotenabled,thedialogboxdoesnotappear.Ifitdoesntappear,run theVMwareToolsinstaller.ClickStart>RunandenterD:\setup.exe NOTE YoudonotuseanactualCDROMtoinstallVMwareTools.TheVMware ServersoftwarecontainsanISOimagethatlookslikeaCDROMtoyour guestoperatingsystemandevenappearsasaCDROMinWindows Explorer.ThisimagecontainsallthefilesneededtoinstallVMwareTools inyourguestoperatingsystem.WhenyoufinishinstallingVMware Tools,thisimagefilenolongerappearsinyourCDROMdrive.
42
VMware, Inc.
TheVMwareToolsinstallationwizardstarts.
ClickNexttocontinuewiththeVMwareToolsinstallationwizard.TheSetupType dialogboxappears.
Chooseatypical,complete,orcustominstallation.Theinstallerusesthisselection eachtimeyouupgradeVMwareTools. TypicalInstallation Atypicalinstallationinstallstheutilitiestoenhancetheperformanceoftheguest operatingsystem,andasetofdriversspecifictoVMwareServervirtualmachines theVMwareSVGAdriver,theVMwareMousedriver,theVMwareSCSIdriver, andtheVMwarevmxnetnetworkingdriver(thevlancedriverisinstalledwhen youcreatethevirtualmachine).Youdonotneedtoconfigureyourvirtualmachine tousethe vmxnet networkingdriver.Thevmxnetdriverisactivatedwhenreboot yourvirtualmachineafteryouinstallVMwareTools. IfyoudonotplantousethisvirtualmachinewithotherVMwareproducts,such asVMwareWorkstation,usethetypicalinstallation.Tochoosethetypical installation,selectTypical,clickNext,andgotostep7. CompleteInstallation Acompleteinstallationinstallstheutilitiestoenhancetheperformanceofthe guestoperatingsystem,andallthedriverstheVMwareSVGAdriver,the
VMware, Inc.
43
VMwareMousedriver,theVMwareSCSIdriver,theVMwarevmxnetnetworking driver(thevlancedriverisinstalledautomaticallywhenyoucreatedthevirtual machine)andthesharedfoldersdriver(forusebyvirtualmachineswithVMware Workstation). IfyouplanonusingthisvirtualmachinewithotherVMwareproducts,usethe completeinstallation.Tochoosethecompleteinstallation,selectComplete,click Next,thengotostep7. CustomInstallation Acustominstallationletsyoupickandchoosewhichcomponentstoinstall.You canalwaysruntheinstalleragainatalaterdatetoinstallcomponentsyoudidnot installthefirsttime,orremovecomponentsyounolongerwant.SelectCustom andclickNext.TheCustomSetupscreenappears.
IntheCustomSetupscreen,pickandchoosethecomponentstoinstall.Clickthe arrowtotheleftofthecomponentyoudonotwanttoinstallandselectthe appropriateoptionfromthemenu. Ifyouneedtodeterminehowmuchfreespaceisontheguest,clickSpace.Thisis usefulifyouarechoosingacustominstallationduetolimiteddiskspaceonyour guest. IfyouwanttoinstallalltheVMwareToolscomponentsinadirectoryotherthan thedefault,clickBrowseandselectthedirectory.Ifthedirectorydoesnotexist,the installercreatesitforyou. Whenyouarereadytocontinue,clickNext. 7 Tochangeanysettingsorinformationyouprovided,clickBackuntilyoureachthe dialogboxcontainingtheinformationyouwanttochange.
44
VMware, Inc.
ClickInstallonceyouarereadytobegintheinstallation.Theinstallerbegins copyingfilestoyourhost.
Aftertheinstallerfinishesinstallingthefiles,clickFinish.
VMware, Inc.
45
46
VMware, Inc.
3 4
VMware, Inc.
47
ToinstallVMwareToolssilentlyinaWindowsguest,makesurethevirtualmachines CDROMdriveisconnectedtotheVMwareToolsISOimage(windows.iso,locatedin thedirectorywhereyouinstalledVMwareServer)andconfiguredtoconnectwhenyou poweronthevirtualmachine.Runthesilentinstallationontheextractedinstallation packages.Atthecommandprompt,ononeline,type: msiexec -i "D:\VMware Tools.msi" ADDLOCAL=ALL /qn TheinstallationcommandcanbecustomizedusingstandardMicrosoftWindows Installerinstallationoptions. TheADDLOCALoptiondefaultstoinstallallVMwareToolscomponents.Youcan customizetheinstallationusingacombinationoftheADDLOCALandREMOVEoptions.For informationaboutthefeaturesofVMwareTools,seeAboutVMwareToolson page 39.Youcanincludeorexcludethefollowingfeatures:
!
SVGAtheVMwareSVGAdriver.Excludingthisfeaturelimitsthedisplay capabilitiesofyourvirtualmachine. MousetheVMwaremousedriver.Excludingthisfeaturedecreasesmouse performanceinyourvirtualmachine. BuslogictheVMwareBusLogicdriver.Excludingthisfeaturepreventsyou fromusingthisdriverinyourvirtualmachine.Ifyourvirtualmachineis configuredtousetheLSILogicdriver,thenyoumaywanttoremovethis feature. VMXNettheVMwarevmxnetnetworkingdriver.Excludingthisfeature preventsyoufromusingthisdriverinyourvirtualmachine. MemCtltheVMwarememorycontroldriver.Thisfeatureisrecommended ifyouplanonusingthisvirtualmachinewithVMwareESXServer.Excluding thisfeaturehindersthememorymanagementcapabilitiesofthevirtual machinerunningonanVMwareESXServersystem.
Toincludeafeature,useitwiththeADDLOCALoption. Toexcludeafeature,useitwiththeREMOVEoption. Forexample,toinstalleverythingbutthesharedfoldersdriver,typethefollowingon thecommandline: msiexec -i "D:\VMware Tools.msi" ADDLOCAL=ALL REMOVE=Hgfs /qn
VMware, Inc. 49
TheSVGA,Mouse,BusLogic,vmxnetandMemCtlfeaturesarechildrenoftheDrivers feature.Thus,onthecommandline,ifyoutype: msiexec -i "D:\VMware Tools.msi" ADDLOCAL=ALL REMOVE=Drivers /qn youalsoskipinstallationoftheSVGA,Mouse,BusLogic,vmxnetandMemCtldrivers. ThedriversinstalledbyVMwareToolsarenotsignedbyMicrosoft.Whenyouinstall VMwareTools,youareaskedtoconfirmtheinstallationofthesedrivers.Youcan preventthesemessagesfromappearingintheguestoperatingsystemduring installationbycompletingthefollowingsteps. Topreventdriverinstallationmessages: 1 2 3 Onthevirtualmachinesdesktop,rightclickMyComputer,andchoose Properties. ClicktheHardwaretab,andclickDriverSigning.TheDriverSigningdialogbox appears. ClickIgnore,andclickOKtwice.
50
VMware, Inc.
NOTE
UsingtheTarInstalleronLinuxGuests:SomeLinuxdistributionsusedifferent devicenamesororganizethe/devdirectorydifferently.IfyourCDROMdriveis not/dev/cdromorifthemountpointforaCDROMisnot/mnt/cdrom,modifythe followingcommandstoreflecttheconventionsusedbyyourdistribution. Also,someLinuxdistributionsautomaticallymountCDROMs.Ifyour distributionusesautomounting,donotusethemountandumountcommands below.YoustillmustuntartheVMwareToolsinstallerto/tmp. mount /dev/cdrom /mnt/cdrom cd /tmp tar zxf /mnt/cdrom/vmware-linux-tools.tar.gz umount /mnt/cdrom Gotostep4. UsingtheRPMInstalleronLinuxGuests:SomeLinuxdistributionsusedifferent devicenamesororganizethe/devdirectorydifferently.IfyourCDROMdriveis not/dev/cdromorifthemountpointforaCDROMisnot/mnt/cdrom,modifythe followingcommandstoreflecttheconventionsusedbyyourdistribution. Also,someLinuxdistributionsautomaticallymountCDROMs.Ifyour distributionusesautomounting,donotusethemountandumountcommands below. mount /dev/cdrom /mnt/cdrom cp /mnt/cdrom/vmware-linux-tools-<xxxxx>.i386.rpm /tmp rpm -Uhv /tmp/vmware-linux-tools-<xxxxx>.i386.rpm umount /mnt/cdrom where<xxxxx>isthebuildnumberoftheVMwareServerrelease. Gotostep6. SolarisGuests:TheSolarisvolumemanagervoldmountstheCDROMunder /cdrom/vmwaretools.IftheCDROMisnotmounted,restartthevolumemanager usingthefollowingcommands: /etc/init.d/volmgt stop /etc/init.d/volmgt start
VMware, Inc. 51
AftertheCDROMismounted,usethefollowingcommandstoextractVMware Tools. cd /tmp gunzip -c /cdrom/vmwaretools/vmware-solaris-tools.tar.gz | tar xf Gotostep4. FreeBSDGuests:SomeFreeBSDdistributionsautomaticallymountCDROMs.If yourdistributionusesautomounting,donotusethemountandumountcommands below.YoustillmustuntartheVMwareToolsinstallerto/tmp. mount /cdrom cd /tmp tar zxf /cdrom/vmware-freebsd-tools.tar.gz umount /cdrom 4 RuntheVMwareToolsinstaller. cd vmware-tools-distrib ./vmware-install.pl 5 6 7 8 Answerthequestionsaboutdefaultdirectories. Runtheconfigurationprogram. vmware-config-tools.pl Tochangeyourvirtualmachinesdisplayresolution,answeryes,andenterthe numberthatcorrespondstothedesiredresolution. Logoffoftherootaccount. exit 9 10 StartXandyourgraphicalenvironment.IfyouinstalledVMwareToolsinanX windowssession,restartXwindows. InanXterminal,launchtheVMwareToolsbackgroundapplication. vmware-toolbox & YoucanrunVMwareToolsasrootorasanormaluser.Toshrinkvirtualdisksorto changeanyVMwareToolsscripts,youmustrunVMwareToolsasroot(su -). NOTE Alwaysrunvmware-toolboxintheguestoperatingsystemtoensureyouhave accesstoallVMwareToolsfeatures,suchascopyandpasteandmouse ungrabforoperatingsystemsforwhichXdisplaydriverisnotavailable.
52
VMware, Inc.
ThenexttimeyoustartX,VMwareToolsalsostarts.
Whenthedriverfinishesloading,youcanbegininstallingVMwareTools.Inthe systemconsole,type vmwtools:\setup.ncf Whentheinstallationfinishes,themessageVMware Tools for NetWare are now runningappearsintheLoggerScreen(NetWare6.5andNetWare6.0guests)orthe ConsoleScreen(NetWare5.1guests).
54
4 5
MounttheVMwareToolsCDROMimage.Inthesystemconsole,type cd mount vmwtools StartinstallingVMwareTools.Inthesystemconsole,type vmwtools:\setup Whentheinstallationfinishes,themessageVMware Tools for NetWare are now runningappearsintheConsoleScreen.
6 7
VMware, Inc.
55
thevirtualmachine,whilethedefaultscriptexecutedwhenyouresumeavirtual machinerenewstheIPaddressofthevirtualmachine(thisaffectsonlyvirtual machinesconfiguredtouseDHCP).OnaLinuxhost,thedefaultscriptexecutedwhen yoususpendavirtualmachinestopsnetworkingforthevirtualmachine,whilethe defaultscriptexecutedwhenyouresumeavirtualmachinestartsnetworkingforthe virtualmachine. Inaddition,youcancreateyourownscripts.Thescriptsyoucanrunmustbebatchfiles forWindowshosts,butcanbeanyexecutableformat(suchasshellorPerlscripts)for Linuxhosts.Youshouldhaveathoroughfamiliaritywiththesetypesofscriptsbefore youmodifythedefaultscriptsorcreateyourown. Ifyoucreateyourownscripts,youmustassociateeachscriptwithitsparticularpower operation.Formoreinformation,seeChoosingScriptsforVMwareToolstoRun DuringPowerStateChangesonpage 58forWindowsguestsandChoosingScripts forVMwareToolstoRunDuringPowerStateChangesonpage 61forLinuxguests. Forscriptsandtheirassociatedpoweroperationstowork,thefollowingconditions mustbemet:
! !
TheVMwareToolsservicemustberunninginthevirtualmachine. TheversionofVMwareToolsmustbeupdatedtothecurrentversion.Ifyouare usingavirtualmachinecreatedwithanotherVMwareproduct,suchasVMware GSXServer3,updateVMwareToolstotheversionincludedinthisrelease. Dependingontheoperationthescriptperforms,thevirtualmachinemusthavea virtualnetworkadapterconnected,orthepoweroperationfails. WhenyoureinstallVMwareToolsafteryouupgradetheVMwareServer software,anychangesyoumadetothedefaultscriptsareoverwritten. Anyscriptsyoucreatedonyourownremainuntouched,butdonot benefitfromanyunderlyingchangesthatenhancethedefaultscripts.
CAUTION
56
VMware, Inc.
IftheVMwareToolsicondoesnotappearinthesystemtray,gotoStart>Control Panel>VMwareTools.
ShowVMwareToolsinthetaskbarthisoptiondisplaystheVMwareToolsicon intheWindowstaskbar.
VMware, Inc.
57
Choosing Scripts for VMware Tools to Run During Power State Changes
ThroughVMwareTools,youcanrunscriptsthatexecutewhenyoupoweron,power off,suspend,orresumethevirtualmachine.Formoreinformation,seeExecuting ScriptsWhentheVirtualMachinesPowerStateChangesonpage 55. NOTE ScriptscannotberuninWindows95guestoperatingsystems.Scriptsin WindowsNTandWindowsMeguestoperatingsystemsdonotreleaseand renewtheIPaddress.
Windowshosts:IfthevirtualmachineisconfiguredtouseDHCP,thescriptexecuted whenyoususpendavirtualmachinereleasestheIPaddressofthevirtualmachine.The scriptexecutedwhenyouresumeavirtualmachinerenewstheIPaddressofthevirtual machine. Linux,FreeBSD,andSolarishosts:Thescriptexecutedwhenyoususpendavirtual machinestopsnetworkingforthevirtualmachine.Thescriptexecutedwhenyou resumeavirtualmachinestartsnetworkingforthevirtualmachine. Foreachpowerstate,youcanusethedefaultscriptoryoucansubstituteascriptyou created.Inaddition,youcantestascriptordisabletherunningofascript.Complete thefollowingsteps. 1 2 IntheScriptEventlist,selectthepoweroperationwithwhichtoassociatethe script. Dooneofthefollowing:
!
! !
ClickApplytosaveyoursettings.
VMware, Inc.
59
Inadditiontocopyrightinformation,thistabcontainsthefollowinginformation:
!
60
VMware, Inc.
ToopentheVMwareToolscontrolpanel,atacommandprompt,type: vmware-toolbox & YoucanrunVMwareToolsasrootorasanormaluser.Toshrinkvirtualdisks,you shouldrunVMwareToolsasroot(su -). NOTE Alwaysrunvmware-toolboxintheguestoperatingsystemtoensureyouhave accesstoallVMwareToolsfeatures,suchascopyandpasteandmouse ungrabforoperatingsystemsforwhichXdisplaydriverisnotavailable.
Choosing Scripts for VMware Tools to Run During Power State Changes
ThroughVMwareTools,youcanrunscriptsthatexecutewhenyoupoweron,power off,suspend,orresumethevirtualmachine.Formoreinformation,seeExecuting ScriptsWhentheVirtualMachinesPowerStateChangesonpage 55. AdefaultscriptforeachpoweroperationisincludedinVMwareTools.Thesescripts arelocatedintheguestoperatingsystemin/etc/vmware-tools. Table 3-2. When You
Suspendtheguestoperating system Resumetheguestoperating system Powerofftheguestoperating system Powerontheguestoperating system
VMware, Inc.
61
Dooneofthefollowing:
! !
Todisableascript,selectthepathtothescriptanddeleteit.
ClickApplytosaveyoursettings.
62
VMware, Inc.
NOTE
VMware, Inc.
63
NOTE
Theshrinkprocessaffectsalldisksnotonlythedisksthatyouprepareto shrink.
Thistabcontains:
! !
Copyrightinformation. AbuttonyouclicktovisittheVMwareWebsite.
64
VMware, Inc.
VMware, Inc.
65
NOTE
66
VMware, Inc.
Definition
DisplaysasummaryofVMwareToolscommandsand optionsinaNetWareguest. Displaysalistofalldiskpartitionsinthevirtualdisk andwhetherornotapartitioncanbeshrunk. Shrinksthelistedpartitions.Ifnopartitionsare specified,allpartitionsinthevirtualdiskareshrunk. Thestatusoftheshrinkprocessappearsatthebottomof thesystemconsole. Formoreinformation,seeDefragmentingand ShrinkingVirtualDisksonpage 125.
devicelist
Listseachremovabledeviceinthevirtualmachine,its deviceIDandwhetherthedeviceisenabledordisabled. Removabledevicesincludethevirtualnetworkadapter, CDROMandfloppydrives. Disablesthespecifieddeviceordevicesinthevirtual machine.Ifnodeviceisspecified,allremovabledevices inthevirtualmachinearedisabled. Note:YoucanalsodisabledevicesfromtheVM> RemovableDevicesmenuintheVMwareServer consolewindow.
VMware, Inc.
67
Definition
Letsyouenableordisabletimesynchronization betweentheguestoperatingsystemandthehost operatingsystem.Bydefault,timesynchronizationis disabled. Usethiscommandwithoutanyoptionstoviewthe currenttimesynchronizationstatus. Youcansynchronizethetimeintheguestoperating systemwithtimeonthehostoperatingsystemonly whenthetimeintheguestoperatingsystemisearlier thanthetimesetinthehost.
idle [on|off]
Synchronizesthetimeoftheguestoperatingsystemwiththetimeinthehost operatingsystem. Runsscriptsinavirtualmachinewhenthepowerstatechanges.SeeExecuting ScriptsWhentheVirtualMachinesPowerStateChangesonpage 55. ExecutescommandsinthevirtualmachinewhenyoushutdownorrestartaLinux orSolarisguestoperatingsystem. SendsaheartbeattoVMwareServersothatitknowstheguestoperatingsystemis running.AgaugeforthisheartbeatappearsintheVMwareManagementInterface. Formoreinformation,seeUsingtheStatusMonitor. Passesmessagesfromthehostoperatingsystemtotheguestoperatingsystem. PassesinformationbetweentheguestoperatingsystemandaVMwareScripting APIscript.
! !
Theservicestartswhenyouboottheguestoperatingsystem.
68
VMware, Inc.
! !
VMware, Inc.
69
70
VMware, Inc.
YoucanpassitemsliketheWindowssystemID(SID),amachinenameoranIP address.Insidetheguestoperatingsystemstartupscript,youhavetheserviceretrieve thisstring,whichcanthenbeusedinanotherscriptyouwriteandincludeinthestartup scripttosetyourvirtualmachinessystemID,machinename,orIPaddress. Thisway,youcanmakecopiesofthesameconfigurationfile,addadifferentstringto each(eitherintheconfigurationfileitselforatthecommandline),thenusethese variationsofthesameconfigurationfiletolaunchthesamevirtualdiskin nonpersistentmodemultipletimesinatrainingortestingenvironment,forexample. Thisiswhatportionsoftwoconfigurationfilesthatpointtothesamevirtualdiskmight looklike.Eachconfigurationfilecontainsitsownuniquestringsetforthemachine.id parameter. <config_file_1>.vmxcontains: ide0:0.present = TRUE ide0:0.fileName = "my_common_virtual_hard_drive.vmdk" machine.id = "the_string_for_my_first_vm" <config_file_2>.vmxcontains: ide0:0.present = TRUE ide0:0.fileName = "my_common_virtual_hard_drive.vmdk" machine.id = "the_string_for_my_second_vm" Passingastringisalsousefulinsituationswhereyouwanttodeployvirtualmachines onanetworkusingacommonconfigurationfile,whileprovidingeachmachinewith itsownuniqueidentity.Inthiscase,youspecifythestringatthecommandline(you needtolauncheachvirtualmachinewiththevmware -scommand)whenyoulaunch eachvirtualmachineusingthisconfigurationfile.Seeexample1below. Eachvirtualmachinediskfilemustbecopiedintoitsowndirectoryifitsharesits filenamewithanothervirtualmachinediskfile. ThefollowingexampleusesaWindowshostandguesttoillustratehowyoucanuse theservicetoretrieveastringcontainingwhatwillbecomethevirtualmachines
VMware, Inc.
71
Addingthefollowinglinetoyourvirtualmachinesconfigurationfile: machine.id = "W2K-VM 148.30.16.24" thenlaunchingavirtualmachineusingthisconfigurationfile. Launchingavirtualmachinefromthecommandline.Atthecommandline, type: C:\Program Files\VMware\VMware Server\vmware -s 'machine.id=W2K-VM 148.30.16.24' C:\Virtual Machines\win2000\win2000.vmx Writetheabovecommandononeline. OnaLinuxhost,themachineIDpassedonthecommandlinetakes precedenceandispassedtotheguestoperatingsystemifthefollowing conditionsaremet:
NOTE NOTE
! ! !
Retrievethestringinthevirtualmachine.InaWindowsguest,thecommandto retrievethestringis VMwareService --cmd machine.id.get NOTE InyourLinuxguestoperatingsystemsstartupscript,addthefollowing commandbeforethenetworkstartupsection: /etc/vmware/vmware-guestd --cmd 'machine.id.get'
72
VMware, Inc.
VMware, Inc.
73
74
VMware, Inc.
C HAPTER 4
OverviewoftheVMwareServerConsoleWindowonpage 75 ConnectingtoVirtualMachinesandVMwareServerHostsonpage 82 ChangingthePowerStateofaVirtualMachineonpage 88 ControllingtheVirtualMachineDisplayonpage 95 RunningVirtualMachinesfromDVDsorCDROMDiscsonpage 98 RunningVirtualMachinesfromDVDsorCDROMDiscsonpage 98 UsingPXEwithVirtualMachinesonpage 100 InstallingSoftwareinaVirtualMachineonpage 101 Cutting,Copying,andPastingTextonpage 102 UsingDevicesinaVirtualMachineonpage 102 CommandReferenceonpage 104
VMware, Inc.
75
! !
CheckingtheStatusofVMwareToolsonpage 80 CreatingaScreenShotofaVirtualMachineonpage 81
ThinkofaVMwareServervirtualmachineasaseparatecomputerthatrunsina windowonyourphysicalcomputersdesktop.TheVMwareServerConsoleletsyou connecttomultiplevirtualmachinesandswitcheasilyfromonetoanother. WhenyoufirstconnecttheVMwareServerConsoletoaVMwareServerhost,the Hometabappearsinthevirtualmachinedisplay.TheHometabindicateswhetheryou areconnectingtoGSX3ServerorVMwareServerandtheversionoftheserver software.ThestatusbaroftheVMwareServerConsolewindowalsodisplaysthis information. NOTE VMwaresupportsconnectingtoVMwareGSXServer3hostsandusing virtualmachinescreatedwithVMwareGSXServer3aslegacymachines.You canalsoupgradethevirtualhardwareofthosevirtualmachines.Youmust upgradethehardwareofvirtualmachinescreatedunderVMwareGSXServer 2.YoucannotconnecttoVMwareESXServerfromVMwareServer.Formore informationsee,MigratingfromGSXServertoVMwareServerinthe VMwareServerAdministrationGuide.
76
VMware, Inc.
Menu Layouts
Thefollowingtableliststhelocationsforthemostcommonlyusedmenuitems.: Table 4-1. Menu Items
File>New>VirtualMachine File>New>Window File>Exit VM>RemovableDevices Host>Settings(forglobalhostsettings)and Edit>Preferences(forusersettings) VM>Settings Host>VirtualNetworkSettings VM>InstallVMwareTools VM>UpgradeVirtualHardware VM>SendCtrl+Alt+Del VM>GrabInput
Forinformationoncreatingvirtualmachines,seeCreatingaNewVirtual MachinewiththeVirtualMachineWizardonpage 27. Forinformationonopeninganexistingvirtualmachine,seeConnectingto VirtualMachinesandVMwareServerHostsonpage 82. Forinformationonchanginghosts,seeConnectingtoaDifferentVMwareServer Hostonpage 85. ForinformationonconfiguringtheVMwareServerhost,seeSettingGlobal PreferencesforVMwareServer.
Opening Virtual Machines from the Inventory list InVMwareServer,youcanopenmultiplevirtualmachineslocatedonthesameserver hostinthesameVMwareServerConsolewindow.Youcanrunmultipleconsolesand haveeachconnecttovirtualmachinesondifferentservers.Besureyouhaveenough memoryandprocessorpowertohandlethenumberofvirtualmachinesyouwantto run.
VMware, Inc.
77
. Figure 4-1. With the virtual machine powered off or suspended, you can enter notes about it, edit its settings or start it. Double-click on a device to configure it. Forinformationabouttheinventory,seeUsingtheVirtualMachineInventoryon page 79. Insteadofusingphysicalbuttonstoturnthiscomputeronandoff,youusebuttonson thetoolbaratthetopoftheVMwareServerConsolewindow.
Figure 4-2. Toolbar when a virtual machine is powered off (as seen on a Windows host) ThereareseparatePowerOffandPowerOnbuttons.Whenyoususpendavirtual machine,thePowerOnbuttonbecomesaResumebutton.
Using Tabs
Whenavirtualmachineisactive,itsvirtualmachinenameappearsonatabatthetop ofthevirtualmachinedisplay.Toswitchfromonevirtualmachinedisplaytoanother,
78
VMware, Inc.
clickthetabofthevirtualmachineyouwanttosee.ItslikeasoftKVMswitch.Youcan usethisfeatureinthewindowedviewandalsointhequickswitchview. Figure 4-3. Tabs make it easy to switch among active virtual machines (as seen on a Windows host) Youcancloseavirtualmachinestabwithoutinterruptingtheoperationofthevirtual machine.Ifthevirtualmachineisrunningwhenyouclosethetab,thevirtualmachine keepsrunninginthebackgroundandwillberunningwhenyouopenitinatabagain. Toviewthevirtualmachineinthevirtualmachinedisplayagain,clickthevirtual machineintheinventory.IfyouclosetheHometab,youcanopenitagainbychoosing View>GotoHomeTab. Ifyouwanttoviewmorethanonevirtualmachineatthesametime,youcanopen multipleconsolewindowsandlaunchoneormorevirtualmachinesineach.Toview virtualmachinesondifferentservers,connectanewconsoletoeachserver.
Figure 4-4. Use the virtual machine settings editor to add, remove and modify virtual machine components Formoreinformation,seeUsingDevicesinaVirtualMachineonpage 102.
Theinventorygivesyouaconvenientwaytoopenvirtualmachines.Toaddavirtual machinetotheinventory(forexample,ifyoucopiedthevirtualmachinefromanother host,youneedtoaddittotheinventorymanually),chooseFile>Open,clickBrowse, andbrowsetothevirtualmachinesconfiguration(.vmx)file. Indicatorsontheiconsforvirtualmachinesinthelistshowwhetheravirtualmachine ispoweredoff,poweredonorsuspended. Totogglethedisplayoftheinventoryonoroff,pressF9 onbothWindowsandLinux hosts.OnWindowshostsonly,youcanalso clicktheinventorybutton( )onthe toolbar.
Displaying Hints
VMwareServercandisplayhintsthatappearinresponsetovariousactionsyoutake whenyourunavirtualmachine.Thehintsprovidemoreinformationaboutthese actions.Bydefault,hintsareturnedoff.VMwarerecommendsthatusersnewto VMwareServerdisplayhints.Todisplayhints,chooseHelp>Hints>ShowEnabled HintsintheVMwareServerConsole.Toenablehintsthatweredisabled,chooseHelp >Hints>EnableAllHints. Youcanhideeachhintonacasebycasebasis.Tohideahint,checkNevershowthis hintagainbeforedismissingthehintdialogbox.Toenablehintsthatweredisabled, chooseHelp>Hints>EnableAllHints.
80
VMware, Inc.
Figure 4-5. When VMware Tools is running in a Windows virtual machine, the VMware Tools icon appears in the system tray unless you disable the icon. IftheVMwareToolsiconisnotdisplayedinthesystemtray,usetheVMwareTools controlpanelintheguestoperatingsystem(Start>Settings>ControlPanel>VMware Tools)tochangesettingsforVMwareTools.Youcanalsoreactivatethesystemtray icon.OntheOptionstab,checkShowVMwareToolsinthetaskbar. InaLinuxorFreeBSDvirtualmachine,boottheguestoperatingsystem,startX,and launchyourgraphicalenvironment.LaunchtheVMwareToolsbackground applicationwiththiscommand: vmware-toolbox & YoucanrunVMwareToolsasrootorasanormaluser.Toshrinkvirtualdisks,you mustrunVMwareToolsasroot(su -).Totestandeditscripts,youmustrunVMware Toolsastherootuser. InaNetWare5.1orhigherguestoperatingsystem,youaccesstheVMwareTools controlpanelbychoosingNovell>Settings>VMwareToolsforNetWare. Withsomewindowmanagers,youcanplacethecommandtostartVMwareTools automaticallywhenyoustartyourgraphicalenvironment.Consultyourwindow managersdocumentationfordetails.Formoreinformation,seeStartingVMware ToolsAutomaticallyonpage 53.
Fordetails,seeInstallingVMwareToolsonpage 41.
VMware, Inc.
81
! !
82
VMware, Inc.
NOTE
Tostartavirtualmachine,clickthePowerOnbutton.
VMware, Inc.
83
84
VMware, Inc.
5 6
ToconnecttoavirtualmachineonanotherVMwareServerhost,specifythe hostname,username,andpasswordtoconnecttothathost,thenclickOK.
IfyouwerealreadyconnectedtoadifferentVMwareServerhost,youlosethat connection.
VMware, Inc.
85
86
VMware, Inc.
Using Snapshots
YoucantakesnapshotsofvirtualmachinesrunningonVMwareGSXServer3when connectedtotheVMwareGSXServerhostfromaVMwareServerhost.Youcannot takesnapshotsoflegacyvirtualmachinesrunningonaVMwareServerhost.Formore information,seeSnapshotsandLegacyDiskModesonpage 117.
Product Messages
MessagesthattheVMwareServerConsoledisplaysarebasedontheversionofthe servertowhichyouareconnecting.Referencestomenuitems,interfaceelementsand productterminologyarerelevanttothatservertypeandversion,notnecessarilytothe currentversionofVMwareServer.
VMware, Inc.
89
90
VMware, Inc.
VMware, Inc.
91
92
VMware, Inc.
Setting Startup and Shutdown Options from the VMware Server Console
ToconfigureavirtualmachinesstartupandshutdownoptionsfromtheVMware ServerConsole,completethefollowingsteps. 1 2 IntheVMwareServerConsole,selectthevirtualmachine,andchooseVM> Settings.Thevirtualmachinesettingseditoropens. ClicktheOptionstab,andclickStartup/Shutdown.
ClickOKtosaveyourchangesandclosethevirtualmachinesettingseditor.
VMware, Inc.
93
Toallowthevirtualmachinetostartupwhenthesystemstartsup,checktheStart VirtualMachinecheckbox. SpecifytheperiodoftimebeforethenextvirtualmachinestartsintheContinue StartingVirtualMachinesAfterlist.Choosethenumberofminutesorwhether VMwareServershouldnotwaitbeforestartingthenextvirtualmachine.Ifyou selectOther,apromptappears;specifyinthepromptthenumberofminutesto wait.TheSystemDefaultisspecifiedinConfiguringStartupandShutdown OptionsforVirtualMachines. TospecifythatVMwareToolsshouldstartinavirtualmachinebeforethenext virtualmachinestarts,checkthewhenVMwareToolsstartscheckbox.IfVMware Toolsdoesnotstartinthevirtualmachinebeforethespecifiedtimeelapses, VMwareServerstartsthenextvirtualmachine.
94
VMware, Inc.
VMware, Inc.
95
ToviewtheVMwareServermenusandtoolbarwhileyouareusingquickswitchmode, movethemousepointertothetopofthescreen. ToresizeaWindowsguestoperatingsystemsdisplaysoitfillsasmuchofthescreen aspossibleinquickswitchmode,chooseView>FitGuestNow.TheFitGuestNow optionworksonlyifyouhavethecurrentversionofVMwareToolsinstalledinthe guestoperatingsystemandyoudisabledAutofit. NOTE WhenyouchooseFitGuestNow,VMwareServeradjuststhedisplaysettings ofyourWindowsguestoperatingsystemasneeded.Ifyousubsequentlyrun thevirtualmachineinwindowmode,youmightwanttochangethedisplay settingsbacktotheirpreviousvalues.
Togetoutofquickswitchmode,movethemousepointertothetopofthescreento activatethemenu,thenchooseView>QuickSwitch.
96
VMware, Inc.
Therearetwowaystoworkaroundthisproblem.
!
VMware, Inc.
97
OnaWindowshost,youcanalsohidethemenubar.Clickthetitlebaricon,thenchoose HideControls.
98
VMware, Inc.
Thevirtualdiskmustbeanindependentdiskinnonpersistentmode,sinceanychanges youmakeinthevirtualmachinecannotbewrittentotheDVDorCDROM.Theredo logforthevirtualmachinemustbeontheVMwareServerhost.Formoreinformation aboutindependentdisks,seeIndependentDisksonpage 121. NOTE Ifyoutakeasnapshotofthevirtualmachineandyouwanttosavethechanges madetothevirtualdiskafterthesnapshotwastaken,youmustcopythe virtualdisktotheVMwareServerhostsharddrive,thenupdatethesnapshot. Inaddition,ifyoucopythediskfiletoaWindowshost,youneedtomakethe diskfilewritable.
BeforeyourunavirtualmachinewithavirtualdiskstoredonDVDorCDROM,you shouldconsiderwhetheryoumayneedtomodifythevirtualmachinesBIOSatsome point.Inthiscase,thevirtualmachinesBIOS,whichisstoredinafilecallednvram, mustbelocatedontheVMwareServerhost.Or,youcanaddasettingtothevirtual machinesconfigurationfilethatallowsforthenvramfiletobeontheDVD/CDROM, whereitcannotbemodified. NOTE Theperformanceofthevirtualmachineaccessingavirtualdiskstoredona DVDorCDROMdependsonthespeedoftheDVD/CDROMdrive.Keepin mindthatavirtualmachineonaDVD/CDROMdriverunsslowerthanit wouldifitwererunningonyourhostsharddisk.
TorunavirtualmachinewithavirtualdiskstoredonDVDorCDROM,completethe followingsteps. 1 2 Createavirtualmachineandinstalltheguestoperatingsystemandany applicationsyouneedwithinit. Makesurethevirtualmachineispoweredoff.Burnthevirtualdisk(.vmdk)files ontoaDVDorCDROM.PlacetheDVDorCDROMintotheVMwareServer hostsDVD/CDROMdrive. ChooseVM>Settingstoopenthevirtualmachinesettingseditorforthisvirtual machine.OntheHardwaretab,selectVirtualDiskandbrowsetothevirtualdisk fileontheDVD/CDROM. ClickAdvanced.UnderMode,checkIndependentandsetthediskmodeto Nonpersistent.ClickOKtosavethesesettings. OntheOptionstab,selectGeneral.UnderWorkingdirectory,browsetoandselect alocationfortheredologontheVMwareServerhost. ClickOKtosaveyourchanges.Thevirtualmachinesettingseditorcloses.
4 5 6
VMware, Inc.
99
Inatexteditor,openthevirtualmachinesconfigurationfile(.vmx)andaddtwoof thefollowinglinestothefile: disk.locking = FALSE nvram = <path on VMware Server host>\nvram(ifyouthinkyouneedtomodify thevirtualmachinesBIOS) or nvram.mode = "nonpersistent"(ifyoudonotneedtomodifythevirtualmachines BIOS)
Saveyourchangesandclosetheconfigurationfile.
! !
100
VMware, Inc.
Whenavirtualmachinebootsandthereisnoguestoperatingsysteminstalled,it proceedstobootfromdevices(harddisk,CDROMdrive,floppydrive,andnetwork adapter)intheorderinwhichtheyoccurinthebootsequencespecifiedinthevirtual machinesBIOS.IfyouplantousePXEwithavirtualmachine,itisagoodideatoput thenetworkadapteratthetopofthebootorder.Whenthevirtualmachinefirstboots, pressF2toenterthevirtualmachinesBIOSandchangethebootorderthere. Asthevirtualmachinebootsfromthenetworkadapter,ittriestoconnecttoaDHCP server.TheDHCPserverprovidesthevirtualmachinewithanIPaddressandalistof anyPXEserversavailableonthenetwork.AfterthevirtualmachineconnectstoaPXE server,itcanconnecttoabootablediskimage(suchasanoperatingsystemimageora GhostorAltirisdiskimage)andstartinstallingaguestoperatingsystem. VMwarehastestedandsupportsthefollowingPXEconfigurationswithVMware Server:
!
RemoteinstallationofaWindowsServer2003guestoperatingsystemfroma serverrunningWindowsServer2003AutomatedDeploymentServices RemoteinstallationofaWindows2000guestoperatingsystemfromaserver runningWindows2000Server/AdvancedServerRemoteInstallationServices RemoteinstallationofaLinuxguestoperatingsystemfromaRedHatEnterprise Linux3.0ASPXEbootserver RemoteinstallationofasupportedguestoperatingsystemfromaGhostimage usingWindows2000andGhostRISBootpackage RemoteinstallationofasupportedguestoperatingsystemfromanAltirisimage usingaWindows2000Altirisserver NetworkbootingaLinuxvirtualmachinebyconnectingwiththeLinuxDiskless optiontoaRedHatEnterpriseLinux3.0ASserver
VMware, Inc.
101
Iftheinstallationprogramdoesnotstartautomatically,clicktheWindowsStart button,gotoSettings>ControlPanel,thendoubleclickAdd/RemovePrograms andclicktheInstallbutton.Followtheinstructionsonscreenandintheuser manualforyournewsoftware. Someapplicationsuseaproductactivationfeaturethatcreatesakey,basedon thevirtualhardwareinthevirtualmachinewhereitisinstalled.Changesin theconfigurationofthevirtualmachinemightrequireyoutoreactivatethe software.Tominimizethenumberofsignificantchanges,setthefinal memorysizeforyourvirtualmachineandinstallVMwareToolsbeforeyou activatethesoftware.
NOTE
102
VMware, Inc.
Forinformationonaddingandconfiguringvirtualnetworkadapters,seeAddingand ModifyingVirtualNetworkAdaptersonpage 162. Forinformationonconfiguringvirtualmachinememory,seeAllocatingMemorytoa VirtualMachineonpage 251. Toremoveadeviceorotherhardwarefromavirtualmachine,makesureitispowered off.YoucanremovehardwareusingtheVMwareServerConsoleortheVMware ManagementInterface. NOTE Youcannotaddorremovesomeitemsfromavirtualmachine,suchasthe processor,SCSIcontrollers,orthevirtualdisplayadapter.VMwareServer createsSCSIcontrollersasneededwhenyouaddSCSIdevices.However,the numberofvirtualSCSIcontrollersisincludedinthesixvirtualPCIslotlimit foravirtualmachine.ForinformationonwhichdevicesusePCIslots,see VirtualMachineSpecificationsonpage 12.
VMware, Inc.
103
2 3
Selecttheitemyouwanttoremove,thenclickRemove. ClickOKtosavethechangeandclosethevirtualmachinesettingseditor.
Command Reference
Thefollowingsectionsdescribecommandlineoptionsthatareavailablewhenyou launchtheVMwareServerConsoleandkeyboardshortcutsthatyoucanusewhilea virtualmachineisrunning.
! ! !
104
VMware, Inc.
-qclosesthevirtualmachinestabwhenthevirtualmachinepowersoff.Ifnoother virtualmachineisopen,italsoclosestheVMwareServerConsole.Thisisparticularly usefulwhentheguestoperatingsystemiscapableofpoweringoffthevirtualmachine. -l launchestheVMwareServerConsole,connectingitdirectlytothelocalhost. -vdisplaystheproductname,versionandbuildnumber. -s NAME=VALUEsetsaconfigurationvariablecallednametovalue.Thisconfiguration settingappliesuntilthevirtualmachineispoweredoff.Thesesettingsarefoundinthe virtualmachinesconfiguration(.vmx)file.Youshouldusethisoptiononlyifyouknow theexactvariableandvaluetouse;typicallyyouusethiswhenyouaretroubleshooting issues,andVMwaresupportsuggestsyouuseaparticularconfigurationsetting. -mautomaticallystartsthevirtualmachineinquickswitchmode.Thisoptionworksfor virtualmachinesrunningonLinuxhostsonly.Forinformationonquickswitchmode, seeUsingQuickSwitchModeonpage 95. /<path_to_config>/<config>.vmx(or.cfg)launchesavirtualmachineusingthe specifiedconfigurationfile. Xtoolkitoptionscanbepassedasarguments,althoughsomeofthem(mostnotablythe sizeandtitleoftheVMwareServerConsolewindow)cannotbeoverridden.
VMware, Inc.
105
106
VMware, Inc.
Action
Poweron. Poweroff. Resetthepower. Suspend. Createanewvirtualmachine. Openavirtualmachine. Closethecurrentvirtualmachine. Editthevirtualmachinesconfiguration. Grabinputfromthekeyboardandmouse. Editpreferences.SeeSettingUserPreferencesfortheVMware ServerHost. Gotofullscreenmode. Returntonormal(windowed)mode. Switchamongopenvirtualmachineswhilethemouseandkeyboard inputaregrabbed. Switchamongopenvirtualmachineswhilethemouseandkeyboard inputarenotgrabbed.VMwareServermustbetheactiveapplication. Switchamongopenvirtualmachineswhilethemouseandkeyboard inputarenotgrabbed.VMwareServermustbetheactiveapplication. Switchamongopenvirtualmachineswhileusingfullscreenmode.Fx isafunctionkeycorrespondingtothevirtualmachineyouwantto use.Thekeycombinationtouseforavirtualmachineisshowninthe VMwareServertitlebarwhenthatvirtualmachineisactiveandin normal(windowed)mode.
VMware, Inc.
107
108
VMware, Inc.
C HAPTER 5
Machine
VMware, Inc.
109
NOTE
To resume a virtual machine that you have suspended 1 2 LaunchtheVMwareServerConsoleandchooseasuspendedvirtualmachine. ClickResumeontheconsoletoolbar. Anyapplicationsyouwererunningatthetimeyoususpendedthevirtualmachine arerunning,andthecontentisthesameaswhenyoususpendedthevirtual machine. YouusealsousetheVMwareManagementInterfacetosuspendandresumeavirtual machine.SeeChangingaVirtualMachinesPowerStatefromtheManagement Interfaceonpage 90. Youcanalsosettheconfigurationofeachvirtualmachinesothefilethatstores informationonthesuspendedstateissavedinalocationofyourchoice.
110
VMware, Inc.
Setting the Suspended State File Directory from the VMware Management Interface
1 LogontotheVMwareManagementInterface.Clickthevirtualmachinemenuicon ( )forthevirtualmachineyouwanttochangeandchooseConfigureOptions.
TheOptionspageforthisvirtualmachineappearsinanewbrowserwindow.
ClickEdit.TheOptionspageappears.
VMware, Inc.
111
Taking Snapshots
Thesnapshotfeatureismostusefulwhenyouwanttopreservethestateofthevirtual machinesoyoucanreturntothesamestaterepeatedly. Tosavethecurrentstateofyourvirtualmachineandpickupworklaterwiththevirtual machineinthesamestate,suspendthevirtualmachine.Fordetails,seeSuspending andResumingVirtualMachinesonpage 109. Youcantakeasnapshotofavirtualmachineatanytimeandreverttothatsnapshotat anytime.IfthevirtualmachineislocatedonaLinuxhost,youshouldnottakea snapshotwhileyouaresuspendingthevirtualmachine.Waituntilthesnapshotis completelysavedbeforetakingthesnapshot. Youcantakeasnapshotwhileavirtualmachineispoweredon,poweredoff,or suspended.Asnapshotpreservesthevirtualmachinejustasitwaswhenyoutookthe snapshotthestateofthedataonallthevirtualmachinesdisksandwhetherthe virtualmachinewaspoweredon,poweredoff,orsuspended. Whenyoureverttoasnapshot,youdiscardallchangesmadetothevirtualmachine sinceyoutookthesnapshot.Thisincludesanydatawrittentothevirtualdiskandany changestothevirtualmachinesconfiguration. Similarly,ifyoutakeasnapshotofavirtualmachineandlatermodifythevirtual machinesconfiguration,anychangesyoumaketotheconfigurationarenotreflected inthesnapshot.Youneedtotakeanewsnapshot. UsetheSnapshotandRevertbuttonsontheconsoletoolbartotakeasnapshotand reverttoitlater. Youcantakeanewsnapshotatanytime.Whenyoudoso,youreplacetheprevious snapshot.Youcanhaveonlyoneactivesnapshotatatime.
112
VMware, Inc.
NOTE
Thefollowingsectionsdescribesnapshotsingreaterdetail.
! ! ! ! ! ! ! ! !
WhatIsCapturedbyaSnapshot?onpage 113 WaysofUsingSnapshotsonpage 114 SnapshotsandaVirtualMachinesHardDisksonpage 114 SnapshotsandOtherActivityintheVirtualMachineonpage 115 SettingsforSnapshotsonpage 115 SnapshotActionsasBackgroundActivityonpage 116 SnapshotsandLegacyDiskModesonpage 117 SnapshotsandLegacyVirtualMachinesonpage 117 SnapshotsandLegacyVirtualMachinesonpage 117
VMware, Inc.
113
114
VMware, Inc.
newlysaveddatacontinuestoaccumulateinthemuntilyoutakeanactionthataffects thesnapshot.Beawareofhowmuchdiskspacethesefilesconsume.
!
RemovethesnapshotWhenyouremovethesnapshot,thechangesaccumulated inthenewvirtualdiskfileiswrittenpermanentlytothebasedisks(eitherthe virtualdiskfilesorthephysicaldisks,dependingonyourvirtualmachineshard diskconfiguration). ReverttothesnapshotWhenyoureverttothesnapshot,thecontentsofthe newlycreatedvirtualdiskfileisdiscarded.Anyadditionalchangesare,once again,accumulatedinanewvirtualdiskfile. TakeasnapshotIfyoutakeasnapshotwhenthevirtualmachinealreadyhasa snapshot,changesstoredinthenewvirtualdiskfilearewrittenpermanentlytothe basedisk.Anysubsequentchangesagainaccumulateinanewvirtualdiskfile. Dependingonhowlargethevirtualdiskfileis,takinganewsnapshotcantake sometime
VMware, Inc.
115
GotoVM>Settings>Options>Snapshots.
116
VMware, Inc.
NOTE
VMware, Inc.
117
118
VMware, Inc.
C HAPTER 6
Machine
Thischapterdescribeshowtoconfigureyourvirtualmachinesharddiskstorageand coversthefollowingtopics:
! ! ! ! ! !
ConfiguringHardDiskStorageinaVirtualMachineonpage 119 ConfiguringOpticalandFloppyDrivesonpage 128 AddingDrivestoaVirtualMachineonpage 131 UsingVMwareVirtualDiskManageronpage 139 InstallinganOperatingSystemontoaPhysicalPartitiononpage 146 DiskPerformanceinWindowsNTGuestsonMultiprocessorHostsonpage 150
VMware, Inc.
119
Virtual Disk
Avirtualdiskisafileorsetoffilesthatappearsasaphysicaldiskdrivetoaguest operatingsystem.Thefilescanbeonthehostmachineoronaremotecomputer.When youconfigureavirtualmachinewithavirtualdisk,youcaninstallanewoperating systemontothevirtualdiskwithoutrepartitioningaphysicaldiskorrebootingthe host. IDEvirtualdiskscanbeaslargeas950GB.SCSIvirtualdiskscanbeaslargeas950GB. Dependingonthesizeofthevirtualdiskandthehostoperatingsystem,VMware Servercreatesoneormorefilestoholdeachvirtualdisk. Bydefault,thevirtualdiskisconfiguredsoallthediskspaceisallocatedatthetimethe virtualdiskiscreated.Thistypeofvirtualdiskisknownasapreallocateddisk.A preallocateddiskprovidesenhancedperformanceandisusefulifyouarerunning performancesensitiveapplicationsinthevirtualmachine.Avirtualdiskthatisnot preallocatedisknownasagrowabledisk.Agrowablevirtualdisksfilesstartoutsmall andgrowtotheirmaximumsizeasneeded.Themainadvantageofthisapproachisthe smallerfilesize.Smallerfilesrequirelessstoragespaceandareeasiertomoveifyou wanttomovethevirtualmachinetoanewlocation.Youcanshrinkthistypeofvirtual disk.However,ittakeslongertowritedatatoadiskconfiguredinthisway. VirtualdiskscanbesetupasIDEdisksforanyguestoperatingsystem.Theycanbeset upasSCSIdisksforanyguestoperatingsystemthathasadriverfortheBusLogicSCSI adapterusedinaVMwareServervirtualmachine. NOTE TouseSCSIdisksinaWindowsXPorWindowsServer2003virtualmachine, youneedaspecialSCSIdriveravailablefromthedownloadsectionofthe VMwareWebsiteatwww.vmware.com/download.Followtheinstructions ontheWebsitetousethedriverwithafreshinstallationofWindowsXPor WindowsServer2003.
120
VMware, Inc.
informationaboutrunningvirtualmachinesfromDVDROMorCDROM,see RunningVirtualMachinesfromDVDsorCDROMDiscsonpage 98. Akeyadvantageofvirtualdisksistheirportability.Becausethevirtualdisksarestored asfilesonthehostmachineoraremotecomputer,youcanmovethemeasilytoanew locationonthesamecomputerortoadifferentcomputer.YoucanalsouseVMware ServeronaWindowshosttocreatevirtualdisksandmovethemtoaLinuxcomputer andusethemunderVMwareServerforLinuxorviceversa.Forinformationabout movingvirtualdisks,seeMovingandSharingVirtualMachinesinVMwareServer AdministrationGuide.
Ifyourunanoperatingsystemnativelyonthehostcomputer,andswitchtorunningit insideavirtualmachine,thechangeislikepullingtheharddriveoutofonecomputer andinstallingitinasecondcomputerwithadifferentmotherboardandother hardware.Youneedtopreparecarefullyforsuchaswitch.Thespecificstepsyouneed totakedependontheoperatingsystemyouwanttouseinsidethevirtualmachine. Youcancreateanewvirtualmachinethatusesaphysicaldiskinsteadofavirtualdisk. Fordetails,seeInstallinganOperatingSystemontoaPhysicalPartitiononpage 146. Inmostcases,however,itisbettertouseavirtualdisk. Onlyadvancedusersshouldattemptphysicaldiskconfigurations.
Independent Disks
Independentdisksaddalayerofcontrolandcomplexitytoyourvirtualdisks.You configurevirtualdisksinindependentmodeforcertainspecialpurposeconfigurations.
VMware, Inc.
121
Forexample,youmightwanttorunavirtualmachinethatusesavirtualdiskstoredon DVDorCDROM.Formoreinformation,seeRunningVirtualMachinesfromDVDs orCDROMDiscsonpage 98. Or,youmightwanttoexcludeoneormorevirtualdisksfromavirtualmachines snapshot.Formoreinformationaboutsnapshots,seeTakingSnapshotsonpage 112. Toconfigureadiskasanindependentdisk,chooseVM>Settings,selectthevirtual disk,andclickAdvanced.Ontheadvancedsettingsscreen,selectIndependent,then themodeforthedisk.Youhavethefollowingoptionsforanindependentdisk:
!
Disk Files
Thevirtualmachinesettingseditor(VM>Settings)letsyouchoosethediskfilesfora virtualmachine. ChooseafileotherthantheonecreatedbytheNewVirtualMachineWizardifyouare usingavirtualdiskthatyoucreatedinadifferentlocationorifyouaremovingthe createddiskfilestoanewlocation. Thediskfilesforavirtualdiskstoretheinformationthatyouwritetoavirtual machinesharddisktheoperatingsystem,theprogramfiles,andthedatafiles.The virtualdiskfileshavea.vmdkextension. Avirtualdiskismadeupofoneormore.vmdkfiles. OnMicrosoftWindowshosts,eachvirtualdiskiscontainedinonefilebydefault.You canoptionallyconfigurethevirtualdisktouseasetoffileslimitedto2GBperfile.Use thisoptionifyouplantomovethevirtualdisktoafilesystemthatdoesnotsupport fileslargerthan2GB. Youmustsetthisoptionatthetimeyoucreatethevirtualdisk.
122
VMware, Inc.
Ifyouaresettingupanewvirtualmachine,followthecustompathintheNewVirtual MachineWizard.Inthescreenthatletsyouspecifythevirtualdiskscapacity,select Splitdiskinto2GBfiles. Ifyouareaddingavirtualdisktoanexistingvirtualmachine,followthestepsinthe AddHardwareWizard.Inthescreenthatletsyouspecifythevirtualdiskscapacity, selectSplitdiskinto2GBfiles. Whenadiskissplitintomultiplefiles,largervirtualdiskshavemore.vmdkfiles. Thefirst.vmdkfileforeachdiskissmallandcontainspointerstotheotherfilesthat makeupthevirtualdisk.Theother.vmdkfilescontaindatastoredbyyourvirtual machineanduseasmallamountofspaceforvirtualmachineoverhead. Bydefault,alldiskspaceisallocatedwhenyoucreatethevirtualdisk.Apreallocated virtualdiskhasfixedfilesizes,andmostofthefilesare2GB.Asmentionedabove,the firstfileissmall.Thelastfileintheseriesmightalsobesmallerthan2GB. Ifyouchosenottoallocatethespaceinadvance,the.vmdkfilesgrowasdataisadded, toamaximumof2GBeachexceptforthefirstfileintheset,whichremainssmall. Thevirtualmachinesettingseditorshowsthenameofthefirstfileinthesettheone thatcontainspointerstotheotherfilesintheset.Theotherfilesusedforthatdiskare assignednamesbasedonthenameofthefirstfile. Forexample,aWindows2000Servervirtualmachineusingthedefaultconfiguration, withfilesthatgrowasneeded,storesthediskinfilesnamedWindows 2000 Server.vmdk,Windows 2000 Server-s001.vmdk,Windows 2000 Server-s002.vmdkandso on. Ifthediskspaceisallocatedinadvanceandthevirtualdiskissplitinto2GBfiles,the namesaresimilar,exceptthattheyincludeanfinsteadofansforexample,Windows 2000 Server-f001.vmdk.Ifthediskisnotsplitinto2GBfiles,thevirtualmachinestores thediskintwofiles,namedWindows 2000 Server.vmdkandWindows 2000 Server-flat.vmdk. Ifyouareusingaphysicaldisk,the.vmdkfilestoresinformationaboutthephysicaldisk orpartitionusedbythevirtualmachine.
Redo-Log Files
Redologfilesarestoredinthevirtualmachinesworkingdirectory,andareforsaving changestoindependentnonpersistentdisks.Redologfilessaveblocksthatthevirtual machinemodifieswhileitisrunning.Theredologfileforadiskin independentnonpersistentmodeisnotsavedwhenthevirtualmachineispoweredoff orreset.
VMware, Inc.
123
Theredologfileforavirtualdiskvmisnamedvm.vmdk.REDO.Ifthevirtualdiskissplit into2GBfiles,thediskfilesarenamedvm.vmdk,vm-02.vmdk,vm-03.vmdkandsoon;its redologfilesarenamedvm.vmdk.REDO,vm-02.vmdk.REDO,vm-03.vmdk.REDOandsoon. Youcanchoosethelocationwheretheredologfilesarestored.Bydefault,thefilesare storedinthesamedirectoryasthevirtualdisk(.vmdk)file.Bydefault,redologfilesfor physicaldisksarelocatedinthesamedirectoryasthevirtualmachineconfigurationfile (.vmx).Youcanchangethelocationoftheredologfilesinthevirtualmachinesettings editor.Withthevirtualmachinepoweredoff,chooseVM>Settings.ClicktheOptions tab,selectGeneral.UnderWorkingdirectory,enterthenameorbrowsetothefolder inwhichtheredologfileshouldbestored. Youcanstorethesefilesinadifferentdirectorytoincreaseavailablespaceorimprove performance.Forbestperformance,thelogfilesforavirtualmachineshouldbeona localharddriveonthehostcomputer.
Snapshot Files
Whenyoutakeasnapshotofavirtualmachinenamedvm,VMwareServerstoresthe snapshotinafilenamedvm.vmsn.VMwareServerstoressnapshotinformationinfiles namedvmSnapshotX.vmsnandinvmxxxxxx.vmdk.Formoreinformationabout snapshots,seeTakingSnapshotsonpage 112. Youcanchoosethelocationwherethesnapshotfilesarestored.Bydefault,thefilesare storedinthesamedirectoryasthevirtualdisk(.vmdk)file.Youcanchangethelocation ofthesnapshotfilesinthevirtualmachinesettingseditor.Withthevirtualmachine poweredoff,chooseVM>Settings.ClicktheOptionstab,selectGeneral.Under Workingdirectory,enterthenameorbrowsetothefolderinwhichthesnapshotfile shouldbestored. Youcanstorethesefilesinadifferentdirectorytoincreaseavailablespaceorimprove performance.Forbestperformance,thelogfilesforavirtualmachineshouldbeona localharddriveonthehostcomputer.
Lock Files
Arunningvirtualmachinecreateslockfilestopreventconsistencyproblemsonvirtual disks.Ifthevirtualmachinedidnotuselocks,multiplevirtualmachinesmightread andwritetothedisk,causingdatacorruption. Lockfilesarealwayscreatedinthesamedirectoryasthe.vmdkfile. ThelockingmethodsusedbyVMwareServeronMicrosoftWindowsandLinuxhosts aredifferent,sofilessharedbetweenthemarenotfullyprotected.Ifyouuseacommon filerepositorythatprovidesfilestousersonbothWindowsandLinuxhosts,besure thateachvirtualmachineisrunbyonlyoneuseratatime.
124
VMware, Inc.
YoucanuseSCSIreservationtoworkaroundthelockfilesothatmultiplevirtual machinescanaccessit.Thisistypicallydoneinconjunctionwithahighavailability configuration,suchasclustering.Formoreinformationaboutthis,seeUsing HighAvailabilityConfigurationsintheVMwareServerAdministrationGuide. Whenavirtualmachineispoweredoff,itremovesthelockfilesitcreated.Ifitcannot removethelock,astalelockfileisleftprotectingthe.vmdkfile.Forexample,ifthehost machinecrashesbeforethevirtualmachinehasachancetoremoveitslockfile,astale lockremains. Ifastalelockfileremainswhenthevirtualmachineisstartedagain,thevirtualmachine triestoremovethestalelock.Tomakesurethatnovirtualmachinecouldbeusingthe lockfile,thevirtualmachinechecksthelockfiletoseewhether 1 2 Thelockwascreatedonthesamehostwherethevirtualmachineisrunning. Theprocessthatcreatedthelockisnotrunning.
VMware, Inc.
125
Shrinkingvirtualdisksisaconvenientwaytoconvertavirtualdisktotheformat supportedbyVMwareServer.Virtualdiskscreatedinthenewformatcannotbe recognizedbyVMwareGSXServer3oranyotherVMwareproduct,except Workstation5.x. Thevirtualdiskstobeshrunkmustnotbebootedasindependentdisks.Youcan changethemodeofavirtualdiskbeforethevirtualmachineispoweredon.See IndependentDisksonpage 121. Shrinkingadiskisatwostepprocess.Inthefirststep,calledwiping,VMwareTools reclaimsallunusedportionsofdiskpartitions(suchasdeletedfiles)andpreparesthem
126
VMware, Inc.
forshrinking.Thisallowsforthemaximumshrinkpossible.Wipingtakesplaceinthe guestoperatingsystem. Theshrinkprocessitselfisthesecondstep,andittakesplaceoutsidethevirtual machine.VMwareServerreducesthesizeofthediskbasedonthediskspacereclaimed bythewipeprocess.Thisstepoccursafterthewipefinishespreparingthediskfor shrinking. Whenavirtualmachineispoweredon,youshrinkitsvirtualdisksfromtheVMware Toolscontrolpanel.Youcannotshrinkvirtualdisksifasnapshotexists.Toremovean existingsnapshot,chooseSnapshot>RemoveSnapshot. InaLinuxorFreeBSDguestoperatingsystem,topreparevirtualdisksforshrinking, youshouldrunVMwareToolsastherootuser.Thisway,youensurethewholevirtual diskisshrunk.Ifyoushrinkdisksasanonrootuser,youcannotwipethepartsofthe virtualdiskthatrequirerootlevelpermissions. 1 TolaunchthecontrolpanelinaWindowsguest,doubleclicktheVMwareTools iconinthesystemtrayorchooseStart>Settings>ControlPanel,anddoubleclick VMwareTools. TolaunchthecontrolpanelinaLinuxorFreeBSDguest,becomeroot(su -),and runvmware-toolbox. 2 3 ClicktheShrinktab. Selectthevirtualdisksyouwanttoshrink,thenclickPreparetoShrink. NOTE Ifyoudeselectsomeofthepartitionstopreparetoshrink,theentiredisk isstillshrunk.However,thosepartitionsarenotpreparedforshrinking, andtheshrinkprocessdoesnotreducethesizeofthevirtualdiskasmuch asitcouldotherwise.
WhenVMwareToolsfinishespreparingtheselecteddiskpartitions,youare promptedtobeginshrinkingthedisks.
! !
VMware, Inc.
128
VMware, Inc.
UsingtheDVD/CDROMDriveonaClientonpage 130
ClickOKtosaveyourchangesandclosethevirtualmachinesettingseditor.
VMware, Inc.
129
drivesandtheirdriversdonotworkcorrectlyinrawmode.SelectLegacyemulation toworkaroundtheseproblems.
130
VMware, Inc.
NOTE
ClickOKtosaveyourchangesandclosethevirtualmachinesettingseditor.
VMware, Inc.
131
2 3 4 5
132
VMware, Inc.
thevirtualdiskifitisstoredonaFAT32filesystemoronafilesystemthatcannot supportfileslargerthan2GB,suchasFAT16. 6 Acceptthedefaultfilenameandlocationforthevirtualdiskfile,orchangeitifyou wanttouseadifferentnameorlocation.Tofindadifferentfolder,clickBrowse. Ifyouwanttospecifyadevicenodeforyourvirtualdisk,clickAdvanced. Ontheadvancedsettingsscreen,youcanalsospecifyadiskmode.Thisisuseful incertainspecialpurposeconfigurationsinwhichyouwanttoexcludedisksfrom thesnapshot.Formoreinformationonsnapshots,seeTakingSnapshotson page 112.Youcanchoosebetweenanormaldiskandanindependentdisk. Normaldisksareincludedinsnapshots.Thisisthedefaultsettingforanewdisk. Independentdisksarenotincludedinsnapshots.IfyouselectIndependent,you mustfurtherselectoneofthefollowingmodes:
! !
2 3 4 5
VMware, Inc.
133
1 2
134
VMware, Inc.
SelectUseaphysicaldisk,andclickNext.TheSelectaPhysicalDiskscreen appears.
Choosethephysicalharddisktousefromthedropdownlist.Thenselectwhether usetheentirediskoruseonlyindividualpartitionsonthedisk.
! !
VMware, Inc.
135
TheSpecifyDiskFilescreenappears.
Whenyouhavesetthefilenameandlocationtouseandhavemadeanyselections ontheadvancedsettingsscreen,clickFinish.
136
VMware, Inc.
NOTE
VMware, Inc.
137
NOTE
IfyoudonotwanttheCDROMdriveconnectedwhenthevirtualmachine starts,uncheckConnectatpoweron. ClickAdvancedtospecifythedevicenodethedriveshoulduseinthevirtual machine. OntheadvancedsettingsscreenyoucanalsoselectLegacyemulation.Thisis necessaryonlyifyouhavehadproblemsusingnormalmode.Thelegacy emulationmodedoesnotsupportallthecapabilitiesofnormalmode.For example,ifyouareusinglegacyemulationmode,youcannotrecordCDs,you cannotreadmultisessionCDs,youcannotextractdigitalaudiofromaCD, andyoucannotreadorwriteDVDs.Fordetails,seeUsingLegacyEmulation forDVD/CDROMDrivesonpage 129. Afteryouhavemadeanydesiredchangesinthesesettings,clickFinish.
!
3 4
Selectwhatyouwanttoconnecttoaphysicalfloppydriveonthehost computer,anexistingfloppyimagefile,oranewfloppyimagefile.ClickNext. IfyouselectedUseaphysicalfloppydrive,choosethedrivesletter(ona Windowshost)ordevicename(onaLinuxhost)fromthedropdownlistorchoose AutodetecttoletVMwareServerselectthedrivetouse.ClickFinish. Thebenefitofautodetectdevicesisthatyoucanmovethembetweenvirtual machinesthatusedifferentoperatingsystems,suchasWindowsandLinux, withouthavingtoreconfigurethem. IfyouselectedUseafloppyimage,typethepathandfilenameforthefloppy imagefileyouwanttouse,orclickBrowsetonavigatetothefile.ClickFinish. IfyouselectedCreateablankfloppyimage,usethedefaultpathandfilenameor typeinanewone.Tonavigatetoalocation,clickBrowse.Whenthefieldcontains thepathandfilenameyouwanttouseforthenewfloppyimagefile,clickFinish.
NOTE
VMware, Inc.
139
Youcanusethevirtualdiskmanagerto:
! !
Automatethemanagementofvirtualdiskswithscripts. Createvirtualdisksthatarenotassociatedwithaparticularvirtualmachine,tobe usedfortemplates,forexample. Switchthevirtualdisktypefrompreallocatedtogrowable,orviceversa.When changingthedisktypetogrowable,somespaceonthevirtualdiskisreclaimed. Youcanshrinkthevirtualdisktoreclaimevenmorediskspace. Expandthesizeofavirtualdisksoitislargerthanthesizespecifiedwhenyou createdit. Defragmentvirtualdisks. Prepareandshrinkvirtualdiskswithoutpoweringonthevirtualmachine (Windowshostsonly). Renameandmovevirtualdisks.
! !
140
VMware, Inc.
Description
Isthenameofthevirtualdiskfile.Thevirtualdiskfilemust havea.vmdkextension. Youcanspecifyapathtowhereyouwanttolocatethedisk.If youmappednetworksharesonyourhost,youcancreatethe virtualdisktherebyprovidingthecorrectpathinformation withthediskfilename.
-c
Createsthevirtualdisk.Youmustusethe-a,-sand-t options,andyoumustspecifythenameofthevirtualdisk (<diskname>). Convertsthevirtualdiskspecifiedby<sourcediskname>, creatinganewvirtualdiskasaresult.Youmustusethe-t optiontospecifythedisktypetowhichthevirtualdiskis convertedandyoumustspecifythenameofthetargetvirtual disk(<targetdiskname>). Aftertheconversioniscompletedandyouhavetestedthe convertedvirtualdisktomakesureitworksasexpected,you candeletetheoriginalvirtualdiskfile. Tohavethevirtualmachinerecognizetheconvertedvirtual disk,usethevirtualmachinesettingseditortoremovethe existingvirtualdiskfromthevirtualmachine.Addthe converteddisktothevirtualmachine.Forinformationon addingvirtualdiskstoavirtualmachine,seeAddingVirtual DiskstoaVirtualMachineonpage 132.
-r <sourcediskname> <targetdiskname>
-x <n>[GB|MB] <diskname>
Expandsthevirtualdisktothespecifiedcapacity.Youmust specifythenew,largersizeofthevirtualdiskinGigabytesor Megabytes.Youcannotchangethesizeofaphysical(raw) disk. Caution:Beforerunningthevirtualdiskmanagerutility,you shouldbackupyourvirtualdiskfiles. Note:Ifthevirtualdiskispartitioned,youmustusea thirdpartyutilityinthevirtualmachinetoexpandthesizeof thepartitions.Formoreinformation,seeVMwareknowledge basearticle1647at www.vmware.com/support/kb/enduser/std_adp.php?p_fa qid=1647. Ifyouhaveavirtualmachinewithasnapshotoraredolog filestoredinadifferentdirectory,donotusethevirtualdisk managertoexpandthevirtualdiskuntilyouremovethe snapshotorcommittheredologfile.Otherwise,youmight notbeabletopoweronthevirtualmachine.
VMware, Inc.
141
Description
Renamesthevirtualdiskspecifiedby<sourcediskname>.You mustspecifythenameofthetargetvirtualdisk (<targetdiskname>).Byprovidingdirectorypaths,youcan renamethediskandplaceitinadifferentdirectoryorplace thediskwiththesamenameinadifferentdirectory. Beforeyourenamethevirtualdiskorchangethedirectoryin whichitislocated,youshouldremovethevirtualdiskfrom anyvirtualmachinethatcontainsthedisk.ChooseVM> Settings><virtualdisk>,thenclickRemove.Ifthisvirtual machinehasasnapshotoraredologstoredinadifferent directory,removethesnapshotorcommittheredolog. Otherwise,youmaynotbeabletopoweronthevirtual machine. Afteryourenameorrelocatethevirtualdisk,additbackto anyvirtualmachinesthatuseit.ChooseVM>Settings,click Add,thenfollowtheWizardtoaddthisexistingvirtualdisk.
-d <diskname>
Defragmentsthespecifiedvirtualdisk.Youcandefragment onlygrowablevirtualdisks.Youcannotdefragment preallocatedvirtualdisks. Preparesavirtualdiskforshrinking.Ifthevirtualdiskis partitionedintovolumes,eachvolumemustbeprepared separately.ThevolumemustbemountedbyVMware DiskMountat<mountpoint>.Afteryoupreparethevolume, unmountitwithVMwareDiskMount.Continuemounting eachvolumeofthevirtualdiskandpreparingitforshrinking untilyoucompletethisprocessforallthevolumesofthe virtualdisk. Youcanmountonlyonevolumeofavirtualdiskatatime withVMwareDiskMount.Youcanpreparevolumesof virtualdisksforshrinkingononlyonWindowshosts.
-p <mountpoint>
-k <diskname>
-a [ide|buslogic|lsilogi c]
142
VMware, Inc.
Description
Specifiesthesizeofthevirtualdisk.Specifywhetherthesize <n>isingigabytesormegabytes.Youmustspecifythesizeof avirtualdiskwhenyoucreateit. Eventhoughyoumustspecifythesizeofavirtualdiskwhen youexpandit,youdonotusethe-soptionatthattime.
-t [0|1|2|3]
-q
VMware, Inc.
143
VMwareDiskMountmountsindividualvolumesofavirtualdisk.Foroptimal shrinkingofavirtualdisk,youshouldmountallthevolumesandpreparethemfor shrinking. Afteryoumountavirtualdiskvolume,usethevirtualdiskmanagertopreparethe volumeforshrinking.Afteryouprepareavolume,unmountit,andrepeattheprocess foreachvolumeofthevirtualdisk.Afteryouprepareallthevolumesofthevirtual disk,youcanshrinkthevirtualdisk.Forexamples,seePreparingaVirtualDiskfor Shrinkingonpage 145andShrinkingaVirtualDiskonpage 146.
144
VMware, Inc.
VMware, Inc.
145
VMwareServerusesdescriptionfilestocontrolaccesstoeachphysicaldiskonthe system.Thesedescriptionfilescontainaccessprivilegeinformationthatcontrolsa virtualmachinesaccesstocertainpartitionsonthedisks.Thismechanismprevents usersfromaccidentallyrunningthehostoperatingsystemagainasaguestorrunning aguestoperatingsystemthatthevirtualmachineisnotconfiguredtouse.The descriptionfilealsopreventsaccidentalwritestophysicaldiskpartitionsfrombadly behavedoperatingsystemsorapplications. UsetheNewVirtualMachineWizardtoconfigureavirtualmachinetouseexisting physicaldiskpartitions.TheWizardguidesyouthoughcreatinganewvirtual machine,includingconfiguringthephysicaldiskdescriptionfiles.ReruntheWizardto createaseparateconfigurationforeachguestoperatingsysteminstalledonaraw partition.
146
VMware, Inc.
NOTE
ReadthesectionappropriatetoyourVMwareServerhostoperatingsystem.
! !
To configure the virtual machine to use a physical disk 1 Identifytherawpartitiononwhichyouplantoinstalltheguestoperatingsystem. Checktheguestoperatingsystemdocumentationregardingthetypeofpartition onwhichtheoperatingsystemcanbeinstalled.Forexample,operatingsystems likeDOS,Windows95,andWindows98mustbeinstalledonthefirstprimary partitionwhileothers,likeLinux,canbeinstalledonaprimaryorextended partitiononanypartofthedrive. Identifyanappropriaterawpartitionordiskfortheguestoperatingsystemtouse. BesurethattherawpartitionisnotmountedbytheWindowshostandnotinuse byothers.Also,besuretherawpartitionordiskdoesnothavedatayouwillneed inthefuture;ifitdoes,backupthatdatanow. 2 StarttheNewVirtualMachineWizard(File>New>VirtualMachine)andselect Custom.
VMware, Inc.
147
WhenyoureachtheSelectaDiskstep,selectUseaphysicaldisk.
Choosethephysicalharddisktousefromthedropdownlist.Selectwhetherto usetheentirediskoruseonlyindividualpartitionsonthedisk.ClickNext.
148
VMware, Inc.
CAUTION
UseDiskManagement(Start>Settings>ControlPanel>AdministrativeTools> ComputerManagement>Storage>DiskManagement).Selectthepartitionyou wanttounmap.ChooseAction>AllTasks>ChangeDriveLetterandPath.Click Remove. 7 Usethevirtualmachinesettingseditor(VM>Settings)tochangeany configurationoptionsfromtheWizarddefaultsforexample,tochangethe amountofmemoryallocatedtothevirtualmachine. Atthispointyouarereadytobegininstallingtheguestoperatingsystemontothe physicaldiskyouconfiguredforthevirtualmachine.Formoredetails,readthe installationnotesforvariousguestoperatingsystemsintheVMwareGuest OperatingSystemInstallationGuide,availablefromtheVMwareWebsite.
VMware, Inc.
149
/dev/hda(IDEphysicaldisk)and/dev/sdb(SCSIphysicaldisk)belongtogroupID disk.Ifthisisthecase,youcanaddVMwareServeruserstothediskgroup. Anotheroptionistochangetheownerofthedevice.Thinkcarefullyaboutsecurity issueswhenyouexploredifferentoptionshere. VMwarerecommendsgrantingVMwareServerusersaccesstoall/dev/hd[abcd] rawdevicesthatcontainoperatingsystemsorbootmanagersratherthantorelyon VMwareServersphysicaldiskconfigurationfilestoguardaccess.Thisprovides bootmanagersaccesstoconfigurationandotherfilestheymightneedtobootthe operatingsystems.Forexample,LILOneedstoread/bootonaLinuxpartitionto bootanonLinuxoperatingsystemthatmightbeonanotherdrive. 4 5 6 StarttheNewVirtualMachineWizard(File>New>VirtualMachine)andselect Custom. WhenyoureachtheSelectaDiskstep,selectUseaphysicaldisk. Ifthephysicaldiskyouplantousealreadyhasmultiplepartitions,certain operatingsystems(DOS,Windows95,Windows98)mustbeinstalledonthefirst primarypartition. CAUTION Corruptionispossibleifyouallowthevirtualmachinetomodifya partitionthatissimultaneouslymountedundertheLinuxhost operatingsystem. Becausethevirtualmachineandguestoperatingsystemaccessan existingpartitionwhilethehostcontinuestorunLinux,itiscritical thatthevirtualmachinenotbeallowedtomodifyanypartition mountedbythehostorinusebyanothervirtualmachine.
150
VMware, Inc.
Improving Performance
YoucanincreaseperformancebyenablingDMA(directmemoryaccess)onthevirtual harddisksIDEchannelinthevirtualmachine. IfyouhaveavirtualdiskandaDVD/CDROMattachedasmasterandslavetothe primaryIDEcontroller(channel0)andyouwanttoenableDMA,poweroffthevirtual machineandusethevirtualmachinesettingseditor(VM>Settings)tomovethe DVD/CDROMdrivetothesecondaryIDEcontroller(channel1)atIDE1:0. YoucanenabletheDMAfeatureafteryoufinishinstallingWindowsNT.Youmust installServicePack3orhigherinthevirtualmachinetoenablethisoption. AfterthevirtualmachineisrunningWindowsNT,insertanSP3orSP4CDinthedrive andrunDMACHECK.EXEfromthe\SUPPORT\UTILS\I386folderontheCD.Ordownload DMACHECK.EXEfromtheMicrosoftWebsite (support.microsoft.com/support/kb/articles/Q191/7/74.ASP). ClicktheEnabledoptionfortheIDEcontrollerandchannelconfiguredforthevirtual disk.Typically,thisischannel0only,unlessyouhavethevirtualmachineconfigured withmultiplevirtualdisksandnovirtualDVD/CDROMdrive. Asnotedabove,youshouldnotenableDMAonanIDEchannelwithavirtual DVD/CDROMdriveattached.
VMware, Inc.
151
152
VMware, Inc.
C HAPTER 7
Networking
Thischapterdescribeshowtousevirtualnetworkingcomponentstocreateawide rangeofconfigurationsandcoversthefollowingtopics:
! ! ! ! ! ! !
ComponentsoftheVirtualNetworkonpage 153 CommonNetworkingConfigurationsonpage 155 CustomNetworkingConfigurationsonpage 159 ChangingtheNetworkingConfigurationonpage 162 AdvancedNetworkingTopicsonpage 171 UnderstandingNATonpage 190 UsingSambaforFileSharingonaLinuxHostonpage 201
WhenyoucreateavirtualmachinewiththeNewVirtualMachineWizard,youcan chooseanyofthecommonconfigurationsbridgednetworking,networkaddress translation(NAT),andhostonlynetworking.TheWizardconnectsthevirtualmachine totheappropriatevirtualnetwork. Youcansetupmorespecializedconfigurationsbychoosingtheappropriatesettingsin thevirtualmachinesettingseditor,intheVirtualNetworkEditor(onMicrosoft Windowshosts)andonyourhostcomputer. OnaWindowshost,thesoftwareneededforallnetworkingconfigurationsisinstalled whenyouinstallVMwareServer.OnaLinuxhost,allcomponentsareavailableifyou choosetohavebothbridgedandhostonlynetworkingavailabletoyourvirtual machinesatthetimeyouinstallVMwareServer.
VMware, Inc.
153
Severaloftheswitchesandthenetworksassociatedwiththemare,bydefault,usedfor specialnamedconfigurations.ThebridgednetworknormallyusesVMnet0.The hostonlynetworkusesVMnet1bydefault.TheNATnetworkusesVMnet8bydefault. TheotheravailablenetworksarenamedVMnet2,VMnet3,VMnet4,andsoon. Youconnectavirtualmachinetoaswitchbyselectingthevirtualnetworkadapterto connectinthevirtualmachinesettingseditor,andconfiguringittousethevirtual network. Bridge ThebridgeletsyouconnectyourvirtualmachinetotheLANusedbyyour hostcomputer.Itconnectsthevirtualnetworkadapterinyourvirtualmachinetothe physicalEthernetadapterinyourhostcomputer. ThebridgeisinstalledduringVMwareServerinstallation(onaLinuxhost,youmust choosetomakebridgednetworkingavailabletoyourvirtualmachines).Itissetup whenyoucreateanewvirtualmachineusingbridgednetworking. Youcansetupadditionalvirtualbridgestouseincustomconfigurationsthatrequire connectionstomorethanonephysicalEthernetadapteronthehostcomputer. Host virtual adapter ThehostvirtualadapterisavirtualEthernetadapterthat appearstoyourhostoperatingsystemasaVMwarevirtualEthernetadapterona WindowshostandasahostonlyinterfaceonaLinuxhost.Itallowsyouto communicatebetweenyourhostcomputerandthevirtualmachinesonthathost computer.ThehostvirtualadapterisusedinhostonlyandNATconfigurations. Thehostvirtualadapterisnotconnectedtoanyexternalnetworkunlessyousetup specialsoftwareonthehostcomputeraproxyserver,forexampletoconnectthe hostonlyadaptertothephysicalnetworkadapter. ThesoftwarethatcreatesthehostvirtualadapterisinstalledwhenyouinstallVMware Server(onaLinuxhost,youmustchoosetomakehostonlynetworkingavailableto yourvirtualmachines).Ahostvirtualadapteriscreatedwhenyoubootthehost computer. Youcansetupadditionalhostvirtualadaptersasneeded. NAT device TheNAT(networkaddresstranslation)deviceallowsyoutoconnect yourvirtualmachinestoanexternalnetworkwhenyouhaveonlyoneIPnetwork addressonthephysicalnetwork,andthataddressisusedbythehostcomputer.You can,forexample,useNATtoconnectyourvirtualmachinestotheInternetthrougha dialupconnectiononthehostcomputerorthroughthehostcomputersEthernet adapterorwirelessEthernetadapter.NATisalsousefulwhenyouneedtoconnectto anonEthernetnetwork,suchasTokenRingorATM. TheNATdeviceissetupautomaticallywhenyouinstallVMwareServer.(OnaLinux host,youmustchoosetomakeNATavailabletoyourvirtualmachines.)
154 VMware, Inc.
Chapter 7 Networking
DHCP server TheDHCP(dynamichostconfigurationprotocol)serverprovidesIP networkaddressestovirtualmachinesinconfigurationsthatarenotbridgedtoan externalnetworkforexample,hostonlyandNATconfigurations. Network adapter Onevirtualnetworkadapterissetupforyourvirtualmachine whenyoucreateitwiththeNewVirtualMachineWizardusinganytypeofnetworking (avirtualnetworkadapterisalwaysaddedtoavirtualmachinecreatedwiththe VMwareManagementInterface).ItappearstotheguestoperatingsystemasanAMD PCNETPCIadapter. Youcancreateandconfigureuptofourvirtualnetworkadaptersineachvirtual machineusingthevirtualmachinesettingseditor. Theadaptercanuseoneoftwodrivers:thevlancedriverandthevmxnetdriver. VMwareServersupportsNICmorphing,whichdynamicallyselectsthedriver.The vlancedriverinstallswhenavirtualmachineisstartedorrebooted.Ifthevirtual machinehasVMwareToolsinstalled,thevmxnetdriverisautomaticallyinstalled. Otherwise,thevlancedriverremainsasthedefault.
VMware, Inc.
155
Bridged Networking
Figure 7-1. Bridged networking connects a virtual machine to a network using the host computers Ethernet adapter. BridgednetworkingissetupautomaticallyifyouselectUsebridgednetworkinginthe NewVirtualMachineWizardorifyouselecttheTypicalsetuppath.Thisselectionis availableonaLinuxhostonlyifyouenablethebridgednetworkingoptionwhenyou installVMwareServer. Bridgednetworkingisoftentheeasiestwaytogiveyourvirtualmachineaccesstothe networkwhenyourhostcomputerisonanEthernetnetwork.OnaWindowshost,you canusebridgednetworkingtoconnecttoeitherawiredorawirelessnetwork.Ona Linuxhost,youcanusebridgednetworkingtoconnecttoawirednetwork. Ifyouusebridgednetworking,yourvirtualmachineneedstohaveitsownidentityon thenetwork.Forexample,onaTCP/IPnetwork,thevirtualmachineneedsitsownIP address.YournetworkadministratorcantellyouwhetherIPaddressesareavailable foryourvirtualmachineandwhatnetworkingsettingsyoushoulduseintheguest operatingsystem.Generally,yourguestoperatingsystemcanacquireanIPaddress andothernetworkdetailsautomaticallyfromaDHCPserver.Youmightneedtosetthe IPaddressandotherdetailsmanuallyintheguestoperatingsystem. Usingbridgednetworkingenablesthevirtualmachinetobeafullparticipantinthe network.Ithasaccesstoothermachinesonthenetworkandcanbecontactedbyother machinesonthenetworkasifitwereaphysicalcomputeronthenetwork. Ifthehostcomputerissetuptobootmultipleoperatingsystemsandyourunoneor moreoftheminvirtualmachines,youneedtoconfigureeachoperatingsystemwitha uniquenetworkaddress.Peoplewhobootmultipleoperatingsystemsoftenassignall systemsthesameaddress,sincetheyassumeonlyoneoperatingsystemwillrunata time.Ifyouuseoneormoreoftheoperatingsystemsinavirtualmachine,this assumptionisnolongertrue.
156
VMware, Inc.
Chapter 7 Networking
Figure 7-2. NAT gives a virtual machine access to network resources using the host computers IP address. Anetworkaddresstranslationconnectionissetupautomaticallyifyoufollowthe CustompathintheNewVirtualMachineWizardandselectUsenetworkaddress translation. IfyouwanttoconnecttotheInternetorotherTCP/IPnetworkusingthehost computersdialupnetworkingorbroadbandconnectionandyouarenotabletogive yourvirtualmachineanIPaddressontheexternalnetwork,NATisoftentheeasiest waytogiveyourvirtualmachineaccesstothatnetwork. NATalsoallowsyoutoconnecttoaTCP/IPnetworkusingaTokenRingadapteron thehostcomputer.HoweverryourvirtualmachinedoesnothaveitsownIPaddress ontheexternalnetworkifyouuseNAT.Instead,aseparateprivatenetworkissetup onthehostcomputer.Yourvirtualmachinegetsanaddressonthatnetworkfromthe VMwarevirtualDHCPserver.TheVMwareNATdevicepassesnetworkdatabetween oneormorevirtualmachinesandtheexternalnetwork.Itidentifiesincomingdata packetsintendedforeachvirtualmachineandsendsthemtothecorrectdestination. IfyouselectNAT,thevirtualmachinecanusemanystandardTCP/IPprotocolsto connecttoothermachinesontheexternalnetwork.Forexample,youcanuseHTTPto browseWebsites,FTPtotransferfiles,andTelnettologontoothercomputers.Inthe defaultconfiguration,computersontheexternalnetworkcannotinitiateconnectionsto thevirtualmachine.Thatmeans,forexample,thatthedefaultconfigurationdoesnot
VMware, Inc.
157
Host-Only Networking
Figure 7-3. Host-only networking creates a network that is completely contained within the host computer. AhostonlynetworkissetupautomaticallyifyouselectUseHostOnlyNetworking intheNewVirtualMachineWizard.OnLinuxhosts,thisselectionisavailableonlyif youenabledthehostonlynetworkingoptionwhenyouinstalledVMwareServer. Hostonlynetworkingprovidesanetworkconnectionbetweenthevirtualmachineand thehostcomputer,usingavirtualEthernetadapterthatisvisibletothehostoperating system.Thisapproachcanbeusefulifyouneedtosetupanisolatedvirtualnetwork. Ifyouusehostonlynetworking,yourvirtualmachineandthehostvirtualadapterare connectedtoaprivateTCP/IPnetwork.Addressesonthisnetworkareprovidedbythe VMwareDHCPserver. IfyoumakesomeotherselectionintheNewVirtualMachineWizardandlaterdecide youwanttousehostonlynetworking,youcanmakethatchangeinthevirtualmachine settingseditor(VM>Settings).Fordetails,seeChangingtheNetworking Configurationonpage 162.
158
VMware, Inc.
Chapter 7 Networking
VMware, Inc.
159
Figure 7-4. In this custom configuration, a Web server connects through a firewall to an external network. An administrators computer can connect to the Web server through a second firewall. Tosetupthisconfiguration,youmustcreatefourvirtualmachinesandusethevirtual machinesettingseditortoadjustthesettingsfortheirvirtualEthernetadapters.You alsoneedtoinstalltheappropriateguestoperatingsystemsandapplicationsoftware ineachvirtualmachineandmaketheappropriatenetworkingsettingsineachvirtual machine. 1 SetupfourvirtualmachinesusingtheNewVirtualMachineWizard. Createthefirstvirtualmachinewithbridgednetworkingsoitcanconnecttoan externalnetworkusingthehostcomputersEthernetadapter. Createtheotherthreevirtualmachineswithoutnetworking.Youwillsetuptheir virtualEthernetadaptersinlatersteps. 2 LaunchaVMwareServerConsoleandopenvirtualmachine1.Donotpoweron thevirtualmachine.
VMware, Inc.
160
Chapter 7 Networking
Usethevirtualmachinesettingseditor(VM>Settings)toaddasecondvirtual networkadapter,asdescribedinChangingtheNetworkingConfigurationon page 162.ConnectthesecondadaptertoCustom(VMnet2). ClickOKtosavetheconfigurationandclosethevirtualmachinesettingseditor. 3 Ifaconsoleisnotrunning,launchone.Openvirtualmachine2.Donotpoweron thevirtualmachine. Usethevirtualmachinesettingseditor(VM>Settings)toaddavirtualnetwork adapter.ConnecttheadaptertoCustom(VMnet2). ClickOKtosavetheconfigurationandclosethevirtualmachinesettingseditor. 4 Ifaconsoleisnotrunning,launchone.Openvirtualmachine3.Donotpoweron thevirtualmachine. Usethevirtualmachinesettingseditortoaddavirtualnetworkadapter.Connect theadaptertoCustom(VMnet2). Usethevirtualmachinesettingseditortoaddasecondvirtualnetworkadapter. ConnecttheadaptertoCustom(VMnet3). ClickOKtosavetheconfigurationandclosethevirtualmachinesettingseditor. 5 Ifaconsoleisnotrunning,launchone.Openvirtualmachine4.Donotpoweron thevirtualmachine. Usethevirtualmachinesettingseditortoaddavirtualnetworkadapter.Connect theadaptertoCustom(VMnet3). ClickOKtosavetheconfigurationandclosethevirtualmachinesettingseditor. 6 DeterminethenetworkaddressesusedforVMnet2andVMnet3. NOTE OnaWindowshost,youcanskipthestepsforconfiguringnetwork addressesmanuallyand,instead,useVMwareServersDHCPserver. ChooseHost>VirtualNetworkSettings>DHCPandaddVMnet2and VMnet3tothelistofvirtualnetworksservedbythevirtualDHCPserver. Thenskiptostep9.
VMware, Inc.
Configurethenetworkingineachguestoperatingsystem. ForthebridgedEthernetadapterinvirtualmachine1,usethenetworkingsettings neededforaconnectiontotheexternalnetwork.IfthevirtualmachinegetsitsIP addressfromaDHCPserverontheexternalnetwork,thedefaultsettingsshould work. ForthesecondEthernetadapterinvirtualmachine1,manuallyassignanIP addressintherangeyouareusingwithVMnet2. Invirtualmachine2,assignanIPaddressintherangeyouareusingwithVMnet2. Invirtualmachine3,networkadaptersareconnectedtoVMnet2andVMnet3. AssigneachadapteranIPaddressintherangeyouareusingwiththevirtual networktowhichitisconnected. Invirtualmachine4,assignanIPaddressintherangeyouareusingwithVMnet3.
Installthenecessaryapplicationsoftwareineachvirtualmachine.
162
VMware, Inc.
Chapter 7 Networking
5 6
ClickFinish.Thenewadapterisadded. ClickOKtosaveyourconfigurationandclosethevirtualmachinesettingseditor.
VMware, Inc.
163
4 5
164
VMware, Inc.
Chapter 7 Networking
TheVirtualNetworkEditorappears,withtheSummarytabactive.
Bydefault,theVMnet0virtualnetworkissetupinbridgedmodeandbridgesto oneoftheactiveEthernetadaptersonthehostcomputer. Thechoiceofwhichadapteritusesisarbitrary.VMwarerecommendsthatyoulet VMwareServerchooseanavailablephysicalnetworkadapterforbridging,asit providesfaulttolerance.Ifanetworkadapterbecomesunavailable(forexample, ifitisunpluggedorremovedfromthehost),thenetworkbridgeautomatically switchestoanothernetworkadapteronthehost. YoucanrestricttherangeofchoicesbyusingoptionsontheAutomaticBridging tab. (AlsoshownareVMnet1,thedefaultvirtualnetworkforhostonlynetworking, andVMnet8,thedefaultvirtualnetworkforNAT,iftheyareenabledinVMware Server.)
ToexcludeoneormorephysicalEthernetadaptersfromthelisttowhichVMnet0 canbebridged,clicktheAutomaticBridgingtab.
VMware, Inc.
165
ToexcludeanEthernetadapter,clickAddtoaddittothelistofexcludeddevices.
166
VMware, Inc.
Chapter 7 Networking
Chooseanadapterfromthedropdownlistbesidethenameofthevirtualswitch youwanttouse. Ifyouareusingteamednetworkadaptersonyourhost,youcanchoosetheteamed NICforVMnet0. CAUTION Becarefulwhenyouchangethebridgedadaptermappings.Ifyou reassignaphysicalEthernetadaptertoadifferentvirtualnetwork, anyvirtualmachineusingtheoriginalnetworklosesitsnetwork connectivitythroughthatnetwork.Youmustthenchangethesetting foreachaffectedvirtualmachinesnetworkadapterindividually. Thiscanbeespeciallytroublesomeifyourhosthasonlyonephysical EthernetadapterandyoureassignittoaVMnetotherthanVMnet0. EventhoughtheVMnetstillappearstobebridgedtoan automaticallychosenadapter,theonlyadapteritcanusehasbeen assignedtoanotherVMnet.
VMware, Inc.
167
Theaddressshouldspecifyavalidnetworkaddressthatissuitableforusewiththe subnetmask. Thedefaultsubnetmaskis255.255.255.0(aclassCnetwork).Typically,thismeans youshouldmodifyonlythethirdnumberintheIPaddressforexample,xin 192.168.x.0or172.16.x.0.Ingeneral,youshouldnotchangethesubnetmask. Certainvirtualnetworkservicesmaynotworkaswellwithacustomizedsubnet mask. Whenyoumodifythenetworkaddressorsubnetmask,VMwareServer automaticallyupdatestheIPaddresssettingsforothercomponentssuchas DHCP,NATandhostvirtualadapteronthatvirtualnetworktoreflectthenew settings.ThespecificsettingsthatareautomaticallyupdatedincludeDHCPlease range,DHCPserveraddress,NATgatewayaddressandhostvirtualadapterIP address.However,ifyouhavechangedanyofthesesettingsfromitsdefaultvalue evenifyouhavelaterchangedthesettingbacktothedefaultVMwareServer doesnotupdatethatsettingautomatically.Itpresumesthatcustomsettingsare nottobemodified. ChangingDHCPSettings IntheDHCPsettingsdialogbox,youcanchangetherangeofIPaddresses providedbytheDHCPserveronaparticularvirtualnetwork.Youcanalsosetthe durationofleasesprovidedtoclientsonthevirtualnetwork.
WhenyouhavemadeallthechangesyouwanttomakeonalltabsoftheVMware NetworkEditor,clickOK.
168
VMware, Inc.
Chapter 7 Networking
3 4 5
ClickOKtoclosetheVirtualNetworkEditor.
2 3
Selecttheadapteryouwanttoremove,thenclickRemoveadapter. ClickOK.
Watchforthefollowingquestion: Do you want networking for your Virtual Machines? (yes/no/help) [yes] Answeryesifyoustillwanttouseanynetworkinginyourvirtualmachines,then continuetothenextquestion. Otherwise,answernotoremoveallnetworking.
170
VMware, Inc.
Chapter 7 Networking
Would you prefer to modify your existing networking configuration using the wizard or the editor? (wizard/editor/help) [wizard] editor 4 Youseealistofvirtualnetworksthathavebeenconfigured.Selectthenetwork correspondingtotheadapteryouwishtodisable. The following virtual networks have been defined: . vmnet0 is bridged to eth0 . vmnet1 is a host-only network on subnet 172.16.155.0. . vmnet8 is NAT network on a private subnet 172.16.107.0. Which virtual network do you wish to configure? (0-99) 1 5 Youmightbepromptedtokeepthisvirtualnetwork.Ifyouaresureyouwantto removeit,answeryestothequestion. The network vmnet1 has been reserved for a host-only network. You may change it, but it is highly recommended that you use it as a host-only network. Are you sure you want to modify it? (yes/no) [no] yes 6 Whenpromptedaboutthetypeofvirtualnetwork,selectnonetoremovethe virtualnetwork. What type of virtual network do you wish to set vmnet1? (bridged,hostonly,nat,none) [hostonly] none
SelectingIPAddressesonaHostOnlyNetworkorNATConfigurationon page 172 AvoidingIPPacketLeakageinaHostOnlyNetworkonpage 174 MaintainingandChangingtheMACAddressofaVirtualMachineonpage 176 ControllingRoutingforaHostOnlyNetworkonaLinuxHostonpage 177 IssueswithHostOnlyNetworkingonaLinuxHostonpage 178 SettingUpaSecondBridgedNetworkInterfaceonaLinuxHostonpage 179 ConfiguringBridgedNetworkingWhenUsingTeamedNetworkInterface Cardsonpage 180 SettingUpTwoSeparateHostOnlyNetworksonpage 182
! ! ! ! ! !
VMware, Inc.
171
! !
172
VMware, Inc.
Chapter 7 Networking
configuretheVMwareDHCPservertoalwaysassignthesameIPaddresstoeachof thesevirtualmachines.
Selectthevirtualnetworkforwhichyouwanttochangesettingsandclick Properties.
VMware, Inc.
173
Makethedesiredchanges,thenclickOK.
Address use
Hostmachine Staticaddresses DHCPassigned DHCPserver Broadcasting
Example
192.168.0.1 192.168.0.2192.168.0.127 192.168.0.128192.168.0.253 192.168.0.254 192.168.0.255
Address use
Hostmachine NATdevice Staticaddresses DHCPassigned DHCPserver Broadcasting
Example
192.168.0.1 192.168.0.2 192.168.0.3192.168.0.127 192.168.0.128192.168.0.253 192.168.0.254 192.168.0.255
174
VMware, Inc.
Chapter 7 Networking
Windows Hosts
SystemsusingserverversionsofWindows2000arecapableofforwardingIPpackets thatarenotaddressedtothem.Bydefault,however,thesesystemscomewithIPpacket forwardingdisabled. IfyoufindpacketsleakingoutofahostonlynetworkonaWindows2000host computer,checktoseewhetherforwardinghasbeenenabledonthehostmachine.Ifit isenabled,disableit. ChooseStart>Programs>AdministrativeTools>RoutingandRemoteAccess.An iconontheleftislabeledwiththehostname.Ifagreendotappearsovertheicon,IP forwardingisturnedon.Toturnitoff,rightclicktheiconanddisableRoutingand RemoteAccess.Areddotappears,indicatingthatIPforwardingisdisabled.
Linux Hosts
IfyoufindpacketsleakingoutofahostonlynetworkonaLinuxhostcomputer,check toseewhetherforwardinghasmistakenlybeenenabledonthehostmachine.Ifitis enabled,disableit. FormanyLinuxsystems,disableforwardingbywritinga0(zero)tothespecialfile /proc/sys/net/ipv4/ip_forward.Asroot,enterthiscommand: echo 0 > /proc/sys/net/ipv4/ip_forward OtherLinuxsystemshaveasystemconfigurationoptionthatyoucanset.Themethod dependsonyourLinuxdistribution.Youcanuseacontrolpanel,specifyasettingatthe timeyoucompileyourkernel,orpossiblyenteraspecificationwhenyoubootyour system.Consultyouroperatingsystemdocumentationfordetailsonthemethodtouse withyourparticulardistribution.
Using Filtering
Ifthehostcomputerhasmultiplenetworkadapters,itmightbeintentionally configuredtodoIPforwarding.Inthiscase,youdonotwanttodisableforwarding.To avoidpacketleakage,youmustenableapacketfilteringfacilityandspecifythat packetsfromthehostonlynetworkshouldnotbesentoutsidethehostcomputer. Consultyouroperatingsystemdocumentationfordetailsonhowtoconfigurepacket filtering.
VMware, Inc.
175
Topreventtheleakage,besurepacketforwardingisdisabledinyourguestoperating system.
176
VMware, Inc.
Chapter 7 Networking
VMware, Inc.
177
Ifeitheroftheseprocessesisbeingrunonlytoreceiveroutinginformation,theeasiest solutionistoruntheprocesswitha-qoptionsothatitdoesnotsupplyrouting information,onlyreceivesit. If,however,theprocessesarerunningbecausetheysupplyroutinginformation,you needtoconfigurethemsotheydonotadvertiseroutestothehostonlynetwork. TheversionofroutedthatcomeswithmanydistributionsofLinuxhasnosupportfor specifyingthataninterfaceshouldnotbeadvertised.Consulttherouted(8)manual pageforyoursystemincaseyouhaveamorecontemporaryversionofthesoftware. Thegatedprocessrequiressomeconfiguration.Youneedtoexplicitlyexcludethe VMnet1interfacefromanyprotocolactivity.Ifyouneedtorunvirtualmachinesona hostonlynetworkonamultihomedsystemwheregatedisusedandhaveproblems doingso,pleasecontactVMwaretechnicalsupportbysubmittingasupportrequestat www.vmware.com/requestsupport.
DHCPD on the Linux Host Does Not Work After VMware Server Installation
IfyouwererunningtheDHCPserverprogramdhcpdonyourmachinebeforeinstalling VMwareServer,itprobablywasconfiguredtorespondtoDHCPrequestsfromclients onanynetworkinterfacepresentonthemachine.Whenhostonlynetworkingis configured,anadditionalnetworkinterface,VMnet1,ismarkedupandavailablefor use,anddhcpdmightnoticethis. Insuchcases,somedhcpdimplementationsabortiftheirconfigurationfilesdonot includeasubnetspecificationfortheinterfaceevenifdhcpdisnotsupposedto respondtomessagesthatarrivethroughtheinterface. Thebestsolutiontothisproblemistoaddalineinthefollowingformattothedhcpd configurationfile: subnet <net>.0 netmask 255.255.255.0 {} <net>isthenetworknumberassignedtoyourhostonlynetworkforexample, 192.168.0.Thisconfigurationfileentryinformsdhcpdaboutthehostonlynetworkand tellsitexplicitlynottorespondtoanyDHCPrequestsitseescomingfromit.
178
VMware, Inc.
Chapter 7 Networking
VMware, Inc.
179
IfyouhavemorethanonephysicalEthernetadapter,oneofthepromptsyousee issimilartothis: The following bridged networks have been defined: . vmnet0 is bridged to eth0 Do you wish to configure another bridged network? (yes/no) [no] Answeryes.
Chapter 7 Networking
NOTE
2 3
VMware, Inc.
181
4 5 6 7
182
VMware, Inc.
Chapter 7 Networking
AfteraskingaboutaNATnetwork,theprogramasks: Do you want to be able to use host-only networking in your virtual machines? 2 Selectyes. TheWizardreportsonhostonlynetworksthatyouhavealreadysetuponthehost or,ifnohostonlynetworkispresent,configuresthefirstone. TheWizardasks: Do you wish to configure another host-only network? 3 Selectyes. Repeatthisstepuntilyouhaveasmanyhostonlynetworksasyouwant.Then answerno. 4 CompletetheremainingstepsintheWizard. WhentheWizardisfinished,itrestartsallservicesusedbyVMwareServer. 5 Runifconfig. Youshouldseeatleastfournetworkinterfaceseth0,lo,vmnet1,andvmnet2.If theVMnetinterfacesdonotdisplayimmediately,waitforaminute,andrunthe
VMware, Inc.
183
commandagain.ThesefourinterfacesshouldhavedifferentIPaddresson separatesubnets.
184
VMware, Inc.
Chapter 7 Networking
VMware, Inc.
185
UsetheWizardtomodifyyourconfiguration.AfteraskingaboutaNATnetwork, theprogramasks: Do you want to be able to use host-only networking in your virtual machines? Answeryes. TheWizardreportsonhostonlynetworksthatyouhavealreadysetuponthehost or,ifnoneispresent,configuresthefirsthostonlynetwork.
TheWizardasks: Do you wish to configure another host-only network? Answeryes. Repeatthisstepuntilyouhaveasmanyhostonlynetworksasyouwant.Then answerno.
186
VMware, Inc.
Chapter 7 Networking
4 5
VMware, Inc.
187
188
VMware, Inc.
Chapter 7 Networking
theIPaddressforthehostonlyadapterconnectedtoVMnet1.Inthesecondvirtual machinesnetworkingconfiguration,thedefaultrouteraddressshouldbetheIP addressforthehostonlyadapterconnectedtoVMnet2. Ifyouarerunningtheroutersoftwareonthethirdvirtualmachine,setthedefault routeraddressesinthefirsttwovirtualmachinesbasedonthoseusedbythethird virtualmachine.Inthefirstvirtualmachinesnetworkingconfiguration,the defaultrouteraddressshouldbetheIPaddressforthethirdvirtualmachines EthernetadapterconnectedtoVMnet1.Inthesecondvirtualmachines networkingconfiguration,thedefaultrouteraddressshouldbetheIPaddressfor thethirdvirtualmachinesEthernetadapterconnectedtoVMnet2. Atthispointyoushouldbeabletopingtheroutermachinefromvirtualmachinesone andtwo.Andiftheroutersoftwareissetupcorrectly,youshouldbeableto communicatebetweenthefirstandsecondvirtualmachines.
VMware, Inc.
189
Understanding NAT
Networkaddresstranslation,orNAT,providesasimplewayforvirtualmachinesto usemostclientapplicationsoveralmostanytypeofnetworkconnectionavailableto thehost.TheonlyrequirementforNATisthatthenetworkconnectionmustsupport TCP/IP. NATisusefulwhenyouhavealimitedsupplyofIPaddressesorareconnectedtothe networkthroughanonEthernetnetworkadapter.NATworksbytranslating addressesofvirtualmachinesinaprivateVMnetnetworktothatofthehostmachine. Whenavirtualmachinesendsarequesttoaccessanetworkresource,itappearstothe networkresourceasiftherequestcamefromthehostmachine. NATusesthehostsownnetworkresourcestoconnecttotheexternalnetwork.Thus, anyTCP/IPnetworkresourcetowhichthehosthasaccessshouldbeavailablethrough theNATconnection. ThechiefadvantageofNATisthatitprovidesatransparent,easytoconfigurewayfor virtualmachinestogainaccesstonetworkresources. ThefollowingsectionsprovidemoreinformationaboutNAT:
! ! ! ! ! ! ! ! ! !
UsingNATonpage 191 TheHostComputerandtheNATNetworkonpage 191 DHCPontheNATNetworkonpage 191 DNSontheNATNetworkonpage 191 ExternalAccessfromtheNATNetworkonpage 192 AdvancedNATConfigurationonpage 193 CustomNATandDHCPConfigurationonaWindowsHostonpage 196 ConsiderationsforUsingNATonpage 198 UsingNATwithNetLogononpage 198 SampleLinuxvmnetnat.confFileonpage 200
190
VMware, Inc.
Chapter 7 Networking
Using NAT
TheNATdeviceisconnectedtotheVMnet8virtualswitch.Virtualmachinesconnected totheNATnetworkalsousetheVMnet8virtualswitch. TheNATdevicewaitsforpacketscomingfromvirtualmachinesontheVMnet8virtual network.Whenapacketarrives,theNATdevicetranslatestheaddressofthevirtual machinetothatofthehostbeforeforwardingthepackettotheexternalnetwork.When dataarrivesfromtheexternalnetworkforthevirtualmachineontheprivatenetwork, theNATdevicereceivesthedata,replacesthenetworkaddresswiththatofthevirtual machineandforwardsthedatatothevirtualmachineonthevirtualnetwork.This translationoccursautomaticallyandrequiresminimalconfigurationontheguestand thehost.
VMware, Inc.
191
192
VMware, Inc.
Chapter 7 Networking
Windows Hosts
ConfiguretheNATdeviceusingtheVirtualNetworkEditor(Host>VirtualNetwork Settings>NAT).
VMware, Inc.
193
ToeditNATsettingsforavirtualnetwork,chooseitfromthedropdownmenu,then clickEdit.TheNATSettingsdialogboxappears.
YoucanchangeanyofthefollowingNATsettings:
!
PortforwardingletsyousendincomingTCPorUDPrequeststoaspecificvirtual machineonthevirtualnetworkservedbytheNATdevice.Tosetupandconfigure forwardedports,clickPortforwarding.Adialogboxappears. ToaddanewportforeitherTCPorUDP,clickAdd.Ifaportisalreadylisted,you canchangeitssettings.Selectitsnameinthelist,andclickProperties.Orclick Removetoremovetheselectedport. WhenyouclickAdd,anotherdialogboxappears.IntheHostportfield,typethe numberoftheincomingTCPorUDPport.Forexample,incomingHTTPrequests areusuallyonport80.InthefirstForwardingIPaddressfield,typetheIPaddress ofthevirtualmachinetowhichyouwanttoforwardtheincomingrequests.Inthe secondfieldonthatline,typetheportnumberyouwanttouseforthoserequests onthatvirtualmachine.Youcanenterthestandardport,suchas80forHTTP,or anonstandardportifsoftwarerunninginthevirtualmachineisconfiguredto acceptrequestsonanonstandardport.TheDescriptionfieldisoptional.You mightuseittoidentifytheservicebeingforwarded(forexample,HTTP).When youhavemadethesesettings,clickOK.
YoucanspecifyDNSserverstobeusedbythevirtualNATdevice.Todoso,click DNS.Adialogboxappears.YoucanchangethePolicyforusingmultipleDNS serversifyouprefertouseRotateorBurstinsteadofthedefaultsettingofOrder. ToaddaDNSservertothelist,clickAdd.Anotherdialogboxappears.Enterthe DNSserversIPaddressintheIPaddressfield.TheDescriptionfieldisoptional. Whenyouhavemadethedesiredsettings,clickOK.Tochangethesettingsfora serveralreadyinthelist,selectitsentryintheDNSdialogbox,andclick Properties.Todeleteanentry,selecttheentry,andclickRemove.Whenyouhave madethedesiredchanges,clickOK. YoucanchangetheIPaddressfortheNATdeviceintheGatewayIPaddressfield. TochangetheNetmask,clickthebuttonontheHostVirtualNetworkMapping taboftheVirtualNetworkEditorandchooseSubnet.
VMware, Inc.
194
Chapter 7 Networking
ToallowonlypassivemodeFTPovertheNATdevice,deselecttheActiveFTP checkbox. YoucanchangethenumberofminutestokeeptheUDPmappingfortheNATin theUDPtimeoutfield. IfyouchangetheOUI(OrganizationallyUniqueIdentifier)portionoftheMAC addressforthevirtualmachineandsubsequentlycannotuseNATwiththevirtual machine,youshouldchecktheAllowAnyOUIcheckbox. IntheConfigportfield,youcanspecifyaportthatcanbeusedtoaccessstatus informationabouttheNAT.Thisoptionisusedfortroubleshootingpurposeswith VMwaretechnicalsupportonly. YoucanchangeNetBIOStimeoutandretrysettings.
Whenyouhavemadeallthenetworkingchangesyouwant,clickOK.
Linux Hosts
UsetheNATconfigurationfileonthehosttoconfiguretheNATdevice.Thisfileis /etc/vmware/vmnet8/nat/nat.conf. Theconfigurationfileisdividedintosections.Eachsectionconfiguresapartofthe NATdevice.Textsurroundedbysquarebracketssuchas[host]marksthe beginningofasection.Ineachsectionisaconfigurationparameterthatcanbeset.The configurationparameterstaketheformip = 192.168.27.1/24. ForanexampleofaNATconfigurationfile,seeSampleLinuxvmnetnat.confFileon page 200.Theconfigurationfilevariablesaredescribedbelow.
VMware, Inc.
195
196
Chapter 7 Networking
DHCP:C:\Documents and Settings\All Users\Application Data\VMware\vmnetdhcp.conf YoucanchangemanykeyNATandDCHPsettingsusingtheVirtualNetwork Editor(Host>VirtualNetworkSettings).However,ifyouhavemade manualchangestotheconfigurationfiles,someorallofthosechangesmight belostwhenyouusetheVirtualNetworkEditor.Ifyouhavemademanual changes,youshouldmakebackupcopiesofthefilesbeforechangingany settingsintheVirtualNetworkEditor.AftermakingchangesintheVirtual NetworkEditor,youcancopyyourmanualchangesbackintotheappropriate configurationfiles.
NOTE
VMware, Inc.
197
Using NAT to Connect to an Existing WINS Server Already Set Up on the Host
Inordertousethismethod,aWINSserverinthesameworkgroupordomainmustbe setuponthehost.ThesestepsuseWindows2000,WindowsXP,or
198
VMware, Inc.
Chapter 7 Networking
WindowsServer2003asaguide.TheprocessissimilarforWindowsNT,WindowsMe, andWindows9xguests. 1 2 3 4 5 6 Inthevirtualmachine,rightclickonMyNetworkPlacesandselectProperties. IntheNetworkConnectionswindow,rightclickthevirtualnetworkadapterand selectProperties. InthePropertiesdialogbox,selectInternetProtocol(TCP/IP),andclick Properties. IntheTCP/IPPropertiesdialogbox,clickAdvanced. ClicktheWINStab,thenunderNetBIOSsetting,selectUseNetBIOSsetting fromDHCPServer. ClickOKtwice,andclickClose.
VMware, Inc.
199
200
VMware, Inc.
Chapter 7 Networking
# WEB (make sure that if you are using named webhosting, names point to # your host, not to guest... And if you are forwarding port other # than 80 make sure that your server copes with mismatched port # number in Host: header) # lynx http://localhost:8888 #8888 = 192.168.27.128:80 # SSH # ssh -p 8889 root@localhost #8889 = 192.168.27.128:22 [incomingudp] # UDP port forwarding example #6000 = 192.168.27.128:6001
VMware, Inc.
201
Ifyoudonotneedanysharestoappearonyourbridgednetwork,youcanuseyour existingSambaserverandsetuptheconfigurationfilesoitworksonlyonthehostonly network. Sambaconfigurationscanbequitecomplex.Thissectionprovidesseveralsample configurationfiles.Ifyouneedtogobeyondtheissuescoveredhere,seethemanpage forthesmb.conffile.Toviewthismanpage,typeoneofthefollowingcommandsina terminalwindow: man smb.conf or man 5 smb.conf Payparticularattentiontothesectiononencryptedpasswords.Ifyouhaveenabled cleartextpasswordsintheguestoperatingsystem,besurethatsmb.confissetupto usecleartextpasswords.Similarly,ifyouareusingencryptedpasswords,youmust havethesamesettingintheguestoperatingsystemandinsmb.conf. NOTE UsingSambaprintersharingwithvirtualmachinesisnotsupported.Consult themanpagesforguidanceonconfiguringSambaforprinting.
Configuration file for Samba 2.0.6 vmware-[sn]mbd operating on vmnet1. This file was generated by the VMware configuration program and modified for this document.
202
VMware, Inc.
Chapter 7 Networking
# # If you modify it, it will be backed up the next time you run the # configuration program. # Global settings [global] # This should be polled at install time from the private subnet created by # vmware-config.pl socket address = 192.168.183.1 interfaces = vmnet1 bind interfaces only = yes workgroup = WORKGROUP netbios name = HOSTNAME server string = VMware host-only security = user encrypt passwords = yes # Note: Printers not loaded in this example. Resource definitions commented # below. ; load printers = yes socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 # VMware extension to use a different shared memory access key on each # Samba server running on this host sysv shm key = /dev/vmnet1 ; ; ; ; log log max max file = /etc/vmware/vmnet1/smb/var/log.smb level = 1 log size in KB log size = 50
lock directory = /etc/vmware/vmnet1/smb/var/locks smb passwd file = /etc/vmware/vmnet1/smb/private/smbpasswd codepage dir = /usr/lib/vmware/smb/codepages dns proxy = no
VMware, Inc. 203
# Shared resources # Home directories [homes] comment = Home directories browseable = no writable = yes # Printers ;[printers] ; comment = All printers ; path = /var/lpd ; browseable = no ; guest ok = no ; writable = no ; printable = yes ;[HostFS] ; comment = VMware host filesystem ; path = / ; public = no ; writeable = yes ; printable = no
204
VMware, Inc.
Chapter 7 Networking
# "testparm" to check that you have not many any basic syntactic # errors. # Global Settings [global] interfaces = eth0 workgroup = WORKGROUP netbios name = HOSTNAME server string = Samba Host Box # # ; ; ; Note: Printers not loaded in this example. Resource definitions commented below. printcap name = lpstat load printers = yes printing = cups
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 log file = /var/log/samba/log.%m max log size = 50 security = user encrypt passwords = yes smb passwd file = /etc/smbpasswd dns proxy = no preserve case = yes short preserve case = yes default case = lower ; case sensitive = no # Shared Resources [homes] comment = Home Directories browseable = yes writable = yes
VMware, Inc.
205
;[printers] ; comment = All Printers ; path = /var/spool/samba ; browseable = yes ; guest ok = yes ; writable = no ; printable = yes ; create mode = 0700 ; print command = lpr-cups -P %p -o raw %s -r # using client side ; printer drivers. ; print command = lpr-cups -P %p %s # using cups own drivers (use ; generic PostScript on clients). ; lpq command = lpstat -o %p ; lprm command = cancel %p-%j ;[system] ; comment = System share ; path = / ; valid users = username ; public = no ; browsable = yes ; writable = yes ; printable = no
Adding User Names and Passwords to the VMware Server Samba Password File
YoumustbesuretheSambapasswordfileincludesentriesforallusersofthevirtual machinewhowillaccessthehostsfilesystem.Theusernamesandpasswordsinthe Sambapasswordfilemustbethesameasthoseusedforloggingontotheguest operatingsystem. YoucanaddusernamesandpasswordstotheVMwareServerSambapasswordfileat anytimefromaterminalwindowonyourLinuxhostcomputer. 1 2 Logontotherootaccount. su RuntheVMwareServerSambapasswordcommand. vmware-smbpasswd vmnet1 -a <username> <username>istheusernameyouwanttoadd.Followtheinstructionsonthe screen.
206
VMware, Inc.
Chapter 7 Networking
NOTE
Logoffoftherootaccount. exit
Youmightreceiveanerrormessagethatsays Unknown virtual interface "vmnet1" ThisindicatesyourmachineisnotusingtheVMwareServerSambaserver. IfyourinstallationofVMwareServerdoesnotincludetheVMwareServerSamba serverandyouwanttosetitup,logontotherootaccountonyourhostcomputer(su ),thenrunvmware-config.plfromaterminalonthehost.Theconfigurationprogram asks Do you want this script to automatically configure your system to allow your virtual machines to access the host file system? Answeryes. CAUTION InordertoconfigureVMwareServercorrectly,thevmware-config.pl configurationprogramrequiresallvirtualmachinestobeshutdown.The programshutsdownanyrunningvirtualmachinesautomatically.
VMware, Inc.
207
YoucanaddusernamesandpasswordstotheSambapasswordfileatanytimefroma terminalwindowonyourLinuxhostcomputer. 1 2 Logontotherootaccount. su RuntheSambapasswordcommand. smbpasswd -a <username> <username>istheusernameyouwanttoadd.Followtheinstructionsonthe screen. Logoffoftherootaccount. exit
Sample smb.conf for Running Two Samba Servers at the Same Time
; ; ; ; ;
208
This file is the recommended smb.conf file for your normal Samba server if you want to run it concurrently (which we don't advise) with the VMware Samba server. Your normal samba server should be at least v 2.0.6
VMware, Inc.
Chapter 7 Networking
; ; Note that you will need to insert specific information ; for your system at several points indicated in the file ; by <text in angle brackets>. ; ; -------------; ; Larmor samba server configuration ; ; Global settings [global] ; ; Identity ; ; Allow several Samba servers on the same machine interfaces = <your real subnet>/<your real netmask> bind interfaces only = yes ; Workgroup the host belongs to workgroup = VMware ; SMB name of the host (the hostname by default) netbios name = <your Windows name> ; Description of the host server string = Linux running Samba 2.0.6 ; ; Access ; ; Allow connections from ; hosts allow = <your real subnet>/<your real netmask> ; Authentication scheme security = user encrypt passwords = yes ; ; Options ; ; Automatically load the printer list (from /etc/printcap ; by default) load printers = yes ; Gives better performance socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 ; ; Files and directories ;
VMware, Inc. 209
; Max log size in KB max log size = 1024 ; Locks lock directory = /var/samba ; SMB passwords smb passwd file = /etc/samba/smbpasswd ; ; Name browsing ; ; Allow the host to participate in master browser ; elections local master = yes ; Force a local browser election upon startup ; We need that otherwise it takes a long time before the ; windows network is browsable preferred master = yes ; Do not try to resolve SMB names via DNS dns proxy = no ; Shared resources ; ; Home directories [homes] comment = Home directories browseable = no writable = yes ; Printers ;[printers] ; comment = All printers ; path = /var/lpd ; browseable = no ; guest ok = no ; writable = no ; printable = yes [Slash] comment = Whole filesystem path = / public = no writeable = yes printable = no
210
VMware, Inc.
C HAPTER 8
Configuring Devices
Thischapterdescribeshowtousevariousdeviceswithavirtualmachineandcovers thefollowingtopics:
! ! ! ! ! !
UsingParallelPortsonpage 211 UsingSerialPortsonpage 216 KeyboardMappingonaLinuxHostonpage 226 UsingUSBDevicesinaVirtualMachineonpage 232 ConnectingtoaGenericSCSIDeviceonpage 237 UsingTwoWayVirtualSymmetricMultiprocessing(Experimental)onpage 244
IfyouselectedOutputfile,enterthepathandfilenameintheOutputfilefield,or browsetothelocationofthefile.
212
VMware, Inc.
VMware, Inc.
213
214
VMware, Inc.
VMware, Inc.
215
Device Permissions
SomeLinuxdistributionsbydefaultdonotgrantthevirtualmachineaccesstothelp andparportdevices.Inmostofthesecases,theownerofthedeviceisrootandthe associatedgroupislp.ToallowtheVMwareServerusertoaccessthedevice,addthe usertotheassociatedgroup.Toviewtheownerandgroupofthedevice,runthis command: ls la /dev/parport0 Thethirdandfourthcolumnsoftheoutputshowtheownerandgroup,respectively. Toaddtheusertothedevicegroup,editthe/etc/groupfile.Onthelinestartingwith lp,whichdefinesthelpgroup,addtheVMwareServerusersusername.Youmust makethischangeastherootuser.Thefollowinglineprovidesanexampleforauser whoseusernameisuserj. lp::7:daemon,lp,userj Thenexttimetheuserlogsontothehost,thechangestakeeffect.
UsingaSerialPortontheHostComputeronpage 217 UsingaFileontheHostComputeronpage 218 ConnectinganApplicationontheHosttoaVirtualMachineonpage 220 ConnectingTwoVirtualMachinesonpage 221 SpecialConfigurationOptionsforAdvancedUsersonpage 223 Examples:DebuggingoveraVirtualSerialPortonpage 224
AVMwareServervirtualmachinecanuseuptofourvirtualserialports.Thevirtual serialportscanbeconfiguredinseveralways.
! !
Youcanconnectavirtualserialporttoaphysicalserialportonthehostcomputer. Youcanconnectavirtualserialporttoafileonthehostcomputer.
216
VMware, Inc.
Youcanmakeadirectconnectionbetweentwovirtualmachinesorbetweena virtualmachineandanapplicationrunningonthehostcomputer.
Youcanalsoselectwhethertoconnectthevirtualserialportwhenyoupoweronthe virtualmachine.
SelectUsephysicalserialportonthehost,thenclickNext.TheSelectaPhysical SerialPortscreenappears.
VMware, Inc.
217
Youcanchoosetheportonthehostcomputertouseforthisserialconnectionor chooseAutodetecttoletVMwareServerselecttheport.
NOTE
Bydefault,thedevicestatussettingisConnectatpoweron.Unchecktheboxfor theportnottobeautomaticallyconnectedwhenyoupoweronthevirtual machine. NOTE IfyouareconnectingwithaWindowsconsoletoaddaphysicalserial porttoavirtualmachineonaremoteLinuxhost,besuretospecifya Linuxdevicenamehere,suchas/dev/ttyS0.Ifyouareconnectingwith aLinuxconsoletoaddaphysicalserialporttoavirtualmachineona remoteWindowshost,besuretospecifyaWindowsdevicenamehere, suchasCOM1.
ClickAdvancedtoconfigurethisserialporttousepolledmode.Thisoptionisof interestprimarilytodeveloperswhoareusingdebuggingtoolsthatcommunicate overaserialconnection.Formoreinformation,seeSpecialConfigurationOptions forAdvancedUsersonpage 223. 7 8 ClickFinish,andclickOKtoclosethevirtualmachinesettingseditor. CheckYieldCPUonPolltoconfigurethisserialporttousepolledmode.This optionisofinterestprimarilytodeveloperswhoareusingdebuggingtoolsthat communicateoveraserialconnection.Formoreinformation,seeSpecial ConfigurationOptionsforAdvancedUsersonpage 223. ClickOKtoaddtheserialport.
218
VMware, Inc.
SelectOutputtofile,thenclickNext.TheChooseSerialPortOutputFilescreen appears.
ClickFinish,andclickOKtoclosethevirtualmachinesettingseditor.
VMware, Inc.
219
SelectOutputtonamedpipe,thenclickNext.TheSpecifyNamedPipescreen appears.
220
VMware, Inc.
6 7 8
SelectThisendistheserverorThisendistheclient.Ingeneral,selectThisend istheserverifyouplantostartthisendoftheconnectionfirst. SelectTheotherendisanapplication. ThedefaultdevicestatussettingisConnectatpoweron.Deselectthecheckbox forthedevicenottobeconnectedwhenyoupoweronthevirtualmachine. ClickAdvancedtoconfigurethisserialporttousepolledmode.Thisoptionisof interestprimarilytodeveloperswhoareusingdebuggingtoolsthatcommunicate overaserialconnection.Formoreinformation,seeSpecialConfigurationOptions forAdvancedUsersonpage 223.
9 10
VMware, Inc.
221
Usethedefaultpipename,orenteranotherpipenameofyourchoice. ForaserialpipeonaVMwareServerforWindowshost,thepipenamemust followtheform\\.\pipe\<namedpipe>thatis,itmustbeginwith\\.\pipe\. ForaserialpipeonaVMwareServerforLinuxhost,enter/tmp/<socket>or anotherUnixsocketnameofyourchoice. NOTE IfyouareusingaWindowsconsoletoconnecttoavirtualmachineona remoteLinuxhost,besuretospecifyaLinuxpipenamehere,suchas /tmp/<pipe>.IfyouareusingaLinuxconsoletoconnecttoavirtual machineonaremoteWindowshost,besuretospecifyaWindowspipe namehere,suchas\\.\pipe\<namedpipe>.
Fortheservervirtualmachine,selectThisendistheserver. Fortheclientvirtualmachine,selectThisendistheclient.
8 9
222
VMware, Inc.
Thisoptionisusefulifyouwanttosqueezeeverypossiblebitofspeedfromyourserial connectionoverapipetothevirtualmachine.Inprinciple,thereisnolimitonthe outputspeedthespeedatwhichthevirtualmachinesendsdatathroughthevirtual serialport.Inpractice,theoutputspeeddependsonhowfasttheapplicationatthe otherendofthepipereadsdatainboundtoit. <n>isthenumberoftheserialport,startingfrom0.Sothefirstserialportisserial0. <x>isanypositiveinteger.Itspecifiesthetimetakentotransmitacharacter,expressed asapercentageofthedefaultspeedsetfortheserialportintheguestoperatingsystem. Forexample,asettingof200forcestheporttotaketwiceaslongpercharacter,orsend dataathalfthedefaultspeed.Asettingof50forcestheporttotakeonlyhalfaslongper character,orsenddataattwicethedefaultspeed. Youshouldfirstusetheguestoperatingsystemtoconfiguretheserialportforthe highestsettingsupportedbytheapplicationyouarerunninginthevirtualmachine. Aftertheserialportspeedissetappropriatelyintheguestoperatingsystem, experimentwiththissetting.Startwithavalueof100andgraduallydecreaseituntil youfindthehighestspeedatwhichyourconnectionworksreliably.
Eitherofthesemethodsletsyoudebugkernelcodeononesystem,withoutrequiring twophysicalcomputers,amodemorserialcable.
224
VMware, Inc.
Topreparethehost,makesureyouhavearecentversionofDebuggingToolsfor Windowsonethatsupportsdebuggingoverapipe.Youneedversion4.0.18.0or higher. Whenyouarereadytobegin,completethefollowingsteps: 1 2 Poweronthevirtualmachine. Checktomakesuretheserialportisconnected.ChooseVM>Removable Devices.Onthatmenu,serial<n>shouldbereportedas\\.\pipe\<namedpipe>(on Windowshosts)or/tmp/<socket>(onLinuxhosts).Iftheserialportisnot connected,choosethevirtualserialport,thenConnect. Onthehost,openaCommandPromptwindowanddooneofthefollowing:
!
IfyouareusingKD,typethefollowing: kd -k com:port=\\.\pipe\<namedpipe>,pipe
ThenpressEntertostartdebugging.
box.Thekernelinthetargetvirtualmachineusesthevirtualserialportinpolledmode, notinterruptmode. Topreparethedebuggervirtualmachine,makesureyouhavedownloadedDebugging ToolsforWindows.FollowthestepsfortheclientvirtualmachineinConnectingTwo VirtualMachinesonpage 221. Whenyouarereadytocontinue,completethefollowingsteps: 1 2 Poweronbothvirtualmachines. Checktomakesuretheserialportisconnected.ChooseVM>Removable Devices.Iftheserialportisnotconnected,choosethevirtualserialport,and Connect. Inthedebuggervirtualmachine,startdebuggingwithWinDbgorKDnormally.
ThefollowingsectionsdescribekeyboardmappingonaLinuxhost:
! ! !
226
VMware, Inc.
xkeymap.usekeycodeMapIfXFree86 = true UsekeycodemappingifyouareusinganXFree86server,evenifitisremote. xkeymap.usekeycodeMap = true Alwaysusekeycodemappingregardlessofservertype. xkeymap.nokeycodeMap = true Neverusekeycodemapping. xkeymap.keycode.<code> = <v-scan code> Ifusingkeycodemapping,mapkeycode<code>to<v-scan code>.Inthis example,<code>mustbeadecimalnumberand<v-scan code>shouldbea Csyntaxhexadecimalnumber(forexample,0x001).
TheeasiestwaytofindtheXkeycodeforakeyistorunxevorxmodmap -pk.Mostof thevscancodesarecoveredintheVScanCodeTableonpage 229.Thekeysym mappingtablesdescribedinthissectionarealsohelpful. Usethisfeaturetomakesmallmodificationstothemapping.Forexample,toswapleft CtrlandCapsLock,usethefollowinglines: xkeymap.keycode.64 = 0x01d # X Caps_Lock -> VM left ctrl xkeymap.keycode.37 = 0x03a # X Control_L -> VM caps lock
VMware, Inc.
227
Theseconfigurationlinescanbeaddedtotheindividualvirtualmachineconfiguration, toyourpersonalVMwareServerconfiguration(~/.vmware/config),oreventothe hostwide(/etc/vmware/config)orinstallationwide(usually /usr/local/lib/vmware/config)configuration. Whenkeycodemappingcannotbeused(orisdisabled),VMwareServermaps keysymstovscancodes.Itdoesthisusingoneofthetablesinthexkeymapdirectoryin theVMwareServerinstallation(usually/usr/local/lib/vmware). Whichtableyoushouldusedependsonthekeyboardlayout.Thenormaldistribution includestablesforPCkeyboardsfortheUnitedStatesandanumberofEuropean countriesandlanguages.Andformostofthese,thereareboththe101key(or102key) andthe104key(or105key)variants. VMwareServerautomaticallydetermineswhichtabletousebyexaminingthecurrent Xkeymap.However,itsdecisionmakingprocesscansometimesfail.Inaddition,each mappingisfixedandmightnotbecompletelyrightforanygivenkeyboardandXkey codetokeysymmapping.Forexample,ausermighthaveswappedCtrlandCaps Lockusingxmodmap.Thismeansthekeysareswappedinthevirtualmachinewhen usingaremoteserver(keysymmapping)butunswappedwhenusingalocalserver (keycodemapping). Therefore,keysymmappingisnecessarilyimperfect.Tomakeupforthisdefect,you canchangemostofthebehaviorusingconfigurationsettings:
!
xkeymap.language = <keyboard-type> UsethisifVMwareServerhasatableinxkeymapforyourkeyboardbutcantdetect it.<keyboard-type>mustbeoneofthetablesinthexkeymapdirectory.(Seeabove forlocation.)However,thefailuretodetectthekeyboardprobablymeansthetable isntcompletelycorrectforyou. xkeymap.keysym.<sym> = <v-scan code> Ifyouusekeysymmapping,mapkeysym<sym>to<v-scan code>.Whenyoudo, <sym>mustbeanXkeysymnameand<v-scan code>shouldbeaCsyntax hexadecimalnumber(forexample,0x001). Theeasiestwaytofindthekeysymnameforakeyistorunxevorxmodmap -pk. TheXheaderfile/usr/X11R6/include/X11/keysymdef.hhasacompletelistof keysyms.(ThenameofakeysymisthesameasitsCconstantwithouttheXK_ prefix.)MostvscancodesareintheVScanCodeTableonpage 229. Thexkeymaptablesthemselvesarealsohelpful.Usethemtofixsmallerrorsinan existingmapping.
228
configurationlinesoftheform <sym> = <v-scan code> where<sym>isanXkeysymname,and<v-scan code>isaCsyntaxhexadecimal number(forexample,0x001).(Seetheexplanationofxkeymap.keysymabovefor tipsonfindingthekeysymsandvscancodesforyourkeyboard.) Compilingacompletekeysymmappingisdifficult.Itisbesttostartwithan existingtableandmakesmallchanges.
Shifted symbol
Location
V-scan code
0x001 0x002 0x003 0x004 0x005 0x006 0x007 0x008 0x009 0x00a 0x00b 0x00c 0x00d 0x00e 0x00f 0x010 0x011 0x012 0x013 0x014 0x015 0x016 0x017
VMware, Inc.
229
Shifted symbol
Location
V-scan code
0x018 0x019 0x01a 0x01b 0x01c 0x01d 0x01e 0x01f 0x020 0x021 0x022 0x023 0x024 0x025 0x026 0x027 0x028 0x029 0x02a 0x02b 0x02c 0x02d 0x02e 0x02f 0x030 0x031 0x032 0x033 0x034 0x035 0x036 0x037 0x038
230
VMware, Inc.
Shifted symbol
Location
V-scan code
0x039 0x03a 0x03b 0x03c 0x03d 0x03e 0x03f 0x040 0x041 0x042 0x043 0x044 0x045 0x046 0x047 0x048 0x049 0x04a 0x04b 0x04c 0x04d 0x04e 0x04f 0x050 0x051 0x052 0x053 0x057 0x058 0x100 0x11c 0x11d 0x135
VMware, Inc.
231
Shifted symbol
PrintScrn
Location
right functionpad functionpad functionpad functionpad functionpad functionpad functionpad functionpad functionpad functionpad left right
V-scan code
0x137 0x138 0x147 0x148 0x149 0x14b 0x14d 0x14f 0x150 0x151 0x152 0x153 0x15b 0x15c 0x15d
The84keykeyboardhasaSysReqkeyonthenumericpad:
Symbol
SysReq
Shifted symbol
Location
numericpad
V-scan code
0x054
<
>
232
VMware, Inc.
! ! ! ! ! !
UsingUSBwithaWindowsHostonpage 235 ReplacingUSB2.0DriversonaWindows2000Hostonpage 235 UsingUSBwithaLinuxHostonpage 235 USBDeviceControlonpage 236 DisconnectingUSBDevicesfromaVirtualMachineonpage 237 Thisisparticularlyimportantwithdatastoragedevices(aZipdrive,for example).Ifyoumoveadatastoragedevicetoosoonaftersavingafileandthe operatingsystemhasnotactuallywrittenthedatatothedisk,youcanlosedata. onpage 237
VMware, Inc.
233
followingstepswiththevirtualmachinepoweredoff.UsetheVMwareServerConsole toaddthedevice.
ClickFinishtoinstallthevirtualUSBcontroller,andclickOKtosavethe configurationandclosethevirtualmachinesettingseditor.
234
VMware, Inc.
VMware, Inc.
235
filesystem,youcanchangeitinthevirtualmachinesettingseditor(VM>Settings> USB).EnterthecorrectpathinthePathtousbdevfsfield.
WhenyouconnectaUSBnetworkorstoragedeviceinavirtualmachine,youmightsee amessageonyourhostthatsaysthedevicecanberemovedsafely.Thisisnormal behavior,andyoucansimplydismissthedialogbox.However,donotremovethe devicefromyourphysicalcomputer.VMwareServerautomaticallytransferscontrolof thedevicetothevirtualmachine. Undersomecircumstances,ifaUSBstoragedeviceisinuseonthehost(forexample, oneormorefilesstoredonthedeviceareopenonthehost),anerrorappearsinthe virtualmachinewhenyoutrytoconnecttothedevice.Youmustletthehostcomplete itsoperationorcloseanyapplicationconnectedtothedeviceonthehost.Reconnectthe deviceinthevirtualmachine.
236
VMware, Inc.
Arelatedissuesometimesaffectsdevicesthatrelyonautomaticconnection(asPDAs oftendo). Ifyouhavesuccessfullyusedautoconnectiontoconnectthedevicetoyourvirtual machine,andlaterexperienceproblemswiththeconnectiontothedevice,completethe followingsteps: 1 Disconnectandreconnectthedevice.Youcaneitherunplugitphysically,andplug itbackin,orusetheVM>RemovableDevicesmenutodisconnectitand reconnectit. Ifyouseeadialogboxwarningthatthedeviceisinuse,disableitinthehotplug configurationfilesinthe/etc/hotplugdirectory.
USB Devices
USBdevices,suchasthekeyboardandmouse,arenothandledthroughthevirtual machinesUSBcontroller.Instead,theyappearinthevirtualmachineasastandard PS/2keyboardandmouse,eventhoughtheyarepluggedintoUSBportsonthehost.
GenericSCSIletsavirtualmachinerunanySCSIdevicethatissupportedbytheguest operatingsysteminthevirtualmachine.GenericSCSIgivestheguestoperatingsystem
VMware, Inc. 237
directaccesstoSCSIdevicesconnectedtothehost,suchasscanners,tapedrives,and tapechangers.
238
VMware, Inc.
Preparing a Windows Me, Windows 98, or Windows 95 Guest OS to Use SCSI Devices
IfyouareusinggenericSCSIdevicesinaWindows95,Windows98,orWindowsMe guestoperatingsystemandareexperiencingproblemswiththedevices,downloadthe latestMylex(BusLogic)BT/KT958compatiblehostbusadapterfrom www.lsilogic.com.ThisdriveroverrideswhatWindowschoosesasthebestdriver,but itcorrectsknownproblems.
4 5
VMware, Inc.
239
NOTE
6 7
ClickFinishtoinstallthenewdevice. ClickOKtosavetheconfigurationandclosethevirtualmachinesettingseditor.
Beforeyouattemptthestepsbelow,verifythatthedevicedriverisinstalledonthehost. Ifthedriverisnotinstalled,installitandverifythatthedeviceappearscorrectlyto VMwareServer.Ifitdoesnotappearcorrectly,orifyoucannotordonotwanttoinstall thedriveronthehost,addthedevicemanuallytothevirtualmachine. Whenaddingadevicemanuallytothevirtualmachine,usescsiX:Ynotationtorefer tothedeviceonthehostinsteadofadevicenamesuchasCdRom0, that VMwareServer uses.Forthistypeofnotation,XistheSCSIbusonwhichthedeviceislocatedonthe hostandYisthetargetIDthedeviceusesonthehost. CAUTION Addingadeviceinthismannerisrecommendedforadvancedusersonly.
240
VMware, Inc.
CAUTION
Thereareafewcircumstancesthatrequireyoutoaddthedevicemanually.Followthe stepsthatmatchyourcircumstance.Ineachcase,poweroffthevirtualmachineand openthevirtualmachinesconfigurationfile(.vmx)inatexteditorandmakethe changesasdescribedbelow. 1 ThevirtualmachinedoesnotcontainanySCSIadaptersordevices,oryouwantto addagenericSCSIdevicetoanewvirtualSCSIadapterinthevirtualmachine. Toaddthedevicetothevirtualmachine,youneedtoaddthefollowinglinestothe virtualmachinesconfigurationfile: scsiZ:Y.present = "true" scsiZ:Y.deviceType = "scsi-passthru" scsiZ:Y.fileName = "scsiX:Y" DefineX,YandZasfollows:
! !
ThevirtualmachinehasaSCSIadapterandgenericSCSIdevice,butVMware ServerdoesnotrecognizethedeviceintheAddHardwareWizard.
241
VMware, Inc.
Forexample,iftheproblematicdeviceisaCDROMdrive,theentryinthe configurationfilemightbe: scsi0:4.fileName = "CdRom0" Ifthedeviceonthehostislocatedonbus2withtargetID4,youshouldchangethis lineto: scsi0:4.fileName = "scsi2:4" ThetargetIDthedeviceusesinthevirtualmachinemustbethesameasthetarget IDthedeviceusesonthehostsystem. 4 YouaddedagenericSCSIdevicetothevirtualmachinesconfigurationfile(.vmx) asinstructedinstep3,butVMwareServerdoesnotrecognizethedeviceinthe AddHardwareWizard.Youmightexperiencethisissuewithtapedrivesandtape changers. Inthiscase,lookforthelineintheconfigurationfilethatlookslike: scsiZ:Y.fileName = "scsiX:Y" Changethelineto: scsiZ:Y.fileName = "<deviceName>" ExampledevicenamesincludeTape0andChanger0. Anotheralternativeyoucantryistouninstallordisablethedevicedriveronthe hostandusethe"scsiX:Y"notationintheconfigurationfile.
242
VMware, Inc.
NOTE
Requirements
GenericSCSIrequiresversion2.1.36oftheSCSIGeneric(sg.o)driver,whichcomes withkernel2.2.14andhigher.
VMware, Inc.
243
usethesamedeviceinbothhostandguest.Thiscancauseunexpectedbehaviorand maycauselossorcorruptionofdata.
NOTE
244
VMware, Inc.
NOTE
Thesummaryviewalsodisplaysthenumberofvirtualprocessors currentlyconfiguredforthevirtualmachine.
Youcanalsosetthenumberofvirtualprocessorswhenyoucreateavirtualmachine usingtheNewVirtualMachineWizard.Youmustchooseacustomconfiguration.The optiontosetthenumberofvirtualprocessorsisnotavailableinatypicalconfiguration. Formoreinformation,seeSettingUpaNewVirtualMachineonpage 25. VMwareServerdoesnotsupportorrecommendassigningtwoprocessorstoahost withasingleprocessorthatdoesnothavehyperthreadingenabled.Awarningmessage appearsifyoudoso.Youcandisregardthismessageandassigntwoprocessorstothe virtualmachine,butafteryouhavecreatedthevirtualmachine,youwillnotbeableto poweritonunlessyoumoveittoahostmachinewithatleasttwologicalprocessors. VirtualMachineswithVirtualSMPenabledarecompatiblewithWorkstation5.x virtualmachines.YoucanalsomovevirtualmachineswithVirtualSMPenabled betweenVMwareServerandVMwareESXServer. VirtualMachineswithVirtualSMPenabledarenotcompatiblewithVMwareGSX Server3orwithversionsofWorkstationpriorto5.x.
VMware, Inc.
245
246
VMware, Inc.
C HAPTER 9
Thischapterprovidesinformationonconfiguringthevideodisplayandsoundfor VMwareServerandcoversthefollowingtopics:
! ! !
Ifthehostisin15bitcolormode,theguestoperatingsystemscolorsettingcontrols offer15bitmodeinplaceof16bitmode. Ifthehostisin24bitcolormode,theguestoperatingsystemscolorsettingcontrols offer24bitmodeinplaceof32bitmode. Ifyourunaguestoperatingsystemsetforagreaternumberofcolorsthanyourhost operatingsystemisusing,youcanencountervariousproblems.Insomecases,the colorsintheguestarenotcorrect.Inothers,theguestoperatingsystemisnotableto useagraphicalinterface. Tofixtheseproblems,youcaneitherincreasethenumberofcolorsavailableonthehost ordecreasethenumberofcolorsusedintheguest. Forbestperformance,usethesamenumberofcolorsintheguestandonthehost. Thefollowingsectionsdescribechangingthecolordepthonthehostandinavirtual machine:
VMware, Inc. 247
! !
Configuring Sound
VMwareServerprovidesasounddevicecompatiblewiththeCreativeTechnology SoundBlasterAudioAPIadapterandsupportssoundinWindows95,Windows98, WindowsMe,WindowsNT,Windows2000,WindowsXP,WindowsServer2003,and Linuxguestoperatingsystems.TheVMwareServersounddeviceisdisabledbydefault andmustbeinstalledusingthevirtualmachinesettingseditor(VM>Settings). SoundsupportincludesPCM(pulsecodemodulation)output,andinput.Forexample, youcanplay.wavfiles,MP3audio,andRealMediaaudio.MIDIoutputfromWindows guestsissupportedthroughtheWindowssoftwaresynthesizer.MIDIinputisnot supported,andnoMIDIsupportisavailableforLinuxguests. Windows2000,WindowsXP,andmostrecentLinuxdistributionsautomaticallydetect thesounddeviceandinstallappropriatedriversforit. ThefollowingsectionsdescribeinstallingsounddriversinsomeWindowsguest operatingsystems.
VMware, Inc.
249
CreativeLabshasanumberofWebsitesservingvariousregionsoftheworld.The adapternamevaries,dependingontheregion,butusuallyincludesPCI128.
250
VMware, Inc.
ThischapterdescribesoptionsforgettingthebestperformancefromVMwareServer andyourvirtualmachinesandcoversthefollowingtopics:
! !
VMware, Inc.
251
Formoreinformationonhostmemoryuse,seeUnderstandingMemoryUsage.
252
VMware, Inc.
Windows 2000, Windows XP and Windows Server 2003 Guest OS Performance Tips
ThissectionoffersadviceforconfiguringaWindows2000,WindowsXP,orWindows Server2003guestoperatingsystemforbetterperformanceinsideavirtualmachine. NOTE Thissectionpertainstotheguestoperatingsystemthatisrunninginsidea VMwareServervirtualmachine.Itdoesnotdescribeactionsthatshouldbe takenonWindows2000orWindowsServer2003runningonthehost computer.
VMware Tools
MakecertainVMwareToolsisinstalled.VMwareToolsprovidesanoptimizedSVGA driverandsetsuptheVMwareToolsservicetorunautomaticallywhenthesystem starts.Amongotherthings,VMwareToolsallowsyoutosynchronizethevirtual machinesclockwiththehostcomputersclock,whichcanimproveperformancefor somefunctions.InstallVMwareToolsbychoosingVM>InstallVMwareTools.
VMware, Inc.
253
Visual Effects
ThefadeeffectsthatWindows2000,WindowsXP,andWindowsServer2003usewhen displayingmenuscanbesomewhatslowandmakethevirtualmachineseemless responsive. Todisablethefadeeffects,rightclicktheguestoperatingsystemdesktop,thenchoose Properties>Appearance>Effects(onWindowsXPorWindowsServer2003)or Properties>Effects(onWindows2000)anddeselecttheUsetransitioneffectsfor menusandtooltipscheckbox.
VMware Tools
MakecertainVMwareToolsisinstalled.VMwareToolsprovidesanoptimizedSVGA driverandsetsuptheVMwareToolsservicetorunautomaticallywhenthesystem starts.Amongotherthings,theVMwareToolsserviceallowsyoutosynchronizethe virtualmachinesclockwiththehostcomputersclock,whichcanimprove
254
VMware, Inc.
performanceforsomefunctions.InstallVMwareToolsbychoosingVM>Install VMwareTools.
Disconnect CD-ROM
UsingtheRemovableDevicessubmenu,disconnectyourCDROMdriveifyoudonot needtouseit.DisconnectingtheCDROMdrivereducesprocessorusage.
Visual Effects
Windows98hasanumberofvisualeffects,designedtobeattractive,thatplace unnecessarydemandsonthegraphicsemulationinVMwareServer.Someusershave seenperformanceimprovementswhentheyturnoffthesespecialeffects. Tomodifythesesettings,rightclickonthedesktopofyourvirtualmachine,thenselect Propertiesfromthepopupmenu.ClicktheEffectstabanddeselecttheAnimate windows,menus,andlistscheckbox.
VMware, Inc.
255
Also,ifShowwindowcontentswhiledraggingischecked,trydeselectingthatcheck box.
VMware Tools
MakecertainVMwareToolsisinstalled.VMwareToolsprovidesanoptimizedSVGA driverandsetsuptheVMwareToolsservicetorunautomaticallywhenthesystem starts.Amongotherthings,theVMwareToolsserviceallowsyoutosynchronizethe virtualmachinesclockwiththehostcomputersclock,whichcanimprove performanceforsomefunctions.InstallVMwareToolsbychoosingVM>Install VMwareTools.
Disconnect CD-ROM
UsingtheRemovableDevicessubmenu,disconnectyourCDROMdriveifyoudonot needtouseit.DisconnectingtheCDROMdrivereducesprocessorusage.
256
VMware, Inc.
Glossary
AddHardwareWizard Apointandclickinterfaceforaddingvirtualhardwaretoavirtualmachine.To launchtheWizard,poweroffthevirtualmachine,openthevirtualmachine settingseditor,thenclickAdd.Itpromptsyouforinformationforconfiguringthe hardware,suggestingdefaultvaluesinmostcases. SeealsoVirtualmachinesettingseditor. Bridgednetworking Atypeofnetworkconnectionbetweenavirtualmachineandtherestoftheworld. Underbridgednetworking,avirtualmachineappearsasanadditionalcomputer onthesamephysicalEthernetnetworkasthehost. SeealsoHostonlynetworking. Configuration SeeVirtualmachineconfigurationfile. Console SeeVMwareServerConsole. Currentvirtualmachine AvirtualmachinecreatedunderthecurrentVMwareServerversionand WorkstationServer5.x. SeealsoLegacyvirtualmachine. Customnetworking Anytypeofnetworkconnectionbetweenvirtualmachinesandthehostthatdoes notusethedefaultbridged,hostonlyornetworkaddresstranslation(NAT) networkingconfigurations.Forinstance,differentvirtualmachinescanbe connectedtothehostbyseparatenetworksorconnectedtoeachotherandnotto thehost.Anynetworktopologyispossible.
VMware, Inc.
191
EULA Theenduserlicenseagreement. Existingpartition Apartitiononaphysicaldiskinthehostmachine. SeealsoPhysicaldisk. Fullscreenmode Adisplaymodeinwhichthevirtualmachinesdisplayfillstheentirescreen. SeealsoQuickswitchmode. Growabledisk Atypeofvirtualdiskwherethediskspaceisnotpreallocatedtoitsfullsize.Its filesstartoutsmallinsizeandgrowasdataiswrittentoit. Guestoperatingsystem Anoperatingsystemthatrunsinsideavirtualmachine. SeealsoHostoperatingsystem. Headless Adescriptionforaprogramorapplicationthatrunsinthebackgroundwithout anygraphicaluserinterfaceconnectedtoit.Avirtualmachinerunningwithno consolesconnectedtoitisconsideredtoberunningheadless. Hostonlynetworking Atypeofnetworkconnectionbetweenavirtualmachineandthehost.Under hostonlynetworking,avirtualmachineisconnectedtothehostonaprivate network,whichnormallyisnotvisibleoutsidethehost.Multiplevirtualmachines configuredwithhostonlynetworkingonthesamehostareonthesamenetwork. SeealsoBridgednetworking,CustomnetworkingandNetworkaddress translation. Hostcomputer ThephysicalcomputeronwhichtheVMwareServersoftwareisinstalled.Ithosts theVMwareServervirtualmachines.
192
VMware, Inc.
Glossary
Hostoperatingsystem Anoperatingsystemthatrunsonthehostmachine. SeealsoGuestoperatingsystem. Independentdisk Anindependentdiskisatypeofvirtualdiskthatisnotaffectedbysnapshots. Independentdiskscanbeconfiguredinpersistentandnonpersistentmodes. SeealsoNonpersistentmode,Persistentmode. Inventory Alistintheleftpaneloftheconsolewindowthatshowsthenamesofvirtual machinesthatauserhasaddedtothelist.Theinventorymakesiteasytolauncha virtualmachineortoconnecttothevirtualmachinesconfigurationfileinorderto makechangesinthevirtualmachinesettings. Legacyvirtualmachine AvirtualmachinecreatedunderVMwareGSXServerorVMwareWorkstation3 or4.SeealsoCurrentvirtualmachine. Networkaddresstranslation(NAT) Atypeofnetworkconnectionthatallowsyoutoconnectyourvirtualmachinesto anexternalnetworkwhenyouhaveonlyoneIPnetworkaddress,andthataddress isusedbythehostcomputer.IfyouuseNAT,yourvirtualmachinedoesnothave itsownIPaddressontheexternalnetwork.Instead,aseparateprivatenetworkis setuponthehostcomputer.Yourvirtualmachinegetsanaddressonthatnetwork fromtheVMwarevirtualDHCPserver.TheVMwareNATdevicepassesnetwork databetweenoneormorevirtualmachinesandtheexternalnetwork.Itidentifies incomingdatapacketsintendedforeachvirtualmachineandsendsthemtothe correctdestination. SeealsoBridgednetworking,CustomnetworkingandHostonlynetworking. NewVirtualMachineWizard Apointandclickinterfaceforconvenient,easycreationofavirtualmachine configuration.TolaunchtheWizard,chooseFile>NewVirtualMachine.It promptsyouforinformation,suggestingdefaultvaluesinmostcases.Itcreates filesthatdefinethevirtualmachine,includingavirtualmachineconfigurationfile and(optionally)avirtualdiskorphysicaldiskfile. SeealsoVirtualmachinesettingseditor.
VMware, Inc.
193
Nonpersistentmode Amodeinwhichalldiskwritesissuedbysoftwarerunninginsideavirtual machinewithadiskinnonpersistentmodeappeartobewrittentodiskbutarein factdiscardedafterthevirtualmachineispoweredoff.Ifyouconfigureavirtual diskorphysicaldiskasanindependentdiskinnonpersistentmode,thediskisnot modifiedbyVMwareServer. SeealsoIndependentdisk,Persistentmode Persistentmode Amodeinwhichalldiskwritesissuedbysoftwarerunninginsideavirtual machineareimmediatelyandpermanentlywrittentothevirtualdisk.Ifyou configureavirtualdiskorphysicaldiskasanindependentdiskinpersistentmode, thediskbehaveslikeaconventionaldiskdriveonaphysicalcomputer. SeealsoIndependentdisk,Nonpersistentmode Physicaldisk Aharddiskinavirtualmachinethatismappedtoaphysicaldiskdriveor partitiononthehostmachine.Avirtualmachinesdiskcanbestoredasafileon thehostfilesystemoronalocalharddisk.Whenavirtualmachineisconfigured touseaphysicaldisk,VMwareServerdirectlyaccessesthelocaldiskorpartition asarawdevice(notasafileonafilesystem). SeealsoVirtualdisk. Preallocateddisk Atypeofvirtualdiskwherealldiskspaceforthevirtualmachineisallocatedat thetimethediskiscreated.Thisisthedefaulttypeofvirtualdiskcreatedby VMwareServer. Quickswitchmode Adisplaymodeinwhichthevirtualmachinesdisplayfillsmostofthescreen.In thismode,tabsatthetopofthescreenallowyoutoswitchquicklyfromone runningvirtualmachinetoanother. SeealsoFullscreenmode. Rawdisk Seephysicaldisk.
194
VMware, Inc.
Glossary
Redolog Thefilethatstoresthechangesmadetoadiskinindependentnonpersistentmode. Theredologfileisdeletedwhenyoupowerofforresetthevirtualmachine withoutwritinganychangestothedisk. Resume Returnavirtualmachinetooperationfromitssuspendedstate.Whenyouresume asuspendedvirtualmachine,allapplicationsareinthesamestatetheywerewhen thevirtualmachinewassuspended. SeealsoSuspend. Shrink Reducetheamountoffilesystemspaceavirtualdiskoccupiesinordertoreclaim unusedspaceinavirtualdisk.Ifthereisemptyspaceinthedisk,shrinking reducestheamountofspacethevirtualdiskoccupiesonthehostdrive.You cannotshrinkpreallocatedvirtualdisksorphysicaldisks. Snapshot Awaytopreservethestateofavirtualmachinethestateofthedataonallthe virtualmachinesdisksandthevirtualmachinespowerstate(whetherthevirtual machinewaspoweredon,poweredofforsuspended).Youcantakeasnapshotof avirtualmachineatanytimeandreverttothatsnapshotatanytime.Thevirtual machinecanbepoweredon,poweredofforsuspended. Supportedpartition AvirtualdiskpartitionthatVMwareToolscanprepareforshrinking,suchasone ofthedrivesthatcomprisethevirtualharddisk.Youcanchoosetonotprepare certainpartitionsforshrinking. SeealsoShrink. Suspend Savethecurrentstateofarunningvirtualmachine.Toreturnasuspendedvirtual machinetooperation,usetheresumefeature. SeealsoResume. Unsupportedpartition AvirtualdiskpartitionthatVMwareToolscannotprepareforshrinking. Unsupportedpartitionsincludereadonlydrivepartitions,partitionsonremote devicesandpartitionsonremovabledevicessuchasfloppydrivesorCDROM
VMware, Inc. 195
drives. SeealsoShrink. Virtualdisk Avirtualdiskisafileorsetoffilesthatappearsasaphysicaldiskdrivetoaguest operatingsystem.Thesefilescanbeonthehostmachineoronaremotefilesystem. Whenyouconfigureavirtualmachinewithavirtualdisk,youcaninstallanew operatingsystemintothediskfilewithoutneedingtorepartitionaphysicaldisk orrebootthehost.Virtualdiskscanbepreallocatedorgrowable.Apreallocated virtualdiskhasallthediskspaceallocatedatthetimethevirtualdiskiscreated.A growablediskisnotpreallocated;itsfilesstartoutsmallinsizeandgrowasdata iswrittentoit. SeealsoPhysicaldisk. Virtualhardware Thedevicesthatcompriseavirtualmachine.Thevirtualhardwareincludesthe virtualdisk,theremovabledevicessuchastheDVDROM/CDROMandfloppy drives,andthevirtualEthernetadapter.Youconfigurethesedeviceswiththe virtualmachinesettingseditor. Virtualmachine Avirtualizedx86PCenvironmentinwhichaguestoperatingsystemand associatedapplicationsoftwarecanrun.Multiplevirtualmachinescanoperateon thesamehostmachineconcurrently. Virtualmachineconfiguration Thespecificationofwhatvirtualdevices(disks,memorysize,andsoforth)are presentinavirtualmachineandhowtheyaremappedtohostfilesanddevices. Virtualmachineconfigurationfile Afilecontainingavirtualmachineconfiguration.Itiscreatedwhenyoucreatethe virtualmachine.ItisusedbyVMwareServertoidentifyandrunaspecificvirtual machine. Virtualmachinesettingseditor Apointandclickcontrolpanelusedtoviewandmodifyavirtualmachines settings.YoulaunchitbychoosingVM>Settings. SeealsoNewVirtualMachineWizard.
196
VMware, Inc.
Glossary
VirtualNetworkEditor Apointandclickeditorusedtoviewandmodifythenetworkingsettingsforthe virtualnetworkscreatedbyVMwareServer.YoulaunchbychoosingHost> VirtualNetworkSettings. VirtualSMP Symmetricmultiprocessingenablesyoutoassigntwovirtualprocessorstoa virtualmachineonanyhostmachinethathasatleasttwologicalprocessors. VMwareAuthorizationService TheserviceVMwareServeremploystoauthenticateusers.ForbothMicrosoft WindowsandLinuxhosts,thisprocessiscalledvmware-authd. VMwareManagementInterface Abrowserbasedtoolthatallowsyoutocontrol(start,suspend,resume,resetand stop),configureandmonitorvirtualmachinesandtheserveronwhichtheyrun. VMwareRegistrationService TheserviceVMwareServeremploysformanagingconnectionstovirtual machinesandtheVMwareManagementInterface.Thisprocessisknownas vmware-serverdonLinuxhostsandvmware-serverdwin32onMicrosoftWindows hosts. VMwareTools Asuiteofutilitiesanddriversthatenhancestheperformanceandfunctionalityof yourguestoperatingsystem.KeyfeaturesofVMwareToolsincludesomeorallof thefollowing,dependingonyourguestoperatingsystem:anSVGAdriver,a mousedriver,theVMwareToolsservice,theVMwareToolscontrolpanel,and supportforsuchfeaturesastheabilitytoshrinkvirtualdisks,time synchronizationwiththehost,VMwareToolsscriptsandtheabilitytoconnectand disconnectdeviceswhilethevirtualmachineisrunning. VMwareToolsservice OneofthecomponentsinstalledwithVMwareToolsthatperformsvariousduties intheguestoperatingsystem,likeexecutingcommandsinthevirtualmachine, gracefullyshuttingdownandresettingavirtualmachine,sendingaheartbeatto VMwareServer,synchronizingthetimeoftheguestoperatingsystemwiththe hostoperatingsystemandpassingstringsfromthehostoperatingsystemtothe guestoperatingsystem.
VMware, Inc. 197
198
VMware, Inc.
Index
Symbols
.bmp 81 .dsk 26 .log 25 .png 81 .REDO 26 .vmdk 25, 122 .vmsn 26 .vmss 26 .vmx 25
Address assigning IP 174 assigning MAC manually 177 IP in virtual machine 33 IP on virtual network 172 MAC 176 network address translation 190 using DHCP to assign on a virtual network 172 Assign IP address 172 MAC address 176 Autofit 97 Automatic bridging 165
A
Access to physical disks 146 Adapter host virtual 154 in promiscuous mode on a Linux host 189 virtual Ethernet 162 Add devices to virtual machine 103 DVD or CD drive 137 floppy drive 138 generic SCSI device 239 host virtual adapter 168 parallel port 212 physical disk 134 serial port 216 software to virtual machine 101 virtual disk 132 virtual Ethernet adapter 162 Add Hardware Wizard 257
B
BIOS file in virtual machine 25 provided in virtual machine 12 Bridge 154 Bridged networking configuring options 164 Bridged networking defined 257 BSD supported guest operating systems 16, 19 VMware Tools for 50 Build number 60
C
Capture screen shot of virtual machine 81
265
VMware, Inc.
CD adding drive to virtual machine 137 CD-ROM image file 13 legacy emulation 87 Change See Configure Chip set in a virtual machine 12 Color screen colors in a virtual machine 247 Commands keyboard shortcuts 106 on the command line 105 Compress See Shrink Configuration, virtual machine 262 Configure automatic bridging 165 devices in virtual machine 103 DHCP on Linux host 173 DHCP on Windows host 173 DHCP settings 167 display resolution on a Linux host 248 generic SCSI device 237, 239 host virtual network mapping 166 memory size 251 NAT 193 NAT on Linux host 200 networking 164 parallel port 212 parallel port on a Linux host 213 screen colors 247 second bridged network on a Linux host 179 serial port 216 sound 249 USB controller 233
virtual Ethernet adapter 162 virtual network 153, 155, 159, 162 virtual network subnet settings 167 VMware Tools 56 X server 248 Connect removable devices 104 USB devices 234 Controls, hiding 98 Copy 102 Core files 22 CPU host requirement 4 CPU, provided in virtual machine 12 Create virtual machine 25 Current virtual machine 86 defined 257 Cut 102
D
DDNS 179 Defragment virtual disks 125 Delete virtual machine from inventory 80 Devices adding, configuring and removing 103 connecting and disconnecting 104 disconnecting from USB controller 237 keyboard 226 legacy emulation 87 parallel port 211 provided in virtual machine 12 scanners 238 serial ports 216 tape changers 238 tape drives 238 USB 232
VMware, Inc.
266
Index
DHCP assigning IP addresses on a virtual network 172 changing settings 167 configuring on a Linux host 173 configuring on a Windows host 173 DHCP server 155 on a virtual network with NAT 191 server on virtual network 157158 troubleshooting on a Linux host 178 dhcpd 178 Dial-up connection 175 Direct memory access See DMA Disable host virtual adapter 168 Disconnect removable devices 104 USB devices 237 Disk files 122 Disk modes compared to snapshot 117 Disks adding virtual disks 132 available in virtual machine 13 defragmenting 125 DMA and performance 255 existing partition 258 file locations 122 growable 120 independent 114, 121 nonpersistent mode 122 persistent mode 122 physical 260 preallocated 120 See also Virtual disk shrinking 81, 125 size 120
VMware, Inc.
virtual 120, 262 virtual disk files 25 virtual disk manager 139 virtual disk size in new virtual machine 28 Display color depth 247 fitting virtual machine to window 97 fitting window to virtual machine 97 full screen 95 multiple monitor 96 resolution on a Linux host 248 switching virtual machines 95 DMA and disk performance 151, 255 DNS 191 Drawing tablet in a virtual machine 14 Driver SCSI 238 sound 249 Drives See Disks Dual-monitor display 96 DVD, adding drive to virtual machine 137 Dynamic domain name service 179
E
Enable host virtual adapter 168 Ethernet adapter in a virtual machine 14 adapter in promiscuous mode on a Linux host 189 adding virtual adapter 162 See Network virtual adapter 155 Event log 22 Existing disk, using in a virtual machine 121
267
avoiding concurrent access on a Linux host 243 on a Linux host 243 on a Windows host 240 permissions 244 virtual machine devices 237 Windows NT driver 238 Windows Server 2003 driver 238 Graphics support in virtual machine 13, 247 Growable disk 120 Guest operating system defined 258 installing 37 supported 15
F
Fault tolerance 165 Files BIOS in virtual machine 25 location of virtual disk files 29 log 25 redo log 26 Samba and file sharing on a Linux host 201 snapshot 26 used by a virtual machine 25 used by snapshot 26 virtual disk files 25 Firewall 198 Fit virtual machine to window 97 window to virtual machine 97 Floppy add drive to virtual machine 138 drives in virtual machine 13 image file 13 Format virtual disk 36 FreeBSD supported guest operating systems 16, 19 VMware Tools for 50 FTP 192 Full screen mode using 95 Full screen mode, defined 258
H
Halt virtual machine 92 Headless 258 Hide controls 98 Hints 80 Host computer defined 258 system requirements 4 Host operating system, defined 259 Host virtual adapter adding 168 defined 154 disabling 168 enabling 168 removing 168 Host virtual network mapping 166 Host-only networking basic configuration 158 defined 258 selecting IP addresses 172
G
gated 177 Generic SCSI adding to virtual machine 239
268
VMware, Inc.
Index
I
ICMP 192 IDE drives in virtual machine 13 See Disks virtual disk 35 Image file floppy 13 ISO 13, 137 Independent disks 121 Install guest operating system 37 guest operating system on physical disk 146 log 24 silent 48 software in a virtual machine 101 VMware Tools 41 Internet connection sharing 159 Inventory defined 259 hide 98 removing from list 80 Iomega parallel port Zip drives 216 IP address assigning 174 in virtual machine 33 IP forwarding 175 ISO image file 13, 137
L
Launch virtual machine 82, 84 Leak IP packets in a virtual machine 175 IP packets in host-only network 174 Legacy emulation 87 Legacy virtual machine 86 defined 259 Linux keyboard mapping 226 supported guest operating systems 16 supported host operating systems 7 VMware Tools for 50 Lock files 124 Log files console installation 24 virtual machine 22, 25 virtual machine event log 22 VMware Authorization Service 23 VMware Management Interface 23 VMware Registration Service 23 VMware Server Console 22 VMware Server installation 24
M
MAC address 176177 Map key code 228 keyboard 226 keysym 228
K
Key code mapping 228 Keyboard in a virtual machine 14 mapping on a Linux host 226 shortcuts 106 USB 237
VMware, Inc.
269
Memory allocating to virtual machine 32 amount required on host 5 available in virtual machine 13 setting size 251 virtual machine memory size 251 Migrate, upgrading virtual disks 45 Mode full screen 95, 258 nonpersistent compared to snapshot 117 persistent compared to snapshot 117 quick switch 95, 260 snapshot and disk modes compared 117 Mouse in a virtual machine 14 USB 237 MS-DOS, supported guest operating systems 17
NetWare See Novell NetWare Network adding and modifying virtual Ethernet adapters 162 automatic bridging 165 bridge 154 bridged networking 257 changing DHCP settings 167 changing subnet settings 167 changing the configuration 162 common configurations 155 components 153 configuring 153 configuring bridged networking options 164 custom configurations 159 custom networking 257 DHCP 172 DHCP server 155 dial-up connection 175 dynamic domain name service 179 fault tolerance 165
N
NAT advanced configuration 193 and DHCP 191 and DNS 191 and the host computer 191 defined 259 external access from a NAT network 192 on virtual network 157, 190 sample configuration file for Linux host 200 selecting IP addresses 172 virtual device 154 when creating a virtual machine 33 nat.conf 195, 200
hardware address 176 host virtual adapter 154 host virtual network mapping 166 host-only 158, 258 host-only subnet 172 Internet connection sharing 159 IP forwarding 175 IP packet leaks 174175 MAC address 176 NAT 157, 190 NAT as firewall 198 NAT device 154 NAT subnet 172
270
VMware, Inc.
Index
packet filtering 175 promiscuous mode on a Linux host 189 routing between two host-only networks 185 routing on a Linux host 177 Samba 201 second bridged network on a Linux host 179 specifying in virtual machine 33 switch 153 teamed NICs 166167, 180 Token Ring 157, 159 troubleshooting DHCP on a Linux host 178 two host-only networks 182 virtual DHCP server 157158 virtual Ethernet adapter 155 Virtual Network Editor 165, 169, 173, 263 virtual switch 153 wireless network 156 Network adapter in a virtual machine 14 Network adapter teaming 166167, 180 Network address translation See NAT Network driver vlance 155, 162 vmxnet 87, 155, 162 New Virtual Machine Wizard 27, 119, 259 NIC adding and configuring virtual Ethernet adapter 162 promiscuous mode on a Linux host 189 Nonpersistent mode, compared to snapshot 117
Novell NetWare VMware Tools for 53 Novell NetWare, supported guest operating systems 19 nvram 25, 99
O
Operating system guest 258 host 259 installing guest 37 supported guest 15 supported Windows host 6
P
Packet filtering 175 leaks 174175 Parallel port in a virtual machine 14 Parallel ports and Iomega Zip drives 216 and the Linux kernel 211 configuring on a Linux host 213 in a virtual machine 211 installing in virtual machines 212 Partition virtual disk 36 Partition, existing 258 Passwords, Samba password file 206 Paste 102 PCI slots in virtual machine 13 limits 13 Performance DMA and disks 255 Linux guest 256 memory usage 251
VMware, Inc.
271
Windows 2000 guest 253 Windows 95 and Windows 98 guests 254 Permissions and running virtual machines 26 Persistent mode, compared to snapshot 117 Physical disk adding 134 defined 260 installing guest operating system on 146 using in a virtual machine 121 Ping 192 Power buttons for a virtual machine 78 Preallocated disk 120 Preallocated disk, defined 260 Private virtual machines 26 Processor host requirement 4 Processor, provided in virtual machine 12 Promiscuous mode 189 PXE boot 100
devices from virtual machine 103 host virtual adapter 168 removable devices 104 USB devices 237 virtual machine from inventory 80 Restore suspended virtual machine 91 virtual machine to state in snapshot 112 Resume virtual machine 91, 109 Resume, defined 261 Return See Revert to snapshot Revert to snapshot 112 routed 177 Routing between two host-only networks 185 for a host-only network on a Linux host 177 Run suspended virtual machine 91, 109
S
Samba already running on a Linux host 207 and file sharing on a Linux host 201 and printer sharing 202 on both bridged and host-only networks 208 password file 206 running two Samba servers 208 sample configuration file 202, 204, 208 Save state of virtual machine 91, 109, 112 Screen colors 247 Screen modes
Q
Quick switch mode 95, 260 Quiet mode, install VMware Tools 48
R
RAM amount required on host 5 RAM available in virtual machine 13 Raw disk See Physical disk Redo log, defined 261 Registration 20 Remove controls 98
272
VMware, Inc.
Index
full screen 95 quick switch 95 Screen shot, capturing 81 Scripts running during power state changes 55 VMware Tools and 58, 61 SCSI adding a generic SCSI device 239 avoiding concurrent access on a Linux host 243 connecting to generic SCSI device 237 devices in virtual machine 13 driver for Windows NT guest 238 driver for Windows Server 2003 guest 238 driver for Windows XP guest 238 generic SCSI on a Linux host 243 generic SCSI on a Windows host 240 permissions for a generic SCSI device on a Linux host 244 virtual disk 35 Serial connection between host application and virtual machine 220 between two virtual machines 221 to a serial port on the host 217 Serial number 83 Serial port in a virtual machine 13 installing and using 216 Server DHCP 155, 161, 168, 173, 178, 191, 198 DNS 179, 191, 194 Samba 201
WINS 193, 198 X on a Linux host 248 Set up automatic bridging 165 DHCP on Linux host 173 DHCP on Windows host 173 DHCP settings 167 display resolution on a Linux host 248 generic SCSI device 237, 239 host virtual network mapping 166 memory size 251 networking 164 parallel port 212, 216 parallel port on a Linux host 213 screen colors 247 second bridged network on a Linux host 179 software in virtual machine 101 sound 249 USB controller 233 virtual machine 25 virtual network 153, 155, 159, 162 virtual network subnet settings 167 VMware Tools 56 X server 248 Settings for a virtual machine 103 Share files on a Linux host with Samba 201 Shortcuts keyboard 106 Shrink virtual disks 81, 125 Shrink, defined 261 Shut down virtual machine 92 Silent install 48 Size
VMware, Inc.
273
virtual machine window 97 smb.conf 202, 204, 208 SMBIOS in a virtual machine 12 Snapshot compared to disk modes 117 defined 261 files 26 removing 116 reverting virtual machine 112 ways of using 114 what is saved in 113 Solaris VMware Tools for 50 Sound configuring 249 drivers for Windows 9x and Windows NT guest operating systems 249 drivers for Windows Server 2003 guest operating systems 249 in a virtual machine 14 Specifications for virtual machine platform 12 Start suspended virtual machine 91, 109 virtual machine 82, 84 VMware Tools 80 Status bar, hide 98 Stop virtual machine 92 Subnet changing settings 167 in NAT configuration 172 on host-only network 172 Support resources, technical 19 Supported guest operating system 15
Supported host operating system Windows 6 Supported partition 261 Suspend virtual machine 91, 109 Suspend, defined 261 Switch, virtual network 153 System requirements 4 remote workstation 10
T
Tabs, hide 98 Take screen shot of virtual machine 81 Teamed network interface cards 166 167, 180 Technical support resources 19 Telnet 192 Text, cutting, copying and pasting 102 Token Ring 157, 159 Toolbar hide 98 power buttons on 78 Tools installing VMware Tools 41 See VMware Tools starting VMware Tools 80 Trend Micro Virus Buster installation issues 102 Turn off virtual machine 92
U
Uninstall host virtual adapter 168 Unplug USB devices 237 Unsupported partition 261 Upgrade virtual disks 45 USB connecting devices 234 control of devices by host and
274
VMware, Inc.
Index
guest 236 devices in a virtual machine 232 disconnecting devices 237 enabling and disabling the controller 233 keyboard and mouse 237 on a Linux host 235 on a Windows host 235 supported device types 233 virtual machine ports 14 User groups 20 User interface 75
current 86 defined 262 installing software in 101 legacy 86 log 22 moving between VMware products 86 platform specifications 12 power buttons 78 powering off when host shuts down 92 powering on when host starts up 92 private 26 resuming 91, 109
V
Video resolution on a Linux host 248 See also Display Virtual disk add to virtual machine 132 defined 120, 262 disk type 35 formatting 36 growable 120 location 29 migrating 45 partitioning 36 preallocated 120 See also Disks shrinking 61, 63, 143, 146 size 28, 132 specifying IDE 35 specifying SCSI 35 Virtual hardware 262 Virtual machine capturing screen shot of 81 constituent files 25 creating 25
running off CD-ROM discs or DVDs 98 shutting down 92 special power options 88 starting 82, 84 suspending 91, 109 window size 97 Virtual machine settings editor using 103 Virtual machine settings editor, defined 262 Virtual Network Editor 263 Virtual SMP 244 Virtual switch 153 Virus Buster See Trend Micro Virus Buster vlance network driver 155, 162 vmnet1.conf 179 VMnet8 191 VMware Authorization Service defined 263 log 23 VMware community forums 20 VMware guest operating system service
275
VMware, Inc.
defined 263 VMware Management Interface changing virtual machine power state 90 defined 263 log 23 VMware Registration Service defined 263 log 23 VMware Server Console 264 connecting from Linux host or client 84 connecting from management interface 85 connecting from Windows host or client 82 log 22 VMware Server host powering virtual machines on and off 92 VMware Tools automated install 48 build number 60 choosing scripts 58, 61 configuring 56 defined 263 for FreeBSD guests 50 for Linux guests 50 for NetWare guests 53 for Solaris guests 50 for Windows guests 41 installing 41 running scripts during power state changes 55 silent install 48 starting 80 VMware Tools service 6873 VMware Tools service
276
executing commands on halt or reboot 70 passing information between the guest and a VMware Scripting API script 73 passing strings from the host 70 time synchronization 69 VMware Tools 6873 VMware Virtual Disk Manager 139 VMware Virtual Machine Console overview 75 vmware.log 25 vmware-authd See VMware Authorization Service vmware-config-tools.pl 52 vmware-serverd See VMware Registration Service vmxnet network driver and older virtual machines 87 configuring 162 virtual network component 155 V-scan code table of codes 229
W
Window size 97 Windows VMware Tools for 41 Windows 95 sound driver 249 Windows 98 sound driver 249 Windows NT SCSI driver for guest 238 sound driver 249 Windows Server 2003 installing guest operating system 37 SCSI driver for guest 238
VMware, Inc.
Index
sound driver 249 Windows XP, SCSI driver for guest 238 Windows, supported guest operating systems 15 Wireless network 156 Wizard add hardware 257 new virtual machine 27, 123, 259
X
X server and keyboard mapping 227 configuring 248 required on Linux client 11 required on Linux host 9 XFree86 and keyboard mapping 227 configuring 248 required on Linux client 11 required on Linux host 9
Z
Zip drives on a parallel port 216
VMware, Inc.
277
278
VMware, Inc.