[libvirt] [PATCH v2 1/5] Introduce virDomainFSFreeze() and virDomainFSThaw() public API
by Tomoki Sekiyama
These will freeze and thaw filesystems within guest. The APIs take flags
arguments which are currently not used, for future extensions.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama(a)hds.com>
---
include/libvirt/libvirt.h.in | 6 ++++
src/driver.h | 10 ++++++
src/libvirt.c | 70 ++++++++++++++++++++++++++++++++++++++++++
src/libvirt_public.syms | 5 +++
4 files changed, 91 insertions(+)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 295d551..22f373b 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -5245,6 +5245,12 @@ int virDomainFSTrim(virDomainPtr dom,
unsigned long long minimum,
unsigned int flags);
+int virDomainFSFreeze(virDomainPtr dom,
+ unsigned int flags);
+
+int virDomainFSThaw(virDomainPtr dom,
+ unsigned int flags);
+
/**
* virSchedParameterType:
*
diff --git a/src/driver.h b/src/driver.h
index fbfaac4..7e6aec0 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -1130,6 +1130,14 @@ typedef int
unsigned int flags,
int cancelled);
+typedef int
+(*virDrvDomainFSFreeze)(virDomainPtr dom,
+ unsigned int flags);
+
+typedef int
+(*virDrvDomainFSThaw)(virDomainPtr dom,
+ unsigned int flags);
+
typedef struct _virDriver virDriver;
typedef virDriver *virDriverPtr;
@@ -1341,6 +1349,8 @@ struct _virDriver {
virDrvDomainMigrateFinish3Params domainMigrateFinish3Params;
virDrvDomainMigrateConfirm3Params domainMigrateConfirm3Params;
virDrvConnectGetCPUModelNames connectGetCPUModelNames;
+ virDrvDomainFSFreeze domainFSFreeze;
+ virDrvDomainFSThaw domainFSThaw;
};
diff --git a/src/libvirt.c b/src/libvirt.c
index a385935..84c9783 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -20552,3 +20552,73 @@ error:
virDispatchError(dom->conn);
return -1;
}
+
+/**
+ * virDomainFSFreeze:
+ * @dom: a domain object
+ * @flags: extra flags, not used yet, so callers should always pass 0
+ *
+ * Freeze filesystems within the guest (hence guest agent may be
+ * required depending on hypervisor used).
+ *
+ * Returns 0 on success, -1 otherwise.
+ */
+int
+virDomainFSFreeze(virDomainPtr dom,
+ unsigned int flags)
+{
+ VIR_DOMAIN_DEBUG(dom, "flags=%x", flags);
+
+ virResetLastError();
+
+ virCheckDomainReturn(dom, -1);
+ virCheckReadOnlyGoto(dom->conn->flags, error);
+
+ if (dom->conn->driver->domainFSFreeze) {
+ int ret = dom->conn->driver->domainFSFreeze(dom, flags);
+ if (ret < 0)
+ goto error;
+ return ret;
+ }
+
+ virReportUnsupportedError();
+
+error:
+ virDispatchError(dom->conn);
+ return -1;
+}
+
+/**
+ * virDomainFSThaw:
+ * @dom: a domain object
+ * @flags: extra flags, not used yet, so callers should always pass 0
+ *
+ * Thaw the frozen filesystems within the guest (hence guest agent
+ * may be required depending on hypervisor used).
+ *
+ * Returns 0 on success, -1 otherwise.
+ */
+int
+virDomainFSThaw(virDomainPtr dom,
+ unsigned int flags)
+{
+ VIR_DOMAIN_DEBUG(dom, "flags=%x", flags);
+
+ virResetLastError();
+
+ virCheckDomainReturn(dom, -1);
+ virCheckReadOnlyGoto(dom->conn->flags, error);
+
+ if (dom->conn->driver->domainFSThaw) {
+ int ret = dom->conn->driver->domainFSThaw(dom, flags);
+ if (ret < 0)
+ goto error;
+ return ret;
+ }
+
+ virReportUnsupportedError();
+
+error:
+ virDispatchError(dom->conn);
+ return -1;
+}
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index 6ed6ce6..9e49a9d 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -645,5 +645,10 @@ LIBVIRT_1.2.1 {
virConnectNetworkEventDeregisterAny;
} LIBVIRT_1.1.3;
+LIBVIRT_1.2.3 {
+ global:
+ virDomainFSFreeze;
+ virDomainFSThaw;
+} LIBVIRT_1.2.1;
# .... define new API here using predicted next version number ....
10 years, 8 months
[libvirt] [RFC][PATCH 0/2] Fix zero cpu shares handling
by Ján Tomko
Hello,
This series tries to fix the behavior of
<cputune><shares>0</shares></cputune> (means default shares of 1024)
and virsh schedinfo --set cpu_shares=0 (means minimum of 2)
If 0 was explicitly specified, treat it as a valid value (which
will get converted to 2 by the kernel)
Re-read the shares value to reflect the cpu shares in live XML.
In v1, I've tried to change the schedinfo behavior instead,
but I have not found a way to reset the value to the kernel default
(which is currently 1024 - see ROOT_TASK_GROUP_LOAD in
kernel/sched/sched.h in Linux source) other than writing it
to the cgroup fs.
Partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=998431
Ján Tomko (2):
Treat zero cpu shares as a valid value
Show the real cpu shares value in live xml
src/conf/domain_conf.c | 12 +++++++-----
src/conf/domain_conf.h | 1 +
src/lxc/lxc_cgroup.c | 13 ++++++++++---
src/lxc/lxc_driver.c | 8 +++++++-
src/lxc/lxc_native.c | 8 +++++---
src/qemu/qemu_cgroup.c | 12 +++++++++---
src/qemu/qemu_driver.c | 13 +++++++++++--
src/vmx/vmx.c | 1 +
8 files changed, 51 insertions(+), 17 deletions(-)
--
1.8.3.2
10 years, 8 months
[libvirt] [PATCH v2] qemu: Reject unsupported tuning in session mode
by Martin Kletzander
When domain is started with setting that cannot be done, i.e. those
that require cgroups, there is no error reported and it succeeds
without any message whatsoever.
When setting with API, virsh, an error is reported, but only due to
the fact that no cgroups are mounted (priv->cgroup == NULL).
Given the above it seems reasonable to reject such unsupported
settings.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1023366
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
v2:
- Allow CPU pinning since setting affinity should still work.
- Remove bogus 'cfg = ...' in SetBlockIoTune.
src/qemu/qemu_command.c | 26 ++++++++++++++++++
src/qemu/qemu_driver.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 98 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 18d0a64..611d21d 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7762,6 +7762,32 @@ qemuBuildCommandLine(virConnectPtr conn,
emulator = def->emulator;
+ if (!cfg->privileged) {
+ /* If we have no cgroups than we can have no tunings that
+ * require them */
+
+ if (def->mem.hard_limit || def->mem.soft_limit ||
+ def->mem.min_guarantee || def->mem.swap_hard_limit) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Memory tuning is not available in session mode"));
+ goto error;
+ }
+
+ if (def->blkio.weight || def->blkio.ndevices) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Block I/O tuning is not available in session mode"));
+ goto error;
+ }
+
+ if (def->cputune.shares || def->cputune.period ||
+ def->cputune.quota || def->cputune.emulator_period ||
+ def->cputune.emulator_quota) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("CPU tuning is not available in session mode"));
+ goto error;
+ }
+ }
+
for (i = 0; i < def->ngraphics; ++i) {
switch (def->graphics[i]->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 4fbcb27..1e50572 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7434,6 +7434,8 @@ static char *qemuDomainGetSchedulerType(virDomainPtr dom,
char *ret = NULL;
virDomainObjPtr vm = NULL;
qemuDomainObjPrivatePtr priv;
+ virQEMUDriverPtr driver = dom->conn->privateData;
+ virQEMUDriverConfigPtr cfg = NULL;
if (!(vm = qemuDomObjFromDomain(dom)))
goto cleanup;
@@ -7443,6 +7445,13 @@ static char *qemuDomainGetSchedulerType(virDomainPtr dom,
if (virDomainGetSchedulerTypeEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ cfg = virQEMUDriverGetConfig(driver);
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("CPU tuning is not available in session mode"));
+ goto cleanup;
+ }
+
/* Domain not running, thus no cgroups - return defaults */
if (!virDomainObjIsActive(vm)) {
if (nparams)
@@ -7469,6 +7478,7 @@ static char *qemuDomainGetSchedulerType(virDomainPtr dom,
cleanup:
if (vm)
virObjectUnlock(vm);
+ virObjectUnref(cfg);
return ret;
}
@@ -7683,6 +7693,12 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
if (virDomainSetBlkioParametersEnsureACL(dom->conn, vm->def, flags) < 0)
goto cleanup;
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Block I/O tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
@@ -7863,6 +7879,7 @@ qemuDomainGetBlkioParameters(virDomainPtr dom,
int ret = -1;
virCapsPtr caps = NULL;
qemuDomainObjPrivatePtr priv;
+ virQEMUDriverConfigPtr cfg = NULL;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG |
@@ -7881,6 +7898,13 @@ qemuDomainGetBlkioParameters(virDomainPtr dom,
if (virDomainGetBlkioParametersEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ cfg = virQEMUDriverGetConfig(driver);
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Block I/O tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
@@ -8269,6 +8293,7 @@ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
+ virObjectUnref(cfg);
return ret;
}
@@ -8316,6 +8341,12 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
if (virDomainSetMemoryParametersEnsureACL(dom->conn, vm->def, flags) < 0)
goto cleanup;
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("Memory tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
@@ -8423,6 +8454,7 @@ qemuDomainGetMemoryParameters(virDomainPtr dom,
int ret = -1;
virCapsPtr caps = NULL;
qemuDomainObjPrivatePtr priv;
+ virQEMUDriverConfigPtr cfg = NULL;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG |
@@ -8439,6 +8471,13 @@ qemuDomainGetMemoryParameters(virDomainPtr dom,
if (virDomainGetMemoryParametersEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ cfg = virQEMUDriverGetConfig(driver);
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("Memory tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
@@ -8550,6 +8589,7 @@ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
+ virObjectUnref(cfg);
return ret;
}
@@ -8975,6 +9015,13 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
if (virDomainSetSchedulerParametersFlagsEnsureACL(dom->conn, vm->def, flags) < 0)
goto cleanup;
+ cfg = virQEMUDriverGetConfig(driver);
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("CPU tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
@@ -9210,6 +9257,7 @@ qemuDomainGetSchedulerParametersFlags(virDomainPtr dom,
virDomainDefPtr persistentDef;
virCapsPtr caps = NULL;
qemuDomainObjPrivatePtr priv;
+ virQEMUDriverConfigPtr cfg = NULL;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG |
@@ -9226,6 +9274,13 @@ qemuDomainGetSchedulerParametersFlags(virDomainPtr dom,
if (virDomainGetSchedulerParametersFlagsEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ cfg = virQEMUDriverGetConfig(driver);
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("CPU tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (*nparams > 1)
cpu_bw_status = virCgroupSupportsCpuBW(priv->cgroup);
@@ -9320,6 +9375,7 @@ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
+ virObjectUnref(cfg);
return ret;
}
@@ -15521,11 +15577,17 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
if (virDomainSetBlockIoTuneEnsureACL(dom->conn, vm->def, flags) < 0)
goto cleanup;
+ cfg = virQEMUDriverGetConfig(driver);
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Block I/O tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
priv = vm->privateData;
- cfg = virQEMUDriverGetConfig(driver);
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto endjob;
@@ -15668,6 +15730,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
int ret = -1;
size_t i;
virCapsPtr caps = NULL;
+ virQEMUDriverConfigPtr cfg = NULL;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG |
@@ -15682,6 +15745,13 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
if (virDomainGetBlockIoTuneEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ cfg = virQEMUDriverGetConfig(driver);
+ if (!cfg->privileged) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Block I/O tuning is not available in session mode"));
+ goto cleanup;
+ }
+
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
@@ -15784,6 +15854,7 @@ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
+ virObjectUnref(cfg);
return ret;
}
--
1.9.0
10 years, 8 months
[libvirt] virDomainShutdown() API failed with error '-1'
by Panday Ritesh Sharma (rpanday)
Hi Team,
We are calling virDomainShutdown() API for shutting the VM. Sometime we see, this API is failing because of 'unknown' reason. It took almost 15 secs to bringdown the VM and at last failed. And the domain goes into shut off state. You can find the time stamp in below log. Could you please let us know in which case this API can fail, how to fix/debug this issue ? We are running 1.0.2 libvirtd version.
===========
20.53.48.532818176: Shuting down domain...
20.54.03.539286528: Failure of libvirt library call: Code: internal error
Context: None
Message: An error occurred, but the cause is unknown
Level: ERROR
20.54.03.539291392: virDomainShutdown() call returned error -1 for CP—3
============
===========
[host:/var/log/libvirt/qemu]$ virsh list --all
Id Name State
----------------------------------------------------
- CP--3 shut off
===========
============
[host:/var/log/libvirt/qemu]$
[host:/var/log/libvirt/qemu]$ libvirtd --version
libvirtd (libvirt) 1.0.2
[host:/var/log/libvirt/qemu]$
============
Regards
Ritesh Sharma
10 years, 8 months
[libvirt] [PATCH 0/4] Add caching of QEMU probed capabilities
by Daniel P. Berrange
Probing capabilities takes 200-300ms per binary and we have as many
as 26 binaries. This noticably slows down libvirtd startup. It does
not look like performance of probing QEMU can be improved, so this
series introduces caching of the capabilities information. So the
first time libvirtd starts it'll be slow, but thereafter it is fast.
The cache is invalidated any time the QEMU binary timestamp changes
or the libvirtd binary or driver module timestamp changes.
Daniel P. Berrange (4):
Add helper APIs for generating cryptographic hashes
Convert lock driver plugins to use new crypto APIs
Cache result of QEMU capabilities extraction
Refresh qemu capabilities if libvirtd binary changes
.gitignore | 1 +
daemon/libvirtd.c | 2 +
include/libvirt/virterror.h | 1 +
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/driver.c | 2 +
src/libvirt_private.syms | 6 +
src/locking/lock_driver_lockd.c | 32 +--
src/locking/lock_driver_sanlock.c | 42 +---
src/qemu/qemu_capabilities.c | 418 +++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_driver.c | 1 +
src/util/vircrypto.c | 80 ++++++++
src/util/vircrypto.h | 40 ++++
src/util/virerror.c | 1 +
src/util/virutil.c | 23 +++
src/util/virutil.h | 4 +
tests/Makefile.am | 5 +
tests/vircryptotest.c | 90 ++++++++
19 files changed, 682 insertions(+), 70 deletions(-)
create mode 100644 src/util/vircrypto.c
create mode 100644 src/util/vircrypto.h
create mode 100644 tests/vircryptotest.c
--
1.8.5.3
10 years, 8 months
[libvirt] [RFC] support memory reserved feature and optimize mlock guest memory propose
by Zhanghailiang
Hi all:
Currently, we use cgroup(memory) to support memory QoS on KVM platform, and use "mlock" on qemu to support "memory reserved".
The "mlock" seems to be not appropriate.
Now qemu "mlock" memory in the main thread, which would lock iothread (qemu_mutex_lock_iothread), if the memory size is large, that will consume lots of time.
It means whenever we want to set a new 'mlock', the VM would be blocked for a while.
Here is my optimization:
1. Add a global variable (lock_ram_size) to save the value of "memory reserved";
2. Add a qmp commond "set_ram_minguarantee" to change lock_ram_size;
3. Create a new thread to mlock(lock_ram_zie), while is waked up by the "set_ram_minguarantee" qmp command.
Flow chart:
main funciton qmp command "set_ram_minguarantee"
| |
| |
create "mlock" thread change value of lock_ram_size
| |
| |
|------>thread wait<-------------wake up "mlock" thread
| |
| |
| |
|-------mlock(lock_ram_zie)
We have tested this demo a few days, it seems to be worked well.
But we are not sure is there any other problems , if the main thread and mlock thread access one memory zone at one time without a mutex lock.
Is it workable?Or Is there any other idea to support "memory reserved" ?
Thanks
zhanghailiang
10 years, 8 months
[libvirt] [PATCH v3 0/2] fix query-command-line-options
by Amos Kong
This patchset fixed some issues of query-command-line-options:
* some new options that haven't argument can't be queried. (eg: -enable-fips)
* some legacy options that have argument can't be queried. (eg: -vnc display)
More discussion:
http://marc.info/?l=qemu-devel&m=139081830416684&w=2
V2: remove duplicate option tables, update schema
V3: fix typo in commitlog and export qemu_options talbe
Amos Kong (2):
qmp: rename query_option_descs() to get_param_infolist()
query-command-line-options: query all the options in qemu-options.hx
qapi-schema.json | 8 ++++++--
qemu-options.h | 18 ++++++++++++++++++
util/qemu-config.c | 41 ++++++++++++++++++++++++++++++++---------
vl.c | 17 -----------------
4 files changed, 56 insertions(+), 28 deletions(-)
--
1.8.5.3
10 years, 8 months
[libvirt] [PATCH 00/10] virFork cleanups
by Eric Blake
Some of these patches were written while working on CVE-2013-6456;
we decided to reorder things and fix that problem first. While
rebasing these patches to the latest tree, I found other things
worth fixing.
Eric Blake (10):
nwfilter: don't ignore child process failures
virFork: give specific status on failure prior to exec
util: make it easier to reflect child exit status
util: preserve exit status from mount namespace callback
util: make it easier to grab only regular process exit
util: make it easier to grab only regular command exit
virFork: simplify semantics
virt-login-shell: use single instead of double fork
virt-login-shell: saner exit value
virsh: report exit status of failed lxc-enter-namespace
daemon/libvirtd.c | 4 +-
daemon/remote.c | 7 +-
docs/internals/command.html.in | 17 ++-
src/access/viraccessdriverpolkit.c | 9 +-
src/bhyve/bhyve_process.c | 19 +---
src/fdstream.c | 3 +-
src/internal.h | 7 ++
src/libvirt.c | 4 +-
src/libvirt_private.syms | 2 +
src/lxc/lxc_container.c | 6 +-
src/lxc/lxc_process.c | 11 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 89 ++++++---------
src/openvz/openvz_driver.c | 18 +---
src/qemu/qemu_capabilities.c | 1 +
src/qemu/qemu_command.c | 3 +-
src/storage/storage_backend_iscsi.c | 7 +-
src/util/vircommand.c | 173 +++++++++++++++---------------
src/util/vircommand.h | 4 +-
src/util/virebtables.c | 5 +-
src/util/virfile.c | 35 ++----
src/util/viriptables.c | 7 +-
src/util/virnetdevveth.c | 4 +-
src/util/virprocess.c | 121 +++++++++++++++------
src/util/virprocess.h | 8 +-
src/xen/xen_driver.c | 9 +-
tests/commandtest.c | 126 +++++++++++++++++++++-
tests/reconnect.c | 3 +-
tests/statstest.c | 3 +-
tests/testutils.c | 4 +-
tools/virsh-domain.c | 30 +++---
tools/virsh.pod | 5 +-
tools/virt-login-shell.c | 141 ++++++++++--------------
tools/virt-login-shell.pod | 25 ++++-
33 files changed, 525 insertions(+), 385 deletions(-)
--
1.8.5.3
10 years, 8 months
[libvirt] [PATCH] Fix missing char dev lock path case in configure
by Roman Bogorodskiy
configure check for character devices lock path calls
AC_DEFINE_UNQUOTED for VIR_CHRDEV_LOCK_FILE_PATH even if
$with_chrdev_lock_files = "no".
So the locking code in conf/virchrdev.c:
#ifdef VIR_CHRDEV_LOCK_FILE_PATH
is compiled in even if it shouldn't, because VIR_CHRDEV_LOCK_FILE_PATH
is defined as "no", so it tries to create lock files with strange
lock path like 'no/LCK..'.
Fix that by calling AC_DEFINE_UNQUOTED only if $with_chrdev_lock_files
is not 'no'.
---
configure.ac | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index a9339ce..62b74c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1401,8 +1401,10 @@ if test "$with_chrdev_lock_files" != "no"; then
AC_MSG_ERROR([You must specify path for the lock files on this
platform])
fi
- AC_DEFINE_UNQUOTED([VIR_CHRDEV_LOCK_FILE_PATH], "$with_chrdev_lock_files",
- [path to directory containing UUCP device lock files])
+ if test "$with_chrdev_lock_files" != "no"; then
+ AC_DEFINE_UNQUOTED([VIR_CHRDEV_LOCK_FILE_PATH], "$with_chrdev_lock_files",
+ [path to directory containing UUCP device lock files])
+ fi
fi
AM_CONDITIONAL([VIR_CHRDEV_LOCK_FILE_PATH], [test "$with_chrdev_lock_files" != "no"])
--
1.8.4.2
10 years, 8 months
[libvirt] [PATCH 00/13] libxl: add basic support for migration
by Jim Fehlig
Based on an earlier patch from Chunyan Liu
https://www.redhat.com/archives/libvir-list/2013-September/msg00667.html
This patch series adds basic migration support to the libxl driver.
Follow-up patches can improve pre-migration checks and add support for
additional migration flags.
Patches 1-12 are almost exclusively code motion, moving functions from
the main driver module into the libxl_domain and libxl_conf modules.
Patch13 is rather large and provides the migration implementation. If it
is preferred to split patch13 further, I'm open to suggestions on ways to
do that.
I've done some basic migration testing of this series using NFS shared
storage. Error handling only minimally tested though. I attempted a
migration to host with a different bridge than the source, verifying
the migration failed and the vm was resumed on the source.
Jim Fehlig (13):
libxl: move libxlDomainEventQueue to libxl_domain
libxl: move libxlDomainManagedSavePath to libxl_domain
libxl: move libxlSaveImageOpen to libxl_domain
libxl: move libxlVmCleanup{,Job} to libxl_domain
libxl: move libxlDomEventsRegister to libxl_domain
libxl: move libxlDomainAutoCoreDump to libxl_domain
libxl: move libxlDoNodeGetInfo to libxl_conf
libxl: move libxlDomainSetVcpuAffinities to libxl_domain
libxl: move libxlFreeMem to libxl_domain
libxl: move libxlVmStart to libxl_domain
libxl: include a pointer to the driver in libxlDomainObjPrivate
libxl: move domain event handler to libxl_domain
libxl: add migration support
po/POTFILES.in | 1 +
src/Makefile.am | 3 +-
src/libxl/libxl_conf.c | 36 ++
src/libxl/libxl_conf.h | 10 +
src/libxl/libxl_domain.c | 696 +++++++++++++++++++++++++++++++
src/libxl/libxl_domain.h | 51 ++-
src/libxl/libxl_driver.c | 972 +++++++++++---------------------------------
src/libxl/libxl_migration.c | 579 ++++++++++++++++++++++++++
src/libxl/libxl_migration.h | 78 ++++
9 files changed, 1681 insertions(+), 745 deletions(-)
create mode 100644 src/libxl/libxl_migration.c
create mode 100644 src/libxl/libxl_migration.h
--
1.8.1.4
10 years, 8 months