::
save domain state-file [--bypass-cache] [--xml file]
+ [--image-format format]
[--parallel-channels channels]
[{--running | --paused}] [--verbose]
either the *--running* or *--paused* flag will allow overriding which
state the ``restore`` should use.
+*--image-format* option can change the default image format used to
+save data into file. For more details consult the qemu.conf configuration
+file.
+
*--parallel-channels* option can specify number of parallel IO channels
to be used when saving memory to file. Using parallel IO channels requires
the use of ``sparse`` image save format. Parallel save may significantly
.type = VSH_OT_INT,
.help = N_("number of IO channels to use for parallel save")
},
+ {.name = "image-format",
+ .type = VSH_OT_STRING,
+ .help = N_("format of the save image file")
+ },
{.name = "xml",
.type = VSH_OT_STRING,
.unwanted_positional = true,
int nchannels = 0;
unsigned int flags = 0;
const char *xmlfile = NULL;
+ const char *format = NULL;
g_autofree char *xml = NULL;
int rc;
#ifndef WIN32
VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS, nchannels) < 0)
goto out;
+ if (vshCommandOptString(ctl, cmd, "image-format", &format) < 0)
+ goto out;
+ if (format &&
+ virTypedParamsAddString(¶ms, &nparams, &maxparams,
+ VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT, format) < 0)
+ goto out;
+
if (vshCommandOptString(ctl, cmd, "xml", &xmlfile) < 0)
goto out;