Red Hat LINUX VIRTUAL SERVER 5.1 - ADMINISTRATION Instrukcja Użytkownika Strona 25

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 38
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 24
VMware, Inc. 25
Chapter 3 Using the vSphere Command-Line Interface
To create and use a session file
1 Connecttothedirectorywherethescriptislocated.
Forexample:
2Runsave_session.
Youcanusethesave_session.plscriptorthe--savesessionfileoptiontothevCLIcommand.You
mustspecifytheservertoconnecttoandthenameofasessionfileinwhichthescriptsavesan
authenticationcookie.
save_session --savesessionfile <location> --server <server>
Forexample:
Ifyouspecifyaserver,butnousernameorpassword,thescriptpromptsyou.
3WhenyourunvCLIcommands,passinthesessionfileusingthe
--sessionfileoption.
<command> --sessionfile <sessionfile_location> <command_options>
Forexample:
Using Environment Variables
OnLinux,youcansetenvironmentvariablesinaLinuxbashprofileoronthecommandlinebyusinga
commandlikethefollowing:
export VI_SERVER=<your_server_name_or_address>
OnWindows,youcansetenvironmentvariablesintheEnvironmentpropertiesdialogboxoftheSystem
controlpanel.Forthecurrentsession,youcansetenvironmentvariablesatthecommandlinebyusinga
commandlikethefollowing:
set VI_SERVER=<your_server_name_or_address>
See“UsingvCLICommandsinScripts”onpage 29foranenvironmentvariableexample.
Using a Configuration File
Youcanuseatextfilethatcontainsvariablenamesandsettingsasaconfigurationfile.Variablescorresponding
totheoptionsareshowninTable 32,“vCLIConnectionOptions,”onpage 28.
Windows:
cd C:\Program Files\VMware\VMware vSphere CLI\Perl\apps\session
Linux:
cd /usr/share/lib/vmware-vcli/apps/session
Windows:
save_session.pl --savesessionfile C:\Temp\my_session --server my_server
--username <username> --password <password>
Linux:
save_session --savesessionfile /tmp/vimsession --server <servername_or_address>
--username <username> --password <password>
Windows:
esxcli --sessionfile C:\Temp\my_session network ip interface list
vicfg-mpath.pl --sessionfile C:\Temp\my_session --list
Linux:
esxcli --sessionfile /tmp/vimsession network ip interface list
vicfg-mpath --sessionfile /tmp/vimsession --list
IMPORTANTDonotuseescapecharactersinenvironmentvariables.
CAUTIONLimitreadaccesstoaconfigurationfilethatcontainsusercredentials.
Przeglądanie stron 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 37 38

Komentarze do niniejszej Instrukcji

Brak uwag