::
create FILE [--console] [--paused] [--autodestroy]
- [--pass-fds N,M,...] [--validate]
+ [--pass-fds N,M,...] [--validate] [--reset-nvram]
Create a domain from an XML <file>. Optionally, *--validate* option can be
passed to validate the format of the input XML file against an internal RNG
file descriptors will be re-numbered in the guest, starting from 3. This
is only supported with container based virtualization.
+If *--reset-nvram* is specified, any existing NVRAM file will be deleted
+and re-initialized from its pristine template.
+
**Example:**
#. prepare a template from an existing domain (skip directly to 3a if writing
::
restore state-file [--bypass-cache] [--xml file]
- [{--running | --paused}]
+ [{--running | --paused}] [--reset-nvram]
Restores a domain from a ``virsh save`` state file. See *save* for more info.
*--running* or *--paused* flag will allow overriding which state the
domain should be started in.
+If *--reset-nvram* is specified, any existing NVRAM file will be deleted
+and re-initialized from its pristine template.
+
``Note``: To avoid corrupting file system contents within the domain, you
should not reuse the saved state file for a second ``restore`` unless you
have also reverted all storage volumes back to the same contents as when
start domain-name-or-uuid [--console] [--paused]
[--autodestroy] [--bypass-cache] [--force-boot]
- [--pass-fds N,M,...]
+ [--pass-fds N,M,...] [--reset-nvram]
Start a (previously defined) inactive domain, either from the last
``managedsave`` state, or via a fresh boot if no managedsave state is
file descriptors will be re-numbered in the guest, starting from 3. This
is only supported with container based virtualization.
+If *--reset-nvram* is specified, any existing NVRAM file will be deleted
+and re-initialized from its pristine template.
+
suspend
-------
::
- snapshot-revert domain {snapshot | --current} [{--running | --paused}] [--force]
+ snapshot-revert domain {snapshot | --current} [{--running | --paused}]
+ [--force] [--reset-nvram]
Revert the given domain to the snapshot specified by *snapshot*, or to
the current snapshot with *--current*. Be aware
likely cause extensive filesystem corruption or crashes due to swap content
mismatches when run.
+If *--reset-nvram* is specified, any existing NVRAM file will be deleted
+and re-initialized from its pristine template.
+
snapshot-delete
---------------
.completer = virshCompleteEmpty,
.help = N_("pass file descriptors N,M,... to the guest")
},
+ {.name = "reset-nvram",
+ .type = VSH_OT_BOOL,
+ .help = N_("re-initialize NVRAM from its pristine template")
+ },
{.name = NULL}
};
flags |= VIR_DOMAIN_START_BYPASS_CACHE;
if (vshCommandOptBool(cmd, "force-boot"))
flags |= VIR_DOMAIN_START_FORCE_BOOT;
+ if (vshCommandOptBool(cmd, "reset-nvram"))
+ flags |= VIR_DOMAIN_START_RESET_NVRAM;
/* We can emulate force boot, even for older servers that reject it. */
if (flags & VIR_DOMAIN_START_FORCE_BOOT) {
.type = VSH_OT_BOOL,
.help = N_("restore domain into paused state")
},
+ {.name = "reset-nvram",
+ .type = VSH_OT_BOOL,
+ .help = N_("re-initialize NVRAM from its pristine template")
+ },
{.name = NULL}
};
flags |= VIR_DOMAIN_SAVE_RUNNING;
if (vshCommandOptBool(cmd, "paused"))
flags |= VIR_DOMAIN_SAVE_PAUSED;
+ if (vshCommandOptBool(cmd, "reset-nvram"))
+ flags |= VIR_DOMAIN_SAVE_RESET_NVRAM;
if (vshCommandOptStringReq(ctl, cmd, "xml", &xmlfile) < 0)
return false;
.type = VSH_OT_BOOL,
.help = N_("validate the XML against the schema")
},
+ {.name = "reset-nvram",
+ .type = VSH_OT_BOOL,
+ .help = N_("re-initialize NVRAM from its pristine template")
+ },
{.name = NULL}
};
flags |= VIR_DOMAIN_START_AUTODESTROY;
if (vshCommandOptBool(cmd, "validate"))
flags |= VIR_DOMAIN_START_VALIDATE;
+ if (vshCommandOptBool(cmd, "reset-nvram"))
+ flags |= VIR_DOMAIN_START_RESET_NVRAM;
if (nfds)
dom = virDomainCreateXMLWithFiles(priv->conn, buffer, nfds, fds, flags);
.type = VSH_OT_BOOL,
.help = N_("try harder on risky reverts")
},
+ {.name = "reset-nvram",
+ .type = VSH_OT_BOOL,
+ .help = N_("re-initialize NVRAM from its pristine template")
+ },
{.name = NULL}
};
flags |= VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING;
if (vshCommandOptBool(cmd, "paused"))
flags |= VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED;
+ if (vshCommandOptBool(cmd, "reset-nvram"))
+ flags |= VIR_DOMAIN_SNAPSHOT_REVERT_RESET_NVRAM;
/* We want virsh snapshot-revert --force to work even when talking
* to older servers that did the unsafe revert by default but
* reject the flag, so we probe without the flag, and only use it