::
- destroy domain [--graceful]
+ destroy domain [--graceful] [--remove-logs]
Immediately terminate the domain *domain*. This doesn't give the domain
OS any chance to react, and it's the equivalent of ripping the power
(e.g. SIGKILL) when the guest doesn't stop after a reasonable timeout;
return an error instead.
+If *--remove-logs* is specified, remove per *domain* log files. Not all
+deployment configuration can be supported.
+
+In case of QEMU the flag is only supported if virlogd is used to handle QEMU
+process output. Otherwise the flag is ignored.
domblkerror
.type = VSH_OT_BOOL,
.help = N_("terminate gracefully")
},
+ {.name = "remove-logs",
+ .type = VSH_OT_BOOL,
+ .help = N_("remove domain logs")
+ },
{.name = NULL}
};
if (vshCommandOptBool(cmd, "graceful"))
flags |= VIR_DOMAIN_DESTROY_GRACEFUL;
+ if (vshCommandOptBool(cmd, "remove-logs"))
+ flags |= VIR_DOMAIN_DESTROY_REMOVE_LOGS;
if (flags)
- result = virDomainDestroyFlags(dom, VIR_DOMAIN_DESTROY_GRACEFUL);
+ result = virDomainDestroyFlags(dom, flags);
else
result = virDomainDestroy(dom);