[libvirt] [PATCH v2] lxc: Refresh capabilities if they have never been initalized
by Cole Robinson
Adjust virLXCDriverGetCapabilities to fill in driver->caps if it is
empty, regardless of the passed 'refresh' value. This matches the
pattern used in virQEMUDriverGetCapabilities
This fixes LXC XML startup parsing for me
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
v2:
Use the virQEMUDriverGetCapabilities like danpb suggested
src/lxc/lxc_conf.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 2df1537b22..adf7a0b66c 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -196,6 +196,14 @@ virCapsPtr virLXCDriverGetCapabilities(virLXCDriverPtr driver,
driver->caps = caps;
} else {
lxcDriverLock(driver);
+
+ if (driver->caps == NULL ||
+ driver->caps->nguests == 0) {
+ VIR_DEBUG("Capabilities didn't detect any guests. Forcing a "
+ "refresh.");
+ lxcDriverUnlock(driver);
+ return virLXCDriverGetCapabilities(driver, true);
+ }
}
ret = virObjectRef(driver->caps);
--
2.23.0
5 years
[libvirt] [PATCH 0/2] tests: VIR_TEST_REGENERATE_OUTPUT fixes
by Cole Robinson
First fix is straightforward, the test-wrap-argv.py path needs to
be adjusted.
Second bit fixes an issue I hit with:
VIR_TEST_REGENERATE_OUTPUT=1 ./build/tests/qemuxml2argvtest
Where it reported not finding a python binary. I assume this is due
to some preload PATH alteration, like the comment suggests, but I
didn't investigate it. The patch sidesteps the issue and seems
worth doing anyways
Cole Robinson (2):
tests: fix REGENERATE test-wrap-argv.py usage
tests: use PYTHON detected from configure
configure.ac | 1 +
tests/testutils.c | 14 ++------------
2 files changed, 3 insertions(+), 12 deletions(-)
--
2.23.0
5 years
[libvirt] [PATCH v2 00/25] Incremental backup support for qemu
by Peter Krempa
Next version which includes feedback from V1:
https://www.redhat.com/archives/libvir-list/2019-November/msg01315.html
and also few features and bugs fixed based on offline requests:
- The flag VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL was added to
facilitate users who wish to provide their own files.
- The schema was fixed as many legitimate uses were not described:
- format for the scratch file was not supported
- security labels for the scratch file were not supported
- tests were insufficient
- backup XML 2 XML testing was added
- scratch files created by libvirt are now removed after the job
finishes
- domain capability feature entry was added
- the code for determining bitmaps for incremental backup was slightly
optimized
- documentation now documents our behaviour towards the scratch file and
the relationship to the new flag.
I might have forgotten to apply some reviewed-by tags though. I'm sorry
for that. Most patches changed though (including the API patches which
add the flag) so a review is welcome even there.
You can fetch the new version at:
git fetch https://gitlab.com/pipo.sk/libvirt.git blockdev-backup-v2
Note that the branch also contains commit to enable block commit for
easier testing. With the posted code the following approach can be
used to enable it (new qemu required):
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
...
<qemu:capabilities>
<qemu:add capability='incremental-backup'/>
</qemu:capabilities>
</domain>
Eric Blake (5):
backup: Document new XML for backups
backup: Introduce virDomainBackup APIs
backup: Implement backup APIs for remote driver
backup: Parse and output backup XML
backup: Implement virsh support for backup
Peter Krempa (20):
qemu: domain: Export qemuDomainGetImageIds
API: Introduce field for reporting temporary disk space usage of a
domain job
virsh: Implement VIR_DOMAIN_JOB_DISK_TEMP_(USED|TOTAL) in
cmdDomjobinfo
API: Add domain job operation for backups
tests: genericxml2xml: Add testing of backup XML files
qemu: Add infrastructure for statistics of a backup job
qemu: domain: Introduce QEMU_ASYNC_JOB_BACKUP async job type
Add 'backup' block job type
qemu: monitor: Add support for blockdev-backup via 'transaction'
qemu: domain: Track backup job data in the status XML
qemu: blockjob: Track internal data for 'backup' blockjob
tests: qemustatusxml2xml: Add test for 'pull' type backup job
conf: backup: Add fields for tracking stats of completed sub-jobs
doc: Document quirk of getting block job info for a 'backup' blockjob
qemu: Implement backup job APIs and qemu handling
qemu: backup: Implement stats gathering while the job is running
qemu: driver: Allow cancellation of the backup job
qemu: blockjob: Implement concluded blockjob handler for backup
blockjobs
conf: domaincaps: Add 'backup' feature flag
qemu: Add support for VIR_DOMAIN_CAPS_FEATURE_BACKUP
docs/docs.html.in | 3 +-
docs/format.html.in | 1 +
docs/formatbackup.html.in | 175 +++
docs/formatcheckpoint.html.in | 12 +-
docs/formatdomaincaps.html.in | 8 +
docs/index.html.in | 3 +-
docs/schemas/domainbackup.rng | 223 ++++
docs/schemas/domaincaps.rng | 9 +
examples/c/misc/event-test.c | 3 +
include/libvirt/libvirt-domain.h | 37 +-
libvirt.spec.in | 1 +
mingw-libvirt.spec.in | 2 +
po/POTFILES.in | 3 +
src/conf/Makefile.inc.am | 2 +
src/conf/backup_conf.c | 499 ++++++++
src/conf/backup_conf.h | 108 ++
src/conf/domain_capabilities.c | 1 +
src/conf/domain_capabilities.h | 1 +
src/conf/domain_conf.c | 2 +-
src/conf/virconftypes.h | 3 +
src/driver-hypervisor.h | 12 +
src/libvirt-domain-checkpoint.c | 7 +-
src/libvirt-domain.c | 147 +++
src/libvirt_private.syms | 8 +
src/libvirt_public.syms | 6 +
src/qemu/Makefile.inc.am | 2 +
src/qemu/qemu_backup.c | 1039 +++++++++++++++++
src/qemu/qemu_backup.h | 46 +
src/qemu/qemu_blockjob.c | 111 +-
src/qemu/qemu_blockjob.h | 19 +
src/qemu/qemu_capabilities.c | 1 +
src/qemu/qemu_domain.c | 150 ++-
src/qemu/qemu_domain.h | 21 +
src/qemu/qemu_driver.c | 68 +-
src/qemu/qemu_migration.c | 2 +
src/qemu/qemu_monitor.c | 13 +
src/qemu/qemu_monitor.h | 15 +
src/qemu/qemu_monitor_json.c | 33 +
src/qemu/qemu_monitor_json.h | 8 +
src/qemu/qemu_process.c | 25 +
src/remote/remote_driver.c | 2 +
src/remote/remote_protocol.x | 33 +-
src/remote_protocol-structs | 15 +
tests/Makefile.am | 2 +
.../backup-pull-seclabel.xml | 18 +
tests/domainbackupxml2xmlin/backup-pull.xml | 10 +
.../backup-push-seclabel.xml | 17 +
tests/domainbackupxml2xmlin/backup-push.xml | 10 +
tests/domainbackupxml2xmlin/empty.xml | 1 +
.../backup-pull-seclabel.xml | 18 +
tests/domainbackupxml2xmlout/backup-pull.xml | 10 +
.../backup-push-seclabel.xml | 17 +
tests/domainbackupxml2xmlout/backup-push.xml | 10 +
tests/domainbackupxml2xmlout/empty.xml | 1 +
.../domaincapsdata/qemu_1.5.3-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.5.3-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_1.5.3.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.6.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.6.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_1.6.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.7.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_1.7.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_1.7.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.1.1-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.1.1-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.1.1.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.10.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.10.0-tcg.x86_64.xml | 1 +
.../qemu_2.10.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.10.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.11.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.11.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.11.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.12.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml | 1 +
.../qemu_2.12.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.4.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.4.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.4.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.5.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.5.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.5.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.6.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.6.0-tcg.x86_64.xml | 1 +
.../qemu_2.6.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.7.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.7.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.7.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.7.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.8.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.8.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.8.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.8.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.9.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml | 1 +
.../qemu_4.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 1 +
.../qemu_4.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 +
tests/genericxml2xmltest.c | 46 +
tests/qemumonitorjsontest.c | 8 +-
.../qemustatusxml2xmldata/backup-pull-in.xml | 608 ++++++++++
.../qemustatusxml2xmldata/backup-pull-out.xml | 1 +
tests/qemuxml2xmltest.c | 2 +
tests/virschematest.c | 2 +
tools/Makefile.am | 1 +
tools/virsh-backup.c | 151 +++
tools/virsh-backup.h | 21 +
tools/virsh-domain.c | 26 +-
tools/virsh.c | 2 +
tools/virsh.h | 1 +
tools/virsh.pod | 35 +
148 files changed, 3952 insertions(+), 26 deletions(-)
create mode 100644 docs/formatbackup.html.in
create mode 100644 docs/schemas/domainbackup.rng
create mode 100644 src/conf/backup_conf.c
create mode 100644 src/conf/backup_conf.h
create mode 100644 src/qemu/qemu_backup.c
create mode 100644 src/qemu/qemu_backup.h
create mode 100644 tests/domainbackupxml2xmlin/backup-pull-seclabel.xml
create mode 100644 tests/domainbackupxml2xmlin/backup-pull.xml
create mode 100644 tests/domainbackupxml2xmlin/backup-push-seclabel.xml
create mode 100644 tests/domainbackupxml2xmlin/backup-push.xml
create mode 100644 tests/domainbackupxml2xmlin/empty.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-pull-seclabel.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-pull.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-push-seclabel.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-push.xml
create mode 100644 tests/domainbackupxml2xmlout/empty.xml
create mode 100644 tests/qemustatusxml2xmldata/backup-pull-in.xml
create mode 120000 tests/qemustatusxml2xmldata/backup-pull-out.xml
create mode 100644 tools/virsh-backup.c
create mode 100644 tools/virsh-backup.h
--
2.23.0
5 years
[libvirt] [jenkins-ci PATCH 00/22] Add CentOS 8 to libvirt-jenkins-ci
by Fabiano Fidêncio
In order to add CentOS 8 to jenkins-ci, we had to:
- Adjust lcitool to generate unattended scripts based on templates
instead of using the templates themselves, as a new parameter is
expected on kickstart files for RHEL / CentOS 8 (or newer);
- Enable the EPEL and PowerTools repos;
Then, the following projects have been added:
- libvirt
- Some adjustments had to be done as some dependencies got removed from
CentOS 8;
- libvirt-glib
- libvirt-dbus
- Some adjustments had to be done as flake8 doesn't pull all the needed
dependencies when installed on CentOS 8;
- libvirt-go
- libvirt-go-xml
- libvirt-ocaml
- libvirt-perl
- libvirt-python
- virt-viewer
- Some adjustments had to be done as libgovirt-devel and gtk-vnc2-devel
are not present anymore on CentOS 8;
- osinfo-db-tools
- oisnfo-db
- libosinfo
- virt-manager
The projects which were not added due to missing dependencies are:
- libvirt-cim
- libvirt-sandbox
- libvirt-tck
This series is written atop of:
https://www.redhat.com/archives/libvir-list/2019-December/msg00461.html
Fabiano Fidêncio (22):
lcitool: Generate the unattended script file
guests,lcitool: Use install_url in the unattended install files
guests,jenkins: Add CentOS 8
guests: Install EPEL repo on all CentOS guests
guests: Enable PowerTools repo on CentOS 8 guests
guests,jenkins: Build libvirt on CentOS 8 guests
guests,jenkins: Build libvirt-glib on CentOS guests
guests,libvirt-dbus: Add python3-entrypoints dependency
guests,libvirt-dbus: Add python3-mccabe dependency
guests,libvirt-dbus: Add python3-pycodestile dependency
guests,libvirt-dbus: Add python3-pyflakes dependency
guests,jenkins: Build libvirt-dbus on CentOS 8 guests
guests,jenkins: Build libvirt-go on CentOS 8 guests
guests,jenkins: Build libvirt-go-xml on CentOS 8 guests
guests,jenkins: Build libvirt-ocaml on CentOS 8 guests
guests,jenkins: Build libvirt-perl on CentOS 8 guests
guests,jenkins: Build libvirt-python on CentOS 8 guests
guests,jenkins: Build virt-viewer on CentOS 8 guests
guests,jenkins: Build osinfo-db-tools on CentOS 8 guests
guests,jenkins: Build osinfo-db on CentOS 8 guests
guests,jenkins: Build libosinfo on CentOS 8 guests
guests,jenkins: Build virt-manager on CentOS 8 guests
guests/configs/kickstart.cfg | 4 ++++
guests/host_vars/libvirt-centos-8/docker.yml | 2 ++
guests/host_vars/libvirt-centos-8/install.yml | 2 ++
guests/host_vars/libvirt-centos-8/main.yml | 22 ++++++++++++++++++
guests/inventory | 1 +
guests/lcitool | 23 ++++++++++++++++++-
guests/playbooks/build/jobs/defaults.yml | 2 ++
guests/playbooks/build/projects/libosinfo.yml | 1 +
.../playbooks/build/projects/libvirt-dbus.yml | 2 ++
.../build/projects/libvirt-go-xml.yml | 1 +
.../playbooks/build/projects/libvirt-go.yml | 1 +
.../build/projects/osinfo-db-tools.yml | 1 +
.../playbooks/build/projects/virt-manager.yml | 3 +++
guests/playbooks/update/tasks/base.yml | 9 +++++++-
guests/vars/mappings.yml | 16 +++++++++++++
guests/vars/projects/libvirt-dbus.yml | 4 ++++
jenkins/jobs/defaults.yaml | 2 ++
jenkins/projects/libosinfo.yaml | 1 +
jenkins/projects/libvirt-dbus.yaml | 2 ++
jenkins/projects/libvirt-go-xml.yaml | 1 +
jenkins/projects/libvirt-go.yaml | 1 +
jenkins/projects/libvirt.yaml | 1 +
jenkins/projects/osinfo-db-tools.yaml | 1 +
jenkins/projects/virt-manager.yaml | 3 +++
24 files changed, 104 insertions(+), 2 deletions(-)
create mode 100644 guests/host_vars/libvirt-centos-8/docker.yml
create mode 100644 guests/host_vars/libvirt-centos-8/install.yml
create mode 100644 guests/host_vars/libvirt-centos-8/main.yml
--
2.23.0
5 years
[libvirt] [PATCH v2] security: apparmor: Label externalDataStore
by Cole Robinson
Teach virt-aa-helper how to label a qcow2 data_file, tracked internally
as externalDataStore. It should be treated the same as its sibling
disk image
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
v2:
s/src/tmp/
src/security/virt-aa-helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index c93dddb228..f623ff965f 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -918,6 +918,10 @@ storage_source_add_files(virStorageSourcePtr src,
if (add_file_path(tmp, depth, buf) < 0)
return -1;
+ if (tmp->externalDataStore &&
+ storage_source_add_files(tmp->externalDataStore, buf, depth) < 0)
+ return -1;
+
depth++;
}
--
2.23.0
5 years
[libvirt] [PATCH] security: apparmor: Label externalDataStore
by Cole Robinson
Teach virt-aa-helper how to label a qcow2 data_file, tracked internally
as externalDataStore. It should be treated the same as its sibling
disk image
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
Compiled but not runtime tested, I don't have an apparmor setup
src/security/virt-aa-helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 509187ac36..fe6fa12550 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -949,6 +949,10 @@ storage_source_add_files(virStorageSourcePtr src,
if (add_file_path(tmp, depth, buf) < 0)
return -1;
+ if (src->externalDataStore &&
+ storage_source_add_files(src->externalDataStore, buf, depth) < 0)
+ return -1;
+
depth++;
}
--
2.23.0
5 years
[libvirt] [PATCH V3 jenkins-ci 0/2] Add support for openSUSE
by Jim Fehlig
Jim Fehlig (2):
guests: Add support for openSUSE
guests: Add lci build support for openSUSE
guests/configs/autoinst.xml | 77 +++++++++++++++++++
.../host_vars/libvirt-opensuse-151/docker.yml | 2 +
.../libvirt-opensuse-151/install.yml | 2 +
.../host_vars/libvirt-opensuse-151/main.yml | 10 +++
guests/inventory | 1 +
guests/lcitool | 2 +
guests/playbooks/build/jobs/defaults.yml | 1 +
guests/playbooks/build/projects/libvirt.yml | 1 +
guests/playbooks/update/tasks/base.yml | 15 ++++
guests/vars/mappings.yml | 38 ++++++++-
10 files changed, 145 insertions(+), 4 deletions(-)
create mode 100644 guests/configs/autoinst.xml
create mode 100644 guests/host_vars/libvirt-opensuse-151/docker.yml
create mode 100644 guests/host_vars/libvirt-opensuse-151/install.yml
create mode 100644 guests/host_vars/libvirt-opensuse-151/main.yml
--
2.24.0
5 years
[libvirt] libvirt-guests.sh stop
by Henning Schild
Hi all,
the shellscript causing VMs to eventually stop when the host shuts
down/reboots has a window where it can loose ACPI shutdown events.
I have seen VMs not shutting down before they become ACPI aware,
causing the systemd magic to time out for a couple of minutes and
eventually killing the VM.
Steps to reproduce:
- start a new VM
- reboot the host while the VM is still booting up
What happens:
- the ACPI power-button event will get lost
- the systemd loop on the host will go and wait
- the VM will get killed hard eventually
What should happen (probably):
- the retry loop should inject an ACPI power-button-event with every
retry (5s?)
- the VM will eventually have ACPI support and pick up any of the
many button-events
- the VM will shut down on any of the many power-button events, if
there was enough time
I could try to come up with a patch, but i hope the description of the
problem is clear enough so someone else will try.
regards,
Henning
5 years
[libvirt] [PATCH] qemu: domain: raise an error when no emulator is found
by Cole Robinson
$ cat f | grep -e arch -e emulator
<type arch='mipsel'>hvm</type>
$ sudo virsh define f
error: Failed to define domain from f
error: An error occurred, but the cause is unknown
After:
$ sudo virsh define f
error: Failed to define domain from f
error: unsupported configuration: No emulator found for arch 'mipsel'
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/qemu/qemu_domain.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a15364a71e..6f53e17b6a 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4687,8 +4687,12 @@ qemuDomainDefPostParseBasic(virDomainDefPtr def,
/* check for emulator and create a default one if needed */
if (!def->emulator) {
if (!(def->emulator = virQEMUCapsGetDefaultEmulator(
- driver->hostarch, def->os.arch)))
+ driver->hostarch, def->os.arch))) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("No emulator found for arch '%s'"),
+ virArchToString(def->os.arch));
return 1;
+ }
}
return 0;
--
2.23.0
5 years
[libvirt] [PATCH] lxc: Refresh capabilities if they have never been initalized
by Cole Robinson
Adjust virLXCDriverGetCapabilities to fill in driver->caps if it has
never been set, regardless of the passed 'refresh' boolean.
This fixes LXC XML startup parsing for me
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/lxc/lxc_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 2df1537b22..803176f52b 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -186,7 +186,7 @@ virCapsPtr virLXCDriverGetCapabilities(virLXCDriverPtr driver,
bool refresh)
{
virCapsPtr ret;
- if (refresh) {
+ if (refresh || !driver->caps) {
virCapsPtr caps = NULL;
if ((caps = virLXCDriverCapsInit(driver)) == NULL)
return NULL;
--
2.23.0
5 years