remembering it */
VIR_DOMAIN_SNAPSHOT_CREATE_HALT = (1 << 3), /* Stop running guest
after snapshot */
+ VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY = (1 << 4), /* disk snapshot, not
+ system checkpoint */
} virDomainSnapshotCreateFlags;
/* Take a snapshot of the current VM state */
return NULL;
}
+ if (def->ndisks) {
+ ESX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("disk snapshots not supported yet"));
+ return NULL;
+ }
+
if (esxVI_LookupVirtualMachineByUuidAndPrepareForTask
(priv->primary, domain->uuid, NULL, &virtualMachine,
priv->parsedUri->autoAnswer) < 0 ||
* running after the snapshot. This flag is invalid on transient domains,
* and is incompatible with VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE.
*
+ * If @flags includes VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY, then the
+ * snapshot will be limited to the disks described in @xmlDesc, and no
+ * VM state will be saved. For an active guest, the disk image may be
+ * inconsistent (as if power had been pulled), and specifying this
+ * with the VIR_DOMAIN_SNAPSHOT_CREATE_HALT flag risks data loss.
+ *
* Returns an (opaque) virDomainSnapshotPtr on success, NULL on failure.
*/
virDomainSnapshotPtr
if (!qemuDomainSnapshotIsAllowed(vm))
goto cleanup;
+ if (def->ndisks) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("disk snapshots not supported yet"));
+ goto cleanup;
+ }
+
if (!(snap = virDomainSnapshotAssignDef(&vm->snapshots, def)))
goto cleanup;
def = NULL;
if (!(def = virDomainSnapshotDefParseString(xmlDesc, NULL, 0, 0)))
goto cleanup;
+ if (def->ndisks) {
+ vboxError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("disk snapshots not supported yet"));
+ goto cleanup;
+ }
+
vboxIIDFromUUID(&domiid, dom->uuid);
rc = VBOX_OBJECT_GET_MACHINE(domiid.value, &machine);
if (NS_FAILED(rc)) {