[libvirt] Live Migration with non-shared storage for kvm
by Kenneth Nagin
On Wed Apr 07 I sent an email with a patch titled Live Migration with
non-shared storage for kvm. What is the status on the patch?
Kenneth Nagin
Ph: +972-4-8296227
Cell: 054-6976227
Fx: +972-4- 8296113
"Do not look back in anger, or forward in fear, but around in awareness."
--James Thurber
14 years, 5 months
[libvirt] [PATCH] build: fix regression with libvirt-api.xml generation
by Eric Blake
(EXTRA_DIST): Remove redundant listing of xml files.
(html/%-%.html, html/%-virterror.html, %-api.xml, %-refs.xml):
Rewrite with...
(python_generated_files): ...new macro, since make didn't see
through the dependency chain correctly otherwise.
---
Since I'm not going to get the xsltproc stuff fixed today, but the
broken python bindings are still annoying, I'm splitting this into
a smaller patch. This does not fix VPATH builds (but that is no
change in the status quo), but DOES fix libvirt-api.xml dependency
detection, so that touching include/libvirt/libvirt.h.in will once
again reflect all the way to python bindings during 'make all'.
docs/Makefile.am | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 41068c6..c01e085 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -70,8 +70,8 @@ fig = \
libvirt-object-model.fig
EXTRA_DIST= \
- libvirt-api.xml libvirt-refs.xml apibuild.py \
- site.xsl newapi.xsl news.xsl page.xsl ChangeLog.xsl \
+ apibuild.py \
+ site.xsl newapi.xsl news.xsl page.xsl ChangeLog.xsl \
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
$(xml) $(fig) $(png) \
@@ -129,19 +129,23 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
$(XMLLINT) --nonet --valid --noout html/*.html ; \
else echo "missing XHTML1 DTD" ; fi ; fi
-$(devhelphtml): libvirt-api.xml $(devhelpxsl)
+$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
-@echo Rebuilding devhelp files
-@if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet -o devhelp/libvirt.devhelp \
$(top_srcdir)/docs/devhelp/devhelp.xsl libvirt-api.xml ; fi
-html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: $(srcdir)/apibuild.py
- -srcdir=$(srcdir) $(srcdir)/apibuild.py
+python_generated_files = \
+ $(srcdir)/html/libvirt-libvirt.html \
+ $(srcdir)/html/libvirt-virterror.html \
+ $(srcdir)/libvirt-api.xml \
+ $(srcdir)/libvirt-refs.xml
-html/%-%.html html/%-virterror.html %-api.xml %-refs.xml: \
- $(srcdir)/../include/%/*.h \
- $(srcdir)/../src/%.c \
+$(python_generated_files): $(srcdir)/apibuild.py \
+ $(srcdir)/../include/libvirt/*.h \
+ $(srcdir)/../src/libvirt.c \
$(srcdir)/../src/util/virterror.c
+ -srcdir=$(srcdir) $(srcdir)/apibuild.py
check-local: all
--
1.7.0.1
14 years, 5 months
[libvirt] [PATCH] Fix more reference leaks for node devices
by Matthias Bolte
Reported by Chris Lalancette, I just found more instances
of the same pattern.
---
daemon/remote.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index ec5f85b..cb9e83d 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -5126,10 +5126,12 @@ remoteDispatchNodeDeviceDettach (struct qemud_server *server ATTRIBUTE_UNUSED,
}
if (virNodeDeviceDettach(dev) == -1) {
+ virNodeDeviceFree(dev);
remoteDispatchConnError(rerr, conn);
return -1;
}
+ virNodeDeviceFree(dev);
return 0;
}
@@ -5153,10 +5155,12 @@ remoteDispatchNodeDeviceReAttach (struct qemud_server *server ATTRIBUTE_UNUSED,
}
if (virNodeDeviceReAttach(dev) == -1) {
+ virNodeDeviceFree(dev);
remoteDispatchConnError(rerr, conn);
return -1;
}
+ virNodeDeviceFree(dev);
return 0;
}
@@ -5180,10 +5184,12 @@ remoteDispatchNodeDeviceReset (struct qemud_server *server ATTRIBUTE_UNUSED,
}
if (virNodeDeviceReset(dev) == -1) {
+ virNodeDeviceFree(dev);
remoteDispatchConnError(rerr, conn);
return -1;
}
+ virNodeDeviceFree(dev);
return 0;
}
@@ -5230,10 +5236,12 @@ remoteDispatchNodeDeviceDestroy(struct qemud_server *server ATTRIBUTE_UNUSED,
}
if (virNodeDeviceDestroy(dev) == -1) {
+ virNodeDeviceFree(dev);
remoteDispatchConnError(rerr, conn);
return -1;
}
+ virNodeDeviceFree(dev);
return 0;
}
--
1.7.0.4
14 years, 5 months
[libvirt] [RESEND PATCHv3 0/3] fix build dependencies
by Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=589465 was marked
incomplete, because VIR_DOMAIN_START_PAUSED did not make it into the
python bindings of 0.8.1-10.el6. Matthias Bolte was kind enough to
help me figure out why (see patch 2/3 for details - but the short
story was a Makefile dependency problem that failed to rebuild the API
documentation after an addition to libvirt.h.in). I was a bit
surprised when I could not repeat the test on the tip of my
development tree, which means I already have pending patches
previously posted to the list but not yet reviewed that are already
sufficient to resolve the problem. Hence this resend.
Eric Blake (3):
build: restore operation of bit-rotted 'make cov'
build: fix VPATH build of docs
autobuild.sh: use VPATH build
.gitignore | 4 ++
Makefile.am | 9 +++-
autobuild.sh | 10 ++--
configure.ac | 1 +
daemon/.gitignore | 2 -
docs/Makefile.am | 48 ++++++++++++---------
docs/apibuild.py | 18 ++++++--
m4/compiler-flags.m4 | 1 -
src/.gitignore | 3 -
src/Makefile.am | 112 +++++++++++++++++++++++++++-----------------------
tests/.gitignore | 2 -
11 files changed, 117 insertions(+), 93 deletions(-)
14 years, 5 months
[libvirt] [PATCH] maint: add gnulib gettimeofday module
by Eric Blake
* bootstrap.conf (gnulib_modules): Add gettimeofday.
---
We're using gettimeofday throughout libvirt sources, but mingw
lacks it. While conditional compilation has made it so that we
have not yet tripped up mingw compilation, it doesn't hurt to
pull this LGPLv2+ module in now.
bootstrap.conf | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index 44d6d0e..5af77a7 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -32,6 +32,7 @@ getaddrinfo
gethostname
getpass
gettext-h
+gettimeofday
gitlog-to-changelog
gnumakefile
ignore-value
--
1.7.0.1
14 years, 5 months
[libvirt] [PATCH 0/3] Fix domain restore problems when selinux is enforcing
by Laine Stump
Prior to this patch series, restoring a domain with selinux set to
enforcing would fail, because the function that sets the label on the
file to allow qemu to read it did not have the name of the file (see
the comments in the individual patches). A patch from Jamie Stranboge
(2b57478ef0a0a983cc6a47b98300c8359f9708d0) added the filename to the
args passed down into the security driver; the first patch of this
series takes advantage of that to properly set the label.
Patches 2 and 3 solve a problem with restoring a domain from an NFS
share - in this case the selinux functions will fail (as will
functions trying to set the uid of the file, if it is a root-squashed
share). The solution to this is just ignore the
failure. qemudDomainSaveFlag previously had a bit of code that
detected if a particular path was on an NFS share; this code was moved
into a utility function so it could be re-used during domain restore -
if the security driver fails to set the label, and the file is on an
NFS share, we ignore the failure, otherwise we behave as before.
14 years, 5 months
[libvirt] [PATCH] Don't squash file permissions when migration fails
by Daniel P. Berrange
If an active migration operation fails, or is cancelled by the
admin, the QEMU on the destination is shutdown and the one on
the source continues running. It is important in shutting down
the QEMU on the destination, the security drivers don't reset
the file labelling/permissions.
* src/qemu/qemu_driver.c: Don't reset labelling/permissions
on migration abort
---
src/qemu/qemu_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c0cd35a..3289822 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11229,7 +11229,7 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
goto endjob;
}
} else {
- qemudShutdownVMDaemon(driver, vm, 0);
+ qemudShutdownVMDaemon(driver, vm, 1);
event = virDomainEventNewFromObj(vm,
VIR_DOMAIN_EVENT_STOPPED,
VIR_DOMAIN_EVENT_STOPPED_FAILED);
--
1.6.6.1
14 years, 5 months
[libvirt] [PATCH] Check for presence of qemu -nodefconfig option before using it
by Laine Stump
We previously assumed that if the -device option existed in qemu, that
-nodefconfig would also exist. It turns out that isn't the case, as
demonstrated by qemu-kvm-0.12.3 in Fedora 13.
*/src/qemu/qemu_conf.[hc] - add a new QEMUD_CMD_FLAG, set it via the
help output, and check it before adding
-nodefconfig to the qemu commandline.
---
src/qemu/qemu_conf.c | 5 ++++-
src/qemu/qemu_conf.h | 1 +
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 9cece8b..b45b592 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1176,6 +1176,8 @@ static unsigned long long qemudComputeCmdFlags(const char *help,
flags |= QEMUD_CMD_FLAG_BALLOON;
if (strstr(help, "-device"))
flags |= QEMUD_CMD_FLAG_DEVICE;
+ if (strstr(help, "-nodefconfig"))
+ flags |= QEMUD_CMD_FLAG_NODEFCONFIG;
/* The trailing ' ' is important to avoid a bogus match */
if (strstr(help, "-rtc "))
flags |= QEMUD_CMD_FLAG_RTC;
@@ -3780,7 +3782,8 @@ int qemudBuildCommandLine(virConnectPtr conn,
ADD_ARG_LIT("-nographic");
if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
- ADD_ARG_LIT("-nodefconfig"); /* Disabling global config files */
+ if (qemuCmdFlags & QEMUD_CMD_FLAG_NODEFCONFIG)
+ ADD_ARG_LIT("-nodefconfig"); /* Disabling global config files */
ADD_ARG_LIT("-nodefaults"); /* Disabling default guest devices */
}
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 0f8a1b3..ab5f158 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -90,6 +90,7 @@ enum qemud_cmd_flags {
QEMUD_CMD_FLAG_NO_KVM_PIT = (1LL << 34), /* -no-kvm-pit-reinjection supported */
QEMUD_CMD_FLAG_TDF = (1LL << 35), /* -tdf flag (user-mode pit catchup) */
QEMUD_CMD_FLAG_PCI_CONFIGFD = (1LL << 36), /* pci-assign.configfd */
+ QEMUD_CMD_FLAG_NODEFCONFIG = (1LL << 37), /* -nodefconfig */
};
/* Main driver state */
--
1.7.1
14 years, 5 months
[libvirt] Host IP Address
by IKI-サガル バルウェ
Hi,
I was trying to figure out a way to get the IP Address of the host, in which
a particular VM is running using the LibvirtAPI. For Eg.; If I have a VM
object, then I would like to fetch the IP Address of the host in which this
VM is running, programatically.
Is there a way to do this using the API?
Please guide me, if there is some other way to do this also.
Thanks and Regards
Sagar Barve
14 years, 5 months