[libvirt] [PATCH 0/9] qemu: More CPU enhancements and fixes
by Jiri Denemark
This is technically a v2 of the not yet pushed part of "qemu: Use
migratable host CPU model from QEMU" series, but the patches were
significantly rewritten based on the review comments and on the need for
additional regression fix.
Current libvirt makes a migratable host CPU model by removing features
marked in cpu_map.xml with migratable='no'. This is not ideal because
cpu_map.xml is a static database while feature migratability may differ
depending on a hypervisor or its version. Thus we should preferably use
the data we got from QEMU.
And to make things even more complicated, we need to use both CPUID data
we probed and data from QEMU when checking whether a guest CPU can run
on the host to maintain backward compatibility with older libvirt.
Thus we need to store three different views of the host CPU model with
each QEMU binary.
Jiri Denemark (9):
qemu: Introduce virQEMUCapsSetHostModel
qemu: Move qemuCaps CPU data copying into a separate function
qemu: Introduce virQEMUCapsHostCPUDataClear
qemu: Move qemuCaps host CPU data in a struct
qemu: Prepare qemuCaps for multiple host CPU defs
qemu: Pass migratable host CPU model to virCPUUpdate
cpu: Drop feature filtering from virCPUUpdate
cpu: Introduce virCPUGetHostIsSupported
qemu: Use more data for comparing CPUs
src/cpu/cpu.c | 20 +++
src/cpu/cpu.h | 3 +
src/cpu/cpu_x86.c | 9 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 288 +++++++++++++++++++++++++++++--------------
src/qemu/qemu_capabilities.h | 16 ++-
src/qemu/qemu_command.c | 3 +-
src/qemu/qemu_process.c | 6 +-
tests/cputest.c | 7 +-
9 files changed, 247 insertions(+), 106 deletions(-)
--
2.12.2
7 years, 8 months
[libvirt] [PATCH] virt-storage-rbd: fix typo s/RDB/RBD/ in configure check
by Daniel P. Berrange
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as trivial build fix.
m4/virt-storage-rbd.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/virt-storage-rbd.m4 b/m4/virt-storage-rbd.m4
index 727bd71..17e2115 100644
--- a/m4/virt-storage-rbd.m4
+++ b/m4/virt-storage-rbd.m4
@@ -36,7 +36,7 @@ AC_DEFUN([LIBVIRT_STORAGE_CHECK_RBD], [
LIBS="$old_LIBS"
fi
- if test "$LIBRDB_FOUND" = "yes"; then
+ if test "$LIBRBD_FOUND" = "yes"; then
with_storage_rbd=yes
AC_DEFINE_UNQUOTED([WITH_STORAGE_RBD], [1],
[whether RBD backend for storage driver is enabled])
--
2.9.3
7 years, 8 months
[libvirt] [PATCH v3 0/2] default USB controller for PPC
by Pavel Hrdina
Pavel Hrdina (2):
conf: add a new parse flag VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION
qemu_domain: use correct default USB controller on ppc64
src/conf/domain_conf.c | 3 ++-
src/conf/domain_conf.h | 4 ++++
src/qemu/qemu_domain.c | 16 ++++++++++++----
src/qemu/qemu_migration_cookie.c | 2 +-
4 files changed, 19 insertions(+), 6 deletions(-)
--
2.12.2
7 years, 8 months
[libvirt] [PATCH 0/2] autogen.sh: Rewrite and modularize
by Andrea Bolognani
This work was motivated by Dan's intention to introduce the
keycodemapdb module into libvirt[1]. As it is, we have a few
useful submodule-related features in our build system, but
they are limited in that they assume there will be a single
submodule, and it will be gnulib.
This series removes such assumptions, making it possible to
introduce more submodules without having to sacrifice any
convenience.
[1] https://www.redhat.com/archives/libvir-list/2017-March/msg00136.html
Andrea Bolognani (2):
autogen.sh: Rewrite
autogen.sh: Modularize
.gitignore | 2 +-
.submodules/gnulib.functions | 65 ++++++++++
autogen.sh | 286 +++++++++++++++++++++++++++++--------------
cfg.mk | 34 ++---
4 files changed, 265 insertions(+), 122 deletions(-)
create mode 100644 .submodules/gnulib.functions
--
2.7.4
7 years, 8 months
[libvirt] [PATCH] spec: Avoid RPM verification errors on nwfilter XMLs
by Jiri Denemark
/etc/libvirt/nwfilter/*.xml files are installed with no UUID, which
means libvirtd will automatically alter all of them once it starts. Thus
RPM verification will always fail on them. Let's use a trick similar to
the default network XML and store nwfilter XMLs in /usr/share. They will
be copied into /etc in %post. Additionally the /etc files are marked as
%ghost so that they are uninstalled if the RPM package is removed.
Note that the %post script overwrites existing files with new ones on
upgrade, which is what has always been happening.
https://bugzilla.redhat.com/show_bug.cgi?id=1431581
https://bugzilla.redhat.com/show_bug.cgi?id=1378774
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
libvirt.spec.in | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1d249851a..78c3c28e1 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1360,6 +1360,13 @@ cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \
$RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
+
+# nwfilter files are installed in /usr/share/libvirt and copied to /etc in %post
+# to avoid verification errors on changed files in /etc
+install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
+cp -a $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml \
+ $RPM_BUILD_ROOT%{_datadir}/libvirt/nwfilter/
+
# Strip auto-generated UUID - we need it generated per-install
sed -i -e "/<uuid>/d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml
%if ! %{with_qemu}
@@ -1586,6 +1593,17 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
fi
+
+%post daemon-config-nwfilter
+cp %{_datadir}/libvirt/nwfilter/*.xml %{_sysconfdir}/libvirt/nwfilter/
+# Make sure libvirt picks up the new nwfilter defininitons
+%if %{with_systemd}
+ /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 ||:
+%else
+ /sbin/service libvirtd condrestart > /dev/null 2>&1 || :
+%endif
+
+
%if %{with_systemd}
%triggerun -- libvirt < 0.9.4
%{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||:
@@ -1767,7 +1785,9 @@ exit 0
%{_datadir}/libvirt/networks/default.xml
%files daemon-config-nwfilter
-%{_sysconfdir}/libvirt/nwfilter/*.xml
+%dir %{_datadir}/libvirt/nwfilter/
+%{_datadir}/libvirt/nwfilter/*.xml
+%ghost %{_sysconfdir}/libvirt/nwfilter/*.xml
%files daemon-driver-interface
%{_libdir}/%{name}/connection-driver/libvirt_driver_interface.so
--
2.12.2
7 years, 8 months
[libvirt] [libvirt-perl][PATCH] Fix typo in NodeDevice.pm
by Dan Zheng
In commit 24a7f8b41ed09e885120af5336de69d3d4c91980, node device events
were written with storage pool prefix by mistake.
Signed-off-by: Dan Zheng <dzheng(a)redhat.com>
---
lib/Sys/Virt/NodeDevice.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Sys/Virt/NodeDevice.pm b/lib/Sys/Virt/NodeDevice.pm
index 97a5fad..3528c41 100644
--- a/lib/Sys/Virt/NodeDevice.pm
+++ b/lib/Sys/Virt/NodeDevice.pm
@@ -193,11 +193,11 @@ reason though the reason is currently unsed.
=over 4
-=item Sys::Virt::StoragePool::EVENT_CREATED
+=item Sys::Virt::NodeDevice::EVENT_CREATED
Indicates that a device was created
-=item Sys::Virt::StoragePool::EVENT_DELETED
+=item Sys::Virt::NodeDevice::EVENT_DELETED
Indicates that a device has been deleted
--
1.8.3.1
7 years, 8 months
[libvirt] server side copy from one volume to another
by Vasiliy Tolstov
Hi! I have two pools pool_a and pool_b and need to copy volume from
pool_a to pool_b. Now i can use volume download/upload to transfer
data, but this is not optimal because all traffic goes via client.
Does it possible to signal libvirt copy volume from pool_a to pool_b
not transfer all data via client? Like server side copy?
If this is not possible - may be someone from redhat team can do that?
(Or provide some tips how can i do that?)
--
Vasiliy Tolstov,
e-mail: v.tolstov(a)selfip.ru
7 years, 8 months
[libvirt] Incompatible CPU after upgrading qemu
by Jim Fehlig
Hi All,
I've been doing some upgrade testing and noticed a problem starting some
existing VMs after upgrading qemu from 2.6 to 2.9 on one of my AMD machines.
Using libvirt 3.2.0 and qemu 2.6, I have no problems starting a VM with the
following machine/CPU config
<os>
<type arch='x86_64' machine='pc-i440fx-2.6'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact'>
<model fallback='allow'>Opteron_G4</model>
</cpu>
After upgrading qemu to 2.9 the VM fails to start with
error: the CPU is incompatible with host CPU: Host CPU does not provide required
features: svm
I see that qemu commit 75d373ef disables SVM in KVM mode, but that change was
made quite some time ago and pertains to all machine types > pc-i440fx-2.2.
Perhaps the problem was revealed by Jiri's recent libvirt changes to detect host
CPU model by asking qemu?
My knee-jerk reaction is to remove 'svm' from Opteron CPUs in cpu_map.xml, but
I'm far from the expert on the evolving CPU code in libvirt, so asking the
experts here for some guidance.
Regards,
Jim
7 years, 8 months
[libvirt] [PATCH 0/6] Hyper-V method invocation support
by Sri Ramanujam
This patchset introduces functionality to support invoking Hyper-V methods over WMI.
It also includes implementations for virDomainSendKey and virDomainSetMemory as
examples of how to use the new functionality.
With this patchset, all the pieces should be in place to implement all parts
of the driver. I've got about 30 functions pending, to be submitted after this
patchset is ACKed.
Additionally, this patchset includes a new function under util that converts
numbers into their string representation. There is a variant for both signed
and unsigned numbers. Since everything must be represented as a string at the XML
layer, this function comes in handy throughout the Hyper-V driver and I thought
it would have some utility as a convenience method for the whole project.
Sri Ramanujam (6):
hyperv: Functions to work with invocation parameters.
hyperv: Generate object property type information.
hyperv: add hypervInvokeMethod
hyperv: support virDomainSendKey
util: add virNumToStr
hyperv: Add support for virDomainSetMemory
src/hyperv/hyperv_driver.c | 182 +++++++
src/hyperv/hyperv_wmi.c | 879 ++++++++++++++++++++++++++++++++++
src/hyperv/hyperv_wmi.h | 93 +++-
src/hyperv/hyperv_wmi_classes.h | 19 +
src/hyperv/hyperv_wmi_generator.input | 116 +++++
src/hyperv/hyperv_wmi_generator.py | 15 +-
src/hyperv/openwsman.h | 4 +
src/util/virstring.c | 34 ++
src/util/virstring.h | 8 +
9 files changed, 1348 insertions(+), 2 deletions(-)
--
2.9.3
7 years, 8 months