[libvirt] vms hung
by Umar Draz
Hello,
I am running libvirt-2.0.0-10.el7_3.2.x86_64 on CentOS 7.3, I have few vms
of CentOS and Windows 2012 servers.
Randomly they are hung, but the status of virtual machine keep running, vnc
and network not responding.
I have checked all /var/log/messages and /var/log/libvirt/qemu/vm.log but
nothing found anything wrong.
Would you please help what should I do more so I can find the issue.
-- Umar
7 years, 11 months
[libvirt] [PATCH] tests: fix compilation of shunloadtest
by Jim Fehlig
While local builds succeed fine, a build worker building in a
chroot environment is encountering the following error with
libvirt 3.0.0 release candidates
[ 162s] shunloadtest.o: In function `main':
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:110: undefined reference to `dlopen'
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:114: undefined reference to `dlsym'
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:133: undefined reference to `dlclose'
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:111: undefined reference to `dlerror'
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:115: undefined reference to `dlerror'
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:116: undefined reference to `dlclose'
Fix by appending LDADDS to shunloadtest_LDADD.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c7d4748..112396f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1348,7 +1348,7 @@ libshunload_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
shunloadtest_SOURCES = \
shunloadtest.c
-shunloadtest_LDADD = $(LIB_PTHREAD)
+shunloadtest_LDADD = $(LIB_PTHREAD) $(LDADDS)
shunloadtest_DEPENDENCIES = libshunload.la
sysinfotest_SOURCES = \
--
2.9.2
7 years, 11 months
[libvirt] [PATCH] qemu: catch failure of drive_add
by Daniel P. Berrange
Previously when QEMU failed "drive_add" due to an error opening
a file it would report
"could not open disk image"
These days though, QEMU reports
"Could not open '/tmp/virtd-test_e3hnhh5/disk1.qcow2': Permission denied"
which we were not detecting as an error condition.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu_monitor_text.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index bc83218..76d7497 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -1959,6 +1959,16 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
goto cleanup;
}
+ if (strstr(reply, "Could not open")) {
+ size_t len = strlen(reply);
+ if (reply[len - 1] == '\n') {
+ reply[len - 1] = '\0';
+ }
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ reply);
+ goto cleanup;
+ }
+
ret = 0;
cleanup:
--
2.9.3
7 years, 11 months
[libvirt] [PATCH] tests: fix QED disk test in xlconfigtest
by Jim Fehlig
When LIBXL_HAVE_QED is defined, xlconfigtest fails
9) Xen XL-2-XML Format disk-qed ... command line: config parsing error
in disk specification: no vdev specified in
`target=/var/lib/libvirt/images/XenGuest2,format=qed,backendtype=qdisk,vdev=hda,access=rw'
FAILED
As per the xl-disk-configuration(5) man page, target= must come
last in the disk specification when specified by name:
When this parameter is specified by name, ie with the target=
syntax in the configuration file, it consumes the whole rest of the
DISKSPEC including trailing whitespaces. Therefore in that case
it must come last.
Change tests/xlconfigdata/test-disk-qed.cfg to adhere to this
restriction.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
tests/xlconfigdata/test-disk-qed.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/xlconfigdata/test-disk-qed.cfg b/tests/xlconfigdata/test-disk-qed.cfg
index ee904e0..7842176 100644
--- a/tests/xlconfigdata/test-disk-qed.cfg
+++ b/tests/xlconfigdata/test-disk-qed.cfg
@@ -22,4 +22,4 @@ parallel = "none"
serial = "none"
builder = "hvm"
boot = "d"
-disk = [ "target=/var/lib/libvirt/images/XenGuest2,format=qed,backendtype=qdisk,vdev=hda,access=rw" ]
+disk = [ "format=qed,backendtype=qdisk,vdev=hda,access=rw,target=/var/lib/libvirt/images/XenGuest2" ]
--
2.9.2
7 years, 11 months
[libvirt] [PATCH v3 0/2] Fabric name must not be required for fc_host capability
by Boris Fiuczynski
fabric_name is one of many fc_host attributes in Linux that is optional
and left to the low-level driver to decide if it is implemented.
---
Changes sinve v2:
- removed virReadFCHostOption method
- changed additional file check to be used permanently
Changes since v1:
- split of minor correction in documenting comment
- added news entry...
- added new virReadFCHostOption method
- added check for file existence when optional is set
- rearranged fchost tests to fit the numbering
---
Boris Fiuczynski (2):
util: add file exists check in virReadFCHost
nodedev: Fabric name must not be required for fc_host capability
docs/formatnode.html.in | 2 +-
docs/news.xml | 12 ++++++++++
docs/schemas/nodedev.rng | 8 ++++---
src/node_device/node_device_linux_sysfs.c | 9 +++----
src/util/virutil.c | 5 +++-
tests/fchostdata/fc_host/host6/node_name | 1 +
tests/fchostdata/fc_host/host6/port_name | 1 +
tests/fchostdata/fc_host/host6/port_state | 1 +
tests/fchosttest.c | 40 ++++++++++++++++++++++++++++++-
9 files changed, 67 insertions(+), 12 deletions(-)
create mode 100644 tests/fchostdata/fc_host/host6/node_name
create mode 100644 tests/fchostdata/fc_host/host6/port_name
create mode 100644 tests/fchostdata/fc_host/host6/port_state
--
2.5.5
7 years, 11 months
[libvirt] [PATCH 0/2] security: Fix the transaction model's list appending
by Erik Skultety
The problem lies in how elements are appended into the transaction list -
instead of making a deep copy of a string we were doing a shallow copy only.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1413773
Erik Skultety (2):
security: DAC: fix the transaction model's list append
security: SELinux: fix the transaction model's list append
src/security/security_dac.c | 30 +++++++++++++++++++++---------
src/security/security_selinux.c | 30 +++++++++++++++++++++---------
2 files changed, 42 insertions(+), 18 deletions(-)
--
2.10.2
7 years, 11 months
[libvirt] [PATCH] qemu: Don't leak hostCPUModelInfo in virQEMUCaps
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.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 2512e4838..89e9dd471 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2215,6 +2215,7 @@ void virQEMUCapsDispose(void *obj)
VIR_FREE(qemuCaps->gicCapabilities);
+ qemuMonitorCPUModelInfoFree(qemuCaps->hostCPUModelInfo);
virCPUDefFree(qemuCaps->hostCPUModel);
}
--
2.11.0
7 years, 11 months
[libvirt] [PATCH] qemu: Actually unshare() iff running as root
by Michal Privoznik
While all the code that deals with qemu namespaces correctly
detects whether we are running as root (and turn into NO-OP for
qemu:///session) the actual unshare() call is not guarded with
such check. Therefore any attempt to start a domain under
qemu:///session shall fail as unshare() is reserved for root.
The fix consists of moving unshare() call (for which we have a
wrapper called virProcessSetupPrivateMountNS) into
qemuDomainBuildNamespace() where the proper check is performed.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 3 +++
src/qemu/qemu_process.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 35baffb51..c67604222 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7400,6 +7400,9 @@ qemuDomainBuildNamespace(virQEMUDriverPtr driver,
goto cleanup;
}
+ if (virProcessSetupPrivateMountNS() < 0)
+ goto cleanup;
+
if (qemuDomainSetupDev(driver, vm, devPath) < 0)
goto cleanup;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index a980f5a9e..184440dc1 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2663,9 +2663,6 @@ static int qemuProcessHook(void *data)
if (virSecurityManagerClearSocketLabel(h->driver->securityManager, h->vm->def) < 0)
goto cleanup;
- if (virProcessSetupPrivateMountNS() < 0)
- goto cleanup;
-
if (qemuDomainBuildNamespace(h->driver, h->vm) < 0)
goto cleanup;
--
2.11.0
7 years, 11 months
[libvirt] How to generate better API documentation?
by Michal Privoznik
Dear list,
now that we more or less agreed to use some new features (i.e. automatic free() when a variable goes out of the scope [1]), and with our NEWS efforts, do you think it is finally the right time to fix generation of our API docs too?
What I mean? Look here: [2] People use '@variable' notation hoping that the generator will put a link there. Or that our generator would allow us to:
typedef enum {
A = X,
B = Y,
C = Z,
# ifdef VIR_ENUM_SENTINELS
VIR_ENUM_LAST
# endif
} virEnum;
where X, Y, Z come from another enum.
Long story short, our documentation generator has a lot of bugs. What if instead of putting our effort in fixing it we would switch to something that is already available on the market? gtk-doc, doxygen, etc. Personally, I don't have any preference. Just want to know what your opinion is.
Again, if I get a green light I can put it onto the list of GSoC projects [3].
Michal
1: https://www.redhat.com/archives/libvir-list/2017-January/msg00323.html
2: http://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEvent...
3: http://wiki.libvirt.org/page/Google_Summer_of_Code_2017
7 years, 11 months
[libvirt] [PATCH v5 0/3] gluster: cache glfs connection object per volume
by Prasanna Kumar Kalever
v5: Address review comments from Peter on v4
Dropping Patch 3 from v3
Patch 1: fix transport type in all drivers, possible switch case converts
Patch 2: use virObject with src->drv to avoid 'initFlag' for
remembering 'virStorageFileInit' status
Patch 3:
* change virStorageBackendGlusterCacheQuery to *Lookup
* change virStorageBackendGlusterCacheRefresh to *Release
* Avoid the global Flags
* Thread safe measure by using virCond*
Thanks Peter!
v4: Address review comments from Peter on v3
Patch 1: changes to fix test failures
(qemuargv2xmltest, qemuxml2argvtest, qemuxml2xmltest and virstoragetest)
Patch 2: fix hung in qemuxml2argvtest
Patch 3 v3: Split this Patch to 2 parts as below
Patch 3 v4: don't free metadata used for storage driver access
Patch 4:
* update variable naming as per standards
* virStorageBackendGlusterPreopened* -> virStorageBackendGlusterCache*
Thanks Peter!
v3: Address comments by Daniel and Peter on v2
* Split the patch to 3 parts
Patch 1: change the virStorageNetHostDef type
Patch 2: optimize calls to virStorageFileInit and friends
Patch 3: add the caching for glfs
* Thanks to Daniel, this version make all the methods as thread safe
* Thanks to Peter for pointing use of virObjectLockable, this had simplified
rest of the parts a lot.
v2: Address review comments from Peter on v1
* Rebased on latest master
* Changes to commit msg
* Introduce storage API's for Register and Unregister of volume
* During qemu process Start/Stop and snapshot create
* Check Transport and Port type
* Atomic element add/del to list and ref counting
Pending: Treating IP and FQDN belong to same host
v1: Initial patch
Prasanna Kumar Kalever (3):
util: change the virStorageNetHostDef type
storage: optimize calls to virStorageFileInit and friends
gluster: cache glfs connection object per volume
src/conf/domain_conf.c | 60 +++--
src/libxl/libxl_conf.c | 10 +-
src/qemu/qemu_command.c | 97 ++++---
src/qemu/qemu_domain.c | 25 +-
src/qemu/qemu_domain.h | 8 +-
src/qemu/qemu_driver.c | 26 +-
src/qemu/qemu_parse_command.c | 50 ++--
src/qemu/qemu_process.c | 49 ++++
src/qemu/qemu_process.h | 4 +
src/storage/storage_backend.h | 1 +
src/storage/storage_backend_fs.c | 5 +
src/storage/storage_backend_gluster.c | 329 ++++++++++++++++++++---
src/storage/storage_driver.c | 40 ++-
src/storage/storage_driver.h | 2 +
src/util/virstoragefile.c | 93 ++++---
src/util/virstoragefile.h | 21 +-
src/xenconfig/xen_xl.c | 10 +-
tests/domainsnapshotxml2xmlin/disk_snapshot.xml | 2 +-
tests/domainsnapshotxml2xmlout/disk_snapshot.xml | 2 +-
tests/virstoragetest.c | 2 +-
20 files changed, 614 insertions(+), 222 deletions(-)
--
2.7.4
7 years, 11 months