You first create a snapshot, and then create
the linked virtual machine from the snapshot.
Procedure
To create the snapshot, call the
CreateSnapshot_Task method
for the virtual machine. The virtual machine can be in any power state. The
following pseudo code creates a snapshot named
snap1. The code does not
include a memory dump. VMware Tools is used to quiesce the file system in the
virtual machine if the virtual machine is powered on.
myVm.CreateSnapshot("snap1", "snapshot for creating linked virtual machines", False, True)
To create the linked virtual machine,
specify the snapshot you created and use a
VirtualMachineRelocateDiskMoveOptions.diskMoveType
of
createNewDeltaDiskBacking,
as illustrated in
Creating a Linked Virtual Machine from a Snapshot.
Creating linked virtual machines from a snapshot works with virtual machines in
any power state.
Example: Creating a Linked Virtual Machine from a
Snapshot