[libvirt] [PATCH] qemu_hotplug: Initialize @charAlias in qemuDomainRemoveChrDevice
by Michal Privoznik
My change in 112f3a8d0f32 was too drastic. The @charAlias
variable is initialized only if @monitor == true. However, it is
used even outside of that condition, at which point it's just
uninitialized pointer.
Reported-by: John Ferlan <jferlan(a)redhat.com>
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index a5c352f44b..78c9a77f2d 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4754,13 +4754,12 @@ qemuDomainRemoveChrDevice(virQEMUDriverPtr driver,
VIR_DEBUG("Removing character device %s from domain %p %s",
chr->info.alias, vm, vm->def->name);
+ if (!(charAlias = qemuAliasChardevFromDevAlias(chr->info.alias)))
+ goto cleanup;
+
if (monitor) {
- if (!(charAlias = qemuAliasChardevFromDevAlias(chr->info.alias)))
- goto cleanup;
-
qemuDomainObjEnterMonitor(driver, vm);
rc = qemuMonitorDetachCharDev(priv->mon, charAlias);
-
if (qemuDomainObjExitMonitor(driver, vm) < 0)
goto cleanup;
}
--
2.19.2
5 years, 10 months
[libvirt] [PATCH v2 0/2] add debugcon-isa chardev guest interface
by Nikolay Shirokovskiy
Diff from v1 [1]:
=================
- expose the device as serial device instead of channel in config
I use isa-debugcon name becase libvirt passes these names to qemu as-is
so I don't want to make exception for this device.
First version discussion:
[1] https://www.redhat.com/archives/libvir-list/2019-January/msg00951.html
Nikolay Shirokovskiy (2):
conf: add debugcon chardev guest interface
qemu: implement debugcon-isa chardev
docs/formatdomain.html.in | 3 +-
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 4 +++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 10 ++++--
src/qemu/qemu_domain.c | 3 ++
tests/qemuxml2argvdata/isa-serial-debugcon.args | 29 ++++++++++++++++
tests/qemuxml2argvdata/isa-serial-debugcon.xml | 36 ++++++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/isa-serial-debugcon.xml | 43 ++++++++++++++++++++++++
tests/qemuxml2xmltest.c | 2 ++
11 files changed, 129 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/isa-serial-debugcon.args
create mode 100644 tests/qemuxml2argvdata/isa-serial-debugcon.xml
create mode 100644 tests/qemuxml2xmloutdata/isa-serial-debugcon.xml
--
1.8.3.1
5 years, 10 months
[libvirt] [jenkins-ci PATCH 0/5] do testing of the libvirt-jenkins-ci project
by Daniel P. Berrangé
This sets things up so that we do testing of the libvirt-jenkins-ci
via flake8, and also validate the docker file builder works.
Daniel P. Berrangé (5):
make: add a rule for running a 'syntax-check' with flake8
lcitool: use subparsers for commands
lcitool: allow restricting host list to those supporting docker
make: add a simple build target that generates all dockerfiles
Add project for CI testing libvirt-jenkins-ci
Makefile | 23 +++
guests/lcitool | 145 +++++++++++-------
guests/playbooks/build/jobs/defaults.yml | 2 +
.../build/projects/libvirt-jenkins-ci.yml | 15 ++
guests/vars/projects/libvirt-jenkins-ci.yml | 4 +
jobs/defaults.yaml | 2 +
projects/libvirt-jenkins-ci.yaml | 14 ++
7 files changed, 148 insertions(+), 57 deletions(-)
create mode 100644 Makefile
create mode 100644 guests/playbooks/build/projects/libvirt-jenkins-ci.yml
create mode 100644 guests/vars/projects/libvirt-jenkins-ci.yml
create mode 100644 projects/libvirt-jenkins-ci.yaml
--
2.20.1
5 years, 10 months
[libvirt] [dockerfiles PATCH] Refresh after recent changes
by Andrea Bolognani
The corresponding libvirt-jenkins-ci commit is eb8dbc6ffdd1.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed under the Dockerfiles refresh rule.
buildenv-centos-7.Dockerfile | 137 ++++++++++----------
buildenv-debian-8.Dockerfile | 151 +++++++++++-----------
buildenv-debian-9.Dockerfile | 155 +++++++++++-----------
buildenv-debian-sid.Dockerfile | 154 +++++++++++-----------
buildenv-fedora-28.Dockerfile | 153 +++++++++++-----------
buildenv-fedora-29.Dockerfile | 153 +++++++++++-----------
buildenv-fedora-rawhide.Dockerfile | 201 +++++++++++++++--------------
buildenv-ubuntu-16.Dockerfile | 157 +++++++++++-----------
buildenv-ubuntu-18.Dockerfile | 157 +++++++++++-----------
9 files changed, 718 insertions(+), 700 deletions(-)
diff --git a/buildenv-centos-7.Dockerfile b/buildenv-centos-7.Dockerfile
index db05f91..ab6f2c5 100644
--- a/buildenv-centos-7.Dockerfile
+++ b/buildenv-centos-7.Dockerfile
@@ -1,72 +1,73 @@
FROM centos:centos7
-ENV PACKAGES audit-libs-devel \
- augeas \
- autoconf \
- automake \
- avahi-devel \
- bash \
- bash-completion \
- chrony \
- cyrus-sasl-devel \
- dbus-devel \
- device-mapper-devel \
- dnsmasq \
- ebtables \
- fuse-devel \
- gcc \
- gettext \
- gettext-devel \
- git \
- glibc-common \
- glibc-devel \
- glusterfs-api-devel \
- gnutls-devel \
- iproute \
- iscsi-initiator-utils \
- libacl-devel \
- libattr-devel \
- libblkid-devel \
- libcap-ng-devel \
- libcurl-devel \
- libiscsi-devel \
- libnl3-devel \
- libpcap-devel \
- libpciaccess-devel \
- librbd1-devel \
- libselinux-devel \
- libssh-devel \
- libssh2-devel \
- libtirpc-devel \
- libtool \
- libudev-devel \
- libwsman-devel \
- libxml2 \
- libxml2-devel \
- libxslt \
- lvm2 \
- make \
- netcf-devel \
- nfs-utils \
- numactl-devel \
- numad \
- parted \
- parted-devel \
- patch \
- perl \
- pkgconfig \
- polkit \
- qemu-img \
- radvd \
- readline-devel \
- rpm-build \
- sanlock-devel \
- screen \
- scrub \
- sudo \
- systemtap-sdt-devel \
- vim \
- yajl-devel
+
RUN yum update -y && \
- yum install -y ${PACKAGES} && \
+ yum install -y audit-libs-devel \
+ augeas \
+ autoconf \
+ automake \
+ avahi-devel \
+ bash \
+ bash-completion \
+ chrony \
+ cyrus-sasl-devel \
+ dbus-devel \
+ device-mapper-devel \
+ dnsmasq \
+ ebtables \
+ fuse-devel \
+ gcc \
+ gettext \
+ gettext-devel \
+ git \
+ glibc-common \
+ glibc-devel \
+ glusterfs-api-devel \
+ gnutls-devel \
+ iproute \
+ iscsi-initiator-utils \
+ libacl-devel \
+ libattr-devel \
+ libblkid-devel \
+ libcap-ng-devel \
+ libcurl-devel \
+ libiscsi-devel \
+ libnl3-devel \
+ libpcap-devel \
+ libpciaccess-devel \
+ librbd1-devel \
+ libselinux-devel \
+ libssh-devel \
+ libssh2-devel \
+ libtirpc-devel \
+ libtool \
+ libudev-devel \
+ libwsman-devel \
+ libxml2 \
+ libxml2-devel \
+ libxslt \
+ lvm2 \
+ make \
+ netcf-devel \
+ nfs-utils \
+ numactl-devel \
+ numad \
+ parted \
+ parted-devel \
+ patch \
+ perl \
+ pkgconfig \
+ polkit \
+ qemu-img \
+ radvd \
+ readline-devel \
+ rpm-build \
+ sanlock-devel \
+ screen \
+ scrub \
+ sudo \
+ systemtap-sdt-devel \
+ vim \
+ xfsprogs-devel \
+ yajl-devel && \
yum autoremove -y && \
yum clean all -y
diff --git a/buildenv-debian-8.Dockerfile b/buildenv-debian-8.Dockerfile
index aaae616..587b06f 100644
--- a/buildenv-debian-8.Dockerfile
+++ b/buildenv-debian-8.Dockerfile
@@ -1,78 +1,81 @@
FROM debian:8
-ENV PACKAGES augeas-tools \
- autoconf \
- automake \
- autopoint \
- bash \
- bash-completion \
- ccache \
- chrony \
- dnsmasq-base \
- dwarves \
- ebtables \
- gcc \
- gettext \
- git \
- glusterfs-client \
- iproute2 \
- libacl1-dev \
- libapparmor-dev \
- libattr1-dev \
- libaudit-dev \
- libavahi-client-dev \
- libblkid-dev \
- libc-dev-bin \
- libc6-dev \
- libcap-ng-dev \
- libcurl4-gnutls-dev \
- libdbus-1-dev \
- libdevmapper-dev \
- libfuse-dev \
- libgnutls28-dev \
- libiscsi-dev \
- libnetcf-dev \
- libnl-3-dev \
- libnl-route-3-dev \
- libnuma-dev \
- libparted-dev \
- libpcap-dev \
- libpciaccess-dev \
- librbd-dev \
- libreadline-dev \
- libsanlock-dev \
- libsasl2-dev \
- libselinux1-dev \
- libssh-gcrypt-dev \
- libssh2-1-dev \
- libtirpc-dev \
- libtool \
- libtool-bin \
- libudev-dev \
- libxen-dev \
- libxml2-dev \
- libxml2-utils \
- libyajl-dev \
- lvm2 \
- make \
- nfs-common \
- open-iscsi \
- parted \
- patch \
- perl \
- pkgconf \
- policykit-1 \
- qemu-utils \
- radvd \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-dev \
- vim \
- xsltproc \
- zfs-fuse
-RUN apt-get update && \
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
apt-get dist-upgrade -y && \
- apt-get install -y ${PACKAGES} && \
+ apt-get install --no-install-recommends -y \
+ augeas-tools \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ dnsmasq-base \
+ dwarves \
+ ebtables \
+ gcc \
+ gettext \
+ git \
+ glusterfs-common \
+ iproute2 \
+ libacl1-dev \
+ libapparmor-dev \
+ libattr1-dev \
+ libaudit-dev \
+ libavahi-client-dev \
+ libblkid-dev \
+ libc-dev-bin \
+ libc6-dev \
+ libcap-ng-dev \
+ libcurl4-gnutls-dev \
+ libdbus-1-dev \
+ libdevmapper-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libiscsi-dev \
+ libnetcf-dev \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libnuma-dev \
+ libparted-dev \
+ libpcap0.8-dev \
+ libpciaccess-dev \
+ librbd-dev \
+ libreadline-dev \
+ libsanlock-dev \
+ libsasl2-dev \
+ libselinux1-dev \
+ libssh-gcrypt-dev \
+ libssh2-1-dev \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libudev-dev \
+ libxen-dev \
+ libxml2-dev \
+ libxml2-utils \
+ libyajl-dev \
+ lvm2 \
+ make \
+ nfs-common \
+ open-iscsi \
+ parted \
+ patch \
+ perl \
+ pkgconf \
+ policykit-1 \
+ qemu-utils \
+ radvd \
+ screen \
+ scrub \
+ sheepdog \
+ sudo \
+ systemtap-sdt-dev \
+ vim \
+ xfslibs-dev \
+ xsltproc \
+ zfs-fuse && \
apt-get autoremove -y && \
apt-get autoclean -y
diff --git a/buildenv-debian-9.Dockerfile b/buildenv-debian-9.Dockerfile
index 0af6061..359d9c4 100644
--- a/buildenv-debian-9.Dockerfile
+++ b/buildenv-debian-9.Dockerfile
@@ -1,80 +1,83 @@
FROM debian:9
-ENV PACKAGES augeas-tools \
- autoconf \
- automake \
- autopoint \
- bash \
- bash-completion \
- ccache \
- chrony \
- dnsmasq-base \
- dwarves \
- ebtables \
- gcc \
- gettext \
- git \
- glusterfs-client \
- iproute2 \
- libacl1-dev \
- libapparmor-dev \
- libattr1-dev \
- libaudit-dev \
- libavahi-client-dev \
- libblkid-dev \
- libc-dev-bin \
- libc6-dev \
- libcap-ng-dev \
- libcurl4-gnutls-dev \
- libdbus-1-dev \
- libdevmapper-dev \
- libfuse-dev \
- libgnutls28-dev \
- libiscsi-dev \
- libnetcf-dev \
- libnl-3-dev \
- libnl-route-3-dev \
- libnuma-dev \
- libparted-dev \
- libpcap-dev \
- libpciaccess-dev \
- librbd-dev \
- libreadline-dev \
- libsanlock-dev \
- libsasl2-dev \
- libselinux1-dev \
- libssh-gcrypt-dev \
- libssh2-1-dev \
- libtirpc-dev \
- libtool \
- libtool-bin \
- libudev-dev \
- libxen-dev \
- libxml2-dev \
- libxml2-utils \
- libyajl-dev \
- lvm2 \
- make \
- nfs-common \
- numad \
- open-iscsi \
- parted \
- patch \
- perl \
- pkgconf \
- policykit-1 \
- qemu-utils \
- radvd \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-dev \
- vim \
- wireshark-dev \
- xsltproc \
- zfs-fuse
-RUN apt-get update && \
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
apt-get dist-upgrade -y && \
- apt-get install -y ${PACKAGES} && \
+ apt-get install --no-install-recommends -y \
+ augeas-tools \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ dnsmasq-base \
+ dwarves \
+ ebtables \
+ gcc \
+ gettext \
+ git \
+ glusterfs-common \
+ iproute2 \
+ libacl1-dev \
+ libapparmor-dev \
+ libattr1-dev \
+ libaudit-dev \
+ libavahi-client-dev \
+ libblkid-dev \
+ libc-dev-bin \
+ libc6-dev \
+ libcap-ng-dev \
+ libcurl4-gnutls-dev \
+ libdbus-1-dev \
+ libdevmapper-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libiscsi-dev \
+ libnetcf-dev \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libnuma-dev \
+ libparted-dev \
+ libpcap0.8-dev \
+ libpciaccess-dev \
+ librbd-dev \
+ libreadline-dev \
+ libsanlock-dev \
+ libsasl2-dev \
+ libselinux1-dev \
+ libssh-gcrypt-dev \
+ libssh2-1-dev \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libudev-dev \
+ libxen-dev \
+ libxml2-dev \
+ libxml2-utils \
+ libyajl-dev \
+ lvm2 \
+ make \
+ nfs-common \
+ numad \
+ open-iscsi \
+ parted \
+ patch \
+ perl \
+ pkgconf \
+ policykit-1 \
+ qemu-utils \
+ radvd \
+ screen \
+ scrub \
+ sheepdog \
+ sudo \
+ systemtap-sdt-dev \
+ vim \
+ wireshark-dev \
+ xfslibs-dev \
+ xsltproc \
+ zfs-fuse && \
apt-get autoremove -y && \
apt-get autoclean -y
diff --git a/buildenv-debian-sid.Dockerfile b/buildenv-debian-sid.Dockerfile
index 4c4c99b..8e49c0c 100644
--- a/buildenv-debian-sid.Dockerfile
+++ b/buildenv-debian-sid.Dockerfile
@@ -1,80 +1,82 @@
FROM debian:sid
-ENV PACKAGES augeas-tools \
- autoconf \
- automake \
- autopoint \
- bash \
- bash-completion \
- ccache \
- chrony \
- dnsmasq-base \
- dwarves \
- ebtables \
- gcc \
- gettext \
- git \
- glusterfs-client \
- iproute2 \
- libacl1-dev \
- libapparmor-dev \
- libattr1-dev \
- libaudit-dev \
- libavahi-client-dev \
- libblkid-dev \
- libc-dev-bin \
- libc6-dev \
- libcap-ng-dev \
- libcurl4-gnutls-dev \
- libdbus-1-dev \
- libdevmapper-dev \
- libfuse-dev \
- libgnutls28-dev \
- libiscsi-dev \
- libnetcf-dev \
- libnl-3-dev \
- libnl-route-3-dev \
- libnuma-dev \
- libparted-dev \
- libpcap-dev \
- libpciaccess-dev \
- librbd-dev \
- libreadline-dev \
- libsanlock-dev \
- libsasl2-dev \
- libselinux1-dev \
- libssh-gcrypt-dev \
- libssh2-1-dev \
- libtirpc-dev \
- libtool \
- libtool-bin \
- libudev-dev \
- libxen-dev \
- libxml2-dev \
- libxml2-utils \
- libyajl-dev \
- lvm2 \
- make \
- nfs-common \
- numad \
- open-iscsi \
- parted \
- patch \
- perl \
- pkgconf \
- policykit-1 \
- qemu-utils \
- radvd \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-dev \
- vim \
- wireshark-dev \
- xsltproc \
- zfs-fuse
-RUN apt-get update && \
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
apt-get dist-upgrade -y && \
- apt-get install -y ${PACKAGES} && \
+ apt-get install --no-install-recommends -y \
+ augeas-tools \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ dnsmasq-base \
+ dwarves \
+ ebtables \
+ gcc \
+ gettext \
+ git \
+ iproute2 \
+ libacl1-dev \
+ libapparmor-dev \
+ libattr1-dev \
+ libaudit-dev \
+ libavahi-client-dev \
+ libblkid-dev \
+ libc-dev-bin \
+ libc6-dev \
+ libcap-ng-dev \
+ libcurl4-gnutls-dev \
+ libdbus-1-dev \
+ libdevmapper-dev \
+ libfuse-dev \
+ libglusterfs-dev \
+ libgnutls28-dev \
+ libiscsi-dev \
+ libnetcf-dev \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libnuma-dev \
+ libparted-dev \
+ libpcap0.8-dev \
+ libpciaccess-dev \
+ librbd-dev \
+ libreadline-dev \
+ libsanlock-dev \
+ libsasl2-dev \
+ libselinux1-dev \
+ libssh-gcrypt-dev \
+ libssh2-1-dev \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libudev-dev \
+ libxen-dev \
+ libxml2-dev \
+ libxml2-utils \
+ libyajl-dev \
+ lvm2 \
+ make \
+ nfs-common \
+ numad \
+ open-iscsi \
+ parted \
+ patch \
+ perl \
+ pkgconf \
+ policykit-1 \
+ qemu-utils \
+ radvd \
+ screen \
+ scrub \
+ sudo \
+ systemtap-sdt-dev \
+ vim \
+ wireshark-dev \
+ xfslibs-dev \
+ xsltproc \
+ zfs-fuse && \
apt-get autoremove -y && \
apt-get autoclean -y
diff --git a/buildenv-fedora-28.Dockerfile b/buildenv-fedora-28.Dockerfile
index 0b4d24f..fe96282 100644
--- a/buildenv-fedora-28.Dockerfile
+++ b/buildenv-fedora-28.Dockerfile
@@ -1,80 +1,81 @@
FROM fedora:28
-ENV PACKAGES audit-libs-devel \
- augeas \
- autoconf \
- automake \
- avahi-devel \
- bash \
- bash-completion \
- ccache \
- chrony \
- cppi \
- cyrus-sasl-devel \
- dbus-devel \
- device-mapper-devel \
- dnsmasq \
- dwarves \
- ebtables \
- fuse-devel \
- gcc \
- gettext \
- gettext-devel \
- git \
- glibc-devel \
- glusterfs-api-devel \
- gnutls-devel \
- iproute \
- iproute-tc \
- iscsi-initiator-utils \
- libacl-devel \
- libattr-devel \
- libblkid-devel \
- libcap-ng-devel \
- libcurl-devel \
- libiscsi-devel \
- libnl3-devel \
- libpcap-devel \
- libpciaccess-devel \
- librbd-devel \
- libselinux-devel \
- libssh-devel \
- libssh2-devel \
- libtirpc-devel \
- libtool \
- libudev-devel \
- libwsman-devel \
- libxml2 \
- libxml2-devel \
- libxslt \
- lvm2 \
- make \
- netcf-devel \
- nfs-utils \
- numactl-devel \
- numad \
- parted \
- parted-devel \
- patch \
- perl \
- pkgconfig \
- polkit \
- qemu-img \
- radvd \
- readline-devel \
- rpcgen \
- rpm-build \
- sanlock-devel \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-devel \
- vim \
- wireshark-devel \
- xen-devel \
- yajl-devel \
- zfs-fuse
+
RUN yum update -y && \
- yum install -y ${PACKAGES} && \
+ yum install -y audit-libs-devel \
+ augeas \
+ autoconf \
+ automake \
+ avahi-devel \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ cppi \
+ cyrus-sasl-devel \
+ dbus-devel \
+ device-mapper-devel \
+ dnsmasq \
+ dwarves \
+ ebtables \
+ fuse-devel \
+ gcc \
+ gettext \
+ gettext-devel \
+ git \
+ glibc-devel \
+ glusterfs-api-devel \
+ gnutls-devel \
+ iproute \
+ iproute-tc \
+ iscsi-initiator-utils \
+ libacl-devel \
+ libattr-devel \
+ libblkid-devel \
+ libcap-ng-devel \
+ libcurl-devel \
+ libiscsi-devel \
+ libnl3-devel \
+ libpcap-devel \
+ libpciaccess-devel \
+ librbd-devel \
+ libselinux-devel \
+ libssh-devel \
+ libssh2-devel \
+ libtirpc-devel \
+ libtool \
+ libudev-devel \
+ libwsman-devel \
+ libxml2 \
+ libxml2-devel \
+ libxslt \
+ lvm2 \
+ make \
+ netcf-devel \
+ nfs-utils \
+ numactl-devel \
+ numad \
+ parted \
+ parted-devel \
+ patch \
+ perl \
+ pkgconfig \
+ polkit \
+ qemu-img \
+ radvd \
+ readline-devel \
+ rpcgen \
+ rpm-build \
+ sanlock-devel \
+ screen \
+ scrub \
+ sheepdog \
+ sudo \
+ systemtap-sdt-devel \
+ vim \
+ wireshark-devel \
+ xen-devel \
+ xfsprogs-devel \
+ yajl-devel \
+ zfs-fuse && \
yum autoremove -y && \
yum clean all -y
diff --git a/buildenv-fedora-29.Dockerfile b/buildenv-fedora-29.Dockerfile
index 2842691..1d10a5f 100644
--- a/buildenv-fedora-29.Dockerfile
+++ b/buildenv-fedora-29.Dockerfile
@@ -1,80 +1,81 @@
FROM fedora:29
-ENV PACKAGES audit-libs-devel \
- augeas \
- autoconf \
- automake \
- avahi-devel \
- bash \
- bash-completion \
- ccache \
- chrony \
- cppi \
- cyrus-sasl-devel \
- dbus-devel \
- device-mapper-devel \
- dnsmasq \
- dwarves \
- ebtables \
- fuse-devel \
- gcc \
- gettext \
- gettext-devel \
- git \
- glibc-devel \
- glusterfs-api-devel \
- gnutls-devel \
- iproute \
- iproute-tc \
- iscsi-initiator-utils \
- libacl-devel \
- libattr-devel \
- libblkid-devel \
- libcap-ng-devel \
- libcurl-devel \
- libiscsi-devel \
- libnl3-devel \
- libpcap-devel \
- libpciaccess-devel \
- librbd-devel \
- libselinux-devel \
- libssh-devel \
- libssh2-devel \
- libtirpc-devel \
- libtool \
- libudev-devel \
- libwsman-devel \
- libxml2 \
- libxml2-devel \
- libxslt \
- lvm2 \
- make \
- netcf-devel \
- nfs-utils \
- numactl-devel \
- numad \
- parted \
- parted-devel \
- patch \
- perl \
- pkgconfig \
- polkit \
- qemu-img \
- radvd \
- readline-devel \
- rpcgen \
- rpm-build \
- sanlock-devel \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-devel \
- vim \
- wireshark-devel \
- xen-devel \
- yajl-devel \
- zfs-fuse
+
RUN yum update -y && \
- yum install -y ${PACKAGES} && \
+ yum install -y audit-libs-devel \
+ augeas \
+ autoconf \
+ automake \
+ avahi-devel \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ cppi \
+ cyrus-sasl-devel \
+ dbus-devel \
+ device-mapper-devel \
+ dnsmasq \
+ dwarves \
+ ebtables \
+ fuse-devel \
+ gcc \
+ gettext \
+ gettext-devel \
+ git \
+ glibc-devel \
+ glusterfs-api-devel \
+ gnutls-devel \
+ iproute \
+ iproute-tc \
+ iscsi-initiator-utils \
+ libacl-devel \
+ libattr-devel \
+ libblkid-devel \
+ libcap-ng-devel \
+ libcurl-devel \
+ libiscsi-devel \
+ libnl3-devel \
+ libpcap-devel \
+ libpciaccess-devel \
+ librbd-devel \
+ libselinux-devel \
+ libssh-devel \
+ libssh2-devel \
+ libtirpc-devel \
+ libtool \
+ libudev-devel \
+ libwsman-devel \
+ libxml2 \
+ libxml2-devel \
+ libxslt \
+ lvm2 \
+ make \
+ netcf-devel \
+ nfs-utils \
+ numactl-devel \
+ numad \
+ parted \
+ parted-devel \
+ patch \
+ perl \
+ pkgconfig \
+ polkit \
+ qemu-img \
+ radvd \
+ readline-devel \
+ rpcgen \
+ rpm-build \
+ sanlock-devel \
+ screen \
+ scrub \
+ sheepdog \
+ sudo \
+ systemtap-sdt-devel \
+ vim \
+ wireshark-devel \
+ xen-devel \
+ xfsprogs-devel \
+ yajl-devel \
+ zfs-fuse && \
yum autoremove -y && \
yum clean all -y
diff --git a/buildenv-fedora-rawhide.Dockerfile b/buildenv-fedora-rawhide.Dockerfile
index 50d38d8..f6e427c 100644
--- a/buildenv-fedora-rawhide.Dockerfile
+++ b/buildenv-fedora-rawhide.Dockerfile
@@ -1,105 +1,106 @@
FROM fedora:rawhide
-ENV PACKAGES audit-libs-devel \
- augeas \
- autoconf \
- automake \
- avahi-devel \
- bash \
- bash-completion \
- ccache \
- chrony \
- cppi \
- cyrus-sasl-devel \
- dbus-devel \
- device-mapper-devel \
- dnsmasq \
- dwarves \
- ebtables \
- fuse-devel \
- gcc \
- gettext \
- gettext-devel \
- git \
- glibc-devel \
- glusterfs-api-devel \
- gnutls-devel \
- iproute \
- iproute-tc \
- iscsi-initiator-utils \
- libacl-devel \
- libattr-devel \
- libblkid-devel \
- libcap-ng-devel \
- libcurl-devel \
- libiscsi-devel \
- libnl3-devel \
- libpcap-devel \
- libpciaccess-devel \
- librbd-devel \
- libselinux-devel \
- libssh-devel \
- libssh2-devel \
- libtirpc-devel \
- libtool \
- libudev-devel \
- libwsman-devel \
- libxml2 \
- libxml2-devel \
- libxslt \
- lvm2 \
- make \
- mingw32-curl \
- mingw32-dbus \
- mingw32-dlfcn \
- mingw32-gcc \
- mingw32-gettext \
- mingw32-gnutls \
- mingw32-libssh2 \
- mingw32-libxml2 \
- mingw32-openssl \
- mingw32-pkg-config \
- mingw32-portablexdr \
- mingw32-readline \
- mingw64-curl \
- mingw64-dbus \
- mingw64-dlfcn \
- mingw64-gcc \
- mingw64-gettext \
- mingw64-gnutls \
- mingw64-libssh2 \
- mingw64-libxml2 \
- mingw64-openssl \
- mingw64-pkg-config \
- mingw64-portablexdr \
- mingw64-readline \
- netcf-devel \
- nfs-utils \
- numactl-devel \
- numad \
- parted \
- parted-devel \
- patch \
- perl \
- pkgconfig \
- polkit \
- qemu-img \
- radvd \
- readline-devel \
- rpcgen \
- rpm-build \
- sanlock-devel \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-devel \
- vim \
- wireshark-devel \
- xen-devel \
- yajl-devel \
- zfs-fuse
+
RUN yum update -y --nogpgcheck fedora-gpg-keys && \
yum update -y && \
- yum install -y ${PACKAGES} && \
+ yum install -y audit-libs-devel \
+ augeas \
+ autoconf \
+ automake \
+ avahi-devel \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ cppi \
+ cyrus-sasl-devel \
+ dbus-devel \
+ device-mapper-devel \
+ dnsmasq \
+ dwarves \
+ ebtables \
+ fuse-devel \
+ gcc \
+ gettext \
+ gettext-devel \
+ git \
+ glibc-devel \
+ glusterfs-api-devel \
+ gnutls-devel \
+ iproute \
+ iproute-tc \
+ iscsi-initiator-utils \
+ libacl-devel \
+ libattr-devel \
+ libblkid-devel \
+ libcap-ng-devel \
+ libcurl-devel \
+ libiscsi-devel \
+ libnl3-devel \
+ libpcap-devel \
+ libpciaccess-devel \
+ librbd-devel \
+ libselinux-devel \
+ libssh-devel \
+ libssh2-devel \
+ libtirpc-devel \
+ libtool \
+ libudev-devel \
+ libwsman-devel \
+ libxml2 \
+ libxml2-devel \
+ libxslt \
+ lvm2 \
+ make \
+ mingw32-curl \
+ mingw32-dbus \
+ mingw32-dlfcn \
+ mingw32-gcc \
+ mingw32-gettext \
+ mingw32-gnutls \
+ mingw32-libssh2 \
+ mingw32-libxml2 \
+ mingw32-openssl \
+ mingw32-pkg-config \
+ mingw32-portablexdr \
+ mingw32-readline \
+ mingw64-curl \
+ mingw64-dbus \
+ mingw64-dlfcn \
+ mingw64-gcc \
+ mingw64-gettext \
+ mingw64-gnutls \
+ mingw64-libssh2 \
+ mingw64-libxml2 \
+ mingw64-openssl \
+ mingw64-pkg-config \
+ mingw64-portablexdr \
+ mingw64-readline \
+ netcf-devel \
+ nfs-utils \
+ numactl-devel \
+ numad \
+ parted \
+ parted-devel \
+ patch \
+ perl \
+ pkgconfig \
+ polkit \
+ qemu-img \
+ radvd \
+ readline-devel \
+ rpcgen \
+ rpm-build \
+ sanlock-devel \
+ screen \
+ scrub \
+ sheepdog \
+ sudo \
+ systemtap-sdt-devel \
+ vim \
+ wireshark-devel \
+ xen-devel \
+ xfsprogs-devel \
+ yajl-devel \
+ zfs-fuse && \
yum autoremove -y && \
yum clean all -y
diff --git a/buildenv-ubuntu-16.Dockerfile b/buildenv-ubuntu-16.Dockerfile
index ec51612..1d49b1f 100644
--- a/buildenv-ubuntu-16.Dockerfile
+++ b/buildenv-ubuntu-16.Dockerfile
@@ -1,81 +1,84 @@
FROM ubuntu:16.04
-ENV PACKAGES augeas-tools \
- autoconf \
- automake \
- autopoint \
- bash \
- bash-completion \
- ccache \
- chrony \
- dnsmasq-base \
- dwarves \
- ebtables \
- gcc \
- gettext \
- git \
- glusterfs-client \
- iproute2 \
- libacl1-dev \
- libapparmor-dev \
- libattr1-dev \
- libaudit-dev \
- libavahi-client-dev \
- libblkid-dev \
- libc-dev-bin \
- libc6-dev \
- libcap-ng-dev \
- libcurl4-gnutls-dev \
- libdbus-1-dev \
- libdevmapper-dev \
- libfuse-dev \
- libgnutls28-dev \
- libiscsi-dev \
- libnetcf-dev \
- libnl-3-dev \
- libnl-route-3-dev \
- libnuma-dev \
- libopenwsman-dev \
- libparted-dev \
- libpcap-dev \
- libpciaccess-dev \
- librbd-dev \
- libreadline-dev \
- libsanlock-dev \
- libsasl2-dev \
- libselinux1-dev \
- libssh-dev \
- libssh2-1-dev \
- libtirpc-dev \
- libtool \
- libtool-bin \
- libudev-dev \
- libxen-dev \
- libxml2-dev \
- libxml2-utils \
- libyajl-dev \
- lvm2 \
- make \
- nfs-common \
- numad \
- open-iscsi \
- parted \
- patch \
- perl \
- pkgconf \
- policykit-1 \
- qemu-utils \
- radvd \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-dev \
- vim \
- wireshark-dev \
- xsltproc \
- zfs-fuse
-RUN apt-get update && \
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
apt-get dist-upgrade -y && \
- apt-get install -y ${PACKAGES} && \
+ apt-get install --no-install-recommends -y \
+ augeas-tools \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ dnsmasq-base \
+ dwarves \
+ ebtables \
+ gcc \
+ gettext \
+ git \
+ glusterfs-common \
+ iproute2 \
+ libacl1-dev \
+ libapparmor-dev \
+ libattr1-dev \
+ libaudit-dev \
+ libavahi-client-dev \
+ libblkid-dev \
+ libc-dev-bin \
+ libc6-dev \
+ libcap-ng-dev \
+ libcurl4-gnutls-dev \
+ libdbus-1-dev \
+ libdevmapper-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libiscsi-dev \
+ libnetcf-dev \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libnuma-dev \
+ libopenwsman-dev \
+ libparted-dev \
+ libpcap0.8-dev \
+ libpciaccess-dev \
+ librbd-dev \
+ libreadline-dev \
+ libsanlock-dev \
+ libsasl2-dev \
+ libselinux1-dev \
+ libssh-dev \
+ libssh2-1-dev \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libudev-dev \
+ libxen-dev \
+ libxml2-dev \
+ libxml2-utils \
+ libyajl-dev \
+ lvm2 \
+ make \
+ nfs-common \
+ numad \
+ open-iscsi \
+ parted \
+ patch \
+ perl \
+ pkgconf \
+ policykit-1 \
+ qemu-utils \
+ radvd \
+ screen \
+ scrub \
+ sheepdog \
+ sudo \
+ systemtap-sdt-dev \
+ vim \
+ wireshark-dev \
+ xfslibs-dev \
+ xsltproc \
+ zfs-fuse && \
apt-get autoremove -y && \
apt-get autoclean -y
diff --git a/buildenv-ubuntu-18.Dockerfile b/buildenv-ubuntu-18.Dockerfile
index d2565e9..7ab5686 100644
--- a/buildenv-ubuntu-18.Dockerfile
+++ b/buildenv-ubuntu-18.Dockerfile
@@ -1,81 +1,84 @@
FROM ubuntu:18.04
-ENV PACKAGES augeas-tools \
- autoconf \
- automake \
- autopoint \
- bash \
- bash-completion \
- ccache \
- chrony \
- dnsmasq-base \
- dwarves \
- ebtables \
- gcc \
- gettext \
- git \
- glusterfs-client \
- iproute2 \
- libacl1-dev \
- libapparmor-dev \
- libattr1-dev \
- libaudit-dev \
- libavahi-client-dev \
- libblkid-dev \
- libc-dev-bin \
- libc6-dev \
- libcap-ng-dev \
- libcurl4-gnutls-dev \
- libdbus-1-dev \
- libdevmapper-dev \
- libfuse-dev \
- libgnutls28-dev \
- libiscsi-dev \
- libnetcf-dev \
- libnl-3-dev \
- libnl-route-3-dev \
- libnuma-dev \
- libopenwsman-dev \
- libparted-dev \
- libpcap-dev \
- libpciaccess-dev \
- librbd-dev \
- libreadline-dev \
- libsanlock-dev \
- libsasl2-dev \
- libselinux1-dev \
- libssh-dev \
- libssh2-1-dev \
- libtirpc-dev \
- libtool \
- libtool-bin \
- libudev-dev \
- libxen-dev \
- libxml2-dev \
- libxml2-utils \
- libyajl-dev \
- lvm2 \
- make \
- nfs-common \
- numad \
- open-iscsi \
- parted \
- patch \
- perl \
- pkgconf \
- policykit-1 \
- qemu-utils \
- radvd \
- screen \
- scrub \
- sheepdog \
- sudo \
- systemtap-sdt-dev \
- vim \
- wireshark-dev \
- xsltproc \
- zfs-fuse
-RUN apt-get update && \
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
apt-get dist-upgrade -y && \
- apt-get install -y ${PACKAGES} && \
+ apt-get install --no-install-recommends -y \
+ augeas-tools \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ccache \
+ chrony \
+ dnsmasq-base \
+ dwarves \
+ ebtables \
+ gcc \
+ gettext \
+ git \
+ glusterfs-common \
+ iproute2 \
+ libacl1-dev \
+ libapparmor-dev \
+ libattr1-dev \
+ libaudit-dev \
+ libavahi-client-dev \
+ libblkid-dev \
+ libc-dev-bin \
+ libc6-dev \
+ libcap-ng-dev \
+ libcurl4-gnutls-dev \
+ libdbus-1-dev \
+ libdevmapper-dev \
+ libfuse-dev \
+ libgnutls28-dev \
+ libiscsi-dev \
+ libnetcf-dev \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libnuma-dev \
+ libopenwsman-dev \
+ libparted-dev \
+ libpcap0.8-dev \
+ libpciaccess-dev \
+ librbd-dev \
+ libreadline-dev \
+ libsanlock-dev \
+ libsasl2-dev \
+ libselinux1-dev \
+ libssh-dev \
+ libssh2-1-dev \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libudev-dev \
+ libxen-dev \
+ libxml2-dev \
+ libxml2-utils \
+ libyajl-dev \
+ lvm2 \
+ make \
+ nfs-common \
+ numad \
+ open-iscsi \
+ parted \
+ patch \
+ perl \
+ pkgconf \
+ policykit-1 \
+ qemu-utils \
+ radvd \
+ screen \
+ scrub \
+ sheepdog \
+ sudo \
+ systemtap-sdt-dev \
+ vim \
+ wireshark-dev \
+ xfslibs-dev \
+ xsltproc \
+ zfs-fuse && \
apt-get autoremove -y && \
apt-get autoclean -y
--
2.20.1
5 years, 10 months
[libvirt] [libvirt-glib 1/3] config: Fix gvir_config_xml_node_to_string() leak
by Christophe Fergeau
If xmlNodeDump() fails, we would be leaking the xmlBuffer we created.
This commit ensures we don't return early before this buffer is freed.
Signed-off-by: Christophe Fergeau <cfergeau(a)redhat.com>
---
libvirt-gconfig/libvirt-gconfig-helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-helpers.c b/libvirt-gconfig/libvirt-gconfig-helpers.c
index 0314a72f..e8f9664a 100644
--- a/libvirt-gconfig/libvirt-gconfig-helpers.c
+++ b/libvirt-gconfig/libvirt-gconfig-helpers.c
@@ -293,7 +293,7 @@ gvir_config_xml_node_to_string(xmlNodePtr node)
xmlbuf = xmlBufferCreate();
if (xmlNodeDump(xmlbuf, node->doc, node, 0, 1) < 0)
- return NULL;
+ xml = NULL;
else
xml = g_strndup((gchar *)xmlBufferContent(xmlbuf), xmlBufferLength(xmlbuf));
--
2.20.1
5 years, 10 months
[libvirt] [jenkins-ci PATCH v3 00/10] Add support for cross compiling libvirt via Debian
by Daniel P. Berrangé
Changed in v3:
- Remove sheepdog more generally
- Use .format() style printf
- Split config to cross-build.yml
- Make glusterfs name per-distro customized
- Misc code style changes
- Rename fields in cross-build.yml
- Don't use crossbuild-essential packages
Changed in v2:
- Fix multiple package name mistakes
- Modify lcitool to generate cross-arch docker files
- Add --no-install-recommended flag to apt-get
- Add DEBIAN_FRONTEND=noninteractive env to apt-get
- Improve error reporting in lcitool
- Add make rule for generating dockerfiles locally
Daniel P. Berrangé (10):
guests: use libpcap0.8-dev package on Debian
guests: add xfsprogs development package for libvirt
guests: fix glusterfs package name on Debian
guests: Debian SID has dropped the sheepdog package
lcitool: include root cause when reporting errors
lcitool: force non-interactive apt-get frontend
lcitool: avoid installing recommended packages
lcitool: refactor logic for building package list
lcitool: avoid using an env var to store package list
lcitool: support generating cross compiler dockerfiles
.../libvirt-debian-9/cross-build.yml | 50 ++++++
.../libvirt-debian-sid/cross-build.yml | 52 +++++++
guests/lcitool | 146 ++++++++++++------
guests/vars/mappings.yml | 13 +-
guests/vars/projects/libvirt.yml | 1 +
5 files changed, 213 insertions(+), 49 deletions(-)
create mode 100644 guests/host_vars/libvirt-debian-9/cross-build.yml
create mode 100644 guests/host_vars/libvirt-debian-sid/cross-build.yml
--
2.20.1
5 years, 10 months
[libvirt] [PATCH 0/3] virDomainXMLFlags cleanups
by Eric Blake
Nir has asked that my upcoming checkpoint APIs have a way to do
bulk operations: grab the XML for ALL checkpoints in one call,
and in turn redefine checkpoints on a new host using the dumped
XML from an old host in one call. But since checkpoints borrow
heavily from the APIs used for snapshots, it makes sense to do
the same thing for checkpoints. And in the process of implementing
that code, I discovered some oddities in the use of flags when
dumping domain-related XML, which this series aims to fix.
Eric Blake (3):
domain: Document VIR_DOMAIN_XML_MIGRATABLE
domain: Define explicit flags for saved image xml
snapshot: Define explicit flags for snapshot xml
include/libvirt/libvirt-domain-snapshot.h | 4 ++++
include/libvirt/libvirt-domain.h | 5 +++++
src/libvirt-domain-snapshot.c | 9 ++++-----
src/libvirt-domain.c | 22 +++++++++++++---------
src/qemu/qemu_driver.c | 6 +++---
src/remote/remote_protocol.x | 6 +++---
src/test/test_driver.c | 2 +-
src/vz/vz_driver.c | 2 +-
8 files changed, 34 insertions(+), 22 deletions(-)
--
2.20.1
5 years, 10 months
[libvirt] [PATCH] udev: only report a warning if udev_enumerate_scan_devices fails
by Marc Hartmayer
Even if an error is reported by `udev_enumerate_scan_devices`,
e.g. because a driver of a device has an bug, we can still enumerate
all other devices. Additionally the documentation of
udev_enumerate_scan_devices says that on success an integer >= 0 is
returned (see man udev_enumerate_scan_devices(3)).
Reviewed-by: Bjoern Walk <bwalk(a)linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
---
src/node_device/node_device_udev.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 299f55260129..90168eb8a969 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1480,13 +1480,8 @@ udevEnumerateDevices(struct udev *udev)
if (udevEnumerateAddMatches(udev_enumerate) < 0)
goto cleanup;
- ret = udev_enumerate_scan_devices(udev_enumerate);
- if (ret != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("udev scan devices returned %d"),
- ret);
- goto cleanup;
- }
+ if (udev_enumerate_scan_devices(udev_enumerate) < 0)
+ VIR_WARN("udev scan devices failed");
udev_list_entry_foreach(list_entry,
udev_enumerate_get_list_entry(udev_enumerate)) {
--
2.17.0
5 years, 10 months
[libvirt] [PATCH] qemu: Escape external snapshot names containing comma
by Eric Blake
The code for creating external snapshots for an offline domain
called out to qemu-img without escaping commas in the manner
that qemu-img expects. This also fixes a typo in the comment.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Noticed by code inspection; I did not try very hard to see how
easy or hard it would be to convince libvirt to actually try
and create an external snapshot to /path/file,with,comma to
see how things break.
src/qemu/qemu_driver.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index dc51de0310..971f915619 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -100,6 +100,7 @@
#include "virnuma.h"
#include "dirname.h"
#include "netdev_bandwidth_conf.h"
+#include "virqemu.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
@@ -14561,6 +14562,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
virBitmapPtr created = NULL;
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
int ret = -1;
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
if (!(qemuImgPath = qemuFindQemuImgBinary(driver)))
goto cleanup;
@@ -14589,13 +14591,15 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
NULL)))
goto cleanup;
- /* adds cmd line arg: backing_file=/path/to/backing/file,backing_fmd=format */
- virCommandAddArgFormat(cmd, "backing_file=%s,backing_fmt=%s",
- defdisk->src->path,
- virStorageFileFormatTypeToString(defdisk->src->format));
+ /* adds cmd line arg: backing_fmt=format,backing_file=/path/to/backing/file */
+ virBufferAsprintf(&buf, "backing_fmt=%s,backing_file=",
+ virStorageFileFormatTypeToString(defdisk->src->format));
+ virQEMUBuildBufferEscapeComma(&buf, defdisk->src->path);
+ virCommandAddArgBuffer(cmd, &buf);
/* adds cmd line args: /path/to/target/file */
- virCommandAddArg(cmd, snapdisk->src->path);
+ virQEMUBuildBufferEscapeComma(&buf, snapdisk->src->path);
+ virCommandAddArgBuffer(cmd, &buf);
/* If the target does not exist, we're going to create it possibly */
if (!virFileExists(snapdisk->src->path))
@@ -14629,6 +14633,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
ret = 0;
cleanup:
+ virBufferFreeAndReset(&buf);
virCommandFree(cmd);
/* unlink images if creation has failed */
--
2.20.1
5 years, 10 months