Guest 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.
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.
Use this general procedure to customize a guest operating system that you can shut
down without a significant service impact. However, to initialize a virtual machine
in a cloud environment, by using the cloud-init utility, see Guest Customization Using cloud-init.
- Shut down the guest operating system by using theShutdownGuestmethod or thePowerOffVM_Taskmethod.
- Prepare aCustomizationSpecdata object that specifies the desired global IP settings, virtual NIC settings, and so on.
- Invoke theCustomizeVM_Taskmethod of theVirtualMachinemanaged object.
- Start the guest operating system by using thePowerOnVM_Taskmethod of theVirtualMachinemanaged object.
For more information about customizing the guest operating system, in the context of
virtual machine configuration, see Customizing the Guest Operating System.