[libvirt] [PATCH] qemu.conf: Clarify the various _tls_x509_cert_dir descriptions
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1458630
Apparantly commit id 'dc4c2f75a' wasn't specific enough, so here's
a few more clarifications.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu.conf | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 2e8370a5a8..6ec893ac1f 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -13,8 +13,9 @@
#
# dh-params.pem - the DH params configuration file
#
-# If the directory does not exist or contain the necessary files, QEMU
-# domains will fail to start if they are configured to use TLS.
+# If the directory does not exist, libvirtd will fail to start. If the
+# directory doesn't contain the necessary files, QEMU domains will fail
+# to start if they are configured to use TLS.
#
# In order to overwrite the default path alter the following. This path
# definition will be used as the default path for other *_tls_x509_cert_dir
@@ -87,8 +88,9 @@
# In order to override the default TLS certificate location for
# vnc certificates, supply a valid path to the certificate directory.
-# If the provided path does not exist then the default_tls_x509_cert_dir
-# path will be used.
+# If the provided path does not exist, libvirtd will fail to start.
+# If the path is not provided, but vnc_tls = 1, then the
+# default_tls_x509_cert_dir path will be used.
#
#vnc_tls_x509_cert_dir = "/etc/pki/libvirt-vnc"
@@ -172,8 +174,9 @@
# In order to override the default TLS certificate location for
# spice certificates, supply a valid path to the certificate directory.
-# If the provided path does not exist then the default_tls_x509_cert_dir
-# path will be used.
+# If the provided path does not exist, libvirtd will fail to start.
+# If the path is not provided, but spice_tls = 1, then the
+# default_tls_x509_cert_dir path will be used.
#
#spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"
@@ -224,8 +227,9 @@
# In order to override the default TLS certificate location for character
# device TCP certificates, supply a valid path to the certificate directory.
-# If the provided path does not exist then the default_tls_x509_cert_dir
-# path will be used.
+# If the provided path does not exist, libvirtd will fail to start.
+# If the path is not provided, but chardev_tls = 1, then the
+# default_tls_x509_cert_dir path will be used.
#
#chardev_tls_x509_cert_dir = "/etc/pki/libvirt-chardev"
@@ -276,8 +280,9 @@
# This is used to authenticate the VxHS block device clients to the VxHS
# server.
#
-# If the provided path does not exist then the default_tls_x509_cert_dir
-# path will be used.
+# If the provided path does not exist, libvirtd will fail to start.
+# If the path is not provided, but vxhs_tls = 1, then the
+# default_tls_x509_cert_dir path will be used.
#
# VxHS block device clients expect the client certificate and key to be
# present in the certificate directory along with the CA master certificate.
@@ -294,7 +299,8 @@
# In order to override the default TLS certificate location for migration
# certificates, supply a valid path to the certificate directory. If the
-# provided path does not exist then the default_tls_x509_cert_dir path
+# provided path does not exist, libvirtd will fail to start. If the path is
+# not provided, but migrate_tls = 1, then the default_tls_x509_cert_dir path
# will be used. Once/if a default certificate is enabled/defined, migration
# will then be able to use the certificate via migration API flags.
#
--
2.13.6
7 years, 1 month
[libvirt] [PATCH v2] qemu: change monitor.sock from /var/lib/libvirt/qemu/domain-*** to /var/run/libvirt/qemu/domain-***
by xinhua.Cao
directory /var/lib alway is Persistence directory, but in redhat system, /var/run is memory directory.
our running domain xml is saved at /var/run/libvirt/qemu. so if we cold reset system,
the /var/run/libvirt/qemu directory is clear, but /var/lib/libvirt/qemu/domain-*** is saved. so there
have same /var/lib/libvirt/qemu/domain-*** directory will be left over at system cold reset.
---
src/qemu/qemu_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ed27a91..3e6fe9b 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1674,7 +1674,7 @@ qemuDomainSetPrivatePaths(virQEMUDriverPtr driver,
goto cleanup;
if (!priv->libDir &&
- virAsprintf(&priv->libDir, "%s/domain-%s", cfg->libDir, domname) < 0)
+ virAsprintf(&priv->libDir, "%s/domain-%s", cfg->stateDir, domname) < 0)
goto cleanup;
if (!priv->channelTargetDir &&
--
2.8.3
7 years, 1 month
[libvirt] [REPOST PATCH 0/4] Add the ability to LUKS encrypt during LV creation
by John Ferlan
Repost to address merge conflict from commit id '0a294a8e2' which
used if (virStorageSourceHasBacking(&vol->target)) instead of
if (vol->target.backingStore).
Original series:
https://www.redhat.com/archives/libvir-list/2017-October/msg00340.html
John Ferlan (4):
storage: Extract out the LVCREATE
storage: Introduce virStorageBackendCreateVolUsingQemuImg
storage: Allow creation of a LUKS using logical volume
docs: Add news article
docs/news.xml | 13 ++++++
src/storage/storage_backend_logical.c | 75 ++++++++++++++++++++---------------
src/storage/storage_util.c | 42 ++++++++++++++++++++
src/storage/storage_util.h | 8 ++++
4 files changed, 105 insertions(+), 33 deletions(-)
--
2.13.6
7 years, 1 month
[libvirt] [PATCH 0/5] Properly resize a local LUKS encrypted volume
by John Ferlan
The patches hopefully speak for themselves.
John Ferlan (5):
storage: Alter args to storageBackendResizeQemuImg
storage: Add error path for virStorageBackendCreateQemuImgCmdFromVol
storage: Alter storageBackendCreateQemuImgSecretObject args
storage: Properly resize a local volume using LUKS
docs: Add news article for bug fix
docs/news.xml | 8 +++
src/storage/storage_util.c | 133 ++++++++++++++++++++++++++++++++++++---------
2 files changed, 115 insertions(+), 26 deletions(-)
--
2.13.6
7 years, 1 month
[libvirt] [PATCH] qemu: Fix memory leak in virQEMUCapsLoadCPUModels
by Marc Hartmayer
Don't leak @blockNodes in the loop.
==226576== 7,120 bytes in 60 blocks are definitely lost in loss record 122 of 125
==226576== at 0x4835214: calloc (vg_replace_malloc.c:711)
==226576== by 0x4950D7B: virAllocN (viralloc.c:191)
==226576== by 0x49EB5BB: virXPathNodeSet (virxml.c:676)
==226576== by 0x104DB67: virQEMUCapsLoadCPUModels (qemu_capabilities.c:3738)
==226576== by 0x105510D: virQEMUCapsLoadCache (qemu_capabilities.c:3929)
==226576== by 0x104459F: qemuTestParseCapabilities (testutilsqemu.c:498)
==226576== by 0x1040DC9: testQemuCapsCopy (qemucapabilitiestest.c:105)
==226576== by 0x1041F07: virTestRun (testutils.c:180)
==226576== by 0x1040B45: mymain (qemucapabilitiestest.c:181)
==226576== by 0x104320F: virTestMain (testutils.c:1119)
==226576== by 0x1041149: main (qemucapabilitiestest.c:193)
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
src/qemu/qemu_capabilities.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 6cea1ccfa50b..7cb091056b48 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3758,6 +3758,7 @@ virQEMUCapsLoadCPUModels(virQEMUCapsPtr qemuCaps,
goto cleanup;
}
}
+ VIR_FREE(blockerNodes);
}
if (virDomainCapsCPUModelsAddSteal(cpus, &str, usable, &blockers) < 0)
--
2.5.5
7 years, 1 month
[libvirt] [PATCH v2 00/22] Fix host-model if the chosen CPU model has more features in QEMU compared to our cpu_map.xml
by Jiri Denemark
When decoding CPUID data to virCPUDef we need to be careful about using
a CPU model which cannot be directly used on the current host. Normally,
libvirt would notice the features which prevent the model from being
usable and it would disable them in the computed virCPUDef, but this
won't work in case the definition of the CPU model in QEMU contains more
features than what we have in cpu_map.xml. We need to count with the
usability blockers we got from QEMU and explicitly disable all of them
to make the computed virCPUDef usable.
https://bugzilla.redhat.com/show_bug.cgi?id=1464832
See individual patches for diff from version 1. However, most patches
were acked in v1 and were not changed.
Jiri Denemark (22):
util: Introduce virStringListCopy
conf: Add usability blockers to virDomainCapsCPUModel
qemu: Store CPU usability blockers in caps cache
qemu: Parse unavailable features for CPU models
cpu: Use virDomainCapsCPUModelsPtr in cpu driver APIs
cpu: Drop unused parameter from cpuDecode
conf: Introduce virDomainCapsCPUModelsGet
cpu_x86: Move x86FeatureFind* to avoid forward prototypes
cpu_x86: Disable blockers from unusable CPU models
cputest: Replace bool with cpuTestCPUIDJson enum
cputest: Avoid calling json_reformat in cpu-parse.sh
cputest: Print correct feature in virCPUUpdateLive test
cputest: Test CPU usability blockers
cputest: Separate QEMUCaps creation from cpuTestCPUIDJson
cputest: Use CPU models from QEMU when available
cputest: Add query-cpu-definitions reply for Core-i5-2540M
cputest: Add CPUID data for Intel(R) Xeon(R) CPU E7-4830
cputest: Add query-cpu-definitions reply for Xeon-E7-4830
cputest: Update Xeon-E3-1245 data
cputest: Add query-cpu-definitions reply for Xeon-E3-1245
cputest: Update Core-i7-2600 data
cputest: Make a crippled version of Core-i7-2600
src/conf/domain_capabilities.c | 48 +-
src/conf/domain_capabilities.h | 11 +-
src/cpu/cpu.c | 89 +-
src/cpu/cpu.h | 30 +-
src/cpu/cpu_arm.c | 3 +-
src/cpu/cpu_ppc64.c | 14 +-
src/cpu/cpu_x86.c | 109 +-
src/libvirt_private.syms | 1 +
src/libxl/libxl_capabilities.c | 2 +-
src/libxl/libxl_driver.c | 2 +-
src/qemu/qemu_capabilities.c | 123 +--
src/qemu/qemu_capabilities.h | 6 +-
src/qemu/qemu_capspriv.h | 5 +
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_monitor.c | 2 +
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 28 +-
src/qemu/qemu_process.c | 9 +-
src/test/test_driver.c | 2 +-
src/util/virstring.c | 37 +
src/util/virstring.h | 3 +
tests/cputest.c | 325 ++++--
tests/cputestdata/cpu-cpuid.py | 26 +-
tests/cputestdata/cpu-gather.sh | 1 +
tests/cputestdata/cpu-parse.sh | 2 +-
tests/cputestdata/cpu-reformat.py | 9 +
tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json | 362 +++++++
.../x86_64-cpuid-Core-i7-2600-disabled.xml | 1 -
.../x86_64-cpuid-Core-i7-2600-enabled.xml | 1 +
.../cputestdata/x86_64-cpuid-Core-i7-2600-json.xml | 1 +
...x86_64-cpuid-Core-i7-2600-xsaveopt-disabled.xml | 6 +
.../x86_64-cpuid-Core-i7-2600-xsaveopt-enabled.xml | 8 +
.../x86_64-cpuid-Core-i7-2600-xsaveopt-guest.xml | 25 +
.../x86_64-cpuid-Core-i7-2600-xsaveopt-host.xml | 25 +
.../x86_64-cpuid-Core-i7-2600-xsaveopt-json.xml | 11 +
.../x86_64-cpuid-Core-i7-2600-xsaveopt.json | 615 +++++++++++
.../x86_64-cpuid-Core-i7-2600-xsaveopt.xml | 33 +
tests/cputestdata/x86_64-cpuid-Core-i7-2600.json | 496 ++++++++-
tests/cputestdata/x86_64-cpuid-Core-i7-2600.xml | 6 +-
.../x86_64-cpuid-Xeon-E3-1245-disabled.xml | 1 -
.../x86_64-cpuid-Xeon-E3-1245-enabled.xml | 2 +-
.../cputestdata/x86_64-cpuid-Xeon-E3-1245-json.xml | 1 +
tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.json | 712 +++++++++----
tests/cputestdata/x86_64-cpuid-Xeon-E3-1245.xml | 7 +-
.../x86_64-cpuid-Xeon-E7-4830-disabled.xml | 5 +
.../x86_64-cpuid-Xeon-E7-4830-enabled.xml | 8 +
.../x86_64-cpuid-Xeon-E7-4830-guest.xml | 28 +
.../cputestdata/x86_64-cpuid-Xeon-E7-4830-host.xml | 29 +
.../cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml | 14 +
tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json | 657 ++++++++++++
tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.xml | 30 +
tests/domaincapstest.c | 6 +-
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1102 ++++++++++++++++++--
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 236 ++++-
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 154 ++-
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 154 ++-
56 files changed, 4938 insertions(+), 688 deletions(-)
create mode 100755 tests/cputestdata/cpu-reformat.py
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-disabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-enabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-guest.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-host.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt-json.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt.json
create mode 100644 tests/cputestdata/x86_64-cpuid-Core-i7-2600-xsaveopt.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-disabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-enabled.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-guest.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-host.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830-json.xml
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.json
create mode 100644 tests/cputestdata/x86_64-cpuid-Xeon-E7-4830.xml
--
2.14.2
7 years, 1 month
[libvirt] [jenkins-ci PATCH] guests: disable glusterfs on FreeBSD
by Pavel Hrdina
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
guests/vars/mappings.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index cae9d23..828690e 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -118,7 +118,6 @@ mappings:
glusterfs:
deb: glusterfs-client
- pkg: glusterfs
rpm: glusterfs-api-devel
gnome-common:
--
2.13.6
7 years, 1 month
[libvirt] [PATCH go-xml] Add address support for memory device
by zhenwei.pi
Add Base element for DomainAddress.
Add address element for DomainMemorydev.
Add test code for new DomainMemorydev.
Signed-off-by: zhenwei.pi <zhenwei.pi(a)youruncloud.com>
---
domain.go | 2 ++
domain_test.go | 9 +++++++++
2 files changed, 11 insertions(+)
diff --git a/domain.go b/domain.go
index bacab11..3d9404f 100644
--- a/domain.go
+++ b/domain.go
@@ -297,6 +297,7 @@ type DomainAddress struct {
Function *HexUint `xml:"function,attr"`
Target *uint `xml:"target,attr"`
Unit *uint `xml:"unit,attr"`
+ Base *HexUint `xml:"base,attr"`
}
type DomainConsole struct {
@@ -450,6 +451,7 @@ type DomainMemorydev struct {
Model string `xml:"model,attr"`
Access string `xml:"access,attr"`
Target *DomainMemorydevTarget `xml:"target"`
+ Address *DomainAddress `xml:"address"`
}
type DomainDeviceList struct {
diff --git a/domain_test.go b/domain_test.go
index dbebe42..cbc5d7f 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -66,6 +66,9 @@ var vcpuId0 uint = 0
var vcpuOrder0 uint = 1
var vcpuId1 uint = 1
+var memorydevAddressSlot HexUint = 0
+var memorydevAddressBase HexUint = 4294967296
+
var domainTestData = []struct {
Object Document
Expected []string
@@ -385,6 +388,11 @@ var domainTestData = []struct {
Value: 0,
},
},
+ Address: &DomainAddress{
+ Type: "dimm",
+ Slot: &memorydevAddressSlot,
+ Base: &memorydevAddressBase,
+ },
},
},
},
@@ -434,6 +442,7 @@ var domainTestData = []struct {
` <size unit="GiB">1</size>`,
` <node>0</node>`,
` </target>`,
+ ` <address type="dimm" slot="0" base="4294967296"></address>`,
` </memory>`,
` </devices>`,
`</domain>`,
--
2.7.4
7 years, 1 month
[libvirt] [PATCH] qemu: logrotate: drop minsize directive
by Jim Fehlig
On a cloud host it is possible to create 100's of unique instances
per day, each leaving behind a /var/log/libvirt/qemu/instance-name.log
file that is < 100k. With the current 'minsize 100k' directive, these
files are never rotated and hence never removed. Over months of time,
tens of thousands of these files can accumulate on the host.
Dropping 'minsize 100k' allows rotating small files, which will
increase the number of log files, but 'rotate 4' ensures they will
be removed after a month.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
daemon/libvirtd.qemu.logrotate.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/daemon/libvirtd.qemu.logrotate.in b/daemon/libvirtd.qemu.logrotate.in
index 15cf019b2..cdb399ef2 100644
--- a/daemon/libvirtd.qemu.logrotate.in
+++ b/daemon/libvirtd.qemu.logrotate.in
@@ -5,5 +5,4 @@
compress
delaycompress
copytruncate
- minsize 100k
}
--
2.14.2
7 years, 1 month