Guest Network Customization for Stopped Virtual Machines
You can customize certain settings in the guest operating system with the help of the vSphere Web Services SDK. Customization is simpler for a virtual machine that is not running.
Use this procedure to customize a guest operating system that you can shut down without a significant service impact.
Prerequisites
A guest operating system can be easily customized while it is not running. If stopping the guest will cause a significant service impact, such as in an instant clone virtual machine, see Guest Network Customization for Instant Clone Virtual Machines instead.
Procedure
-
Shut down the guest operating
system by using the
ShutdownGuest
method or thePowerOffVM_Task
method. -
Prepare a
CustomizationSpec
data object that specifies the desired global IP settings, virtual NIC settings, and so on. -
Invoke the
CustomizeVM_Task
method of theVirtualMachine
managed object. -
Start the guest operating system
by using the
PowerOnVM_Task
method of theVirtualMachine
managed object.
What to do next
For more information about customizing the guest operating system, in the context of virtual machine configuration, see Customizing the Guest Operating System.