[libvirt] Strange periodic failures of the commandtest case
by Daniel P. Berrange
I'm getting periodic failures of the 'commandtest' case where the diff
is
> DAEMON:no
--
< DAEMON:yes
For test cases 'test3' through to 'test15', except 'test'4. Tests 1,
2, 4, 16, 17, 18 are all unaffected. I can never reproduce it when
I run just that one test case manually, but the automated builds
I'm doing hit it > 50% of the time so it is clearly some kind of race
condition. The line of code that's getting confused is this
fprintf(log, "DAEMON:%s\n", getpgrp() == getsid(0) ? "yes" : "no");
but I'm not clear how this can be going wrong. Ideas ?
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
13 years, 8 months
[libvirt] [PATCH] Fix cleanup on VM state after failed QEMU startup
by Daniel P. Berrange
Commit 9962e406c664ed5521f5aca500c860a331cb3979 introduced a
problem where if the VM failed to startup, it would not be
correctly cleaned up. Amongst other things the SELinux
security label would not be removed, which prevents the VM
from ever starting again.
The virDomainIsActive() check at the start of qemudShutdownVMDaemon
checks for vm->def->id not being -1. By moving the assignment of the
VM id to the start of qemudStartVMDaemon, we can ensure cleanup will
occur on failure
* src/qemu/qemu_driver.c: Move initialization of 'vm->def->id'
so that qemudShutdownVMDaemon() will process the shutdown
---
src/qemu/qemu_driver.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 21d7779..d7c806b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2652,6 +2652,8 @@ static int qemudStartVMDaemon(virConnectPtr conn,
if (virDomainObjSetDefTransient(driver->caps, vm, true) < 0)
goto cleanup;
+ vm->def->id = driver->nextvmid++;
+
/* Must be run before security labelling */
DEBUG0("Preparing host devices");
if (qemuPrepareHostDevices(driver, vm->def) < 0)
@@ -2818,7 +2820,6 @@ static int qemudStartVMDaemon(virConnectPtr conn,
}
DEBUG0("Building emulator command line");
- vm->def->id = driver->nextvmid++;
if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig,
priv->monJSON != 0, qemuCmdFlags,
migrateFrom, stdin_fd,
--
1.7.4
13 years, 8 months
[libvirt] [PATCH] libxenlight driver
by Jim Fehlig
Hi All,
Here's a first cut of libxenlight driver for libvirt. The driver is
stateful and provides functionality for managed (persistent) domains.
The driver only maintains state for and manages domains under its
control, ignoring domains created by other libxenlight clients, e.g. xl.
As you can see, a fair number of the driver functions are implemented,
at least what I think constitutes a minimal set for upstream inclusion.
Are there any required functions missing?
I'm still looking into a problem with failure to restart a domain,
persistent or otherwise. E.g. virsh start|create domU; virsh shutdown
domU; virsh start|create domU. The second start/create fails in
libxenlight, but I've not yet tracked down the cause. Also, I've not
yet handled restart of libvirtd if domains are running - not sure if
this is a requirement for initial inclusion.
TIA for your review and comment.
Regards,
Jim
13 years, 8 months
[libvirt] [PATCH] libvirt-qemu: Fix enum type declaration
by Jiri Denemark
---
Ugh! Sorry for this stupid typo.
include/libvirt/libvirt-qemu.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h
index 9257c2f..f172eff 100644
--- a/include/libvirt/libvirt-qemu.h
+++ b/include/libvirt/libvirt-qemu.h
@@ -20,7 +20,7 @@
extern "C" {
# endif
-enum {
+typedef enum {
VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0,
VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP = (1 << 0), /* cmd is in HMP */
} virDomainQemuMonitorCommandFlags;
--
1.7.4
13 years, 8 months
[libvirt] [PATCH] osx: fix broken enum typedef declaration breaking compilation on osx
by Justin Clift
As pointed out by Daniel Berrange, this broken enum declaration was the cause of
"duplicate symbol _virDomainQemuMonitorCommandFlags ..." errors on OSX.
---
include/libvirt/libvirt-qemu.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h
index 9257c2f..f172eff 100644
--- a/include/libvirt/libvirt-qemu.h
+++ b/include/libvirt/libvirt-qemu.h
@@ -20,7 +20,7 @@
extern "C" {
# endif
-enum {
+typedef enum {
VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0,
VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP = (1 << 0), /* cmd is in HMP */
} virDomainQemuMonitorCommandFlags;
--
1.7.4.1
13 years, 8 months
[libvirt] [PATCH 0/3] Basic libxenlight driver
by Markus Groß
Hi,
I started working on a libxenlight driver for libvirt a few weeks ago.
By that time I didn't knew Jim Fehlig was also working on a driver for that api:
http://article.gmane.org/gmane.comp.emulators.libvirt/33024
Because I already did some work and there is no driver from Jim yet,
I am posting my current version of the driver here.
It is a driver for the libxl (libxenlight) interface from the upcoming xen 4.1.
This driver is divided into 3 patches, the first adds the driver without
changing anything in libvirt, the second one integrates it into the
build system of libvirt. The last one is self explanatory.
However there are a few caveats.
1. The driver offers only basic functionality like: suspend, resume, pinvcpu, etc.
create, restore, definexml and others are not yet implemented.
2. The driver supports libvirtxml <-> xen-xm conversion, thanks to the unified xen
driver which already offered this functionality. But since this driver is
not part of xen unified, I had to copy this functionality, rather than reusing it.
3. To compile libvirt with this driver, there is a new flag --with-xenlight.
To fix some linker errors, libvirt has to link against several
additional libraries now which are used in xen's libxenlight.
These libraries are not directly used within libvirt,
but I believe that some of them are GPL licensed, so that could be an issue.
4. To compile the driver you may need to copy the libxl_utils.h
from tools/libxl of your xen-source directory to an include dir in your PATH.
Right now this file is not copied when installing xen,
but I will talk with the xen developers about that.
Please let me know what you think about it.
Thanks,
Markus
Markus Groß (3):
Add basic libxenlight driver
Integrate libxenlight driver into libvirt
Add myself to AUTHORS
AUTHORS | 1 +
configure.ac | 35 +-
include/libvirt/virterror.h | 1 +
po/POTFILES.in | 2 +
src/Makefile.am | 25 +
src/driver.h | 3 +-
src/libvirt.c | 13 +
src/util/virterror.c | 3 +
src/xenlight/xl_driver.c | 948 ++++++++++++++++++
src/xenlight/xl_driver.h | 46 +
src/xenlight/xl_driver_private.h | 52 +
src/xenlight/xl_utils.c | 1969 ++++++++++++++++++++++++++++++++++++++
src/xenlight/xl_utils.h | 90 ++
tools/virsh.c | 3 +
14 files changed, 3188 insertions(+), 3 deletions(-)
create mode 100644 src/xenlight/xl_driver.c
create mode 100644 src/xenlight/xl_driver.h
create mode 100644 src/xenlight/xl_driver_private.h
create mode 100644 src/xenlight/xl_utils.c
create mode 100644 src/xenlight/xl_utils.h
--
1.7.4
13 years, 8 months
[libvirt] Entering freeze for libvirt-0.8.8
by Daniel Veillard
We're entering the week freeze for 0.8.8, so let's delay new feature
until the end of next week and let's focuse on bug fixes. I have put an
initial release candidate at:
ftp://libvirt.org/libvirt/libvirt-0.8.8-rc1.tar.gz
it seems to compile and work fine for me. there is however a small
problem at configure time:
-------------------------------------
thinkpad:~/tmp/libvirt-0.8.8 -> ./autogen.sh --system ; make
Running ./configure with --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib
fatal: Not a git repository (or any of the parent directories): .git
fatal: Cannot open 'bootstrap.conf': No such file or directory
usage: git diff [--no-index] <path> <path>
/home/veillard/tmp/libvirt-0.8.8/tmpwrk2661/archive
/home/veillard/tmp/libvirt-0.8.8/tmpwrk2661/archive
/home/veillard/tmp/libvirt-0.8.8/tmpwrk2661/archive
Copying file m4/codeset.m4
-------------------------------------
Seems some git command is launched but errors out, that's normal
but it should not pollute the output (there is also the extra paths
output but that's due to the fact that I use CDPATH env variable
and as a result "cd dir" is not silent when successful but output
the target dir).
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 8 months
[libvirt] [PATCH] Update src/README
by Matthias Bolte
Add missing subdirectories.
---
src/README | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/README b/src/README
index 75acbe0..ad171a5 100644
--- a/src/README
+++ b/src/README
@@ -20,6 +20,8 @@ There are two core shared modules to be aware of:
files used by the public API. This directory is only
in the include path for driver implementation modules
+ * vmx/ - VMware VMX config handling (used by esx/ and vmware/)
+
Then there are the hypervisor implementations:
@@ -33,7 +35,9 @@ Then there are the hypervisor implementations:
* test/ - A "mock" driver for testing
* uml/ - User Mode Linux
* vbox/ - Virtual Box using native API
+ * vmware/ - VMware Workstation and Player using the vmrun tool
* xen/ - Xen using hypercalls, XenD SEXPR & XenStore
+ * xenapi/ - Xen using libxenserver
Finally some secondary drivers that are shared for several HVs.
@@ -41,8 +45,10 @@ Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers.
The ESX, OpenNebula, Power Hypervisor, Remote, Test & VirtualBox
drivers all implement the secondary drivers directly
+ * cpu/ - CPU feature management
* interface/ - Host network interface management
* network/ - Virtual NAT networking
+ * nwfilter/ - Network traffic filtering rules
* node_device/ - Host device enumeration
* secret/ - Secret management
* security/ - Mandatory access control drivers
--
1.7.0.4
13 years, 8 months