Your software can follow one of two restore scenarios: either revert to a saved state, or disaster recovery:
To bring an existing virtual machine to a previous state
- Connect to the server and command it to halt and power off the target virtual machine.
- Use the server to gain access to the virtual disks. With SAN transport (but not HotAdd or NBDSSL) you must create a snapshot before restoring data.
- Transfer the disk images from backup using VixDiskLib. Revert-to and delete the snapshot, if created.
To completely re-create a virtual machine (disaster recovery)
- Connect to the server.
- Command the server to create a new virtual machine and its virtual disks using the configuration information saved from vim.vm.ConfigInfo during backup.
- Transfer virtual disk data to the newly created virtual disks using VixDiskLib. Virtual disk data includes disk formatting information, so you do not need to build any kind of file system on the virtual disks.