VMware Workstation 7 Manual de usuario Pagina 129

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 512
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 128
VMware, Inc. 129
Chapter 5 Installing and Using VMware Tools
Passing a String from the Host to the Guest at Startup
Topassastringfromthehosttotheguestatstartup,youpassthestringfromyour
virtualmachine’sconfigurationfileinthehosttotheguestoperatingsystemwhenyou
poweronthevirtualmachine.
YoucanpassitemsliketheWindowssystemID(SID),amachinename,oran
IP
addr
ess.Insidetheguestoperatingsystemstartupscript,youcanhavetheservice
retrievethisstring.Thestringcanthenbeusedinanotherscripttosetyourvirtual
machine’ssystemID,machinename,orIPaddress.
Usethisstrategy,forexample,tomakecopiesofthesameconfigurationfile,adda
diffe
rentstringtoeach(eitherintheconfigurationfileitselforatthecommandline),
andusethesevariationsofthesameconfigurationfiletolaunchthesamevirtualdisk
innonpersistentmodemultipletimesinatrainingortestingenvironment.
Passingastringisalsousefulwhenyouwanttode
ployvirtualmachinesonanetwork
usingacommonconfigurationfilewhileprovidingeachmachinewithitsownunique
identity.
Youcanpassstringstoavirtualmachine’sguestoperatingsysteminoneoftwoways:
placingthestringinthevirtualmachine’sconfigurationfileorpassingthestringtothe
gues
tfromthecommandline.
Usethisfeatureonlyifyouhaveagoodunderstandingofascriptinglanguage(for
example,PerlorNetShell)andknowhowtomodifysystemstartupscripts.
String in a Configuration File
Placeastringinthevirtualmachine’sconfigurationfile(.vmxfile)bysettingthestring
tothemachine.idparameter.Forexample,youcansetthisstring:
machine.id = "Hello World."
Followingisanexampleofportionsoftwoconfigurationfilesthatpointtothesame
virtualdisk.Eachconfigurationfilecontainsitsownuniquestringsetforthe
machine.idparameter.
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"
Vista de pagina 128
1 2 ... 124 125 126 127 128 129 130 131 132 133 134 ... 511 512

Comentarios a estos manuales

Sin comentarios