Specifications
VMware, Inc. 53
Chapter 2 Creating and Configuring Virtual Machines
have!the!guest!service!retrieve!this!string,!which!can!be!used!by!your!script!to!set!your!
virtual!machineʹs!system!ID,!machine!name,!or!IP!address.!
In!the!following!example,!a!Linux!guest!illustrates!how!you!can!use!the!guest!service!to!
retrieve!a!string!containing!what!becomes!the!virtual
!machine’s!machine!name!and!IP!
address.!Use!RedHat62VM!as!the!machine!name!and!148.30.16.24!as!the!IP!address.!
To retrieve the machine name and IP address of a Linux guest
1Define!the!following!option!in!your!virtual!machine’s!configuration!file:!
machine.id = “RedHat62VM 148.30.16.24"
See!“Setting!Startup!and!Shutdown!Options!by!Modifying!the!Configuration!File!
Directly!(Advanced!Users!Only)”!on!page 126.
2 Launch!a!virtual!machine!using!this!configuration!file.!
3 Retrieve!the!machine.id!string!in!the!virtual!machine.
In!your!system!startup!script,!before!the!network!startup!section,!add!the!following!
command:!
/etc/vmware/vmware-guestd --cmd 'machine.id.get'
In!a!Windows!guest,!the!command!to!retrieve!the!string!is:!
VMwareService --cmd machine.id.get
Customize!this!startup!script!so!it!uses!the!string!the!guest!service!retrieved!during!
startup!to!set!the!virtual!machine’s!network!name!to!RedHat62VM!and!its!IP!
address!to!148.30.16.24.!This!should!be!located!in!the!script!before!the!network!
services!are!started.!
From!the!service!console,!you!can!prevent!the
!service!console!from!passing!a!string!to!
the!guest!operating!system!through!the!guest!service.!Set!the!following!line!in!your!
virtual!machine’s!configuration!file:
isolation.tools.machine.id.get.disable = TRUE
Using PXE with Virtual Machines
You!can!use!a!preboot!execution!environment!(known!as!PXE)!to !boot!a!virtual!machine!
over!a!network.!
When!you!use!PXE!with!a!virtual!machine,!you!can:
! Remotely!install!a!guest!operating!system!over!a!network!without!the!need!for!the!
operating!system!installation!media.
! Deploy!an!image!of!a!virtual!disk!to!the!virtual!machine.