[libvirt] [PATCH v4 0/12] migration: support all toURI and proto combos
by Nikolay Shirokovskiy
Current implementation of 'toURI' migration interfaces does not support all
combinations of interface versions and protocol versions. For example 'toURI2'
with p2p flag will not migrate if driver supports only v3params proto.
This is not convinient as drivers that starts to support migration have to
manually support older versions of protocol. I guess this should be done in
one place, namely here.
Another issue is that there are a lot of code duplication in implementation of
toURI interfaces and it is not obvious from code how are they related.
This implementation uses extensible parameters as intermediate parameters
representation. This is possible as interfaces are done backward compatible in
terms of parameters and later versions supports all parameters of former
versions.
= Changes from version 3
* fix spellings
* make error messages more specific as suggested
* in 'migration: refactor: introduce params version of unmanaged':
fix conversion for null values of explicit string params into virTypedParameterPtr.
* squash 'migration: reuse parameters check in toURI2 and toURI3' into
'migration: introduce parameter checking function'
* 'migration: refactor: one return in forURI family functions' is dropped as suggested
src/libvirt-domain.c | 509 +++++++++++++++++++++++---------------------------
1 files changed, 237 insertions(+), 272 deletions(-)
9 years, 1 month
[libvirt] [PATCH 0/4] Add more host validation checks
by Daniel P. Berrange
This extends the virt-host-validate command todo a bunch more
checks. Probably the most interesting is the last one which
checks for Intel IOMMU needed todo PCI assignment with KVM.
It is pretty crude, so further suggestions welcome. I don't
want to grep dmesg as suggested in [1] since dmesg can be
purged by the time we look at it.
What kmods should we look for for VT-D too ?
[1] http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM
Daniel P. Berrange (4):
virt-host-validate.c: check for kernel namespaces
virt-host-validate: distinguish exists vs accessible for devices
virt-host-validate: check for required cgroups
virt-host-validate: check for intel_iommu=on cmdline flag
tools/virt-host-validate-common.c | 209 +++++++++++++++++++++++++++++++++++---
tools/virt-host-validate-common.h | 31 +++++-
tools/virt-host-validate-lxc.c | 60 +++++++++++
tools/virt-host-validate-qemu.c | 66 ++++++++++--
4 files changed, 338 insertions(+), 28 deletions(-)
--
2.4.3
9 years, 1 month
[libvirt] [PATCH 0/2] improve the error in 2 function
by Luyao Huang
*** BLURB HERE ***
Luyao Huang (2):
util: split the virNumaGetHugePageInfoPath into separate function
util: Produce friendlier error message to user
src/util/virnuma.c | 54 ++++++++++++++++++++++++++++++------------------------
1 file changed, 30 insertions(+), 24 deletions(-)
--
1.8.3.1
9 years, 1 month
[libvirt] virsh can't support VM offline blockcommit
by 陈明
Hi everyone!
I use the libvirt(version: 1.2.2) and QEMU(version: 2.2.1) to test
qemu snapshot features:
I tried virsh blockcommit when VM offline, the virsh blockcommit
failed: the error messase as below:
* error: Requested operation is not valid: domain
is not running*
when I start the VM, the virsh blockcommit work fine!
my question is : we need virsh support blockcommit when
VM offline。how do?
we test qemu snapshot as follows:
we need create snapshot of the cycle,and by virsh blockcommit
merge snapshot chain,but whenVM offline, the virsh blockcommit will
fail, someone suggest me:when VM offline,may use qemu-img commit to
submit snapshot turn,but qemu-img can't modify snapshot chain backing
relation,it need
we use qemu-img rebase amend snapshot‘s backingfile,* the main
question* is when we use qemu-img rebase modify snapshot's
backingfile, if someone start the VM, it will may lead to VM filesystem
readonly。
we should how to solve the question? thanks!
9 years, 1 month
[libvirt] virsh can't support VM offline blockcommit
by justlibvirt
Hi everyone!
I use the libvirt(version: 1.2.2) and QEMU(version: 2.2.1) to test qemu snapshot features:
I tried virsh blockcommit when VM offline, the virsh blockcommit failed: the error messase as below:
error: Requested operation is not valid: domain is not running
when I start the VM, the virsh blockcommit work fine!
my question is : we need virsh support blockcommit when VM offline。how do?
we test qemu snapshot as follows:
we need create snapshot of the cycle,and by virsh blockcommit merge snapshot chain,but whenVM offline, the virsh blockcommit will fail, someone suggest me:when VM offline,may use qemu-img commit to submit snapshot turn,but qemu-img can't modify snapshot chain backing relation,it need we use qemu-img rebase amend snapshot‘s backingfile, the main question is when we use qemu-img rebase modify snapshot's backingfile, if someone start the VM, it will may lead to VM filesystem readonly。
we shoule solve the question? thanks!
9 years, 1 month
[libvirt] [PATCH] src: Include $(builddir)/util in the header search path
by Andrea Bolognani
Since a9fe620372144db, we are generating virkeymaps.h at build
time; however, we are not including $(builddir)/util in the
header search path, so when doing a VPATH build the compiler
is unable to locate the file.
make[2]: Entering directory
`/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src'
GEN util/virkeymaps.h
...
CC util/libvirt_util_la-virkeycode.lo
CC util/libvirt_util_la-virkeyfile.lo
CC util/libvirt_util_la-virlockspace.lo
CC util/libvirt_util_la-virlog.lo
../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory
#include "virkeymaps.h"
^
compilation terminated.
---
Tested by
* running 'git clean -xdf' in the source directory
* running './autogen.sh'
* running 'make distclean'
* making sure src/util/virkeymaps.h did not exist
* moving to an empty build directory
* running '../libvirt/configure'
* running 'make check'
* running 'make distcheck'
This is another take on the problem Michal's trying to solve with
https://www.redhat.com/archives/libvir-list/2015-October/msg00254.html
The commit message is "inspired" by his ;)
src/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am
index e4660eb..01e816a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,6 +31,7 @@ INCLUDES = -I../gnulib/lib \
-I../include \
-I$(top_srcdir)/include \
-I$(srcdir)/util \
+ -I$(builddir)/util \
-DIN_LIBVIRT \
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
-Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
--
2.4.3
9 years, 1 month
[libvirt] [PATCH] src: Remove $(builddir) usage
by Andrea Bolognani
Commit 4e8032272f1704f7 used $(builddir) in the header search
path to fix a build issue; however, $(builddir) is not defined
by old autoconf versions such as the one available in CentOS 5,
resulting in the following error:
cc1: error: /util: No such file or directory
make[3]: *** [libvirt_driver_la-fdstream.lo] Error 1
Since $(builddir) is defined to always be '.', just use that
value directly instead.
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 01e816a..d5dd9fb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,7 @@ INCLUDES = -I../gnulib/lib \
-I../include \
-I$(top_srcdir)/include \
-I$(srcdir)/util \
- -I$(builddir)/util \
+ -I./util \
-DIN_LIBVIRT \
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
-Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
--
2.4.3
9 years, 1 month
[libvirt] [PATCH] virJSONValueArraySize: return ssize_t
by Michal Privoznik
The internal representation of a JSON array counts the items in
size_t. However, for some reason, when asking for the count it's
reported as int. Firstly, we need the function to return a signed
type as it's returning -1 on an error. But, not every system has
integer the same size as size_t. Therefore, lets return ssize_t.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/locking/lock_daemon.c | 2 +-
src/network/bridge_driver.c | 2 +-
src/qemu/qemu_agent.c | 12 ++++++------
src/qemu/qemu_monitor_json.c | 28 ++++++++++++++--------------
src/rpc/virnetserver.c | 2 +-
src/rpc/virnetserverservice.c | 2 +-
src/util/virjson.c | 2 +-
src/util/virjson.h | 2 +-
src/util/virlockspace.c | 4 ++--
9 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index bf87af1..55fc0c3 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -184,7 +184,7 @@ virLockDaemonNewPostExecRestart(virJSONValuePtr object, bool privileged)
virJSONValuePtr lockspaces;
virNetServerPtr srv;
size_t i;
- int n;
+ ssize_t n;
if (VIR_ALLOC(lockd) < 0)
return NULL;
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index c343e5b..cd9a51e 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3599,7 +3599,7 @@ networkGetDHCPLeases(virNetworkPtr network,
size_t i, j;
size_t nleases = 0;
int rv = -1;
- int size = 0;
+ ssize_t size = 0;
int custom_lease_file_len = 0;
bool need_results = !!leases;
long long currtime = 0;
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 7021a7a..5735ed8 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -1461,7 +1461,7 @@ qemuAgentGetVCPUs(qemuAgentPtr mon,
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
virJSONValuePtr data = NULL;
- int ndata;
+ ssize_t ndata;
if (!(cmd = qemuAgentMakeCommand("guest-get-vcpus", NULL)))
return -1;
@@ -1767,7 +1767,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon, virDomainFSInfoPtr **info,
{
size_t i, j, k;
int ret = -1;
- int ndata = 0, ndisk;
+ ssize_t ndata = 0, ndisk;
char **alias;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
@@ -1810,7 +1810,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon, virDomainFSInfoPtr **info,
if (!entry) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("array element '%zd' of '%d' missing in "
+ _("array element '%zd' of '%zd' missing in "
"guest-get-fsinfo return data"),
i, ndata);
goto cleanup;
@@ -1871,7 +1871,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon, virDomainFSInfoPtr **info,
if (!disk) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("array element '%zd' of '%d' missing in "
+ _("array element '%zd' of '%zd' missing in "
"guest-get-fsinfo 'disk' data"),
j, ndisk);
goto cleanup;
@@ -1954,7 +1954,7 @@ qemuAgentGetInterfaces(qemuAgentPtr mon,
{
int ret = -1;
size_t i, j;
- int size = -1;
+ ssize_t size = -1;
virJSONValuePtr cmd = NULL;
virJSONValuePtr reply = NULL;
virJSONValuePtr ret_array = NULL;
@@ -1994,7 +1994,7 @@ qemuAgentGetInterfaces(qemuAgentPtr mon,
virJSONValuePtr tmp_iface = virJSONValueArrayGet(ret_array, i);
virJSONValuePtr ip_addr_arr = NULL;
const char *hwaddr, *ifname_s, *name = NULL;
- int ip_addr_arr_size;
+ ssize_t ip_addr_arr_size;
virDomainInterfacePtr iface = NULL;
/* Shouldn't happen but doesn't hurt to check neither */
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index df0c82a..b39b29b 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1265,7 +1265,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
int ret = -1;
size_t i;
int *threads = NULL;
- int ncpus;
+ ssize_t ncpus;
if (!(data = virJSONValueObjectGetArray(reply, "return"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -3061,7 +3061,7 @@ qemuMonitorJSONQueryRxFilterParse(virJSONValuePtr msg,
int ret = -1;
const char *tmp;
virJSONValuePtr returnArray, entry, table, element;
- int nTable;
+ ssize_t nTable;
size_t i;
virNetDevRxFilterPtr fil = virNetDevRxFilterNew();
@@ -4090,7 +4090,7 @@ qemuMonitorJSONGetAllBlockJobInfo(qemuMonitorPtr mon)
virJSONValuePtr cmd = NULL;
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
- int nr_results;
+ ssize_t nr_results;
size_t i;
virHashTablePtr blockJobs = NULL;
@@ -4597,7 +4597,7 @@ int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
qemuMonitorMachineInfoPtr *infolist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*machines = NULL;
@@ -4777,7 +4777,7 @@ int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
char **commandlist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*commands = NULL;
@@ -4845,7 +4845,7 @@ int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
char **eventlist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*events = NULL;
@@ -4922,7 +4922,7 @@ qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon,
virJSONValuePtr data = NULL;
virJSONValuePtr array = NULL;
char **paramlist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*params = NULL;
@@ -5093,7 +5093,7 @@ int qemuMonitorJSONGetObjectTypes(qemuMonitorPtr mon,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
char **typelist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*types = NULL;
@@ -5162,7 +5162,7 @@ int qemuMonitorJSONGetObjectListPaths(qemuMonitorPtr mon,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
qemuMonitorJSONListPathPtr *pathlist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*paths = NULL;
@@ -5408,7 +5408,7 @@ int qemuMonitorJSONGetObjectProps(qemuMonitorPtr mon,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
char **proplist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*props = NULL;
@@ -5527,7 +5527,7 @@ qemuMonitorJSONGetMigrationCapabilities(qemuMonitorPtr mon,
virJSONValuePtr caps;
char **list = NULL;
size_t i;
- int n;
+ ssize_t n;
*capabilities = NULL;
@@ -5804,7 +5804,7 @@ qemuMonitorJSONGetStringArray(qemuMonitorPtr mon, const char *qmpCmd,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
char **list = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*array = NULL;
@@ -6167,7 +6167,7 @@ qemuMonitorJSONGetCPUx86Data(qemuMonitorPtr mon,
virCPUx86Data *x86Data = NULL;
virCPUx86CPUID cpuid;
size_t i;
- int n;
+ ssize_t n;
int ret = -1;
/* look up if the property exists before asking */
@@ -6330,7 +6330,7 @@ qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
qemuMonitorIOThreadInfoPtr *infolist = NULL;
- int n = 0;
+ ssize_t n = 0;
size_t i;
*iothreads = NULL;
diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index 80b5588..547e52e 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -369,7 +369,7 @@ virNetServerPtr virNetServerNewPostExecRestart(virJSONValuePtr object,
virJSONValuePtr clients;
virJSONValuePtr services;
size_t i;
- int n;
+ ssize_t n;
unsigned int min_workers;
unsigned int max_workers;
unsigned int priority_workers;
diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index 3b35fc0..1ef0636 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -328,7 +328,7 @@ virNetServerServicePtr virNetServerServiceNewPostExecRestart(virJSONValuePtr obj
virNetServerServicePtr svc;
virJSONValuePtr socks;
size_t i;
- int n;
+ ssize_t n;
unsigned int max;
if (virNetServerServiceInitialize() < 0)
diff --git a/src/util/virjson.c b/src/util/virjson.c
index c123943..ae6362b 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -864,7 +864,7 @@ virJSONValueIsArray(virJSONValuePtr array)
}
-int
+ssize_t
virJSONValueArraySize(const virJSONValue *array)
{
if (array->type != VIR_JSON_TYPE_ARRAY)
diff --git a/src/util/virjson.h b/src/util/virjson.h
index a7df6e5..66ed48a 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -114,7 +114,7 @@ virJSONValuePtr virJSONValueObjectGetByType(virJSONValuePtr object,
const char *key, virJSONType type);
bool virJSONValueIsArray(virJSONValuePtr array);
-int virJSONValueArraySize(const virJSONValue *array);
+ssize_t virJSONValueArraySize(const virJSONValue *array);
virJSONValuePtr virJSONValueArrayGet(virJSONValuePtr object, unsigned int element);
virJSONValuePtr virJSONValueArraySteal(virJSONValuePtr object, unsigned int element);
diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c
index 2366a74..7aa0f1d 100644
--- a/src/util/virlockspace.c
+++ b/src/util/virlockspace.c
@@ -293,7 +293,7 @@ virLockSpacePtr virLockSpaceNewPostExecRestart(virJSONValuePtr object)
{
virLockSpacePtr lockspace;
virJSONValuePtr resources;
- int n;
+ ssize_t n;
size_t i;
VIR_DEBUG("object=%p", object);
@@ -336,7 +336,7 @@ virLockSpacePtr virLockSpaceNewPostExecRestart(virJSONValuePtr object)
const char *tmp;
virJSONValuePtr owners;
size_t j;
- int m;
+ ssize_t m;
if (VIR_ALLOC(res) < 0)
goto error;
--
2.4.9
9 years, 1 month
[libvirt] Cannot dump core: error: Requested operation is not valid: domain is marked for auto destroy
by Richard W.M. Jones
I wonder if there's a reason why it is not possible to dump the core
of a KVM domain which is set to autodestroy.
$ virsh dump guestfs-4xe592eyqq4rfnk9 /tmp/guestfs-4xe592eyqq4rfnk9.core
error: Failed to core dump domain guestfs-4xe592eyqq4rfnk9 to /tmp/guestfs-4xe592eyqq4rfnk9.core
error: Requested operation is not valid: domain is marked for auto destroy
All libguestfs domains have the autodestroy flag, but I am trying to
debug one which is crashing in the guest (RHBZ#1269779) and having the
ability to dump it would be very helpful.
I added the following patch to libvirt, which allowed me to dump the
domain with no apparent ill effects.
(The patch is a bit of a hack, and I did not check it very closely, so
it's probably not suitable for going upstream).
Rich.
>From ffb899e436c15974b0f42b1cbd8337701c3a05d1 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones(a)redhat.com>
Date: Thu, 8 Oct 2015 11:11:10 +0100
Subject: [PATCH] qemu: Don't prevent core dump of auto-destroy domain.
---
src/qemu/qemu_driver.c | 8 ++++----
src/qemu/qemu_migration.c | 16 +++++++++-------
src/qemu/qemu_migration.h | 2 +-
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8cd5ee3..c3778de 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3184,7 +3184,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!qemuMigrationIsAllowed(driver, vm, false, 0))
+ if (!qemuMigrationIsAllowed(driver, vm, false, false, 0))
goto cleanup;
if (qemuDomainObjBeginAsyncJob(driver, vm, QEMU_ASYNC_JOB_SAVE) < 0)
@@ -3616,7 +3616,7 @@ doCoreDump(virQEMUDriverPtr driver,
goto cleanup;
}
- if (!qemuMigrationIsAllowed(driver, vm, false, 0))
+ if (!qemuMigrationIsAllowed(driver, vm, false, true, 0))
goto cleanup;
ret = qemuMigrationToFile(driver, vm, fd, 0, path,
@@ -13690,7 +13690,7 @@ qemuDomainSnapshotCreateActiveInternal(virConnectPtr conn,
bool resume = false;
int ret = -1;
- if (!qemuMigrationIsAllowed(driver, vm, false, 0))
+ if (!qemuMigrationIsAllowed(driver, vm, false, false, 0))
goto cleanup;
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
@@ -14505,7 +14505,7 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
/* do the memory snapshot if necessary */
if (memory) {
/* check if migration is possible */
- if (!qemuMigrationIsAllowed(driver, vm, false, 0))
+ if (!qemuMigrationIsAllowed(driver, vm, false, false, 0))
goto cleanup;
/* allow the migration job to be cancelled or the domain to be paused */
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index d0f1e46..19031f9 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2201,7 +2201,7 @@ qemuMigrationIsAllowedHostdev(const virDomainDef *def)
bool
qemuMigrationIsAllowed(virQEMUDriverPtr driver,
virDomainObjPtr vm,
- bool remote,
+ bool remote, bool coreDump,
unsigned int flags)
{
int nsnapshots;
@@ -2235,10 +2235,12 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
/* following checks don't make sense for offline migration */
if (!(flags & VIR_MIGRATE_OFFLINE)) {
- if (qemuProcessAutoDestroyActive(driver, vm)) {
- virReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("domain is marked for auto destroy"));
- return false;
+ if (!coreDump) {
+ if (qemuProcessAutoDestroyActive(driver, vm)) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("domain is marked for auto destroy"));
+ return false;
+ }
}
@@ -2987,7 +2989,7 @@ qemuMigrationBeginPhase(virQEMUDriverPtr driver,
if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_OUT)
qemuMigrationJobSetPhase(driver, vm, QEMU_MIGRATION_PHASE_BEGIN3);
- if (!qemuMigrationIsAllowed(driver, vm, true, flags))
+ if (!qemuMigrationIsAllowed(driver, vm, true, false, flags))
goto cleanup;
if (!(flags & VIR_MIGRATE_UNSAFE) &&
@@ -5347,7 +5349,7 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
goto endjob;
}
- if (!qemuMigrationIsAllowed(driver, vm, true, flags))
+ if (!qemuMigrationIsAllowed(driver, vm, true, false, flags))
goto endjob;
if (!(flags & VIR_MIGRATE_UNSAFE) &&
diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h
index 8175f4b..cc4d25d 100644
--- a/src/qemu/qemu_migration.h
+++ b/src/qemu/qemu_migration.h
@@ -174,7 +174,7 @@ int qemuMigrationConfirm(virConnectPtr conn,
int cancelled);
bool qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm,
- bool remote, unsigned int flags);
+ bool remote, bool coreDump, unsigned int flags);
int qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
int fd, off_t offset, const char *path,
--
2.5.3
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
9 years, 1 month
[libvirt] [libvirt-test-API] [PATCH] fix some typo
by Shanzhi Yu
Signed-off-by: Shanzhi Yu <shyu(a)redhat.com>
---
repos/domain/fsinfo.py | 2 +-
repos/domain/install_linux_check.py | 2 +-
repos/domain/install_linux_net.py | 2 +-
repos/interface/define.py | 2 +-
repos/interface/undefine.py | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/repos/domain/fsinfo.py b/repos/domain/fsinfo.py
index e6d1bf0..d4614f5 100644
--- a/repos/domain/fsinfo.py
+++ b/repos/domain/fsinfo.py
@@ -81,7 +81,7 @@ def fsinfo(params):
return 1
fsinfo = vm.fsInfo()
- logger.info("get geust filesystem information")
+ logger.info("get guest filesystem information")
mac = get_guest_mac(vm)
if not mac:
diff --git a/repos/domain/install_linux_check.py b/repos/domain/install_linux_check.py
index ab1e7db..bb3cc2a 100644
--- a/repos/domain/install_linux_check.py
+++ b/repos/domain/install_linux_check.py
@@ -99,7 +99,7 @@ def install_linux_check(params):
Test_Result = 1
return Test_Result
- # Check whether vcpu equals the value set in geust config xml
+ # Check whether vcpu equals the value set in guest config xml
logger.info("check point3: check cpu number in guest equals to \
the value set in domain config xml")
vcpunum_expect = int(utils.get_num_vcpus(domain_name))
diff --git a/repos/domain/install_linux_net.py b/repos/domain/install_linux_net.py
index 4367d97..7173294 100644
--- a/repos/domain/install_linux_net.py
+++ b/repos/domain/install_linux_net.py
@@ -239,7 +239,7 @@ def install_linux_net(params):
logger.info("booting guest vm off harddisk failed")
return 1
else:
- logger.info("geust is booting up")
+ logger.info("guest is booting up")
else:
interval = 0
while(interval < 3600):
diff --git a/repos/interface/define.py b/repos/interface/define.py
index 18ba71b..e0dbcf4 100644
--- a/repos/interface/define.py
+++ b/repos/interface/define.py
@@ -42,7 +42,7 @@ def define(params):
try:
conn.interfaceDefineXML(xmlstr, 0)
if check_define_interface(ifacename):
- logger.info("define a interface form xml is successful")
+ logger.info("define a interface from xml is successful")
else:
logger.error("fail to check define interface")
return 1
diff --git a/repos/interface/undefine.py b/repos/interface/undefine.py
index f9b2d74..8b250de 100644
--- a/repos/interface/undefine.py
+++ b/repos/interface/undefine.py
@@ -39,14 +39,14 @@ def undefine(params):
try:
ifaceobj.undefine()
if check_undefine_interface(ifacename):
- logger.info("undefine a interface form xml is successful")
+ logger.info("undefine a interface is successful")
else:
logger.error("fail to check undefine interface")
return 1
except libvirtError, e:
logger.error("API error message: %s, error code is %s" \
% (e.message, e.get_error_code()))
- logger.error("fail to undefine a interface from xml")
+ logger.error("fail to undefine a interface")
return 1
return 0
--
1.8.3.1
9 years, 1 month