[libvirt] [PATCH] lxc.conf: s/QEMU/LXC
by Michal Privoznik
There's one copy paste error where a comment mentions QEMU
instead of LXC driver.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/lxc/lxc.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc.conf b/src/lxc/lxc.conf
index 8df4601..318a536 100644
--- a/src/lxc/lxc.conf
+++ b/src/lxc/lxc.conf
@@ -15,7 +15,7 @@
# The default security driver is SELinux. If SELinux is disabled
# on the host, then the security driver will automatically disable
-# itself. If you wish to disable QEMU SELinux security driver while
+# itself. If you wish to disable LXC SELinux security driver while
# leaving SELinux enabled for the host in general, then set this
# to 'none' instead.
#
--
2.8.4
8 years
[libvirt] [PATCH] qemu: Fix double free when live-attaching shmem
by Martin Kletzander
Function qemuDomainAttachShmemDevice() steals the device data if the
hotplug was successful, but the condition checked for unsuccessful
execution otherwise.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 38c841420e32..a82e58b29f29 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7615,7 +7615,7 @@ qemuDomainAttachDeviceLive(virDomainObjPtr vm,
case VIR_DOMAIN_DEVICE_SHMEM:
ret = qemuDomainAttachShmemDevice(driver, vm,
dev->data.shmem);
- if (ret < 0) {
+ if (!ret) {
alias = dev->data.shmem->info.alias;
dev->data.shmem = NULL;
}
--
2.10.2
8 years
[libvirt] [PATCH] test driver: Deny some operations on inactive domains
by Michal Privoznik
Some operations like reboot, save, coreDump, blockStats,
ifaceStats make sense iff domain is running. While it is
technically possible for our test driver to return success
regardless of domain state, we should copy constraints from
other drivers and thus deny these operations over inactive
domains.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/test/test_driver.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index c5e1a45..236874f 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1867,6 +1867,12 @@ static int testDomainReboot(virDomainPtr domain,
if (!(privdom = testDomObjFromDomain(domain)))
goto cleanup;
+ if (!virDomainObjIsActive(privdom)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ goto cleanup;
+ }
+
virDomainObjSetState(privdom, VIR_DOMAIN_SHUTDOWN,
VIR_DOMAIN_SHUTDOWN_USER);
@@ -1987,6 +1993,12 @@ testDomainSaveFlags(virDomainPtr domain, const char *path,
if (!(privdom = testDomObjFromDomain(domain)))
goto cleanup;
+ if (!virDomainObjIsActive(privdom)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ goto cleanup;
+ }
+
xml = virDomainDefFormat(privdom->def, privconn->caps,
VIR_DOMAIN_DEF_FORMAT_SECURE);
@@ -2185,6 +2197,12 @@ static int testDomainCoreDumpWithFormat(virDomainPtr domain,
if (!(privdom = testDomObjFromDomain(domain)))
goto cleanup;
+ if (!virDomainObjIsActive(privdom)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ goto cleanup;
+ }
+
if ((fd = open(to, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR)) < 0) {
virReportSystemError(errno,
_("domain '%s' coredump: failed to open %s"),
@@ -3064,6 +3082,12 @@ static int testDomainBlockStats(virDomainPtr domain,
if (!(privdom = testDomObjFromDomain(domain)))
return ret;
+ if (!virDomainObjIsActive(privdom)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ goto error;
+ }
+
if (virDomainDiskIndexByName(privdom->def, path, false) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
_("invalid path: %s"), path);
@@ -3103,6 +3127,12 @@ static int testDomainInterfaceStats(virDomainPtr domain,
if (!(privdom = testDomObjFromDomain(domain)))
return -1;
+ if (!virDomainObjIsActive(privdom)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ goto error;
+ }
+
for (i = 0; i < privdom->def->nnets; i++) {
if (privdom->def->nets[i]->ifname &&
STREQ(privdom->def->nets[i]->ifname, path)) {
--
2.8.4
8 years
[libvirt] [PATCH 0/8] qemu: Add support for unavailable-features
by Jiri Denemark
QEMU 2.8.0 adds support for unavailable-features in
query-cpu-definitions reply. The unavailable-features array lists CPU
features which prevent a corresponding CPU model from being usable on
current host. It can only be used when all the unavailable features are
disabled. Empty array means the CPU model can be used without
modifications.
Jiri Denemark (8):
qemu: Add support for unavailable-features
tests: Add QEMU 2.8.0 capabilities data
qemu: Add flags to virQEMUCapsNewForBinaryInternal
qemu: Enable KVM when probing capabilities
qemu: Store loaded QEMU binary ctime in qemuCaps
qemu: Unify cached caps validity checks
qemu: Discard caps cache when KVM availability changes
qemu: Ignore CPU usability when accel doesn't match
src/conf/domain_capabilities.c | 11 +-
src/conf/domain_capabilities.h | 3 +-
src/qemu/qemu_capabilities.c | 196 +-
src/qemu/qemu_capabilities.h | 11 +-
src/qemu/qemu_capspriv.h | 9 +-
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 27 +-
src/qemu/qemu_process.c | 2 +-
.../qemu_2.8.0-kvm-on-tcg.x86_64.xml | 116 +
.../qemu_2.8.0-tcg-on-kvm.x86_64.xml | 116 +
.../domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml | 116 +
tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 116 +
tests/domaincapstest.c | 16 +
.../caps_2.8.0-tcg.x86_64.replies | 5239 ++++++++++++++++++++
.../qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml | 260 +
.../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 5176 +++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 260 +
tests/qemucapabilitiestest.c | 2 +
tests/qemucapsprobe.c | 18 +-
tests/qemumonitorjsontest.c | 25 +-
tests/qemuxml2argvtest.c | 12 +-
tests/testutilsqemu.c | 3 +-
22 files changed, 11655 insertions(+), 80 deletions(-)
create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-kvm-on-tcg.x86_64.xml
create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-tcg-on-kvm.x86_64.xml
create mode 100644 tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml
create mode 100644 tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0-tcg.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
--
2.10.2
8 years
[libvirt] [PATCH] docs: add note about when lxc: XML namespace was added
by Daniel P. Berrange
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as a trivial patch
docs/drvlxc.html.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in
index 3dc9d59..4f86535 100644
--- a/docs/drvlxc.html.in
+++ b/docs/drvlxc.html.in
@@ -611,6 +611,10 @@ ignored.
</domain>
</pre>
+<p>
+The use of namespace passthrough requires libvirt >= 1.2.19
+</p>
+
<h2><a name="usage">Container usage / management</a></h2>
<p>
--
2.9.3
8 years
[libvirt] [PATCH] qemu: Only allow 'raw' format for scsi-block using virtio-scsi
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1379196
Add check in qemuCheckDiskConfig for an invalid combination
of using the 'scsi' bus for a block 'lun' device and any disk
source format other than 'raw'.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_command.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 96c4f31..9adf0fe 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1238,6 +1238,14 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk)
return -1;
}
+ if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI &&
+ disk->src->format != VIR_STORAGE_FILE_RAW) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("disk device 'lun' using target 'scsi' must use "
+ "'raw' format"));
+ return -1;
+ }
+
if (qemuDomainDefValidateDiskLunSource(disk->src) < 0)
return -1;
--
2.7.4
8 years
[libvirt] [PATCH 0/2] List only online cpus for vcpupin/emulatorpin when vcpu placement static
by Nitesh Konkar
From: nitesh konkar <niteshkonkar.libvirt(a)gmail.com>
Currently when the vcpu placement is static and
cpuset is not specified, CPU Affinity shows 0..
CPUMAX. This patchset will result in display of
only online CPU's under CPU Affinity.
nitesh konkar (2):
conf: List only online cpus under CPU Affinity for virsh vcpupin.
conf: List only online cpus under CPU Affinity for virsh emulatorpin
src/conf/domain_conf.c | 3 +++
src/qemu/qemu_driver.c | 2 ++
2 files changed, 5 insertions(+)
--
2.1.0
8 years
[libvirt] [PATCH] Test driver should error when domain destroy twice
by Félix Bouliane
Fixes the behavior when destroying a domain more than once.
VIR_ERR_OPERATION_INVALID should be raised when destroying an
already destroyed domain.
---
src/test/test_driver.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 51fb7c8..42adbad 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1735,6 +1735,12 @@ static int testDomainDestroy(virDomainPtr domain)
if (!(privdom = testDomObjFromDomain(domain)))
goto cleanup;
+ if (!virDomainObjIsActive(privdom)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is not running"));
+ goto cleanup;
+ }
+
testDomainShutdownState(domain, privdom, VIR_DOMAIN_SHUTOFF_DESTROYED);
event = virDomainEventLifecycleNewFromObj(privdom,
VIR_DOMAIN_EVENT_STOPPED,
--
2.9.3
8 years
[libvirt] [PATCH v2 00/11] clean up after "slot sharing" patches
by Laine Stump
(this is just a rebase of the v1 patches to make review easier)
Some of the patches that enabled sharing PCI slots by multiple
pcie-root-ports made the idea of reserving an entire slot obsolete. To
reduce confusion and misunderstandings, this patch series gets rid of
the name "Slot" in all of the functions that reserve and release PCI
addresses.
None of these patches affect any functional change.
This is a lot of patches, but each patch is trivial, I promise - most
are simply renaming a single function, or changing one argument to
some calls to a function.
Laine Stump (11):
conf: fix fromConfig argument to virDomainPCIAddressReserveAddr()
conf: fix fromConfig argument to virDomainPCIAddressValidate()
conf: rename virDomainPCIAddressGetNextSlot() to ...GetNextAddr()
conf: eliminate virDomainPCIAddressReserveNextSlot()
qemu: replace virDomainPCIAddressReserveAddr with
virDomainPCIAddressReserveSlot
conf: make virDomainPCIAddressReserveAddr() a static function
conf: rename virDomainPCIAddressReserveAddr() to ...Internal()
conf: rename virDomainPCIAddressReserveSlot() to ...Addr()
qemu: remove qemuDomainPCIAddressReserveNextAddr()
qemu: rename qemuDomainPCIAddressReserveNextSlot() to ...Addr()
conf: eliminate virDomainPCIAddressReleaseSlot() in favor of ...Addr()
src/bhyve/bhyve_device.c | 26 ++++++----
src/conf/domain_addr.c | 60 +++++------------------
src/conf/domain_addr.h | 15 ------
src/libvirt_private.syms | 4 +-
src/qemu/qemu_domain_address.c | 105 ++++++++++++++++++++---------------------
5 files changed, 80 insertions(+), 130 deletions(-)
--
2.7.4
8 years
[libvirt] [PATCH 0/6] Add group_name support for <iotune>
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1336564
Add support for "group" name in <iotune>.
The odd thing about the <iotune> group name is that support was added
in qemu after the _max parameters, but before the _max_length - so when
building the command line - that needs to be followed.
At least it's far less complicated than the _length parameters.
John Ferlan (6):
include: Add new "group_name" definition for iotune throttling
caps: Add new capability for the iotune group name
qemu: Add support for parsing iotune group setting
conf: Add support for blkiotune group_name option
qemu: Add the group name option to the iotune command line
virsh: Add group name to blkdeviotune output
docs/formatdomain.html.in | 11 ++++
docs/schemas/domaincommon.rng | 5 ++
include/libvirt/libvirt-domain.h | 15 +++++
src/conf/domain_conf.c | 10 +++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 13 ++++
src/qemu/qemu_driver.c | 50 +++++++++++++--
src/qemu/qemu_monitor.c | 2 +
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 21 +++++-
src/qemu/qemu_monitor_json.h | 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 | 1 +
.../caps_2.6.0-gicv3.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
tests/qemumonitorjsontest.c | 74 +++++++++++++++++-----
.../qemuxml2argv-blkdeviotune-group-num.args | 32 ++++++++++
.../qemuxml2argv-blkdeviotune-group-num.xml | 61 ++++++++++++++++++
tests/qemuxml2argvtest.c | 4 ++
.../qemuxml2xmlout-blkdeviotune-group-num.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
tools/virsh-domain.c | 17 +++++
tools/virsh.pod | 5 +-
28 files changed, 309 insertions(+), 26 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-group-num.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-group-num.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-blkdeviotune-group-num.xml
--
2.7.4
8 years