[libvirt] [dbus PATCH 00/10] Impement some APIs for network Interface
by Katerina Koukiou
Katerina Koukiou (10):
Implement BridgeName property for Network interface.
Implement Autostart property for Network Interface
Implement UUID property for Network interface.
Implement NetworkLookupByUUID method for network interface.
Rename virtDBusEventsRegisterEvent to
virtDBusDomainEventsRegisterEvent
Rename callback_ids variable to domain_callback_ids
Register Network Lifecycle Events
Implement Destroy method for Network Interface.
Implement Undefine method for Network Interface
Implement Create method for Network Interface
data/org.libvirt.Connect.xml | 12 ++++
data/org.libvirt.Network.xml | 24 ++++++++
src/connect.c | 50 +++++++++++++++--
src/connect.h | 3 +-
src/events.c | 112 ++++++++++++++++++++++++++++---------
src/network.c | 128 +++++++++++++++++++++++++++++++++++++++++++
test/test_connect.py | 1 +
test/test_network.py | 43 +++++++++++++++
8 files changed, 342 insertions(+), 31 deletions(-)
--
2.15.0
6 years, 7 months
[libvirt] [PATCH] qemu: use target.port for isa-serial
by Thilo Cestonaro
A configured target.port is currently totaly ignored, while contsructing
qemu commandline, for all types of serial devices. This patch adds a -device
parameter "index" for the target model isa-serial.
This enables the user to specify which serial device will end in which ttySX
device.
---
src/qemu/qemu_command.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index bbd3cd0a7..a685abec0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10290,6 +10290,22 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
virDomainChrSerialTargetModelTypeToString(serial->targetModel),
serial->info.alias, serial->info.alias);
+ switch ((virDomainChrSerialTargetModel) serial->targetModel) {
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_ISA_SERIAL:
+ if (serial->target.port != -1)
+ virBufferAsprintf(&cmd, ",index=%d", serial->target.port);
+ break;
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_NONE:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_USB_SERIAL:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PCI_SERIAL:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SPAPR_VTY:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_PL011:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPCONSOLE:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_SCLPLMCONSOLE:
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_MODEL_LAST:
+ break;
+ }
+
if (qemuBuildDeviceAddressStr(&cmd, def, &serial->info, qemuCaps) < 0)
goto error;
--
2.15.1
6 years, 7 months
[libvirt] [PATCH] qemu: cpu: fix fullCPU to include all emulatable qemu features
by Nikolay Shirokovskiy
On Core i5 650 guest fail to start with error [1] if guest cpu config is taken
from domcapabilities and check is set to partial.
The problem is in qemu caps fullCPU calculation in virQEMUCapsInitHostCPUModel.
It is supposed to include features emulated by qemu and missed on host. Some of
such features may be not included however.
For mentioned cpu host cpu is detected as Westmere and guest cpu as
SandyBridge. x2apic is missed on host and provided by installed qemu. The
feature is not mentioned in guest cpu features explicitly because SandyBridge
model include it. As a result fullCPU does not include x2apic too.
Solution is to expand guest cpu features before updating fullCPU features.
[1] error: the CPU is incompatible with host CPU: Host CPU does not
provide required features: x2apic, tsc-deadline
---
src/qemu/qemu_capabilities.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 9c1eeac..edba716 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3475,6 +3475,7 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
virDomainVirtType type)
{
virCPUDefPtr cpu = NULL;
+ virCPUDefPtr cpuExpanded = NULL;
virCPUDefPtr migCPU = NULL;
virCPUDefPtr hostCPU = NULL;
virCPUDefPtr fullCPU = NULL;
@@ -3504,9 +3505,13 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
NULL, NULL)))
goto error;
- for (i = 0; i < cpu->nfeatures; i++) {
- if (cpu->features[i].policy == VIR_CPU_FEATURE_REQUIRE &&
- virCPUDefUpdateFeature(fullCPU, cpu->features[i].name,
+ if (!(cpuExpanded = virCPUDefCopy(cpu)) ||
+ virCPUExpandFeatures(qemuCaps->arch, cpuExpanded) < 0)
+ goto error;
+
+ for (i = 0; i < cpuExpanded->nfeatures; i++) {
+ if (cpuExpanded->features[i].policy == VIR_CPU_FEATURE_REQUIRE &&
+ virCPUDefUpdateFeature(fullCPU, cpuExpanded->features[i].name,
VIR_CPU_FEATURE_REQUIRE) < 0)
goto error;
}
@@ -3528,6 +3533,7 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
virQEMUCapsSetHostModel(qemuCaps, type, cpu, migCPU, fullCPU);
cleanup:
+ virCPUDefFree(cpuExpanded);
virCPUDefFree(hostCPU);
return;
--
1.8.3.1
6 years, 7 months
[libvirt] Libvirt master compilation failed
by Mathieu Tarral
Hello,
i have been trying to compile the latest libvirt from the Github mirror.
I checked out on this commit: 3487973ee0c730b6fbfc6183af798c46ae3b85ff
virjsontest: Use a more stable floating point number for testing
But the compilation failed with this error:
CC ssh.o
CCLD ssh
CC qemucapsprobe.o
CCLD qemucapsprobe
CC nsslinktest-nsslinktest.o
CCLD nsslinktest
CC nssguestlinktest-nsslinktest.o
CCLD nssguestlinktest
make[2]: Leaving directory '/var/ansible/libvirt/tests'
Making all in po
make[2]: Entering directory '/var/ansible/libvirt/po'
test ! -f ./libvirt.pot || \
test -z "af.gmo am.gmo anp.gmo ar.gmo as.gmo ast.gmo bal.gmo be.gmo
bg.gmo bn.gmo bn_IN.gmo bo.gmo br.gmo brx.gmo bs.gmo ca.gmo cs.gmo
cy.gmo da.gmo de.gmo de_CH.gmo el.gmo en_GB.gmo eo.gmo es.gmo et.gmo
eu.gmo fa.gmo fi.gmo fr.gmo gl.gmo gu.gmo he.gmo hi.gmo hr.gmo hu.gmo
ia.gmo id.gmo ilo.gmo is.gmo it.gmo ja.gmo ka.gmo kk.gmo km.gmo kn.gmo
ko.gmo kw.gmo kw(a)kkcor.gmo kw(a)uccor.gmo kw_GB.gmo ky.gmo lt.gmo lv.gmo
mai.gmo mk.gmo ml.gmo mn.gmo mr.gmo ms.gmo nb.gmo nds.gmo ne.gmo
nl.gmo nn.gmo nso.gmo or.gmo pa.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo
ru.gmo si.gmo sk.gmo sl.gmo sq.gmo sr.gmo sr(a)latin.gmo sv.gmo ta.gmo
te.gmo tg.gmo th.gmo tr.gmo tw.gmo uk.gmo ur.gmo vi.gmo wba.gmo yo.gmo
zh_CN.gmo zh_HK.gmo zh_TW.gmo zu.gmo" || make af.gmo am.gmo anp.gmo
ar.gmo as.gmo ast.gmo bal.gmo be.gmo bg.gmo bn.gmo bn_IN.gmo bo.gmo
br.gmo brx.gmo bs.gmo ca.gmo cs.gmo cy.gmo da.gmo de.gmo de_CH.gmo
el.gmo en_GB.gmo eo.gmo es.gmo et.gmo eu.gmo fa.gmo fi.gmo fr.gmo
gl.gmo gu.gmo he.gmo hi.gmo hr.gmo hu.gmo ia.gmo id.gmo ilo.gmo is.gmo
it.gmo ja.gmo ka.gmo kk.gmo km.gmo kn.gmo ko.gmo kw.gmo kw(a)kkcor.gmo
kw(a)uccor.gmo kw_GB.gmo ky.gmo lt.gmo lv.gmo mai.gmo mk.gmo ml.gmo
mn.gmo mr.gmo ms.gmo nb.gmo nds.gmo ne.gmo nl.gmo nn.gmo nso.gmo
or.gmo pa.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo si.gmo sk.gmo
sl.gmo sq.gmo sr.gmo sr(a)latin.gmo sv.gmo ta.gmo te.gmo tg.gmo th.gmo
tr.gmo tw.gmo uk.gmo ur.gmo vi.gmo wba.gmo yo.gmo zh_CN.gmo zh_HK.gmo
zh_TW.gmo zu.gmo
make[3]: Entering directory '/var/ansible/libvirt/po'
rm -f af.gmo && : -c --statistics -o af.gmo af.po
mv: cannot stat 't-af.gmo': No such file or directory
Makefile:470: recipe for target 'af.gmo' failed
make[3]: *** [af.gmo] Error 1
make[3]: Leaving directory '/var/ansible/libvirt/po'
Makefile:507: recipe for target 'stamp-po' failed
make[2]: *** [stamp-po] Error 2
make[2]: Leaving directory '/var/ansible/libvirt/po'
Makefile:2121: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/ansible/libvirt'
Makefile:2014: recipe for target 'all' failed
make: *** [all] Error 2
I'm on Debian stretch, i installed every dependency required by the
configure script.
Any ideas what's wrong here ?
Thanks.
--
Mathieu Tarral
6 years, 7 months
[libvirt] [PATCH v2 0/8] Prepare for daemon split
by Daniel P. Berrangé
When we split up the daemons, libvirtd will need to forward different
sets of APIs to different daemons. This means libvirtd is going to need
to have multiple virConnectPtr instances open.
This series prepares for that by introducing "separate" connections,
which are actually just an extra reference on the current single
connection. This will facilitate later changes.
Daniel P. Berrangé (8):
rpc: refactor way connection object is generated for remote dispatch
remote: push check for conn down into remoteClientFreePrivateCallbacks
remote: use a separate connection for interface APIs
remote: use a separate connection for network APIs
remote: use a separate connection for nodedev APIs
remote: use a separate connection for nwfilter APIs
remote: use a separate connection for secret APIs
remote: use a separate connection for storage APIs
src/remote/remote_daemon.h | 6 +++
src/remote/remote_daemon_dispatch.c | 94 +++++++++++++++++++-------------
src/rpc/gendispatch.pl | 104 +++++++++++++++++++++++++-----------
3 files changed, 138 insertions(+), 66 deletions(-)
--
2.14.3
6 years, 7 months
[libvirt] [dbus PATCH v3 0/4] Introduce Network Interface
by Katerina Koukiou
This patchset introduces also some basic methods and properties for
Network interface.
More functionality will be added in following patchsets.
New functions are covered by the test suite.
Changes from v2:
* Added test_list_networks test.
* xml files should group methods/signals/properties together.
* Some other minor fixes.
Katerina Koukiou (4):
Introduce Network Interface
Implement ListNetworks method for Connect interface
Implement Name property for Network interface
Implement NetworkLookupByName method for Connect interface
data/Makefile.am | 3 +-
data/org.libvirt.Connect.xml | 12 +++++
data/org.libvirt.Network.xml | 11 +++++
src/Makefile.am | 3 +-
src/connect.c | 76 ++++++++++++++++++++++++++++++
src/connect.h | 1 +
src/network.c | 107 +++++++++++++++++++++++++++++++++++++++++++
src/network.h | 9 ++++
src/util.c | 33 +++++++++++++
src/util.h | 15 ++++++
test/Makefile.am | 3 +-
test/libvirttest.py | 12 +++++
test/test_connect.py | 23 ++++++++++
test/test_network.py | 19 ++++++++
14 files changed, 324 insertions(+), 3 deletions(-)
create mode 100644 data/org.libvirt.Network.xml
create mode 100644 src/network.c
create mode 100644 src/network.h
create mode 100755 test/test_network.py
--
2.15.0
6 years, 7 months
[libvirt] [PATCH] docs: add page describing goals for host platform version support
by Daniel P. Berrangé
Describe how we decide which host platforms to support for libvirt,
which in turn makes it easier to decide when a platform / software
version can be dropped.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/index.html.in | 2 +-
docs/platforms.html.in | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+), 1 deletion(-)
create mode 100644 docs/platforms.html.in
diff --git a/docs/index.html.in b/docs/index.html.in
index 1b3a7a3db6..4783c39e3c 100644
--- a/docs/index.html.in
+++ b/docs/index.html.in
@@ -28,7 +28,7 @@
The libvirt project:
</p>
<ul>
- <li>is a toolkit to manage virtualization hosts</li>
+ <li>is a toolkit to manage <a href="platforms.html.in">virtualization platforms</a></li>
<li>is accessible from C, Python, Perl, Java and more</li>
<li>is licensed under open source licenses</li>
<li>supports <a href="drvqemu.html">KVM</a>,
diff --git a/docs/platforms.html.in b/docs/platforms.html.in
new file mode 100644
index 0000000000..859b482428
--- /dev/null
+++ b/docs/platforms.html.in
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <h1>Supported host platforms</h1>
+
+ <ul id="toc"></ul>
+
+ <h2>Build targets</h2>
+
+ <p>
+ Libvirt drivers aim to support building and executing on multiple
+ host OS platforms. This document outlines which platforms are the
+ major build targets. These platforms are used as the basis for deciding
+ upon the minimum required versions of 3rd party software libvirt depends
+ on. If a platform is no listed here, it does not imply that libvirt
+ won't work. If an unlisted platform has comparable software versions
+ to a listed platform, there is every expectation that it will work.
+ Bug reports are welcome for problems encountered on unlisted platforms
+ unless they are clearly older vintage that what is described here.
+ </p>
+
+ <h3>Linux OS</h3>
+
+ <p>
+ For distributions with frequent, short-lifetime releases (Fedora,
+ Ubuntu, OpenSUSE, etc), the project will aim to support all versions
+ that are not end of life by their respective vendors.
+ </p>
+
+ <p>
+ For distributions with long-lifetime releases (RHEL, Ubuntu LTS,
+ SLES, etc), the project will aim to support the most recent major
+ version at all times. Support for the previous major version will
+ be dropped 2 years after the new major version is released.
+ </p>
+
+ <h3>Windows</h3>
+
+ <p>
+ The project supports building with current versions of the MinGW
+ toolchain, hosted on Linux.
+ </p>
+
+ <h3>OS-X</h3>
+
+ <p>
+ The project supports building with the current version of OS-X,
+ with the current homebrew package set available.
+ </p>
+
+ <h3>FreeBSD</h3>
+
+ <p>
+ The project will aim to support the most recent major version
+ at all times. Support for the previous major version will
+ be dropped 2 years after the new major version is released.
+ </p>
+
+ <h2>Virtualization platforms</h2>
+
+ <p>
+ For hypervisor drivers which execute locally (QEMU, LXC, VZ,
+ libxl, etc), the set of supported operating system platforms
+ listed above will inform choices as to the minimum required
+ versions of 3rd party libraries and hypervisor management APIs.
+ If a hypervisor is not commonly shipped directly by any distro
+ listed above, (VMWare ESX, HyperV, VZ), the project aims to
+ support versions upto 5 years, or until the vendor discontinues
+ support, whichever comes first.
+ </p>
+
+ </body>
+</html>
--
2.14.3
6 years, 7 months
[libvirt] [PATCH] docs: Update the format of the generate metadata example
by John Ferlan
Initially, update the UUID field to have the proper format, but
then also changed the type, id, and name fields.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
While beginning to think more about the vmgenid RFC and creating a <genid/>
element under the <uuid>, I noted that the existing name and uuid fields
were a bit out of date.
docs/formatdomain.html.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 82e7d7ce66..984563379e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -31,9 +31,9 @@
<h3><a id="elementsMetadata">General metadata</a></h3>
<pre>
-<domain type='xen' id='3'>
- <name>fv0</name>
- <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
+<domain type='kvm' id='1'>
+ <name>MyFirstGuest</name>
+ <uuid>4dea22b3-1d52-d8f3-2516-782e98ab3fa0</uuid>
<title>A short description - title - of the domain</title>
<description>Some human readable description</description>
<metadata>
--
2.13.6
6 years, 7 months
[libvirt] [dbus PATCH v2 0/5] Introduce Network Interface
by Katerina Koukiou
This patchset introduces also some basic methods and properties for
Network interface.
More functionality will be added in following patchsets.
New functions are covered by the test suite.
Changes from v1: I forgot to the test_network.py in v1.
Katerina Koukiou (5):
Introduce Network Interface
Implement ListNetworks method for Connect interface
Implement virtDBusUtilVirNetworkFromBusPath helper function.
Implement Name property for Network interface
Implement NetworkLookupByName method for Connect interface
data/Makefile.am | 3 +-
data/org.libvirt.Connect.xml | 12 +++++
data/org.libvirt.Network.xml | 11 +++++
src/Makefile.am | 3 +-
src/connect.c | 75 ++++++++++++++++++++++++++++++
src/connect.h | 1 +
src/network.c | 107 +++++++++++++++++++++++++++++++++++++++++++
src/network.h | 9 ++++
src/util.c | 33 +++++++++++++
src/util.h | 15 ++++++
test/Makefile.am | 3 +-
test/libvirttest.py | 12 +++++
test/test_connect.py | 11 +++++
test/test_network.py | 19 ++++++++
14 files changed, 311 insertions(+), 3 deletions(-)
create mode 100644 data/org.libvirt.Network.xml
create mode 100644 src/network.c
create mode 100644 src/network.h
create mode 100755 test/test_network.py
--
2.15.0
6 years, 7 months
[libvirt] [PATCH v3 0/3] Improve handling of multipath devices
by Michal Privoznik
The saga continues.
Turns out, this is bug in both libvirt AND kernel. Firstly, kernel uses
different CGroup for checking open() than for ioctl() [1]. However,
libvirt needs to allow all targets in the CGroup too. Not only it's
logical, kernel devel says it never worked. QEMU was able to open the
devmapper device but any subsequent read()/write() would fail because of
CGroup perms.
Anyway, it's not only RHEL which is affected by this bug. I've upgraded
my Gentoo to 4.16 and I'm hitting it even though I was not with 4.15.
It all started with upstream kernel commit of 519049afead4f7c3e6446028.
This changed call in dm_blk_ioctl() from dm_grab_bdev_for_ioctl() to
dm_get_bdev_for_ioctl(). The former merely increases refcount on some
internal kernel strcut, the latter calls blkdev_get() which calls
__blkdev_get() which actually performs CGroup check.
1: https://bugzilla.redhat.com/show_bug.cgi?id=1557769#c54
Diff to v2:
- Changed virDevMapperGetTargets() to do recursive target fetching, and
at the same time make it return string list of devices rather than
MAJ:MIN pairs. This is because dm_task_set_name() accepts path as
string. There's also dm_task_set_major_minor() but:
a) handling multiple arrays and merging them (because of recursion) -
the code would look ugly,
b) we don't need to introduce virDomainAuditCgroupMajorMinor() just to
pass MAJ:MIN to it.
- Implemented dropping of permissions when unplugging a disk (was
missing in previous versions)
Michal Privoznik (3):
util: Introduce virDevMapperGetTargets
qemu_cgroup: Handle device mapper targets properly
news: Document device mapper fix
docs/news.xml | 10 +++
libvirt.spec.in | 2 +
src/libvirt_private.syms | 4 +
src/qemu/qemu_cgroup.c | 69 +++++++++++++---
src/util/Makefile.inc.am | 2 +
src/util/virdevmapper.c | 200 +++++++++++++++++++++++++++++++++++++++++++++++
src/util/virdevmapper.h | 31 ++++++++
7 files changed, 309 insertions(+), 9 deletions(-)
create mode 100644 src/util/virdevmapper.c
create mode 100644 src/util/virdevmapper.h
--
2.16.1
6 years, 7 months