The Backup Process
These are the high-level steps to back up a virtual machine running in vSphere:
- Connect to the ESXi host containing the virtual machine targeted for backup. A side-effect of this step is determining the arrangement and description of virtual machines on the host.
- Tell the host to take a snapshot of the target virtual machine, using the vSphere API. Use thequiesceflag, but not thememoryflag, which is incompatible withquiesce. The virtual machine continues to run, while the snapshot provides a static (quiesced) view.
- Capture the virtual disk data and virtual machine configuration information (vim.vm.ConfigInfo).
- On the ESXi host, use the VDDK (programming in C or C++) to open and read the virtual disk and snapshot files. Copy them to backup media, along with configuration information.
- Tell the host to delete the backup snapshot, using the vSphere API.