From nobody Wed Apr 24 02:21:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575299119; cv=none; d=zohomail.com; s=zohoarc; b=XvM9RvL6E11a83tnSt8BoXojb46ni9P/ux4/vT4eSYkWKU57umSi9cbdq6aWV7DVWZ78Bp8gtoqYzZQeRiCFhaeS/ZNypFl2i4yWB45YtfMFcXkA53A+4xUYZYzeavOs+aP/N6cuWie2GSrQYNeZSobYCZNHHoOMAJLv5R0u+v0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575299119; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CRcZdmIASiHlt6GovbdcijhP7rgf6iW3ISdURnJXI+Y=; b=Qsnk83mxgu4yNDiYGARYHEHivo7icYEL5qtKfACRqQsrZshKgO4ltZBOEW5HZPXUMHsz+7GFd6kus1g0kDDGyGd2q1bDn1C1oKwLPudf3rx7ZcWCcQVQPngnAcLX9UuTzYd9i9AiPX+2Z+UjNInNC2I5914Atq07T/pmecTDsjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1575299119631157.57591317524918; Mon, 2 Dec 2019 07:05:19 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-328-2QMdcpsgOXS-5N18Pzsh8g-1; Mon, 02 Dec 2019 10:04:04 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE9FCA1941; Mon, 2 Dec 2019 15:03:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4461600CD; Mon, 2 Dec 2019 15:03:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 50ED018034F0; Mon, 2 Dec 2019 15:03:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB2F3fnF030626 for ; Mon, 2 Dec 2019 10:03:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5E654600CC; Mon, 2 Dec 2019 15:03:41 +0000 (UTC) Received: from dhcp-16-105.lcy.redhat.com (unknown [10.42.16.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id B15A3600C9; Mon, 2 Dec 2019 15:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575299118; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CRcZdmIASiHlt6GovbdcijhP7rgf6iW3ISdURnJXI+Y=; b=V186HkCr1e10ES26xkNNs3Re7bNAVuIJaIz5KpSTDwFe8K/wob5AAku9ZgyU1qlQiDje0y ZbwftqLxdVFJC/Ty3ow7T/qvZpJ34HeRVYfvf7OV75wZ3uY2dc5TN3qM+zSCF6TopkBRcc jo1fmxe/zw8NxXvCq+mZ0Nr10LrueXU= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 2 Dec 2019 15:03:31 +0000 Message-Id: <20191202150331.173475-8-berrange@redhat.com> In-Reply-To: <20191202150331.173475-1-berrange@redhat.com> References: <20191202150331.173475-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/7] qemu: introduce a new "virt-qemu-run" program X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: 2QMdcpsgOXS-5N18Pzsh8g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The previous "QEMU shim" proof of concept was taking an approach of only caring about initial spawning of the QEMU process. It was then registered with the libvirtd daemon who took over management of it. The intent was that later libvirtd would be refactored so that the shim retained control over the QEMU monitor and libvirt just forwarded APIs to each shim as needed. This forwarding of APIs would require quite alot of significant refactoring of libvirtd to achieve. This impl thus takes a quite different approach, explicitly deciding to keep the VMs completely separate from those seen & managed by libvirtd. Instead it uses the new "qemu:///embed" URI scheme to embed the entire QEMU driver in the shim, running with a custom root directory. Once the driver is initialization, the shim starts a VM and then waits to shutdown automatically when QEMU shuts down, or should kill QEMU if it is terminated itself. This ought to use the AUTO_DESTROY feature but that is not yet available in embedded mode, so we rely on installing a few signal handlers to gracefully kill QEMU. This isn't reliable if we crash of course, but you can restart with the same root dir. Note this program does not expose any way to manage the QEMU process, since there's no RPC interface enabled. It merely starts the VM and cleans up when the guest shuts down at the end. This program is installed to /usr/bin/virt-qemu-run enabling direct use by end users. Most use cases will probably want to integrate the concept directly into their respective application codebases. This standalone binary serves as a nice demo though, and also provides a way to measure performance of the startup process quite simply. Signed-off-by: Daniel P. Berrang=C3=A9 --- build-aux/syntax-check.mk | 2 +- libvirt.spec.in | 2 + src/Makefile.am | 9 ++ src/qemu/Makefile.inc.am | 26 ++++ src/qemu/qemu_shim.c | 313 ++++++++++++++++++++++++++++++++++++++ src/qemu/qemu_shim.pod | 94 ++++++++++++ 6 files changed, 445 insertions(+), 1 deletion(-) create mode 100644 src/qemu/qemu_shim.c create mode 100644 src/qemu/qemu_shim.pod diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 94e4945323..627734fc55 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -2340,7 +2340,7 @@ exclude_file_name_regexp--sc_prohibit_devname =3D \ ^(tools/virsh.pod|build-aux/syntax-check\.mk|docs/.*)$$ =20 exclude_file_name_regexp--sc_prohibit_virXXXFree =3D \ - ^(docs/|tests/|examples/|tools/|build-aux/syntax-check\.mk|src/test/test= _driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|n= odedev|storage|stream|secret|nwfilter|interface|domain-snapshot).h|src/libv= irt-(domain|qemu|network|nodedev|storage|stream|secret|nwfilter|interface|d= omain-snapshot).c$$) + ^(docs/|tests/|examples/|tools/|build-aux/syntax-check\.mk|src/test/test= _driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|n= odedev|storage|stream|secret|nwfilter|interface|domain-snapshot).h|src/libv= irt-(domain|qemu|network|nodedev|storage|stream|secret|nwfilter|interface|d= omain-snapshot).c|src/qemu/qemu_shim.c$$) =20 exclude_file_name_regexp--sc_prohibit_sysconf_pagesize =3D \ ^(build-aux/syntax-check\.mk|src/util/virutil\.c)$$ diff --git a/libvirt.spec.in b/libvirt.spec.in index c7fac104d9..886c7b73d5 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1757,6 +1757,8 @@ exit 0 %{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/swtpm/ %dir %attr(0711, root, root) %{_localstatedir}/log/swtpm/libvirt/qemu/ +%{_bindir}/virt-qemu-run +%{_mandir}/man1/virt-qemu-run.1* %endif =20 %if %{with_lxc} diff --git a/src/Makefile.am b/src/Makefile.am index 696e64c52e..f86ba3fe3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -90,6 +90,8 @@ SYSTEMD_UNIT_FILES =3D SYSTEMD_UNIT_FILES_IN =3D SYSCONF_FILES =3D sbin_PROGRAMS =3D +bin_PROGRAMS =3D +man1_MANS =3D man8_MANS =3D DRIVER_SOURCES =3D man7_MANS =3D @@ -659,6 +661,13 @@ endif WITH_LIBVIRTD < $< > $@-t && \ mv $@-t $@ =20 +%.1: %.1.in $(top_srcdir)/configure.ac + $(AM_V_GEN)sed \ + -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ + -e 's|[@]runstatedir[@]|$(runstatedir)|g' \ + < $< > $@-t && \ + mv $@-t $@ + CLEANFILES +=3D \ $(man8_MANS) \ $(MANINFILES) diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index bf30f8a3c5..d41853ac9e 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -231,3 +231,29 @@ EXTRA_DIST +=3D \ qemu/THREADS.txt \ libvirt_qemu_probes.d \ $(NULL) + +QEMU_SHIM_SOURCES =3D qemu/qemu_shim.c +QEMU_SHIM_POD =3D qemu/qemu_shim.pod + +EXTRA_DIST +=3D $(QEMU_SHIM_SOURCES) $(QEMU_SHIM_POD) + +if WITH_QEMU +bin_PROGRAMS +=3D virt-qemu-run + +man1_MANS +=3D virt-qemu-run.1 + +virt_qemu_run_SOURCES =3D $(QEMU_SHIM_SOURCES) + +virt_qemu_run_LDADD =3D libvirt.la +virt_qemu_run_LDFLAGS =3D -Wl,--export-dynamic +endif WITH_QEMU + +virt-qemu-run.1.in: qemu/qemu_shim.pod + $(AM_V_GEN)$(POD2MAN) $< $@-t1 && \ + if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \ + sed \ + -e 's|SYSCONFDIR|\@sysconfdir\@|g' \ + -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \ + < $@-t1 > $@-t2 && \ + rm -f $@-t1 && \ + mv $@-t2 $@ diff --git a/src/qemu/qemu_shim.c b/src/qemu/qemu_shim.c new file mode 100644 index 0000000000..10f9682143 --- /dev/null +++ b/src/qemu/qemu_shim.c @@ -0,0 +1,313 @@ +/* + * qemu_shim.c: standalone binary for running QEMU instances + * + * Copyright (C) 2019 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + */ + +#include + +#include +#include + +#include "virfile.h" +#include "virstring.h" +#include "virgettext.h" + +#define VIR_FROM_THIS VIR_FROM_QEMU + +static bool eventQuitFlag; +static int eventQuitFD =3D -1; +static virDomainPtr dom; + +static void * +qemuShimEventLoop(void *opaque G_GNUC_UNUSED) +{ + while (!eventQuitFlag) + virEventRunDefaultImpl(); + + return NULL; +} + +/* Runs in event loop thread context */ +static void +qemuShimEventLoopStop(int watch G_GNUC_UNUSED, + int fd G_GNUC_UNUSED, + int event G_GNUC_UNUSED, + void *opaque G_GNUC_UNUSED) +{ + char c; + ignore_value(read(fd, &c, 1)); + eventQuitFlag =3D true; +} + +/* Runs in event loop thread context */ +static int +qemuShimDomShutdown(virConnectPtr econn G_GNUC_UNUSED, + virDomainPtr edom G_GNUC_UNUSED, + int event, + int detail G_GNUC_UNUSED, + void *opaque G_GNUC_UNUSED) +{ + if (event =3D=3D VIR_DOMAIN_EVENT_STOPPED) + eventQuitFlag =3D true; + + return 0; +} + +/* Runs in unknown thread context */ +static void +qemuShimSigShutdown(int sig G_GNUC_UNUSED) +{ + if (dom) + virDomainDestroy(dom); + ignore_value(safewrite(eventQuitFD, "c", 1)); +} + +static void +qemuShimQuench(void *userData G_GNUC_UNUSED, + virErrorPtr error G_GNUC_UNUSED) +{ +} + +int main(int argc, char **argv) +{ + GThread *eventLoopThread =3D NULL; + virConnectPtr conn =3D NULL; + virConnectPtr sconn =3D NULL; + g_autofree char *xml =3D NULL; + g_autofree char *uri =3D NULL; + g_autofree char *suri =3D NULL; + char *root =3D NULL; + bool tmproot =3D false; + int ret =3D 1; + g_autoptr(GError) error =3D NULL; + g_auto(GStrv) secrets =3D NULL; + bool verbose =3D false; + GStrv tmpsecrets; + GOptionContext *ctx; + GOptionEntry entries[] =3D { + { "secret", 's', 0, G_OPTION_ARG_STRING_ARRAY, &secrets, "Load sec= ret file", "SECRET-XML-FILE,SECRET-VALUE-FILE" }, + { "root", 'r', 0, G_OPTION_ARG_STRING, &root, "Root directory", "D= IR"}, + { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Verbose output"= , NULL }, + { NULL } + }; + int quitfd[2] =3D {-1, -1}; + long long start =3D g_get_monotonic_time(); + +#define deltams() ((long long)g_get_monotonic_time() - start) + + ctx =3D g_option_context_new("- run a standalone QEMU process"); + g_option_context_add_main_entries(ctx, entries, PACKAGE); + if (!g_option_context_parse(ctx, &argc, &argv, &error)) { + g_printerr("%s: option parsing failed: %s\n", + argv[0], error->message); + return 1; + } + if (argc !=3D 2) { + g_autofree char *help =3D g_option_context_get_help(ctx, TRUE, NUL= L); + g_printerr("%s", help); + return 1; + } + + if (verbose) + g_printerr("%s: %lld: initializing libvirt\n", + argv[0], deltams()); + + if (virInitialize() < 0) { + g_printerr("%s: cannot initialize libvirt\n", argv[0]); + return 1; + } + if (virGettextInitialize() < 0) { + g_printerr("%s: cannot initialize libvirt translations\n", argv[0]= ); + return 1; + } + + virSetErrorFunc(NULL, qemuShimQuench); + + if (verbose) + g_printerr("%s: %lld: initializing signal handlers\n", + argv[0], deltams()); + + signal(SIGTERM, qemuShimSigShutdown); + signal(SIGINT, qemuShimSigShutdown); + signal(SIGQUIT, qemuShimSigShutdown); + signal(SIGHUP, qemuShimSigShutdown); + + if (root =3D=3D NULL) { + if (!(root =3D g_dir_make_tmp("libvirt-qemu-shim-XXXXXX", &error))= ) { + g_printerr("%s: cannot create temporary dir: %s\n", + argv[0], error->message); + return 1; + } + tmproot =3D true; + } + + virFileActivateDirOverrideForProg(argv[0]); + + if (verbose) + g_printerr("%s: %lld: preparing event loop thread\n", + argv[0], deltams()); + virEventRegisterDefaultImpl(); + + if (pipe(quitfd) < 0) { + g_printerr("%s: cannot create event loop pipe: %s", + argv[0], g_strerror(errno)); + goto cleanup; + } + + if (virEventAddHandle(quitfd[0], VIR_EVENT_HANDLE_READABLE, qemuShimEv= entLoopStop, NULL, NULL) < 0) { + VIR_FORCE_CLOSE(quitfd[0]); + VIR_FORCE_CLOSE(quitfd[1]); + quitfd[0] =3D quitfd[1] =3D -1; + g_printerr("%s: cannot register event loop handle: %s", + argv[0], virGetLastErrorMessage()); + goto cleanup; + } + eventQuitFD =3D quitfd[1]; + + eventLoopThread =3D g_thread_new("event-loop", qemuShimEventLoop, NULL= ); + + if (secrets && *secrets) { + suri =3D g_strdup_printf("secret:///embed?root=3D%s", root); + + if (verbose) + g_printerr("%s: %lld: opening %s\n", + argv[0], deltams(), suri); + + sconn =3D virConnectOpen(suri); + if (!sconn) { + g_printerr("%s: cannot open %s: %s\n", + argv[0], suri, virGetLastErrorMessage()); + goto cleanup; + } + + tmpsecrets =3D secrets; + while (tmpsecrets && *tmpsecrets) { + g_auto(GStrv) bits =3D g_strsplit(*tmpsecrets, ",", 2); + g_autofree char *sxml =3D NULL; + g_autofree char *value =3D NULL; + virSecretPtr sec; + size_t nvalue; + + if (!bits || bits[0] =3D=3D NULL || bits[1] =3D=3D NULL) { + g_printerr("%s: expected a pair of filenames for --secret = argument\n", + argv[0]); + goto cleanup; + } + + if (verbose) + g_printerr("%s: %lld: loading secret %s and %s\n", + argv[0], deltams(), bits[0], bits[1]); + + if (!g_file_get_contents(bits[0], &sxml, NULL, &error)) { + g_printerr("%s: cannot read secret XML %s: %s\n", + argv[0], bits[0], error->message); + goto cleanup; + } + + if (!g_file_get_contents(bits[1], &value, &nvalue, &error)) { + g_printerr("%s: cannot read secret value %s: %s\n", + argv[0], bits[1], error->message); + goto cleanup; + } + + if (!(sec =3D virSecretDefineXML(sconn, sxml, 0))) { + g_printerr("%s: cannot define secret %s: %s\n", + argv[0], bits[0], virGetLastErrorMessage()); + goto cleanup; + } + + if (virSecretSetValue(sec, (unsigned char *)value, nvalue, 0) = < 0) { + virSecretFree(sec); + g_printerr("%s: cannot set value for secret %s: %s\n", + argv[0], bits[0], virGetLastErrorMessage()); + goto cleanup; + } + virSecretFree(sec); + + tmpsecrets++; + } + } + + uri =3D g_strdup_printf("qemu:///embed?root=3D%s", root); + + if (verbose) + g_printerr("%s: %lld: opening %s\n", + argv[0], deltams(), uri); + + conn =3D virConnectOpen(uri); + if (!conn) { + g_printerr("%s: cannot open %s: %s\n", + argv[0], uri, virGetLastErrorMessage()); + goto cleanup; + } + + if (virConnectDomainEventRegisterAny( + conn, dom, VIR_DOMAIN_EVENT_ID_LIFECYCLE, + VIR_DOMAIN_EVENT_CALLBACK(qemuShimDomShutdown), + NULL, NULL) < 0) { + g_printerr("%s: cannot regiser for lifecycle events: %s\n", + argv[0], virGetLastErrorMessage()); + goto cleanup; + } + + if (verbose) + g_printerr("%s: %lld: starting guest %s\n", + argv[0], deltams(), argv[1]); + + if (!g_file_get_contents(argv[1], &xml, NULL, &error)) { + g_printerr("%s: cannot read %s: %s\n", + argv[0], argv[1], error->message); + goto cleanup; + } + + dom =3D virDomainCreateXML(conn, xml, 0); + if (!dom) { + g_printerr("%s: cannot start VM: %s\n", + argv[0], virGetLastErrorMessage()); + goto cleanup; + } + if (verbose) + g_printerr("%s: %lld: guest running, Ctrl-C to stop\n", + argv[0], deltams()); + + ret =3D 0; + + cleanup: + if (ret !=3D 0 && eventQuitFD !=3D -1) + ignore_value(safewrite(eventQuitFD, "c", 1)); + + if (eventLoopThread !=3D NULL && (ret =3D=3D 0 || eventQuitFD !=3D -1)) + g_thread_join(eventLoopThread); + + VIR_FORCE_CLOSE(quitfd[0]); + VIR_FORCE_CLOSE(quitfd[1]); + + if (dom !=3D NULL) + virDomainFree(dom); + if (sconn !=3D NULL) + virConnectClose(sconn); + if (conn !=3D NULL) + virConnectClose(conn); + if (tmproot) + virFileDeleteTree(root); + + if (verbose) + g_printerr("%s: %lld: cleaned up, exiting\n", + argv[0], deltams()); + return ret; +} diff --git a/src/qemu/qemu_shim.pod b/src/qemu/qemu_shim.pod new file mode 100644 index 0000000000..eb17fa0ac7 --- /dev/null +++ b/src/qemu/qemu_shim.pod @@ -0,0 +1,94 @@ +=3Dencoding utf8 + +=3Dhead1 NAME + +virt-qemu-run - run a standalone QEMU guest + +=3Dhead1 SYNOPSIS + +B [I...] [I] + +=3Dhead1 DESCRIPTION + +This tool provides a way to run a standalone QEMU guest such that it +is completely independant of libvirtd. It makes use of the embedded +QEMU driver support to run the VM placing files under an isolated +directory tree. When the guest is run with this tool it is invisible +to libvirtd and thus also invisible to other libvirt tools such as +virsh. + +The virt-qemu-run program will run the QEMU virtual machine, and then +block until the guest OS shuts down, at which point it will exit. + +If the virt-qemu-run program is interrupted (eg Ctrl-C) it will +immediately terminate the virtual machine without giving the guest +OS any opportunity to gracefully shutdown. + +=3Dhead1 OPTIONS + +=3Dover 4 + +=3Ditem C + +The full path to the XML file describing the guest virtual machine +to be booted. + +=3Ditem C<-h>, C<--help> + +Display the command line help + +=3Ditem C<-v>, C<--verbose> + +Display verbose information about startup + +=3Ditem C<-r DIR>, C<--root=3DDIR> + +Specify the root directory to use for storing state associated with +the virtual machine. The caller is responsible for deleting this +directory when it is no longer required. + +If this parameter is omitted, then a random temporary directory +will be created, and its contents be automaticlaly deleted at +VM shutdown. + +=3Ditem C<-s XML-FILE,VALUE-FILE> C<--secret=3DXML-FILE,VALUE-FILE> + +Specify a secret to be loaded into the secret driver. The C +is a path to the XML description of the secret, whose UUID should +match a secret referenced in the guest domain XML. The C +is a path containing the raw value of the secret. + +=3Dback + +=3Dhead1 EXIT STATUS + +Upon successful shutdown, an exit status of 0 will be set. Upon +failure a non-zero status will be set. + +=3Dhead1 AUTHOR + +Daniel P. Berrang=C3=A9 + +=3Dhead1 BUGS + +Report any bugs discovered to the libvirt community via the +mailing list L or bug tracker +L. +Alternatively report bugs to your software distributor / vendor. + +=3Dhead1 COPYRIGHT + +Copyright (C) 2019 by Red Hat, Inc. + +=3Dhead1 LICENSE + +virt-run-qemu is distributed under the terms of the GNU LGPL v2+. +This is free software; see the source for copying conditions. There +is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE + +=3Dhead1 SEE ALSO + +L + +=3Dcut --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list