CLI Vmotion
CLI Vmotion
CLI Vmotion
Update 2 and later for ESX Server 3.5, ESX Server 3i version 3.5, VirtualCenter 2.5
Remote Command-Line Interface Installation and Reference Guide Revision: 20090313 Item: EN-000082-01
You can find the most up-to-date technical documentation on our Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com
20072009 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. 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
AboutThisBook
5
5
ProductNamingConventions
1 RemoteCLIInstallationandExecution 9
ListofAvailableCommands 10 UsingtheVMwareRemoteCLI 12 InstallingandExecutingRemoteCLICommandsonLinux 13 UnpackingandInstallingtheRemoteCLIPackage 13 ExecutingRemoteCLICommands 14 UninstallingtheRemoteCLIPackage 15 InstallingandExecutingRemoteCLICommandsonWindows 15 InstallingtheRemoteCLIPackage 15 ExecutingRemoteCLICommands 16 UninstallingtheRemoteCLIPackage 16 InstallingandRunningtheRemoteCLIVirtualAppliance 17 ImportingtheVirtualAppliance 17 RunningtheVirtualAppliance 18 SpecifyingOptionsforRemoteCLICommands 19 UsingaSessionFile 19 SettingEnvironmentVariables 20 UsingaConfigurationFile 20 PassingParametersattheCommandLine 21 UsingMicrosoftWindowsSecuritySupportProviderInterface(SSPI) 21 AvailableOptionsforRemoteCLIExecution 22 ExamplesforSpecifyingConnectionOptions 24 UsingRemoteCLICommandsinScripts 25 Example:EditingFilesontheESXServerHost 26 Example:AddingaNASDatastoretoMultipleESXServerHosts 26
2 RemoteCLIReference 27
StorageManagementCommands 28 ManagingDiagnosticPartitionswithvicfgdumppart ConfiguringStorageArrayswithvicfgmpath 30 28
VMware, Inc.
ManagingNASFileSystemswithvicfgnas 33 Rescanningwithvicfgrescan 34 FindingAvailableLUNswithvicfgvmhbadevs 35 NetworkingCommands 36 SpecifyingtheDNSConfigurationwithvicfgdns 36 ManagingPhysicalNICswithvicfgnics 38 SpecifyingtheNTPServerwithvicfgntp 39 ManipulatingtherouteEntrywithvicfgroute 40 ManagingVMkernelNICswithvicfgvmknic 41 ManagingVirtualSwitcheswithvicfgvswitch 42 SystemManagementCommands 45 UsingresxtopforPerformanceMonitoring 45 UsingvicfgcfgbackupforConfigurationInformation 45 SettingUpSNMPwithvicfgsnmp 47 SpecifyingthesyslogServerwithvicfgsyslog 49 PerformingMaintenancewithvihostupdate 50 VirtualMachineManagementCommands 51 MigratingVirtualMachinesUsingsvmotion 52 MiscellaneousManagementCommands 54 UsingvicfgadvcfginSpecialCircumstances 55 EnablingVMkernelModuleOptionswithvicfgmodule 55 ManagingUsersandGroupswithvicfguser 56 PerformingFileSystemOperationswithvifs 58 CommandswithanesxcfgPrefix 61
3 ManagingStoragewithvmkfstools 63
vmkfstoolsCommandSyntax 64 SpecifyingOptions 64 SpecifyingtheTarget 66 vmkfstoolsFileSystemOptions 67 vmkfstoolsVirtualDiskOptions 69
4 ManagingVirtualMachineswithvmwarecmd 77
ConnectionOptionsforvmwarecmd 78 GeneralOptionsforvmwarecmd 78 ServerOptionsforvmwarecmd 79 VirtualMachineOptionsforvmwarecmd 79 Valuesforpowerop_mode 81 vmwarecmdExamples 83
Index 85
4 VMware, Inc.
Thisbook,theRemoteCommandLineInterfaceInstallationandReferenceGuide,explains howtoinstallandusetheVMwareRemoteCommandLineInterface(RemoteCLI) andincludesreferencedocumentationandexamplesforeachcommand. Chapter 1explainshowtoinstallRemoteCLIpackages,howtoimporttheRemote CLIappliance,andhowtoexecuteRemoteCLIcommandsonWindowsorLinux. Thechapteralsoincludesareferencetoconnectionoptionsandotheroptionsyou canusewitheachoftheRemoteCLIcommands. Chapter 2providesreferencedocumentationformostoftheRemoteCLI commands,organizedbysubjectarea.Foreachcommand,thechapterlistsand discusseseachoptionandgivesexamples. Chapter 3andChapter 4providereferencedocumentationfortwoofthemore complexRemoteCLIcommands. Chapter 3discussesvmkfstools.Itincludesinformationaboutthecommand syntax,filesystemoptions,andvirtualdiskoptions. Chapter 4discussesvmware-cmd.Itincludesinformationaboutconnection options,generaloptions,serveroptions,andvirtualmachineoptions.
Intended Audience
Thisbookisintendedforadministratorswhowanttousecommandlineinterfaces insteadoftheVMwareInfrastructureClient(VIClient)tomanageandmonitorthe VMwareInfrastructureenvironment.Theinformationinthisbookiswrittenfor experiencedWindowsorLinuxsystemadministratorswhoarefamiliarwithvirtual machinetechnologyanddatacenteroperationsandknowhowtousecommandsin scripts.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Ifyouhave comments,sendyourfeedbackto: docfeedback@vmware.com
Related Documentation
TheVMwareInfrastructuredocumentationconsistsofthecombinedVMware VirtualCenterandESXServerdocumentationset.Thedocumentationsetexplainsalot ofthebackgroundinformationforthecommandsdiscussedinthisdocument,for example,storage,networking,andsoon. TheVIPerlToolkitdocumentationexplainshowyoucanusetheVIPerlToolkitand relatedutilityapplicationstomanageyourVMwareInfrastructureenvironment.You canusetheRemoteCLIcommandsinconjunctionwiththeVIPerlToolkit.
VMware, Inc.
Support Offerings
FindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds.Goto: http://www.vmware.com/support/services
VMware, Inc.
VMware, Inc.
ThischapterexplainshowtoinstallandexecuteRemoteCLIcommandsandincludes alistofallsupportedcommandsthatpointstowhereeachcommandisdiscussed. RemoteCLIcommandsallowyoutoperformmanyoftheoperationsyoumight currentlyperformusingtheESXServer3serviceconsole.RemoteCLIcommandsare especiallyusefulforanESXServer3ihostbecauseitdoesnotincludeaserviceconsole. YoucanuseRemoteCLIcommandsinscriptsthatrunonESXServer3iandESXServer 3version3.5hosts.YoucanalsouseRemoteCLIcommandsforconsoleaccesstoESX Serverhosts. RemoteCLIcommandsrunontopofftheVMwareInfrastructurePerlToolkit(VIPerl Toolkit),whichdependsonPerlandanumberofotherlibraries.Prerequisitesoftware isincludedwiththeinstallationpackageonWindowsandonsupportedLinux distributions.YoucanuseaninstallablepackageortheRemoteCLIappliancetorun RemoteCLIandVIPerlToolkitcommands. Thischapterincludesthefollowingtopics: ListofAvailableCommandsonpage 10 UsingtheVMwareRemoteCLIonpage 12 InstallingandExecutingRemoteCLICommandsonLinuxonpage 13 InstallingandExecutingRemoteCLICommandsonWindowsonpage 15 InstallingandRunningtheRemoteCLIVirtualApplianceonpage 17 SpecifyingOptionsforRemoteCLICommandsonpage 19 AvailableOptionsforRemoteCLIExecutiononpage 22 UsingRemoteCLICommandsinScriptsonpage 25
VMware, Inc. 9
svmotion
vicfgadvcfg vicfgcfgbackup
SpecifiesanESXServerhostsDNS (DomainNameSystem)configuration. Managesdiagnosticpartitions. EnablesVMkerneloptions.Usethis commandwiththeoptionslistedinthis document,orinstructedbyVMware. Configuresstoragearrays. ManagesNASfilesystems. ManagestheESXServerhostsphysical NICs. SpecifiestheNTP(NetworkTime Protocol)server. Rescansthestorageconfiguration.
10
VMware, Inc.
vicfgsyslog
Creates,modifies,deletes,andlistslocal directaccessusersandgroupsofusers. FindsavailableLUNsontheESXServer host. Adds,deletes,andmodifiesvirtual networkadapters(VMkernelNICs). Addsorremovesvirtualswitchesor modifiesvirtualswitchsettings. Performsfilesystemoperationssuchas retrievinganduploadingfilesonthe remoteserver. PerformsmaintenanceonESXServer3i hosts.
vihostupdate
vmkfstools
vmwarecmd
VMware, Inc.
11
12
VMware, Inc.
Whenyouexecutecommands,youmustspecifytheESXServerhostonwhichyou wanttorunthecommandandtheusernameandpassword,asdiscussedin SpecifyingOptionsforRemoteCLICommandsonpage 19. CAUTIONSpecifyingthepasswordinplaintextrisksexposingthepasswordtoother users.Thepasswordmightalsobecomeexposedinbackupfiles.Provideaplaintext passwordonlyonclientsystemsthatyouconsidersecure.Providingplaintext passwordsonproductionsystemsisnotrecommended.Youhavetwochoices: IfyouuseaRemoteCLIinteractivelyanddonotspecifyausernameand password,youareprompted.Whatyoutypeisnotechoedtothescreen. Fornoninteractiveuse,youcancreateasessionfileusingthesave_session.pl scriptincludedintheapps/sessiondirectoryoftheVIPerlToolkit.SeeUsinga SessionFileonpage 19.
VMware, Inc.
13
To install the Remote CLI Package 1 Starttheinstaller(vmware-install-rcli.pl). Theinstallerpromptsyoutoacceptthetermsofthelicenseagreement. 2 TypeyesattheprompttoacceptthelicensetermsandpressEntertocontinue.If youdonottypeyesinfullandpressEnter,theinstallercannotcontinue. Theinstallerpromptsyoutoprovideaninstallationlocationortoacceptthe default,whichis/usr/bin. 3 Specifyaninstallationdirectory,orpressEntertoacceptthedefault. TheinstallercheckswhetherthecorrectversionoftheVIPerlToolkitisinstalled onyoursystemandofferstoreplaceit. Whentheinstallationprocesscompletes: Asuccessmessageappears. Theinstallerlistsdifferentversionnumbersforrequiredmodules(ifany). Thepromptreturnstotheshellprompt. YoucanexecuteaRemoteCLIcommandtoverifythatinstallationwassuccessful. SeeExecutingRemoteCLICommandsonpage 14. AnumberofVIPerlutilityapplicationsandsamplescriptsthatperformcommon operationsonESXServerhostsandvirtualmachinesareincludedwiththeinstallation. SeetheVIPerlToolkitdocumentationforareferencetoallutilityapplications.
Specifyconnectionparametersinaconfigurationorpassthemonthecommand line.Theextension.plisnotrequiredonLinux.
14
VMware, Inc.
Forexample:
vicfg-nas --server my_vcserver --username u42 --password mypwd --vihost my_esxhost --list
SeeConnectionOptionsonpage 22foracompletelistofconnectionparameters.
VMware, Inc.
15
6 7
Executethecommand,passingintheconnectionparametersandanyother options.
<command>.pl <conn_params> <params>
Theextension.plisrequired.Forexample:
vicfg-nas.pl --server my_vcserver --username u42 --password mypwd --vihost my_esxhost --list
SeeConnectionOptionsonpage 22foracompletelistofconnectionparameters.
16
VMware, Inc.
ThesystemuninstallsboththeVIPerlToolkitandtheRemoteCLIpackage.
Acceptthelicenseagreement.
17
6 7
18
VMware, Inc.
Callsave_session.plwhichhasthefollowingsyntax.
save_session.pl --savesessionfile <location> --server <vc_server> --vihost <esx_host>
Youmustsupplyconnectionparametersandthenameofasessionfileinwhichthe scriptsavesanauthenticationcookie.Forexample:
save_session.pl --savesessionfile C:\Temp\my_session --server my_vc_server --vihost myserver
Ifyouspecifyaserverbutnousernameorpassword,thescriptpromptsyou.
VMware, Inc.
19
Passinthesessionfileusingthe--sessionfileparameterwhenyouexecute RemoteCLIcommands,asfollows:
<command> --sessionfile <sessionfile_location> <command_options>
Forexample:
vicfg-mpath.pl --sessionfile C:\Temp\my_session --list
Ifyouuseasessionfile,anyotherconnectionparametersareignored.
PassintheconfigurationfilewhenyouexecuteRemoteCLIcommands,asfollows:
<command> --config <my_saved_config> --list
Forexample:
vicfg-mpath --config <my_saved_config> --list
20
VMware, Inc.
Thefollowingsyntaxresults:
<command> --server <vc_server> --username <privileged_user> --password <pw> --vihost <esx_host> <--option_name option_value>
SeetheMicrosoftWebsiteforadetaileddiscussionofSSPI.
VMware, Inc.
21
Connection Options
Table 12listsconnectionoptionsinalphabeticalorder.SeeSpecifyingOptionsfor RemoteCLICommandsonpage 19forthedifferentapproachesforspecifyingthe parameters.Table 13listsasmallnumberofcommonparametersthatdonotspecify logininformation. Table 1-2. Remote CLI Connection Options
Parameter and Environment Variable --config <config_file> VI_CONFIG=<config_file> --encoding <encoding> VI_ENCODING=<encoding> Description Usestheconfigurationfileatthespecifiedlocation. Specifyapaththatisreadablefromthecurrentdirectory. Specifytheencodingtobeused.Oneofcp936(SimplifiedChinese) ISO-8859-1(German),orShift_JIS(Japanese). Youcanuse--encodingtospecifytheencodingtheRemoteCLI shouldmaptowhenitisrunonaforeignlanguagesystem. --passthroughauth VI_PASSTHROUGHAUTH Ifyouspecifythisoption,thesystemusestheMicrosoftWindows SecuritySupportProviderInterface(SSPI)forauthentication.Youare notpromptedforausernameandpassword.SeetheMicrosoftWeb siteforadetaileddiscussionofSSPI. ThisoptionissupportedonlyifyouarerunningtheRemoteCLIona WindowssystemandconnectingtoaVirtualCenterServer. --passthroughauthpackage <package> VI_PASSTHROUGHAUTHPACKAGE= <package> Usethisparameterwith--passthroughauthtospecifya domainlevelauthenticationprotocoltobeusedbyWindows.By default,SSPIusestheNegotiateprotocol,whichmeansthatclient andserverattempttonegotiateaprotocolthatbothsupport. IftheVirtualCenterServertowhichyouareconnectingisconfigured touseaspecificprotocol,youcanspecifythatprotocolusingthis parameter. ThisoptionissupportedonlyifyouarerunningtheRemoteCLIona WindowssystemandconnectingtoaVirtualCenterServer.
22
VMware, Inc.
VMware, Inc.
23
Youcanusethesave_session.plandload_session.plscriptsasexamplesforuse ofsessionfilesfromscripts.
24
VMware, Inc.
Windows
SeeUsingMicrosoftWindowsSecuritySupportProviderInterface(SSPI)onpage 21.
VMware, Inc.
25
ThescriptitselfaddstheNASdatastorebycallingthedifferentconfigurationfiles.
#!bin/sh for i in {"esxi_server_a","esxi_server_b","esxi_server_c"} do echo "Adding NAS datastore for $i..." vicfg-nas --config /home/admin/.visdkrc.$i -a -o mainnas.x.com -s /shared nas_ds vicfg-nas --config /home/admin/.visdkrc.$i -l done
26
VMware, Inc.
ThischapterisareferencetomostoftheRemoteCLIcommandsyoucanusefor administeringyourESXServerhosts.Somecommandswithmanyoptionsare discussedinseparatechapters(Chapter 3,ManagingStoragewithvmkfstools,on page 63andChapter 4,ManagingVirtualMachineswithvmwarecmd,onpage 77). Thischapterincludesthefollowingtopics: StorageManagementCommandsonpage 28 NetworkingCommandsonpage 36 SystemManagementCommandsonpage 45 VirtualMachineManagementCommandsonpage 51 MiscellaneousManagementCommandsonpage 54 PerformingFileSystemOperationswithvifsonpage 58 CommandswithanesxcfgPrefixonpage 61
VMware, Inc.
27
28
VMware, Inc.
--get-active -t
--list -l
ShowsthecurrentdiagnosticpartitiontheVMkerneluses.
VMware, Inc.
29
Setstheactivepartitiontovmhba1:0:0:6.Afterthecommandhasbeenexecuted,c reportsvmhba1:0:0:6astheactivepartition.
vicfg-dumppart.pl <conn_params> -l
Displaysinformationonallpartitionsthatcouldbeusedasdiagnosticpartitions.
vicfg-dumppart.pl <conn_params> -d
Deactivatesthediagnosticpartition.Afterthiscommandhasexecuted,nodiagnostic partitionisset.
vicfg-dumppart.pl <conn_params> -f
Findsallpartitionsthatcouldbeusedasdiagnosticpartitionsanddisplaysdetailed information.Theoutputmightlookasfollows.
Partition number 5 on vml.01000000005550543650334130314844334d4150333336 -> vmhba1:0:0:5 -> /dev/sda5 Partition number 6 on vml.01000000005550543650334130314844334d4150333336 -> vmhba1:0:0:6 -> /dev/sda6 Partition number 7 on vml.01000000005550543650334130314844334d4150333336 -> vmhba1:0:0:7 -> /dev/sda7 Partition number 1 on vml.010000000033485a394757375a535433373333 -> vmhba1:3:0:1 -> /dev/sdb1
VMware, Inc.
31
Displaysallavailablepaths.
vicfg-mpath.pl <conn_params> -q --lun=vml.123456
Displaysthepathsfordiskvml.123456.
vicfg-mpath.pl <conn_params> --policy=mru --lun=vmhba0:0:1
Setsthepathpolicyfordiskvmhba0:0:1tomru.
vicfg-mpath.pl <conn_params> --path=vmhba1:0:1 --lun=vmhba0:0:1 --state=on
Enablesapathfordiskvmhba0:0:1.
vicfg-mpath.pl <conn_params> --path=vmhba0:1:1 --state=off --lun=vmhba0:0:1 -p fixed
Disablesapathandsetsthepolicytofixedfordiskvmhba0:0:1.
vicfg-mpath.pl <conn_params> -l
ListsallLUNsonthesystemandthepathstotheseLUNsthroughadapters.
vicfg-mpath.pl <conn_params> -a
DisplaysLUNinformation.Resultsinoutputlikethefollowing.
vmhba2 2305843973628581845 42:2.0 vmhba3 2305843973628747050 4c:00.0 vmhba4 2306125448607554858 4c:00.1 vmhba5 50:1.1 vicfg-mpath.pl <conn_params> -b
Returnsabulkpathlistsuitableforparsing.
vicfg-mpath.pl <conn_params> --policy fixed --path vmhba2:0:1 --lun vmhba2:0:1 --preferred
Setsthepreferredpath.Resultsinoutputlikethefollowing:
Setting vmhba2:0:1 -- vmhba2:0:1 as preferred path Setting vmhba2:0:1 policy to fixed
32
VMware, Inc.
--delete -d
--list -l --nasserver <n_host> -o <n_host> --share <share> -s <share> --vihost <host> -h <host>
ListsallknownNASfilesystemswiththeirmountname,sharename,andhostname. Indicatesforeachfilesystemwhetheritismounted.
vicfg-nas.pl <conn_params> -a
AddsanewNASfilesystemtotheESXServerhost.Thiscommandaddsanentryto theknownNASfilesystemlist.
VMware, Inc. 33
vicfg-nas.pl <conn_params> -d
DeletesaNASfilesystem.ThiscommandunmountstheNASfilesystemandremoves itfromthelistofknownfilesystems.
vicfg-nas.pl <conn_params> -a -s new_share
Resultsinoutputlikethefollowing:
Scan operation succeeded
34
VMware, Inc.
VMware, Inc.
35
Networking Commands
Table 27listsRemoteCLInetworkingcommandsdiscussedinthissection.Foran introductiontonetworkingintheVirtualInfrastructure,seeChapter2,Networking, intheESXServer3iConfigurationGuideandtheESXServer3ConfigurationGuide. Table 2-7. Remote CLI Networking Commands
Command vicfg-dns vicfg-nics vicfg-ntp vicfg-route vicfg-vmknic vicfg-vswitch Description SpecifiesanESXServerhostsDNS configuration. ManagestheESXServerhosts physicalNICs. SpecifiestheNTPserver. ManipulatestheESXServerhosts routeentry. Adds,deletes,andmodifies VMkernelNICs. Addsorremovesvirtualswitches ormodifiesvirtualswitchsettings. See SpecifyingtheDNSConfigurationwith vicfgdnsonpage 36 ManagingPhysicalNICswithvicfgnicson page 38 SpecifyingtheNTPServerwithvicfgntpon page 39 ManipulatingtherouteEntrywith vicfgrouteonpage 40 ManagingVMkernelNICswith vicfgvmkniconpage 41 ManagingVirtualSwitcheswith vicfgvswitchonpage 42
36
VMware, Inc.
Configuresthehostnameforthespecifiedserver.
vicfg-dns.pl <conn_params> -d mydomain.biz
Configuresthedomainnameforthespecifiedserver.
vicfg-dns.pl <conn_params> -H yes
SpecifiesthatthehostshoulduseDHCPtodeterminetheDNSconfiguration.
vicfg-dns.pl <conn_params>
VMware, Inc.
37
Setstheduplexsettingofvmnic0tofullandthespeedto100.
vicfg-nics.pl <conn_params> -a vmknic2
Setsvmknic2toautonegotiateitsspeedandduplexsettings.
vicfg-nics.pl <conn_params> -l
ListstheNICsinthesystem,andprinttheircurrentandconfiguredspeedandduplex.
38 VMware, Inc.
PCI
02:02.0 e1000 02:04.0 e1000 00:02.0 e1000
Driver Link
Up Down Up
Speed
1000Mbps
Duplex
Full
MTU 1500
Description
<desc> <desc>
1000Mbps
Full
1500
<desc>
VMware, Inc.
39
StartstheNTPserviceonthespecifiedhost.
vicfg-ntp.pl <conn_params> -a 192.168.XXX.XXX
Addsthehostspecifiedby192.168.XXX.XXXasaremoteNTPserver.
ListstheVMkernelIPstacksdefaultgatewayentry.
40
VMware, Inc.
SetsthedefaultgatewayfortheESXServerhostspecifiedin<conn_params>to 10.17.XXX.XXX.
VMware, Inc.
41
AddsthespecifiedVMkernelNICtothesystem.
vicfg-vmknic.pl <conn_params> -d "VMkernel NIC Name"
DeletesthespecifiedVMkernelNICfromthesystem.
vicfg-vmknic.pl <conn_params> --ip <IP address> -n <net mask> "VMkernel NIC Name
ModifiestheVMkernelNICsIPaddressandnetmask.
vicfg-vmknic.pl <conn_params> --ip DHCP "VMkernel NIC Name"
SetsthespecifiedVMkernelNICtouseDHCP.
42
VMware, Inc.
--list -l --mtu <virtual_switch> -m <virtual_switch> --pg <port group> -p <port group> --unlink <pnic> -U <pnic>
--vlan -v
VMware, Inc.
43
AddsvSwitch1asavirtualswitch.
vicfg-vswitch.pl <conn_params> --add-pg=group1 vSwitch0
AddsaportgrouptovSwitch0.
vicfg-vswitch.pl <conn_params> -c vSwitch0
CheckswhethervSwitch0exists.Prints1iftheswitchexists,0iftheswitchdoesnot exist.
vicfg-vswitch.pl <conn_params> -m 9000 vSwitch0
SetstheMTUofthevirtualswitchvSwitch0to9000.
vicfg-vswitch.pl <conn_params> -l
44
VMware, Inc.
vicfg-snmp vicfg-syslog
vihostupdate
VMware, Inc.
45
Backsupthehostconfiguration.
vicfg-cfgbackup.pl <conn_params> -r
Restoresthehosttofactorysettings.
vicfg-cfgbackup.pl <conn_params> -l C:\backup.txt
Restoresthehosttoaconfigurationyoupreviouslysavedtoafile.
vicfg-cfgbackup.pl --server <myserver -l C:\backup.txt -q
Restoresthehosttoaconfigurationyoupreviouslysavedtoafile,anddoesnotprompt forconfirmation.
46
VMware, Inc.
VMware, Inc.
47
Setsthecommunitytopublic.
vicfg-snmp.pl <conn_params> -c my_comm1,my_comm2
Setsmy_comm1andmy_comm2asthecommunities,overwritinganyexisting communities.
vicfg-snmp.pl <conn_params> -E
EnablestheSNMPservice.
vicfg-snmp.pl <conn_params> -p 163
SetstheSNMPagentporttoport163.
vicfg-snmp.pl <conn_params> -s
DisplaystheSNMPagentconfiguration.Returnsinformationlikethefollowing:
Current SNMP agent settinegs: Enabled: 0 UDP port: 161 Communities: Notification targets:
48
VMware, Inc.
Displaysthesyslogserverconfiguration.
vicfg-syslog.pl <conn_params> -s mysyslogserver
Makesmysyslogserverthesyslogserverfortheserverspecifiedin<conn_params>.
vicfg-syslog.pl <conn_params> -p <port>
Setstheportnumberusedbythesyslogserver.
VMware, Inc.
49
50
VMware, Inc.
Unpacksandpatchesthehost
vihostupdate.pl <conn_params> -b EESX-142-test-release.zip
Unpacksthefile,butdoesnotpatchthehost.
vihostupdate.pl <conn_params> -i -m EESX-142-test-release.zip/metadata.xml
PatchesahostusingthefileEESX-142-test-release.zip. Runningthefirstexampleisequivalenttorunningthesecondandthirdinsequence.
vmware-cmd
VMware, Inc.
52
VMware, Inc.
VMware, Inc.
53
Startstheinteractiveversionofthesvmotioncommand.
svmotion.pl --url=https://myvc.mycorp.com/sdk --datacenter=DC1 --vm=[old_datastore] myvm/myvm.vmx: new_datastore
Relocatesavirtualmachinesstorage(includingdisks)tonew_datastore.
svmotion.pl <conn_params> --datacenter=My DC --vm=[old_datastore] myvm/myvm.vmx: new_datastore --disks=[old_datastore] myvm/myvm_1.vmdk: old_datastore, [old_datastore] myvm/myvm_2.vmdk: old_datastore
Relocatesavirtualmachinesconfigurationfiletonew_datastore,butleavethetwo disks(myvm_1.vmdkandmyvm_2.vmdk)inold_datastore.
svmotion.pl <conn_params> --datacenter RcliTstDc --vm="[storage1]testvm/testvm.vmx:storage2
Migratesthevirtualmachinetestvmfromstorage1tostorage2.
vicfg-user
54
VMware, Inc.
ConfiguresasupportedNICtouseNetQueue.
vicfg-module.pl <conn_params> -g s2io
VerifiesthattheNetQueuemodulehasbeenconfigured.
VMware, Inc.
55
56
VMware, Inc.
AddswithloginIDuser27.
vicfg-user.pl <conn_params> -e user -o modify -l user27 -p 27_password -i <new user id> -n <new user name>
ModifiestheuserwithloginIDuser27.
vicfg-user.pl <conn_params> -e user -o modify -l user27 -g test
AddstheuserwithloginIDuser27toagrouptest.
vicfg-user.pl <conn_params> -e user -o delete -l user27
RemovestheuserwithloginIDuser27.
vicfg-user.pl <conn_params> -e group -o add -d group42 -D <group id>
Addsgroup42asagroup.
vicfg-user.pl <conn_params> -e group -o add -d group42 -u test
Addsausertesttothegroupgroup42.
VMware, Inc.
57
Removesthegroupgroup42.
YoucanviewdatacenteranddatastoredirectoriesfromthisrootURL.
Running vifs
Whenyourunvifs,youcanspecifytheoperationnameandargumentandalsooneof thestandardconnectionoptionsdiscussedinTable 12.Usealiases,symboliclinks,or wrapperscriptstosimplifytheinvocationsyntax. NOTEThevifscommandhasnoconceptofaworkingdirectoryorlastdirectoryor fileoperatedon.
VMware, Inc.
59
Datastore Temp
rmdir dst_directory_path
Copiesthemy_textfilefromdir_1todir_3.
vifs.pl <conn_params> --dir '[myvmfs] dir_3'
Liststhecontentsofdirectorydir_3.
60 VMware, Inc.
Createsthedirectorycallednew_dir.
vifs.pl <conn_params> --put /root/test_put '[myvmfs] new_dir/test_put'
Placesacopyofthelocaltest_putfileintothespecifiedserversnew_dirdirectory.
vifs.pl <conn_params> --rm '[myvmfs] new_dir/test_put'
Removesthetest_putfilefromthenew_dirfolder.
vifs.pl <conn_params> --rmdir '[myvmfs] new_dir'
Removesthenew_dirfolder.
vifs.pl <conn_params> --get '[myvmfs] dir_1/my_text' /root/my_text
Retrievesthefilemy_textfromtheESXServer3ihostandplacesitinthelocal machinesrootfolder.
vifs.pl <conn_params> --move '[myvmfs] dir_1/my_text' '[myvmfs] dir_3/my_text'
Movesthemy_textfilefromdir_1todir_3.
vifs.pl <conn_params> --listds
62
VMware, Inc.
YouusethevmkfstoolsRemoteCLItocreateandmanipulatevirtualdisks,file systems,logicalvolumes,andphysicalstoragedevicesonanESXServerhost.Using vmkfstools,youcancreateandmanageavirtualmachinefilesystem(VMFS)ona physicalpartitionofadisk.Youcanalsousevmkfstoolstomanipulatefiles,suchas virtualdisks,storedonVMFS3andNFS. NOTEThevmkfstoolscommandonESXServerdoesnotsupportalltheoptions supportedintheESXServer3version3.5serviceconsole. YoucanexecutethevmkfstoolsRemoteCLIlikeotherRemoteCLIcommands. SpecifytheESXServerhostonwhichtoexecutethecommand,andspecifyadditional connectionoptionsasdiscussedinSpecifyingOptionsforRemoteCLICommands onpage 19.ThiscommandisnotsupportedonVirtualCenterServer. Inmostcases,youdontneedtologinastherootusertorunthevmkfstools command.However,somecommands,suchasthefilesystemcommands,might requiretherootuserlogin. YoucanperformmostvmkfstoolsoperationsusingtheVIClientinsteadofthe commandline.ForinformationonusingtheVIClienttoworkwithstorage,see ConfiguringStorageintheESXServer3ConfigurationGuideandtheESXServer3i ConfigurationGuide. Thischapterincludesthefollowingtopics: vmkfstoolsCommandSyntaxonpage 64 vmkfstoolsFileSystemOptionsonpage 67 vmkfstoolsVirtualDiskOptionsonpage 69
VMware, Inc.
63
Specifying Options
Youcanuseoneormorecommandlineoptionsandassociatedargumentstospecify whatyouwanttodo.Forexample,whenyoucreateanewvirtualdisk,youcanspecify thediskformat. Thelongandshort(singleletter)formsofoptionsareequivalent.Forexample,the followingcommandsareidentical:
vmkfstools --createfs vmfs3 --blocksize 2m vmhba1:3:0:1 vmkfstools -C vmfs3 -b 2m vmhba1:3:0:1
Table 31givesanoverviewofvmkfstoolsfilesystemoptions.Itincludesabrief descriptionandapointertowheretheoptionisdiscussed. Table 3-1. vmkfstools File System Option Overview
Option --blocksize b --createfs -C --extendfs -Z --human-readable j --queryfs -P --setfsname S Setsthelabelforthefilesystem. Usedwith--createfs. ExtendsexistingVMFS3file system. Listsattributesin humanreadableformat. Listsattributesoffilesystem. Description Usesthespecifiedsizeforfile systemcreation.Usedwith --createfs. CreatesaVMFSfilesystem. See CreatingaVMFSFileSystemon page 67 CreatingaVMFSFileSystemon page 67. ExtendinganExistingVMFS3Volume onpage 68. ListingAttributesofaVMFSVolume onpage 69 ListingAttributesofaVMFSVolume onpage 69. CreatingaVMFSFileSystemon page 67
64
VMware, Inc.
ExtendingaVirtualDiskonpage 74. DisplayingVirtualDiskGeometryon page 76. InflatingaThinVirtualDiskon page 72. CreatingaVirtualCompatibilityMode RawDeviceMappingonpage 75. ListingAttributesofanRDMon page 76. RenamingaVirtualDiskonpage 73. InitializingaVirtualDiskonpage 71.
VMware, Inc.
65
or
/vmfs/volumes/<file_system_label>
TospecifyaVMFSfile,usethisformat:
/vmfs/volumes/<file system label|file system UUID>/[dir]/myDisk.vmdk
SeevmkfstoolsFileSystemOptionsonpage 67.
Device Target
SpecifyadeviceorlogicalvolumeusingapathnameintheESXServerdevicefile system.Thepathnamebeginswith/vmfs/devices,whichisthemountpointofthe devicefilesystem.Eachdevicetypehassubmounts,forexample: /vmfs/devices/disksforlocalorSANbaseddisks. /vmfs/devices/lvmforESXServerlogicalvolumes. /vmfs/devices/genericforgenericSCSIdevices,suchastapedrives.
66
VMware, Inc.
FilesystemoptionsallowyoutocreateaVMFSfilesystem.Theseoptionsdonotapply toNFSfilesystems.YoucanperformmanyofthesetasksthroughtheVIClient.
NOTEYoucanhaveonlyoneVMFSvolumeforaLUN. VMFS2filesystemsarereadonlyonanyESXServerhost.Youcannotcreateormodify VMFS2filesystemsbutyoucanreadfilesstoredonVMFS2filesystems. Table 33liststhesuboptionsyoucanusewiththe-Coption. Table 3-3. Suboptions for vmkfstools -C
Option -b --blocksize Description DefinetheblocksizefortheVMFS3filesystem.Thedefaultfileblocksizeis1MB. The<block_size>valueyouspecifymustbeamultipleof128KB,withaminimum valueof128KB.Whenenteringasize,indicatetheunittypebyaddingasuffixsuch asmorM.TheunittypeisnotcasesensitivevmkfstoolsinterpretseithermorM tomeanmegabytesandkorKtomeankilobytes. DefinethevolumelabelofaVMFSvolumefortheVMFS3filesystemyouare creating.Usethissuboptiononlywiththe-Coption.Thelabelyouspecifycanbeup to128characterslongandcannotcontainanyleadingortrailingblankspaces. Afteryoudefineavolumelabel,youcanuseitwheneveryouspecifytheVMFS volumeinacalltovmkfstools.Thevolumelabelappearsinlistingsgeneratedfor theLinuxls -lcommandandasasymboliclinktotheVMFSvolumeunderthe /vmfs/volumesdirectory. YoucanchangetheVMFSvolumelabelusingtheVIClientUI.
-S --setfsname
VMware, Inc.
67
68
VMware, Inc.
Thiscommandmightreturnthefollowing:
VMFS-3.31 file system spanning 1 partitions. Capacity : 65229815808, 64641564672 avail File system label : my_vmfs UUID : 46fd1460-6ec4e2b8-e048-000e0c7f4088 Path : /vmfs/volumes/46fd1460-6ec4e2b8-e048-000e0c7f4088 Partitions spanned: vmhba2:0:0:6
IfanydevicebackingVMFSfilesystemgoesoffline,thenumberofextentsandthe availablespacechangeaccordingly.
VMware, Inc.
69
eagerzeroedthickSpacerequiredforthevirtualdiskisallocatedatcreation time.Incontrasttozeroedthickformat,thedataremainingonthephysical deviceiszeroedoutduringcreation.Itmighttakemuchlongertocreatedisksin thisformatthantocreateothertypesofdisks. thickSpacerequiredforthevirtualdiskisallocatedduringcreation.Thistype offormattingdoesntzerooutanyolddatathatmightbepresentonthisallocated space.Onlytherootuserisallowedtocreatedisksinthisformat. thinThinprovisionedvirtualdisk.Unlikewiththethickformat,space requiredforthevirtualdiskisnotallocatedduringcreation,butissupplied, zeroedout,ondemandatalatertime. rdmVirtualcompatibilitymoderawdiskmapping. rdmpPhysicalcompatibilitymode(passthrough)rawdiskmapping. rawRawdevice. 2gbsparseAsparsediskwith2GBmaximumextentsize.Youcanusedisksin thisformatwithotherVMwareproducts.However,youcannotpoweronasparse diskonanESXServerhostunlessyoufirstreimportthediskinacompatible format,suchasthickorthin,withvmkfstools. monosparseAmonolithicsparsedisk.Youcanusedisksinthisformatwith otherVMwareproducts. monoflatAmonolithicflatdisk.Youcanusedisksinthisformatwithother VMwareproducts. With -c --createvirtualdisk,vmkfstoolsacceptszeroedthick, eagerzeroedthick,thick,andthin. With-i --clonevirtualdisk,vmkfstoolsacceptsrdm:dev,rdmp:dev,raw:dev, thin,2gbsparse,monoflat,andmonosparse. WithNFSfiles,vmkfstoolssupportsonlythin,thick,zeroedthick,and 2gbsparse.BecausetheNFSserverandnottheESXServerhostdecidestheallocation policy,thick,zeroedthick,andthinusuallyhavethesameresult.Thedefault allocationpolicyonmostNFSserversisthin.
Youcanindicatetheunittypefor<size>byaddingasuffixofk(kilobytes),m (megabytes),org(gigabytes).Theunittypeisnotcasesensitivevmkfstools interpretseitherkorKtomeankilobytes.Ifyoudonotspecifyaunittype,vmkfstools defaultstobytes. Thevmkfstoolscommandsupportsthefollowingsuboptionsinconjunctionwith-c. -aspecifiesthedevicedriverthatisusedtocommunicatewiththevirtualdisks. YoucanchoosebetweenBusLogicandLSILogicSCSIdrivers. -dspecifiesdiskformats.Fordetaileddescriptionofthediskformats,see SupportedDiskFormatsonpage 69.
CreatesatwogigabytevirtualdiskfilenamedmyOS.vmdkontheVMFSfilesystem namedmyVMFS.Thisfilerepresentsanemptyvirtualdiskavirtualmachinecanaccess.
vmkfstools.pl <conn_params> --createvirtualdisk 20m /vmfs/volumes/store1/test.vmdk
Createsa20MBvirtualdisknamedtest.vmdk.
vmkfstools.pl <conn_params> --createvirtualdisk 20mb -d thin -a lsilogic /vmfs/volumes/M1/test.vmdk
Createsavirtualdiskassociatedwiththespecifiedadapter.
vmkfstools.pl <conn_params> -c 200m /vmfs/volumes/my_vmfs/test01.vmdk
Createsa200MBvirtualdisknamedtest01.vmdkontheVMFSfilesystemnamed my_vmfs.
VMware, Inc.
71
SeeSupportedDiskFormatsonpage 69.
Deletesthevirtualdisktest.vmdk.
72
VMware, Inc.
Youmustspecifytheoriginalfilenameorfilepath<oldName>andthenewfilenameor filepath<newName>.
Clonesthecontentsofamastervirtualdiskfromthetemplaterepositorytoavirtual diskfilenamedmyOS.vmdkonthefilesystemmyVMFS.
VMware, Inc.
73
Youmustpoweroffthevirtualmachinethatusesthisdiskfilebeforeyouenterthis command.Youmighthavetoupdatethefilesystemonthedisksotheguestoperating systemcanrecognizeandusethenewsizeofthediskandtakeadvantageoftheextra space. NOTEThenewSizeparameterdefinestheentirenewsize,notjusttheincrementyou addtothedisk. YouspecifythenewSizeparameterinkilobytes,megabytes,orgigabytesbyaddinga suffixofk(kilobytes),m(megabytes),org(gigabytes).Theunittypeisnotcase sensitivevmkfstoolsinterpretseitherkorKtomeankilobytes.Ifyoudontspecifya unittype,vmkfstoolsdefaultstokilobytes. Donotextendthebasediskofavirtualmachinethathassnapshotsassociatedwithit. Ifyoudo,youcannolongercommitthesnapshotorrevertthebasedisktoitsoriginal size.
74
VMware, Inc.
Extendsa4GBvirtualdiskby1GB.
vmkfstools.pl <conn_params> 10.20.120.132 -X 50M /vmfs/volumes/my_newVMFS/my_disk.vmdk
CreatesavirtualcompatibilitymodeRDMfile/vmfs/volumes/storage1/rdm210.vmdk andmapsthe/vmfs/devices/disks/vmhba2:1:0:0rawdisktothatfile.
vmkfstools.pl <conn_params> -r /vmfs/devices/disks/vmhba1:3:0:0 my_rdm.vmdk
CreatesaphysicalcompatibilitymodeRDMfilenamedrdmpass.vmdkandmapsthe vmbha2:1:0:0tothatfile.Youcantusethenameofafilethatalreadyexists.
ThisoptionprintsthevmhbanameoftherawdiskRDM.Theoptionalsoprintsother identificationinformation,likethediskID,fortherawdisk.
Thischapterdiscussesthevmware-cmdRemoteCLIcommand,whichallowsyouto managethevirtualmachinesinyourVMwareInfrastructureenvironment. Youcanusevmware-cmdtoperformvariousoperationsonavirtualmachine,including registeringavirtualmachineonthelocalserver,gettingthepowerstateofavirtual machine,settingconfigurationvariables,andsoon. NOTEOlderversionsofvmware-cmdsupportedasetofconnectionoptionsand generaloptionsthatdifferfromtheoptionsinotherRemoteCLIcommands.The vmware-cmdRemoteCLIsupportstheexistingserviceconsolebasedvmware-cmd syntaxandoptionnamesforbackwardcompatibility.TheRemoteCLIalsosupports thestandardRemoteCLI--server,--username,and--passwordoptions,butnone oftheotherconnectionoptions. Thischapterincludesthefollowingtopics: ConnectionOptionsforvmwarecmdonpage 78 GeneralOptionsforvmwarecmdonpage 78 ServerOptionsforvmwarecmdonpage 79 VirtualMachineOptionsforvmwarecmdonpage 79 vmwarecmdExamplesonpage 83
VMware, Inc.
77
78
VMware, Inc.
VMware, Inc.
79
80
VMware, Inc.
Table 4-4. Commands that apply to any VMware Infrastructure Host (Continued)
Command <vm-path> gettoolslastactive Description Returnsanintegerindicatinghowmuchtimehaspassed,inseconds, sincethelastheartbeatwasdetectedfromtheVMwareToolsservice. Thisvalueisinitializedtozerowhenthevirtualmachinepowerson. Itstaysatzerountilthefirstheartbeatisdetected,afterwhichthe valueisalwaysgreaterthanzerountilthevirtualmachineispower cycledagain. Accessestheuptimeoftheguestoperatingsystemonthevirtual machine. Returns1ifthevirtualmachinealreadyhasasnapshot.Returns0 otherwise. Removesallsnapshotsbelongingtothevirtualmachine.Ifno snapshotexists,thenthisoperationdoesnothing. Shutsdown,thenrebootsavirtualmachine.Thepowerop_modecan behard,soft,ortrysoft.Ifpowerop_modeisnotspecified,the defaultissoft.SeeValuesforpowerop_modeonpage 81. Revertsthevirtualmachinetothecurrentsnapshot.Ifnosnapshot exists,thenthisoperationdoesnothing,andthevirtualmachinestate remainsunchanged. WritesaGuestInfovariableintomemory.Thevariableisdiscarded whenthevirtualmachineprocessterminates. Powersonapreviouslypoweredoffvirtualmachineorresumesa suspendedvirtualmachine.Thepowerop_modecanbehard,soft,or trysoft.Ifpowerop_modeisnotspecified,thedefaultissoft.See Valuesforpowerop_modeonpage 81. Shutsdownandpowersoffavirtualmachine.Thepowerop_modecan behard,soft,ortrysoft.Ifpowerop_modeisnotspecified,the defaultissoft.SeeValuesforpowerop_modeonpage 81. Suspendsavirtualmachine.Thepowerop_modecanbehard,soft,or trysoft.Ifpowerop_modeisnotspecified,thedefaultissoft.See Valuesforpowerop_modeonpage 81.
<vm-path> getuptime <vm-path> hassnapshot <vm-path> removesnapshots <vm-path> reset <powerop_mode> <vm-path> revertsnapshot
VMware, Inc.
81
82
VMware, Inc.
vmware-cmd Examples
Thefollowingexamplesforvmware-cmdrequireconnectionoptions.SeeSpecifying OptionsforRemoteCLICommandsonpage 19.
vmware-cmd.pl <conn_params> C:\home\vmware\win2000.vmx getstate
Retrievestheexecutionstateofavirtualmachine.C:\home\vmware\win2000.vmxis thepathtothevirtualmachinesconfigurationfile.
vmware-cmd.pl <conn_params> -q C:\home\vmware\win2000.vmx reset hard
Returns,forexample,getproductinfo(product) = esx.
VMware, Inc.
83
84
VMware, Inc.
Index
Numerics
2gbsparse disk format 70
A
adding NAS datastore 26 appliance See virtual appliance
B
backup of configuration information 45
C
cloning 73 cloning virtual disks 73 command-line connection parameters 21 commands with esxcfg prefix 61 configuration files 20, 24 configuration information 45 connection options 19, 24 copying files 59 cp936 encoding 22 creating directories 60 creating pass-through RDM 76 creating session files 19 creating VMFS 68
directory groups 58 disk attributes 69 disk formats 69 supported 69 disk partition target 66 disks See virtual disks displaying virtual disks 76 DNS configuration 36 downloading files 59 downloading Remote CLI package 13
E
eagerzeroedthick disk format 70 editing remote files example 26 encoding cp936 22 ISO-8859-1 22 Shift_JIS 22 environment variables 20 esxcfg prefix 61 esxcfg-advcfg 55, 62 esxcfg-cfgbackup 45, 62 esxcfg-dns 36, 62 esxcfg-dumppart 28, 62 esxcfg-module 55, 62 esxcfg-mpath 30, 62 esxcfg-nas 33, 62 esxcfg-nics 38, 62 esxcfg-ntp 39, 62 esxcfg-rescan 34, 62 esxcfg-route 40, 62 esxcfg-snmp 47, 62
D
deleting virtual disks 72 device target 66 diagnostic partitions deactivating 29 managing 28 vicfg-dumppart 28
VMware, Inc.
85
esxcfg-syslog 49, 62 esxcfg-user 56, 62 esxcfg-vmhbadevs 35, 62 esxcfg-vmknic 41, 62 esxcfg-vswitch 42, 62 examples adding a NAS datastore 26 cloning raw disk 73 cloning virtual disk 73 command line 25 configuration files 24 deleting a virtual disk 72 editing files on ESX host 26 editing remote files 26 extending virtual disks 75 extending VMFS volume 68 inflating virtual disks 72 initializing virtual disks 72 listing attributes 69 physical compatibility mode RDM 76 renaming virtual disks 73 session files 24 specifying connection options 24 SSPI protocol 25 svmotion 54 vicfg-cfgbackup 46 vicfg-dns 37 vicfg-dumppart 29 vicfg-module 55 vicfg-mpath 32 vicfg-nas 33 vicfg-nics 38 vicfg-ntp 40 vicfg-rescan 34 vicfg-route 40 vicfg-snmp 48 vicfg-syslog 49 vicfg-user 57
86
vicfg-vmhbadevs 35 vicfg-vmknic 42 vicfg-vswitch 44 vifs 60 virtual compatibility mode RDM 75 virtual disks 71 VMFS file system 68 executing commands Linux 13, 14 Windows 15, 16 execution options 22 extending a virtual disk 74 extending existing VMFS volume 68 extending volume 68
F
Fibre Channel storage 30 file groups 58 file system target 66 file systems NAS 33 VMFS 68 finding available LUNs 35 fixed path policy 31
G
groups 56 GSX Server 74
H
hard power operations 82 host maintenance, vihostupdate 50
I
importing virtual appliance 17 inflating thin virtual disks 72 initializing virtual disks 71
VMware, Inc.
Index
L
Linux executing commands 14 installing Remote CLI 13 Remote CLI 13 shell 17 listing available LUNs 35 listing disk attributes 69 listing RDM attributes 76 listing VMFS volume attributes 69 logs 49 LUNs listing available 35 rescanning 34 VML names 30
miscellaneous management commands 54 module options 55 monoflat disk format 70 monosparse disk format 70 most recently used path policy 31 MRU path policy 31 multipathing 30
N
NAS datastores accessing 33 adding in script 26 adding to ESX host 33 removing from ESX host 33 vicfg-nas 26, 33 NetQueue configuration 55 network adapters duplex value 38 managing 38 speed 38 vicfg-nics 38 vicfg-vmknic 41 Network Time Protocol 39 networking commands 36 NICs 38 NTP Server 39
M
maintenance 50 managing diagnostic partitions 28 managing groups 56 managing NAS file systems 33 managing physical NICs 38 managing users 56 managing virtual switches 42 managing VMkernel NICs 41 manipulating route entry 40 Microsoft Windows Security Support Provider Interface 21 migrating virtual machines GSX Server 74 svmotion 52 vmkfstools 74 VMware Workstation 74
O
options 22
P
parameters, command line 21 partitions, diagnostic 28 password, virtual appliance 18 path policies 31 performance monitoring 45 Perl 9
VMware, Inc.
87
physical compatibility mode disk format 70 physical compatibility mode RDM 76 physical network adapters 38 physical NICs 38 port groups 42 power operations hard 82 soft 82 trysoft 82 powerop_mode 81
R
raw device mapping physical compatibility mode 76 virtual compatibility mode 75 raw disks cloning 73 format 70 rdm format 70 rdmp format 70 RCLI See Remote CLI rdm disk format 70 rdmp disk format 70 RDMs attributes 76 physical compatibility mode 76 virtual compatibility mode 75 Remote CLI command-line 21 configuration files 20 environment variables 20 execution options 22 installing on Linux 13 installing on Windows 15 using virtual appliance 17 Remote CLI package downloading 13 installing on Linux 13
88
installing on Windows 15 uninstalling 15, 16 unpacking 13 Remote CLI virtual appliance installing 17 running 18 renaming virtual disks 73 required parameters 19 rescanning adapters 34 rescanning LUNs 34 resxtop 10, 45 root password 18 route entry 40 Running 59 running vifs 59 running virtual appliance 18
S
scripts with Remote CLI commands 25 session files 19, 24 Shift_JIS encoding 22 Simple Network Management Protocol 47 snapshots 74 soft power operations 82 SSPI protocol 21, 25 storage commands 28 creating directories with vifs 60 supported disk formats 69 svmotion 52 syslog server 49 system logs 49 system management commands 45
T
target, specifying 66 thick disk format 70 thin disk format 70
VMware, Inc.
Index
U
uninstalling Remote CLI package Linux 15 Windows 16 unpacking Remote CLI package 13 users, managing 56 using session files 19
V
variables 20 VI Perl Toolkit 9 vicfg-advcfg 55 vicfg-cfgbackup 45 vicfg-dns 36 vicfg-dumppart 28 vicfg-module NetQueue configuration 55 uses 55 vicfg-mpath 30 vicfg-nas 33 vicfg-nics 38 vicfg-ntp 39 vicfg-rescan 34 vicfg-route 40 vicfg-snmp 47 vicfg-syslog 49 vicfg-user 56 vicfg-vmhbadevs 35 vicfg-vmknic 41 vicfg-vswitch 42 vifs 58, 59 vihostupdate 50 virtual appliance environment variables 20
VMware, Inc.
importing 17 installing Remote CLI 17 introduction 17 multiple configuration files 20 required parameters 19 root password 18 running 18 using Remote CLI 17 virtual compatibility mode RDM 75 virtual disk geometry 76 virtual disks cloning 73 creating 70, 71 deleting 72 extending 75 inflating 72 initializing 71, 72 options 69 renaming 73 virtual machines HBA names 30 management commands 51 managing 79 migrating 52 vmware-cmd 79 virtual switches port groups 42 vicfg-vswitch 42 VMFS creating with vmkfstools 67, 68 extending volumes 68 listing attributes 69 vmkfstools 63 volume attributes 69 VMkernel module options 55 VMkernel NICs 41 vmkfstools command syntax 64 creating pass-through RDM 76
89
creating virtual disk 70 creating VMFS 67 creating VMFS example 68 deleting virtual disk 72 device target 66 disk formats 69 disk partition target 66 display disk geometry 76 extending virtual disk 74 extending volume 68 file system options 67 file system target 66 inflating thin virtual disk 72 initializing virtual disk 71 options 67 overview 63 RDM attributes 76 renaming virtual disk 73 snapshots 74 syntax 64 virtual disk options 69 VMFS volume attributes 69
VML LUN names 30 VMware Workstation 74 vmware-cmd connection options 78 examples 83 general options 78 server options 79 virtual machine options 79
W
Windows executing commands 16 installing Remote CLI 15 using Remote CLI 15
Z
zeroedthick disk format 69
90
VMware, Inc.