[libvirt] [PATCH] Remove non-existant 'wiremode' attribute
by Daniel P. Berrange
The 'wiremode' attribute exists in a couple of Xen XML files, but no code has
ever parsed that value. It was later added to the RNG schema too, again despite
there not being any code which parses it.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
docs/schemas/domaincommon.rng | 3 ---
tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.xml | 2 +-
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 4f739abfb2..1e936f03d3 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3686,9 +3686,6 @@
<optional>
<attribute name="service"/>
</optional>
- <optional>
- <attribute name="wiremode"/>
- </optional>
<optional>
<attribute name="channel"/>
</optional>
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.xml b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.xml
index 667ecbd4c2..3f0176e768 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.xml
+++ b/tests/xml2sexprdata/xml2sexpr-fv-parallel-tcp.xml
@@ -32,7 +32,7 @@
<target dev='ioemu:hda'/>
</disk>
<parallel type='tcp'>
- <source mode='connect' host='localhost' service='9999' wiremode='raw'/>
+ <source mode='connect' host='localhost' service='9999'/>
<target port='0'/>
</parallel>
<graphics type='vnc' port='5917' keymap='ja'/>
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.xml b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.xml
index 72915b0a39..69603fea3a 100644
--- a/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.xml
+++ b/tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.xml
@@ -32,7 +32,7 @@
<target dev='ioemu:hda'/>
</disk>
<serial type='tcp'>
- <source mode='bind' host='localhost' service='9999' wiremode='raw'/>
+ <source mode='bind' host='localhost' service='9999'/>
<target port='0'/>
</serial>
<graphics type='vnc' port='5917' keymap='ja'/>
--
2.14.3
6 years, 11 months
[libvirt] [PATCH] Misc XML schema fixes for libxl
by Daniel P. Berrange
The libxlxml2domconfigdata directory was not covered in the RNG schema
tests. This hid a few bugs in both the libxl XML files and the RNG
schema itself.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
docs/schemas/domaincommon.rng | 3 ++-
tests/libxlxml2domconfigdata/basic-hvm.xml | 2 +-
tests/libxlxml2domconfigdata/vnuma-hvm.xml | 2 +-
tests/virschematest.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index f1808065b2..4f739abfb2 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1169,7 +1169,7 @@
<optional>
<element name="bootloader">
<choice>
- <ref name="absFilePath"/>
+ <text/>
<empty/>
</choice>
</element>
@@ -2764,6 +2764,7 @@
<choice>
<value>kvm</value>
<value>vfio</value>
+ <value>xen</value>
</choice>
</attribute>
</group>
diff --git a/tests/libxlxml2domconfigdata/basic-hvm.xml b/tests/libxlxml2domconfigdata/basic-hvm.xml
index d8cd2a283e..68c2ef08af 100644
--- a/tests/libxlxml2domconfigdata/basic-hvm.xml
+++ b/tests/libxlxml2domconfigdata/basic-hvm.xml
@@ -8,7 +8,7 @@
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
- <clock sync='utc'/>
+ <clock offset='utc'/>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
diff --git a/tests/libxlxml2domconfigdata/vnuma-hvm.xml b/tests/libxlxml2domconfigdata/vnuma-hvm.xml
index 28ad923e8f..6e265e31a9 100644
--- a/tests/libxlxml2domconfigdata/vnuma-hvm.xml
+++ b/tests/libxlxml2domconfigdata/vnuma-hvm.xml
@@ -8,7 +8,7 @@
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
- <clock sync='utc'/>
+ <clock offset='utc'/>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
diff --git a/tests/virschematest.c b/tests/virschematest.c
index 9dc4dc5ed8..f1d11437e0 100644
--- a/tests/virschematest.c
+++ b/tests/virschematest.c
@@ -221,7 +221,7 @@ mymain(void)
"qemuxml2argvdata", "sexpr2xmldata", "xmconfigdata",
"xml2sexprdata", "qemuxml2xmloutdata", "lxcxml2xmldata",
"lxcxml2xmloutdata", "bhyvexml2argvdata", "genericxml2xmlindata",
- "genericxml2xmloutdata", "xlconfigdata",
+ "genericxml2xmloutdata", "xlconfigdata", "libxlxml2domconfigdata",
"qemuhotplugtestdomains");
DO_TEST_DIR("domaincaps.rng", "domaincapsschemadata");
DO_TEST_DIR("domainsnapshot.rng", "domainsnapshotxml2xmlin",
--
2.14.3
6 years, 11 months
[libvirt] [libvirt-python][PATCH] Don't hardcode interpreter path
by Cédric Bosdonnat
This is particularly useful on operating systems that don't ship
Python as part of the base system (eg. FreeBSD) while still working
just as well as it did before on Linux.
---
examples/event-test.py | 2 +-
generator.py | 2 +-
sanitytest.py | 2 +-
setup.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/event-test.py b/examples/event-test.py
index 4eb7142..2587226 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -u
+#!/usr/bin/env python
#
#
#
diff --git a/generator.py b/generator.py
index 59e7531..74150b7 100755
--- a/generator.py
+++ b/generator.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -u
+#!/usr/bin/env python
#
# generate python wrappers from the XML API description
#
diff --git a/sanitytest.py b/sanitytest.py
index a5cb01b..1d65e8d 100644
--- a/sanitytest.py
+++ b/sanitytest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
import sys
import lxml
diff --git a/setup.py b/setup.py
index 3cdfcbf..05a981e 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
from distutils.core import setup, Extension, Command
from distutils.command.build import build
--
2.15.0
6 years, 11 months
[libvirt] [PATCH] spec: don't package product dirs
by Nikolay Shirokovskiy
Directories /var/{lib,cache}/libvirt/qemu/ are created by libvirtd on
start and their owner:group is changed according to the config. Thus
no need to include them in libvirt-daemon-driver-qemu package. Otherwise
we see noisy "directory changed" on rpm -V for the package.
---
libvirt.spec.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index a3bd77f..e20f65c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1911,8 +1911,6 @@ exit 0
%config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
%ghost %dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
-%dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
-%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
%{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
--
1.8.3.1
6 years, 11 months
[libvirt] [PATCH] qemu-capabilities: Adjust function header comments of virQEMUCapsInitCPUModel*
by Boris Fiuczynski
Adjust function descriptions of virQEMUCapsInitCPUModelS390 and
virQEMUCapsInitCPUModel to the changes introduced with
commitID 74fc32a955.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
---
src/qemu/qemu_capabilities.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f2d24a3..e4e25da 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3308,8 +3308,7 @@ virQEMUCapsCPUFilterFeatures(const char *name,
/**
* Returns 0 when host CPU model provided by QEMU was filled in qemuCaps,
* 1 when the caller should fall back to using virCapsPtr->host.cpu,
- * 2 when cpu model info is not supported for this configuration and
- * fall back should not be used.
+ * 2 when cpu model info is not supported for this configuration,
* -1 on error.
*/
static int
@@ -3436,9 +3435,8 @@ virQEMUCapsInitCPUModelX86(virQEMUCapsPtr qemuCaps,
/**
* Returns 0 when host CPU model provided by QEMU was filled in qemuCaps,
- * 1 when the caller should fall back to other methods
- * 2 when cpu model info is not supported for this configuration and
- * fall back should not be used.
+ * 1 when the caller should fall back to other methods,
+ * 2 when cpu model info is not supported for this configuration,
* -1 on error.
*/
int
--
2.9.4
6 years, 11 months
[libvirt] [PATCH 0/6] Remove some repetitive code from qemuDomainNamespace* functions
by Ján Tomko
Ján Tomko (6):
qemuDomainNamespaceTeardownHostdev: rename path to paths
Introduce qemuDomainNamespaceMknodPaths
Introduce qemuDomainNamespaceMknodPath
Introduce qemuDomainNamespaceUnlinkPaths
Introduce qemuDomainNamespaceUnlinkPath
Do not pass driver to qemuDomainNamespace{Setup,Teardown} functions
src/qemu/qemu_domain.c | 394 ++++++++++++++++++------------------------------
src/qemu/qemu_domain.h | 30 ++--
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hotplug.c | 42 +++---
4 files changed, 176 insertions(+), 292 deletions(-)
--
2.13.6
6 years, 11 months
[libvirt] Help:Can libvirt restore several xen snapshots more faster at same time?
by Chenjia (C)
Dear libvirt expert,
we find a blocker issue in our project. Would you please offer us some feedback?
Our project have a requirement: restore as much as xen snapshot at same time. we have done the following test(our environment is cpu E52620, 256G memory, SSD hard disk. The xen snapshot is Win7 OS with 1G memory):
1) Save 40 xen snapshots to disk, then restore these snapshot at sametime, we found the restore speed is too slow, and the bottleneck is the IO speed.
2) we save all the 40 xen snapshot to ramdisk, then we got a good performance, but the space is too big, about 40G, it is too expensive .
Our question is :
1) each our xen snapshot is almost same except IP address(Win7 OS with 1G memory), does there have some way to reduce the 40 snapshots space?
2) Do you have some suggestion to improve the performance of restore as much as xen snapshot at same time?
Best regards, wish your reply.
6 years, 11 months
[libvirt] [PATCH v4 00/30] Fix serial console behavior on non-x86 architectures
by Andrea Bolognani
Changes from [v3]:
* document which target types have an associated address;
* add capability for pl011.
Changes from [v2]:
* don't drop -serial suffix from existing target types;
* add capability and machine type checks for isa-serial;
* reduce code duplication;
* improve documentation.
Changes from [v1]:
* introduce target model to go along with target type and
store the actual hypervisor-specific device name, as
suggested by Pavel;
* shorten the names of the esisting target types;
* introduce a bunch of additional cleanups required for the
first item.
[v1] https://www.redhat.com/archives/libvir-list/2017-November/msg00545.html
[v2] https://www.redhat.com/archives/libvir-list/2017-November/msg00831.html
[v3] https://www.redhat.com/archives/libvir-list/2017-November/msg01027.html
Andrea Bolognani (26):
docs: Improve documentation for serial consoles
qemu: Introduce qemuDomainChrDefPostParse()
conf: Run devicePostParse() again for the first serial device
conf: Introduce VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE
conf: Drop virDomainChrDeviceType.targetTypeAttr
conf: Introduce virDomainChrTargetDefFormat()
conf: Improve error handling in virDomainChrDefFormat()
conf: Check virDomainChrSourceDefFormat() return value
conf: Improve virDomainChrTargetDefFormat()
conf: Remove ATTRIBUTE_FALLTHROUGH from virDomainChrTargetDefFormat()
qemu: Introduce qemuDomainChrTargetDefValidate()
qemu: Improve qemuDomainChrTargetDefValidate()
conf: Parse and format virDomainChrSerialTargetModel
qemu: Set targetModel based on targetType for serial devices
qemu: Validate target model for serial devices
qemu: Format targetModel for serial devices
qemu: Remove redundancy in qemuBuildSerialChrDeviceStr()
conf: Add target type and model for spapr-vty
qemu: Support usb-serial and pci-serial on pSeries
conf: Add target type and model for pl011
qemu: Add QEMU_CAPS_DEVICE_ISA_SERIAL
qemu: Require QEMU_CAPS_DEVICE_ISA_SERIAL for isa-serial
qemu: Limit isa-serial usage to x86 guests
qemu: Add QEMU_CAPS_DEVICE_PL011
qemu: Require QEMU_CAPS_DEVICE_PL011 for pl011
news: Update for serial console fixes
Pino Toscano (4):
conf: add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP
conf: pass parseFlags down to virDomainDefAddConsoleCompat
conf: convert sclp/sclplm <console> as <serial>
qemu: switch s390/s390x default console back to serial
docs/formatdomain.html.in | 239 ++++++++++++----
docs/news.xml | 12 +
docs/schemas/domaincommon.rng | 22 ++
src/conf/domain_conf.c | 304 ++++++++++++++++-----
src/conf/domain_conf.h | 26 +-
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 6 +
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_command.c | 147 +++++-----
src/qemu/qemu_domain.c | 301 ++++++++++++++++++--
src/qemu/qemu_domain_address.c | 7 +-
src/vz/vz_sdk.c | 5 +-
.../qemuargv2xml-console-compat.xml | 4 +-
tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml | 4 +-
.../qemuargv2xmldata/qemuargv2xml-serial-file.xml | 4 +-
.../qemuargv2xmldata/qemuargv2xml-serial-many.xml | 8 +-
tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml | 4 +-
.../qemuargv2xml-serial-tcp-telnet.xml | 4 +-
tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml | 4 +-
tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml | 8 +-
.../qemuargv2xmldata/qemuargv2xml-serial-unix.xml | 4 +-
tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml | 4 +-
tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 +
.../caps_2.10.0-gicv2.aarch64.xml | 2 +
.../caps_2.10.0-gicv3.aarch64.xml | 2 +
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0-gicv2.aarch64.xml | 2 +
.../caps_2.6.0-gicv3.aarch64.xml | 2 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
tests/qemuhelptest.c | 5 +
...otplug-console-compat-2-live+console-virtio.xml | 12 +-
.../qemuhotplug-console-compat-2-live.xml | 12 +-
.../qemuxml2argv-mach-virt-console-native.args | 1 +
.../qemuxml2argv-mach-virt-console-native.xml | 17 ++
... => qemuxml2argv-mach-virt-console-virtio.args} | 15 +-
.../qemuxml2argv-mach-virt-console-virtio.xml | 19 ++
...muxml2argv-mach-virt-serial+console-native.args | 1 +
...emuxml2argv-mach-virt-serial+console-native.xml | 18 ++
.../qemuxml2argv-mach-virt-serial-compat.args | 1 +
.../qemuxml2argv-mach-virt-serial-compat.xml | 19 ++
...muxml2argv-mach-virt-serial-invalid-machine.xml | 21 ++
...s => qemuxml2argv-mach-virt-serial-native.args} | 12 +-
.../qemuxml2argv-mach-virt-serial-native.xml | 16 ++
.../qemuxml2argv-mach-virt-serial-pci.args | 26 ++
.../qemuxml2argv-mach-virt-serial-pci.xml | 18 ++
.../qemuxml2argv-mach-virt-serial-usb.args | 27 ++
.../qemuxml2argv-mach-virt-serial-usb.xml | 21 ++
.../qemuxml2argv-pseries-basic.args | 2 +-
.../qemuxml2argv-pseries-console-native.args | 1 +
.../qemuxml2argv-pseries-console-native.xml | 17 ++
...gs => qemuxml2argv-pseries-console-virtio.args} | 10 +-
.../qemuxml2argv-pseries-console-virtio.xml | 19 ++
.../qemuxml2argv-pseries-cpu-compat-power9.args | 2 +-
.../qemuxml2argv-pseries-cpu-compat.args | 2 +-
.../qemuxml2argv-pseries-cpu-exact.args | 2 +-
.../qemuxml2argv-pseries-cpu-le.args | 2 +-
.../qemuxml2argv-pseries-panic-missing.args | 2 +-
.../qemuxml2argv-pseries-panic-no-address.args | 2 +-
...qemuxml2argv-pseries-serial+console-native.args | 1 +
.../qemuxml2argv-pseries-serial+console-native.xml | 18 ++
.../qemuxml2argv-pseries-serial-compat.args | 1 +
.../qemuxml2argv-pseries-serial-compat.xml | 19 ++
...qemuxml2argv-pseries-serial-invalid-machine.xml | 19 ++
...rgs => qemuxml2argv-pseries-serial-native.args} | 7 +-
.../qemuxml2argv-pseries-serial-native.xml | 16 ++
...c.args => qemuxml2argv-pseries-serial-pci.args} | 7 +-
.../qemuxml2argv-pseries-serial-pci.xml | 18 ++
...c.args => qemuxml2argv-pseries-serial-usb.args} | 8 +-
.../qemuxml2argv-pseries-serial-usb.xml | 21 ++
.../qemuxml2argv-pseries-usb-default.args | 2 +-
.../qemuxml2argv-pseries-usb-kbd.args | 2 +-
.../qemuxml2argv-pseries-usb-multi.args | 2 +-
.../qemuxml2argv-pseries-vio-user-assigned.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-pseries-vio.args | 4 +-
....args => qemuxml2argv-s390-console2serial.args} | 11 +-
.../qemuxml2argv-s390-console2serial.xml | 19 ++
...power9.args => qemuxml2argv-s390-serial-2.args} | 14 +-
.../qemuxml2argv-s390-serial-2.xml | 19 ++
....args => qemuxml2argv-s390-serial-console.args} | 11 +-
.../qemuxml2argv-s390-serial-console.xml | 15 +
...es-basic.args => qemuxml2argv-s390-serial.args} | 11 +-
.../qemuxml2argvdata/qemuxml2argv-s390-serial.xml | 14 +
...muxml2argv-serial-tcp-tlsx509-chardev-notls.xml | 8 +-
.../qemuxml2argvdata/qemuxml2argv-user-aliases.xml | 8 +-
tests/qemuxml2argvtest.c | 110 +++++++-
.../qemuxml2xmlout-aarch64-pci-serial.xml | 4 +-
.../qemuxml2xmlout-aarch64-virtio-pci-default.xml | 4 +-
.../qemuxml2xmlout-bios-nvram-os-interleave.xml | 4 +-
.../qemuxml2xmlout-chardev-label.xml | 8 +-
.../qemuxml2xmlout-console-compat-auto.xml | 4 +-
.../qemuxml2xmlout-console-compat.xml | 4 +-
.../qemuxml2xmlout-console-compat2.xml | 4 +-
.../qemuxml2xmlout-console-virtio-many.xml | 4 +-
.../qemuxml2xmlout-interface-driver.xml | 4 +-
.../qemuxml2xmlout-interface-server.xml | 8 +-
.../qemuxml2xmlout-mach-virt-console-native.xml | 1 +
...=> qemuxml2xmlout-mach-virt-console-virtio.xml} | 19 +-
...uxml2xmlout-mach-virt-serial+console-native.xml | 1 +
.../qemuxml2xmlout-mach-virt-serial-compat.xml | 31 +++
.../qemuxml2xmlout-mach-virt-serial-native.xml | 1 +
...xml => qemuxml2xmlout-mach-virt-serial-pci.xml} | 15 +-
.../qemuxml2xmlout-mach-virt-serial-usb.xml | 41 +++
.../qemuxml2xmlout-net-bandwidth.xml | 4 +-
.../qemuxml2xmlout-net-bandwidth2.xml | 4 +-
.../qemuxml2xmlout-net-coalesce.xml | 4 +-
.../qemuxml2xmloutdata/qemuxml2xmlout-net-mtu.xml | 4 +-
.../qemuxml2xmlout-panic-pseries.xml | 4 +-
.../qemuxml2xmlout-pci-serial-dev-chardev.xml | 4 +-
.../qemuxml2xmlout-pseries-console-native.xml | 1 +
...l => qemuxml2xmlout-pseries-console-virtio.xml} | 16 +-
.../qemuxml2xmlout-pseries-cpu-compat-power9.xml | 4 +-
.../qemuxml2xmlout-pseries-cpu-compat.xml | 4 +-
.../qemuxml2xmlout-pseries-cpu-exact.xml | 4 +-
.../qemuxml2xmlout-pseries-panic-missing.xml | 4 +-
.../qemuxml2xmlout-pseries-panic-no-address.xml | 4 +-
...emuxml2xmlout-pseries-serial+console-native.xml | 1 +
.../qemuxml2xmlout-pseries-serial-compat.xml | 1 +
...ml => qemuxml2xmlout-pseries-serial-native.xml} | 10 +-
...g.xml => qemuxml2xmlout-pseries-serial-pci.xml} | 16 +-
...g.xml => qemuxml2xmlout-pseries-serial-usb.xml} | 13 +-
.../qemuxml2xmlout-q35-virt-manager-basic.xml | 4 +-
.../qemuxml2xmlout-s390-defaultconsole.xml | 8 +-
.../qemuxml2xmlout-s390-serial-2.xml | 33 +++
.../qemuxml2xmlout-s390-serial-console.xml | 28 ++
.../qemuxml2xmlout-s390-serial.xml | 28 ++
.../qemuxml2xmlout-serial-spiceport-nospice.xml | 4 +-
.../qemuxml2xmlout-serial-spiceport.xml | 4 +-
.../qemuxml2xmlout-serial-target-port-auto.xml | 12 +-
.../qemuxml2xmlout-serial-tcp-tlsx509-chardev.xml | 8 +-
.../qemuxml2xmlout-tap-vhost-incorrect.xml | 4 +-
.../qemuxml2xmlout-tap-vhost.xml | 4 +-
.../qemuxml2xmlout-vhost_queues.xml | 4 +-
tests/qemuxml2xmltest.c | 54 ++++
147 files changed, 1923 insertions(+), 390 deletions(-)
create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-console-native.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-console-native.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-mach-virt-console-virtio.args} (53%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-console-virtio.xml
create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial+console-native.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial+console-native.xml
create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-compat.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-compat.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-invalid-machine.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-mach-virt-serial-native.args} (62%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-native.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-pci.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-pci.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-usb.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-mach-virt-serial-usb.xml
create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-console-native.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-pseries-console-virtio.args} (59%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-console-virtio.xml
create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial+console-native.xml
create mode 120000 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-compat.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-invalid-machine.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-pseries-serial-native.args} (70%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-native.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-pseries-serial-pci.args} (70%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-pci.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-pseries-serial-usb.args} (65%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-serial-usb.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-s390-console2serial.args} (71%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-console2serial.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-cpu-compat-power9.args => qemuxml2argv-s390-serial-2.args} (62%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-serial-2.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-s390-serial-console.args} (71%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-serial-console.xml
copy tests/qemuxml2argvdata/{qemuxml2argv-pseries-basic.args => qemuxml2argv-s390-serial.args} (71%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-s390-serial.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-mach-virt-console-native.xml
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-s390-defaultconsole.xml => qemuxml2xmlout-mach-virt-console-virtio.xml} (50%)
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-mach-virt-serial+console-native.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-mach-virt-serial-compat.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-mach-virt-serial-native.xml
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-aarch64-pci-serial.xml => qemuxml2xmlout-mach-virt-serial-pci.xml} (78%)
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-mach-virt-serial-usb.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-console-native.xml
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-panic-pseries.xml => qemuxml2xmlout-pseries-console-virtio.xml} (75%)
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial+console-native.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-serial-compat.xml
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-panic-missing.xml => qemuxml2xmlout-pseries-serial-native.xml} (82%)
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-panic-missing.xml => qemuxml2xmlout-pseries-serial-pci.xml} (74%)
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-pseries-panic-missing.xml => qemuxml2xmlout-pseries-serial-usb.xml} (75%)
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial-2.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial-console.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-serial.xml
--
2.14.3
6 years, 11 months
[libvirt] Redesigning Libvirt: Adapting for the next 12 years
by Daniel P. Berrange
Hold tight, this is a long one...
It is hard for me to believe it, but the libvirt project is now 12 years old
(born on Nov 2, 2005), and I've been working on it since March 2006, making it
easily the most significant project I've worked on. It started off life as an
attempt to provide a stable application development API for the Xen hypervisor,
interfacing across XenD, XenStore and Xen hypercalls. It was initially just a
plain C library and Python binding, but when we added QEMU support in Feb 2007
the libvirtd daemon was born. That cemented a split of hypervisor drivers into
two distinct architectures, stateless drivers where all logic was in the library
(VMware ESX, VirtualBox, original Xen) and stateful drivers where all logic was
in the daemon (QEMU, LXC, UML, modern Xen).
The project has been wildly successful beyond our expectations, in particular
the hypervisor abstraction layer made it possible for RHEL to switch from using
Xen to KVM while keeping the userspace tooling the same for users. Libvirt is
now used, to some degree, by likely 100's of applications with KVM being the
dominant hypervisor choice by a long way. There is an old adage in the computer
industry though
"Adapt or die"
This is usually applied to companies who see their primary product suddenly
become a commodity, or disappear into irrelevance as new technology disrupts
the market, killing their revenue stream. It is, however, just as reasonable to
apply this to open source projects which can see their core usage scenarios
disrupted by new startup projects & technologies. While the open source code
will never go away, the companies who pay for the project's developers can
quickly reassign them elsewhere, seriously harming the viability of the
community thereafter.
IOW, while Libvirt has seen 12 years of great success, we must not be so naive
to assume we are going to see another 12 years without being disrupted.
Over time we've done alot of work refactoring libvirt code to introduce new
concepts and support new hypervisor targets, but I think its fair to say that at
a high level the architecture is unchanged since we first introduced libvirtd,
and then its multithreaded internals in the 2006-2008 timeframe. We've taken a
fairly conservative, evolutionary approach to our changes. This is good, because
providing stability to our users is a critically important reason for libvirt to
exist. This is bad, because we've not been willing to take risks in short term
that could potentially be very beneficial in the long term (5-10 year time).
I think that now is the time to consider some major architectural changes in the
approach we take. There's no single reason, rather a combination of factors all
coming together to form a compelling case for ambitious change.
Before going further though, I want to highlight one important point:
I am NOT suggesting changing the public API or the XML format in a backwards
incompatible manner. API & XML stability is the single most important part of
libvirt and MUST be maintained on a par with that's available today. IOW we can
add new features, but can't remove what's there already. This even leaves the
door open for providing a libvirt2.so, provided we're willing to still maintain
libvirt.so indefinitely alongside, though that's not something I'd encourage.
The majority of the hard problems we face are not in the API design, or in the
XML format, so that's not a significant limiting factor IMHO.
There are three core areas of libvirt I see that are problematic, and where
the fixes have major implications.
At a very high level what I'm going to suggest is
- Expose key hypervisor specific concepts as fully supported features to
applications. In particular provide a way for an application to launch
QEMU processes directly in their process execution environment, rather
than as a child of libvirtd.
- Explode the libvirtd daemon into a swarm of independant daemons. This
would provide a more reliable system where a single bug doesn't take
out the entire libvirt management daemon. It would allow for better
security isolation of components. It would let session libvirtd
use system daemons for networking & hostdev setup
- Adopt use of Go and gradually convert (all|most) our C code into Go.
This would improve the reliablity of libvirt, by giving us a memory
safe language with garbage collection. It would improve productivity
by letting us spend more time writing interesting code, rather than
wasting time on platform portability or building basic abstractions
for things like OO programming, hash tables, etc (much of the stuff
we have in src/util), no more XML parsers needed (just annotated
struct fields). It would increase the talent pool of potential
contributors to libvirt by lowering the bar to getting work done.
To avoid this mail getting too long, I'll cover each area in a separate mail.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
6 years, 11 months