[libvirt] [PATCH] Added the description for Qt Virtual machine manager and Qt Remote Viewer as libvirt related applications.
by F1ash
---
docs/apps.html.in | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/docs/apps.html.in b/docs/apps.html.in
index 1a138b3..3098b73 100644
--- a/docs/apps.html.in
+++ b/docs/apps.html.in
@@ -208,6 +208,17 @@
to remote consoles supporting the VNC protocol. Also provides
an optional mozilla browser plugin.
</dd>
+ <dt><a href="http://f1ash.github.io/qt-virt-manager">qt-virt-manager</a></dt>
+ <dd>
+ The Qt GUI for create and control VMs and another virtual entities
+ (aka networks, storages, interfaces, secrets, network filters).
+ Contains integrated LXC/SPICE/VNC viewer for accessing the graphical or
+ text console associated with a virtual machine or container.
+ </dd>
+ <dt><a href="http://f1ash.github.io/qt-virt-manager">qt-remote-viewer</a></dt>
+ <dd>
+ The Qt VNC/SPICE viewer for access to remote desktops or VMs.
+ </dd>
</dl>
<h2><a name="iaas">Infrastructure as a Service (IaaS)</a></h2>
--
2.10.1
8 years
[libvirt] [PATCH] qemu: Minimalize global driver accesses
by Michal Privoznik
Whilst working on another issue, I've noticed that in some
functions we have a local @driver variable among with access to
global @qemu_driver variable. This makes no sense.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index bacabd2..3495cbf 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3831,7 +3831,7 @@ qemuDomainScreenshot(virDomainPtr dom,
}
unlink_tmp = true;
- virSecurityManagerSetSavedStateLabel(qemu_driver->securityManager, vm->def, tmp);
+ virSecurityManagerSetSavedStateLabel(driver->securityManager, vm->def, tmp);
qemuDomainObjEnterMonitor(driver, vm);
if (qemuMonitorScreendump(priv->mon, tmp) < 0) {
@@ -11449,7 +11449,7 @@ qemuDomainMemoryPeek(virDomainPtr dom,
goto endjob;
}
- virSecurityManagerSetSavedStateLabel(qemu_driver->securityManager, vm->def, tmp);
+ virSecurityManagerSetSavedStateLabel(driver->securityManager, vm->def, tmp);
priv = vm->privateData;
qemuDomainObjEnterMonitor(driver, vm);
--
2.8.4
8 years
[libvirt] [PATCH] virsh: Fix on_shutdown to on_poweroff
by Martin Kletzander
The 'on_shutdown' was the name in Xen, there was never such option in
libvirt's domain XML.
Reported-by: Ruben Kerkhof <ruben(a)rubenkerkhof.com>
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Pushed as trivial.
tools/virsh.pod | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 8236a36fc2af..f278fecafde3 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -2398,7 +2398,7 @@ succeed, and may take a variable length of time depending on what
services must be shutdown in the domain.
The exact behavior of a domain when it shuts down is set by the
-I<on_shutdown> parameter in the domain's XML definition.
+I<on_poweroff> parameter in the domain's XML definition.
If I<domain> is transient, then the metadata of any snapshots will
be lost once the guest stops running, but the snapshot contents still
--
2.10.1
8 years
[libvirt] [PATCH 1/1] qemu: host NUMA hugepage policy without guest NUMA
by Sam Bobroff
At the moment, guests that are backed by hugepages in the host are
only able to use policy to control the placement of those hugepages
on a per-(guest-)CPU basis. Policy applied globally is ignored.
Such guests would use <memoryBacking><hugepages/></memoryBacking> and
a <numatune> block with <memory mode=... nodeset=.../> but no <memnode
.../> elements.
This patch corrects this by, in this specific case, changing the QEMU
command line from "-mem-prealloc -mem-path=..." (which cannot
specify NUMA policy) to "-object memory-backend-file ..." (which can).
Note: This is not visible to the guest and does not appear to create
a migration incompatibility.
Signed-off-by: Sam Bobroff <sam.bobroff(a)au1.ibm.com>
---
There was some discussion leading up to this patch, here:
https://www.redhat.com/archives/libvir-list/2016-October/msg00033.html
During that discussion it seemed that fixing this issue would cause
migration incompatibility but after some careful testing, it appears
that it only does when a memory-backend object is attached to a guest
NUMA node and that is not the case here. If only one is created, and
used globally (not attached via mem=<id>), the migration data does not
seem to be changed and so it seems reasonable to try something like
this patch.
This patch does work for my test cases but I don't claim a deep
understanding of the libvirt code so this is at least partly a RFC.
Comments welcome :-)
Cheers,
Sam.
src/qemu/qemu_command.c | 55 ++++++++++++++++++++++++++++++++++++++++---------
src/qemu/qemu_command.h | 2 +-
2 files changed, 46 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0804133..c28c8f2 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3143,7 +3143,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
int guestNode,
virBitmapPtr userNodeset,
virBitmapPtr autoNodeset,
- virDomainDefPtr def,
+ const virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
virQEMUDriverConfigPtr cfg,
const char **backendType,
@@ -7129,12 +7129,18 @@ qemuBuildSmpCommandLine(virCommandPtr cmd,
static int
qemuBuildMemPathStr(virQEMUDriverConfigPtr cfg,
- const virDomainDef *def,
+ const virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
- virCommandPtr cmd)
+ virCommandPtr cmd,
+ virBitmapPtr auto_nodeset)
{
const long system_page_size = virGetSystemPageSizeKB();
char *mem_path = NULL;
+ virBitmapPtr nodemask = NULL;
+ const char *backendType = NULL;
+ char *backendStr = NULL;
+ virJSONValuePtr props;
+ int rv = -1;
/*
* No-op if hugepages were not requested.
@@ -7159,18 +7165,47 @@ qemuBuildMemPathStr(virQEMUDriverConfigPtr cfg,
if (qemuGetHupageMemPath(cfg, def->mem.hugepages[0].size, &mem_path) < 0)
return -1;
- virCommandAddArgList(cmd, "-mem-prealloc", "-mem-path", mem_path, NULL);
+ if (virDomainNumatuneMaybeGetNodeset(def->numa, auto_nodeset,
+ &nodemask, -1) < 0)
+ return -1;
+ if (nodemask && virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE)) {
+ props = virJSONValueNewObject();
+ if (qemuBuildMemoryBackendStr(virDomainDefGetMemoryInitial(def),
+ 0, -1, NULL, auto_nodeset,
+ def, qemuCaps, cfg, &backendType,
+ &props, false) < 0)
+ goto cleanup;
+ if (!(backendStr = virQEMUBuildObjectCommandlineFromJSON(backendType,
+ "mem",
+ props)))
+ goto cleanup;
+ virCommandAddArgList(cmd, "-object", backendStr, NULL);
+ rv = 0;
+cleanup:
+ VIR_FREE(backendStr);
+ VIR_FREE(props);
+ }
+ else {
+ if (nodemask || 1)
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Memory file backend objects are "
+ "unsupported by QEMU binary. Global NUMA "
+ "hugepage policy will be ignored."));
+ virCommandAddArgList(cmd, "-mem-prealloc", "-mem-path", mem_path, NULL);
+ rv = 0;
+ }
VIR_FREE(mem_path);
- return 0;
+ return rv;
}
static int
qemuBuildMemCommandLine(virCommandPtr cmd,
virQEMUDriverConfigPtr cfg,
- const virDomainDef *def,
- virQEMUCapsPtr qemuCaps)
+ const virDomainDefPtr def,
+ virQEMUCapsPtr qemuCaps,
+ virBitmapPtr auto_nodeset)
{
if (qemuDomainDefValidateMemoryHotplug(def, qemuCaps, NULL) < 0)
return -1;
@@ -7194,7 +7229,7 @@ qemuBuildMemCommandLine(virCommandPtr cmd,
* there is no numa node specified.
*/
if (!virDomainNumaGetNodeCount(def->numa) &&
- qemuBuildMemPathStr(cfg, def, qemuCaps, cmd) < 0)
+ qemuBuildMemPathStr(cfg, def, qemuCaps, cmd, auto_nodeset) < 0)
return -1;
if (def->mem.locked && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_REALTIME_MLOCK)) {
@@ -7331,7 +7366,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
}
if (!needBackend &&
- qemuBuildMemPathStr(cfg, def, qemuCaps, cmd) < 0)
+ qemuBuildMemPathStr(cfg, def, qemuCaps, cmd, auto_nodeset) < 0)
goto cleanup;
for (i = 0; i < ncells; i++) {
@@ -9381,7 +9416,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
if (!migrateURI && !snapshot && qemuDomainAlignMemorySizes(def) < 0)
goto error;
- if (qemuBuildMemCommandLine(cmd, cfg, def, qemuCaps) < 0)
+ if (qemuBuildMemCommandLine(cmd, cfg, def, qemuCaps, nodeset) < 0)
goto error;
if (qemuBuildSmpCommandLine(cmd, def) < 0)
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index 2f2a6ff..1e97d76 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -126,7 +126,7 @@ int qemuBuildMemoryBackendStr(unsigned long long size,
int guestNode,
virBitmapPtr userNodeset,
virBitmapPtr autoNodeset,
- virDomainDefPtr def,
+ const virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
virQEMUDriverConfigPtr cfg,
const char **backendType,
--
2.10.0.297.gf6727b0
8 years
[libvirt] on shutdown
by Ruben Kerkhof
Hi all,
virsh(1) has this to say about virsh shutdown:
"The exact behavior of a domain when it shuts down is set by the
on_shutdown parameter in the domain's XML definition."
on_shutdown isn't documented in https://libvirt.org/formatdomain.html
Is the virsh(1) manpage wrong?
Kind regards,
Ruben Kerkhof
8 years
[libvirt] [PATCH 0/5] wireshark: Fix $(prefix) handling
by Andrea Bolognani
Well, almost :) There are still some cases that are not
handled correctly, but at least this will unbreak 'make
rpm' while I work on the rest.
Tested by running 'make rpm' successfully on Fedora 23,
Fedora 24 and Fedora rawhide.
Andrea Bolognani (5):
wireshark: Introduce $ws_modversion
wireshark: Hoist $ws_prefix declaration
wireshark: Strip prefix correctly
wireshark: Inject $(prefix) at the right time
wireshark: Rename plugindir to ws_plugindir
m4/virt-wireshark.m4 | 29 ++++++++++++++++++-----------
tools/Makefile.am | 2 +-
2 files changed, 19 insertions(+), 12 deletions(-)
--
2.7.4
8 years
[libvirt] [PATCH] virt-wireshark.m4: Defer $(prefix) substitution
by Michal Privoznik
The problem with evaluating $(prefix) in configure phase is that
autoconf does a lot of magic with this variable. Firstly, if the
--prefix argument is not set for the configure script, the
variable will have value "NONE". Wait, wat? Secondly, even
autoconf scripts then have special cases for when variable is
"NONE". It's even worse - whenever they need to construct new
path based on prefix, they save its current value, substitute it
with proper value (like /usr/local/), do what they need and then
restore the original value. Le sigh.
This mad behaviour is, however, suppressed if there's --prefix on
the configure command line.
Now, the problem is that we tried to construct path for wireshark
plugin in the m4 file. Based on the knowledge described above, we
shouldn't do it and just construct the full path in Makefile
later where prefix has proper value.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
m4/virt-wireshark.m4 | 2 +-
tools/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4
index f383e2b..e1e4a59 100644
--- a/m4/virt-wireshark.m4
+++ b/m4/virt-wireshark.m4
@@ -38,7 +38,7 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[
if test "x$ws_prefix" = "x" ; then
ws_prefix="/usr";
fi
- plugindir="${prefix}${plugindir#$ws_prefix}"
+ plugindir="${plugindir#$ws_prefix}"
fi
elif test "x$with_ws_plugindir" = "xno" || test "x$with_ws_plugindir" = "xyes"; then
AC_MSG_ERROR([ws-plugindir must be used only with valid path])
diff --git a/tools/Makefile.am b/tools/Makefile.am
index e7e42c3..08e1680 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -398,7 +398,7 @@ EXTRA_DIST += \
if WITH_WIRESHARK_DISSECTOR
-ws_plugindir = $(plugindir)
+ws_plugindir = $(prefix)$(plugindir)
ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la
wireshark_src_libvirt_la_CPPFLAGS = \
-I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS)
--
2.8.4
8 years
[libvirt] [PATCH v11 0/5] Add native TLS encrypted chardev TCP support
by John Ferlan
v10: http://www.redhat.com/archives/libvir-list/2016-October/msg00866.html
Changes since v10...
This is essentially the adding the secret to/for the TLS chardev TCP. Lots
of messy stuff.
Patches 1-3 are new... In particular, I kept looking at the RNG removal
code and kept thinking, something just doesn't look right when compared
to the RemoveVirtioDisk code. If I'm incorrect with order of removal it's
an easy enough change. Kept trying to think what depends on what and for
the RNG it would seem a need a to unplug the backend before removing the
front end object would be more logical.
Patches 4-5 are the old patch 3-4. They (hopefully) encompass the previous
review plus other things since discovered.
John Ferlan (5):
qemu: Move TLS object remove from DetachChr to RemoveChr
qemu: Swap order of RNG hot unplug removal
qemu: Need to remove TLS object in RemoveRNGDevice
qemu: Add a secret object to/for a char source dev
qemu: Add secret object hotplug for TCP chardev TLS
src/qemu/qemu_command.c | 30 +++-
src/qemu/qemu_command.h | 1 +
src/qemu/qemu_domain.c | 173 +++++++++++++++++-
src/qemu/qemu_domain.h | 17 +-
src/qemu/qemu_driver.c | 6 +-
src/qemu/qemu_hotplug.c | 195 +++++++++++++++++----
src/qemu/qemu_hotplug.h | 9 +-
src/qemu/qemu_process.c | 9 +-
tests/qemuhotplugtest.c | 2 +-
...xml2argv-serial-tcp-tlsx509-secret-chardev.args | 38 ++++
...uxml2argv-serial-tcp-tlsx509-secret-chardev.xml | 50 ++++++
tests/qemuxml2argvtest.c | 17 ++
12 files changed, 495 insertions(+), 52 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-secret-chardev.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-secret-chardev.xml
--
2.7.4
8 years
[libvirt] [PATCH v5 00/15] Use more PCIe less legacy PCI
by Laine Stump
These are just the rebased versions of the patches from v4 that I
haven't yet pushed, to make review easier. Patch 1 and 2 (and several
others) are already ACKed, but included for completeness.
Laine Stump (15):
qemu: new functions qemuDomainMachineHasPCI[e]Root()
qemu: new functions to calculate/set device pciConnectFlags
qemu: set/use info->pciConnectFlags when validating/assigning PCI
addresses
qemu: set/use proper pciConnectFlags during hotplug
qemu: set pciConnectFlags to 0 instead of PCI|HOTPLUGGABLE if device
isn't PCI
qemu: assign virtio devices to PCIe slot when appropriate
qemu: assign e1000e network devices to PCIe slots when appropriate
qemu: assign nec-xhci (USB3) controller to a PCIe address when
appropriate
qemu: only force an available legacy-PCI slot on domains with pci-root
qemu: auto-add pcie-root-port/dmi-to-pci-bridge controllers as needed
[RFC] qemu: if pci-bridge is in PCIe config w/o dmi-to-pci-bridge, add
it
qemu: don't force-add a dmi-to-pci-bridge just on principle
qemu: add a USB3 controller to Q35 domains by default
qemu: try to put ich9 sound device at 00:1B.0
qemu: initially reserve one open pcie-root-port for hotplug
src/conf/device_conf.h | 5 +
src/conf/domain_addr.c | 112 ++-
src/conf/domain_addr.h | 3 +-
src/qemu/qemu_domain.c | 52 +-
src/qemu/qemu_domain.h | 2 +
src/qemu/qemu_domain_address.c | 805 +++++++++++++++++----
src/qemu/qemu_domain_address.h | 4 +
src/qemu/qemu_hotplug.c | 20 +-
tests/qemuxml2argvdata/qemuxml2argv-autoindex.args | 10 +-
.../qemuxml2argv-bios-nvram-secure.args | 1 +
.../qemuxml2argv-machine-smm-opt.args | 1 +
tests/qemuxml2argvdata/qemuxml2argv-pcie-root.args | 3 +-
.../qemuxml2argv-q35-default-devices-only.args | 23 +
.../qemuxml2argv-q35-default-devices-only.xml | 18 +
.../qemuxml2argv-q35-pcie-autoadd.args | 57 ++
.../qemuxml2argv-q35-pcie-autoadd.xml | 51 ++
tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.args | 58 ++
tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.xml | 67 ++
.../qemuxml2argv-q35-pm-disable-fallback.args | 1 +
.../qemuxml2argv-q35-pm-disable.args | 1 +
.../qemuxml2argv-q35-virt-manager-basic.args | 56 ++
.../qemuxml2argv-q35-virt-manager-basic.xml | 76 ++
.../qemuxml2argv-q35-virtio-pci.args | 58 ++
.../qemuxml2argv-q35-virtio-pci.xml | 1 +
tests/qemuxml2argvtest.c | 164 ++++-
.../qemuxml2xmlout-autoindex.xml | 10 +-
.../qemuxml2xmlout-pcie-root.xml | 4 -
.../qemuxml2xmlout-q35-default-devices-only.xml | 45 ++
.../qemuxml2xmlout-q35-pcie-autoadd.xml | 148 ++++
.../qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml | 152 ++++
.../qemuxml2xmlout-q35-virt-manager-basic.xml | 121 ++++
.../qemuxml2xmlout-q35-virtio-pci.xml | 152 ++++
tests/qemuxml2xmltest.c | 136 +++-
33 files changed, 2189 insertions(+), 228 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-default-devices-only.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-default-devices-only.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-pcie-autoadd.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-pcie-autoadd.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pci.args
create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pci.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml
--
2.7.4
8 years