To save configuration of a virtual machine so you can restore it later, you can use the PropertyCollector to get the virtual machine configuration.
The PropertyCollector is the most efficient mechanism to specify, at the top level, all of the managed objects that are of interest to your application. It has methods for providing updates that indicate only changes to the previous state of these objects. There are two mechanisms for acquiring these updates:
- Polling – Check for changes. The result is either “no change” or an object containing the changes. One advantage of this mechanism is that it involves no network traffic except for a poll request and reporting.
- Wait for updates – “Wait for updates” is basically a blocking call to the PropertyCollector. This is only useful if you dedicate a program thread waiting for the call to unblock. The advantage of this mechanism is that there is no traffic on the communications thread unless something must be reported.
The PropertyCollector is powerful but requires great attention to detail. Backup-related features of the PropertyCollector are covered in Low Level Backup Procedures of this document. The next section provides some background about PropertyCollector.