Release of libvirt-6.1.0
by Daniel Veillard
It's out, one day late, though I did the build and pushed the tag
in git yesterday, but I had forgotten to push the commit, thanks
Boris for raising this to me. So it's now available as signed tarball
and rpm source package at the usual place:
https://libvirt.org/sources/
This release come with a number of new features as listed below
but also make the packaging change of not relying on gnulib anymore for
platform compatibility, so there are some serious changes in this version:
New features:
- qemu: new rng backend type: builtin
It implements qemu builtin rng backend. That uses getrandom syscall to
generate random, no external rng source needed. Available since QEMU
4.2.
- support for virtio+hostdev NIC <teaming>
QEMU 4.2.0 and later, combined with a sufficiently recent guest
virtio-net driver (e.g. the driver included in Linux kernel 4.18 and
later), supports setting up a simple network bond device comprised of
one virtio emulated NIC and one hostdev NIC (which must be an SRIOV
VF). (in QEMU, this is known as the "virtio failover" feature). The
allure of this setup is that the bond will always favor the hostdev
device, providing better performance, until the guest is migrated - at
that time QEMU will automatically unplug the hostdev NIC and the bond
will send all traffic via the virtio NIC until migration is completed,
then QEMU on the destination side will hotplug a new hostdev NIC and
the bond will switch back to using the hostdev for network traffic. The
result is that guests desiring the extra performance of a hostdev NIC
are now migratable without network downtime (performance is just
degraded during migration) and without requiring a complicated bonding
configuration in the guest OS network config and complicated
unplug/replug logic in the management application on the host - it can
instead all be accomplished in libvirt with the interface <teaming>
subelement "type" and "persistent" attributes.
- support BR_ISOLATED flag for guest interfaces attached to a Linux host
bridge
Since Linux kernel 4.18, the Linux host bridge has had a flag
BR_ISOLATED that can be applied to individual ports. When this flag is
set for a port, traffic is blocked between that port and any other port
that also has the BR_ISOLATED flag set. libvirt domain interface config
now supports setting this flag via the <port isolated='yes'/> setting.
It can also be set for all connections to a particular libvirt network
by setting the same option in the network config - since the port for
the host itself does not have BR_ISOLATED set, the guests can
communicate with the host and the outside world, but guests on that
network can't communicate with each other. This feature works for QEMU
and LXC guests with interfaces attached to a Linux host bridge.
- qemu: Introduce the 'armvtimer' timer type
QEMU 5.0 introduces the ability to control the behavior of the virtual
timer for KVM ARM/virt guests, and this new timer type exposes the same
capability to libvirt users.
- qemu: Storage configuration improvements
Libvirt now accepts <backingStore type='volume'> and allows specifying
the offset and size of the image format container inside the storage
source via the <slices> subelement.
- qemu: Introduce the 'tpm-spapr' TPM model
This device, available starting from QEMU 5.0, is limited to pSeries
guests.
Improvements:
- qemu: Image format probing is allowed in certain cases
To resolve regressions when users didn't specify the backing image
format in the overlay, libvirt now probes the format in certain secure
scenarios which fixes a few common existing cases. Additionally the
knowledge base was extended to provide more information on how to
rectify the problem.
- qemu: Support "dies" in CPU topology
This CPU topology concept, new in QEMU 4.1.0, sits between the existing
"socket" and "core".
- libxl: Add support for Credit2 scheduler parameters
- lxc: Add support LXC 3 network configuration format
Bug fix:
- conf: Do not generate machine names ending with a dash
Recent systemd versions do not allow them.
Packaging changes:
- use of gnulib has been completely eliminated
Historically libvirt has embedded gnulib to provide fixes for various
platform portability problems. This usage has now been eliminated and
alternative approaches for platform portability problems adopted where
required. This has been validated on the set of platforms covered by
automated CI build testing. Other modern Linux distros using glibc are
expected to work. Linux distros using non-glibc packages, and other
non-Linux platforms may encounter regressions when building this
release. Please report any build problems encountered back to the
project maintainers for evaluation.
Thanks everybody for your help with this release, and sorry for the delay,
Daniel
--
Daniel Veillard | Red Hat Developers Tools http://developer.redhat.com/
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
4 years, 8 months
[libvirt PATCH] tests: do not include skipped tests in failedTests
by Ján Tomko
We recognize three return values from tests:
* OK -> 0
* SKIP -> EXIT_AM_SKIP
* ERROR -> anything else
Also check for EXIT_AM_SKIP when building a bitmap of failed tests,
otherwise the skipped tests would be printed in the suggested range
of tests that shoud be re-run.
Reported-by: Peter Krempa <pkrempa(a)redhat.com>
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Fixes: cebb468ef5e82b8d4253e27ef70c67812cf93c5a
---
tests/testutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/testutils.c b/tests/testutils.c
index 2f6d65364e..5fd81b70a2 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -172,7 +172,7 @@ virTestRun(const char *title,
fprintf(stderr, "!");
}
- if (ret != 0)
+ if (ret != 0 && ret != EXIT_AM_SKIP)
ignore_value(virBitmapSetBitExpand(failedTests, testCounter));
g_unsetenv("VIR_TEST_MOCK_TESTNAME");
--
2.24.1
4 years, 8 months
[PATCH 0/3] cleanups inspired by QMP-deprecation-introspection
by Peter Krempa
I take a look at Markus' QMP deprecation-introspection series. While
that requires a lot more work I've fixed a few things along.
Peter Krempa (3):
util: json: Convert virJSONValueNewObject() to g_new0
qemuMonitorJSONSetMigrationParams: Refactor command construction and
cleanup
qemuhotplugtestcpus: Always use 'query-cpus-fast'
src/admin/admin_server_dispatch.c | 3 -
src/locking/lock_daemon.c | 8 +-
src/logging/log_daemon.c | 8 +-
src/logging/log_handler.c | 5 -
src/qemu/qemu_agent.c | 8 +-
src/qemu/qemu_command.c | 3 +-
src/qemu/qemu_firmware.c | 20 +-
src/qemu/qemu_migration_params.c | 8 +-
src/qemu/qemu_monitor_json.c | 53 +--
src/qemu/qemu_vhost_user.c | 3 +-
src/rpc/virnetdaemon.c | 10 +-
src/rpc/virnetserver.c | 5 +-
src/rpc/virnetserverclient.c | 3 -
src/rpc/virnetserverservice.c | 3 -
src/rpc/virnetsocket.c | 3 +-
src/util/virjson.c | 21 +-
src/util/virlease.c | 6 +-
src/util/virlockspace.c | 6 -
src/util/virmacmap.c | 5 +-
src/util/virnetdev.c | 3 +-
tests/qemuhotplugtest.c | 2 +
.../ppc64-modern-bulk-monitor.json | 390 +++++++++---------
.../ppc64-modern-individual-monitor.json | 196 ++++-----
.../x86-modern-bulk-monitor.json | 150 +++----
.../x86-modern-individual-add-monitor.json | 92 ++---
.../x86-old-bulk-monitor.json | 150 +++----
tests/qemumonitortestutils.c | 8 +-
27 files changed, 529 insertions(+), 643 deletions(-)
--
2.24.1
4 years, 8 months
[libvirt PATCH 0/6] [RFC] qemu: implement support for pulling into non-active layers
by Pavel Mores
QEMU's block-stream command supports pulling ("streaming" in QMP lingo) into
arbitrary layer, however libvirt can only pull into an active layer. This
series is a proof-of-concept work to extend libvirt's pull to support pulling
into non-active layers as well.
While this doesn't seem to be a much demanded feature by itself, it can be seen
as a prerequisite to implementing full support for external snapshots in
snapshot-delete(*) as that appears to be implementable in terms of a
full-featured pull.
As stated above, this is a proof-of-concept work so admittedly not much effort
went into fully polishing the series. The expectation is that the series will
have to change heavily anyway before it's good enough to be pushed.
(*) https://bugzilla.redhat.com/show_bug.cgi?id=1519001
Pavel Mores (6):
qemu: block: add 'top' parameter to qemuDomainBlockPullCommon()
qemu: block: pull job extended with 'top' parameter
qemu: block: blockpull param 'top' support in virsh proper
qemu: block: blockpull param 'top' support in driver and RPC
qemu: block: 'top' support in construction of QMP block-stream
qemu: block: extend pull job completion with 'top' handling
include/libvirt/libvirt-domain.h | 4 ++--
src/driver-hypervisor.h | 1 +
src/libvirt-domain.c | 7 ++++---
src/qemu/qemu_blockjob.c | 35 ++++++++++++++++++++++++++++----
src/qemu/qemu_blockjob.h | 2 ++
src/qemu/qemu_driver.c | 33 +++++++++++++++++++++++-------
src/remote/remote_protocol.x | 1 +
src/remote_protocol-structs | 1 +
tools/virsh-domain.c | 14 ++++++++++---
9 files changed, 79 insertions(+), 19 deletions(-)
--
2.24.1
4 years, 8 months
Redfish API implementation for GSoC 2020.
by ROHAN Gupta
Hi everyone, I am Rohan Gupta a CSE undergraduate student at Shri Mata
Vaishno Devi University currently in the 4th semester. I would like to work
on the idea: Redfish API implementation for GSoC 2020. I find this
interesting as I have worked with REST apis in the past and have sound
knowledge about it. Here's the link to my GitHub profile:
https://github.com/Rohan-cod
4 years, 8 months
[PATCH v2 00/30] Configurable policy for handling deprecated interfaces
by Markus Armbruster
Based-on: <20200227144531.24309-1-armbru(a)redhat.com>
This series extends QMP introspection to cover deprecation.
Additionally, new option -compat lets you configure what to do when
deprecated interfaces get used. This is intended for testing users of
the management interfaces. It is experimental.
-compat deprecated-input=<in-policy> configures what to do when
deprecated input is received. Available policies:
* accept: Accept deprecated commands and arguments (default)
* reject: Reject them
* crash: Crash
-compat deprecated-output=<out-policy> configures what to do when
deprecated output is sent. Available output policies:
* accept: Emit deprecated command results and events (default)
* hide: Suppress them
For now, -compat covers only deprecated syntactic aspects of QMP. We
may want to extend it to cover semantic aspects, CLI, and experimental
features.
PATCH 01-04: Documentation fixes
PATCH 05-10: Test improvements
PATCH 11-24: Add feature flags to remaining user-defined types and to
struct members
PATCH 25-26: New special feature 'deprecated', visible in
introspection
PATCH 27-30: New -compat to set policy for handling stuff marked with
feature 'deprecated'
Comparison to RFC (24 Oct 2019):
* Cover arguments and results in addition to commands and events
* Half-baked "[RFC PATCH 18/19] qapi: Include a warning in the
response to a deprecated command" dropped
See also last item of
Subject: Minutes of KVM Forum BoF on deprecating stuff
Date: Fri, 26 Oct 2018 16:03:51 +0200
Message-ID: <87mur0ls8o.fsf(a)dusky.pond.sub.org>
https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg05828.html
Markus Armbruster (30):
qemu-doc: Belatedly document QMP command arg & result deprecation
qapi: Belatedly update doc comment for @wait deprecation
docs/devel/qapi-code-gen: Clarify allow-oob introspection
docs/devel/qapi-code-gen: Document 'features' introspection
tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers
tests/test-qmp-cmds: Check responses more thoroughly
tests/test-qmp-cmds: Simplify test data setup
tests/test-qmp-event: Simplify test data setup
tests/test-qmp-event: Use qobject_is_equal()
tests/test-qmp-event: Check event is actually emitted
qapi/schema: Clean up around QAPISchemaEntity.connect_doc()
qapi: Add feature flags to remaining definitions
qapi: Consistently put @features parameter right after @ifcond
qapi/introspect: Rename *qlit* to reduce confusion
qapi/introspect: Factor out _make_tree()
qapi/schema: Change _make_features() to a take feature list
qapi/schema: Reorder classes so related ones are together
qapi/schema: Rename QAPISchemaObjectType{Variant,Variants}
qapi/schema: Call QAPIDoc.connect_member() in just one place
qapi: Add feature flags to struct members
qapi: Inline do_qmp_dispatch() into qmp_dispatch()
qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP
qapi: Simplify how qmp_dispatch() gets the request ID
qapi: Replace qmp_dispatch()'s TODO comment by an explanation
qapi: New special feature flag "deprecated"
qapi: Mark deprecated QMP parts with feature 'deprecated'
qemu-options: New -compat to set policy for deprecated interfaces
qapi: Implement -compat deprecated-output=hide
qapi: Implement -compat deprecated-input=reject
qapi: New -compat deprecated-input=crash
docs/devel/qapi-code-gen.txt | 79 ++-
qemu-deprecated.texi | 38 +-
tests/qapi-schema/doc-good.texi | 32 ++
qapi/block-core.json | 69 ++-
qapi/block.json | 9 +-
qapi/char.json | 1 +
qapi/compat.json | 52 ++
qapi/control.json | 11 +-
qapi/introspect.json | 26 +-
qapi/machine.json | 34 +-
qapi/migration.json | 36 +-
qapi/misc.json | 13 +-
qapi/qapi-schema.json | 1 +
include/qapi/compat-policy.h | 20 +
include/qapi/qmp/dispatch.h | 1 +
include/qapi/qobject-input-visitor.h | 9 +
include/qapi/qobject-output-visitor.h | 9 +
include/qapi/visitor-impl.h | 3 +
include/qapi/visitor.h | 9 +
qapi/qapi-visit-core.c | 9 +
qapi/qmp-dispatch.c | 137 ++---
qapi/qobject-input-visitor.c | 29 ++
qapi/qobject-output-visitor.c | 20 +
softmmu/vl.c | 17 +
tests/test-qmp-cmds.c | 249 +++++----
tests/test-qmp-event.c | 183 ++-----
qapi/Makefile.objs | 8 +-
qapi/trace-events | 1 +
qemu-options.hx | 23 +
scripts/qapi/commands.py | 20 +-
scripts/qapi/doc.py | 16 +-
scripts/qapi/events.py | 16 +-
scripts/qapi/expr.py | 14 +-
scripts/qapi/introspect.py | 104 ++--
scripts/qapi/schema.py | 488 ++++++++++--------
scripts/qapi/types.py | 8 +-
scripts/qapi/visit.py | 28 +-
tests/Makefile.include | 1 +
tests/qapi-schema/alternate-base.err | 2 +-
tests/qapi-schema/doc-good.json | 22 +-
tests/qapi-schema/doc-good.out | 18 +
.../qapi-schema/features-deprecated-type.err | 2 +
.../qapi-schema/features-deprecated-type.json | 3 +
.../qapi-schema/features-deprecated-type.out | 0
tests/qapi-schema/qapi-schema-test.json | 48 +-
tests/qapi-schema/qapi-schema-test.out | 46 +-
tests/qapi-schema/test-qapi.py | 26 +-
47 files changed, 1259 insertions(+), 731 deletions(-)
create mode 100644 qapi/compat.json
create mode 100644 include/qapi/compat-policy.h
create mode 100644 tests/qapi-schema/features-deprecated-type.err
create mode 100644 tests/qapi-schema/features-deprecated-type.json
create mode 100644 tests/qapi-schema/features-deprecated-type.out
--
2.21.1
4 years, 8 months
[PATCH] maint: Post-release version bump to 6.2.0
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed.
configure.ac | 2 +-
docs/news.xml | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ac4052afb6..e565437062 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
-AC_INIT([libvirt], [6.1.0], [libvir-list(a)redhat.com], [], [https://libvirt.org])
+AC_INIT([libvirt], [6.2.0], [libvir-list(a)redhat.com], [], [https://libvirt.org])
if test $srcdir = "."
then
diff --git a/docs/news.xml b/docs/news.xml
index 54afd3e286..7fd88f9998 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -42,6 +42,14 @@
-->
<libvirt>
+ <release version="v6.2.0" date="unreleased">
+ <section title="New features">
+ </section>
+ <section title="Improvements">
+ </section>
+ <section title="Bug fixes">
+ </section>
+ </release>
<release version="v6.1.0" date="2020-03-03">
<section title="New features">
<change>
--
2.24.1
4 years, 8 months
[libvirt PATCH 0/6] Introduce Local Migration Support in Libvirt
by Daniel P. Berrangé
I'm (re-)sending this patch series on behalf of Shaju Abraham
<shaju.abraham(a)nutanix.com> who has tried to send this several times
already.
Red Hat's email infrastructure is broken, accepting the mails and then
failing to deliver them to mailman, or any other Red Hat address.
Unfortunately it means that while we can send comments back to Shaju
on this thread, subscribers will then probably fail to see any responses
Shaju tries to give :-( To say this is bad is an understatement. I have
yet another ticket open tracking & escalating this awful problem but
can't give any ETA on a fix :-(
Anyway, with that out of the way, here's Shaju's original cover letter
below....
1) What is this patch series about?
Local live migration of a VM is about Live migrating a VM instance with in the
same node. Traditional libvirt live migration involves migrating the VM from a
source node to a remote node. The local migrations are forbidden in Libvirt for
a myriad of reasons. This patch series is to enable local migration in Libvirt.
2) Why Local Migration is important?
The ability to Live migrate a VM locally paves the way for hypervisor upgrades
without shutting down the VM. For example to upgrade qemu after a security
upgrade, we can locally migrate the VM to the new qemu instance. By utilising
capabilities like "bypass-shared-memory" in qemu, the hypervisor upgrades are
faster.
3) Why is local migration difficult in Libvirt?
Libvirt always assumes that the name/UUID pair is unique with in a node. During
local migration there will be two different VMs with the same UUID/name pair
which will confuse the management stack. There are other path variables like
monitor path, config paths etc which assumes that the name/UUID pair is unique.
So during migration the same monitor will be used by both the source and the
target. We cannot assign a temporary UUID to the target VM, since UUID is a part
of the machine ABI which is immutable.
To decouple the dependecy on UUID/name, a new field (the domain id) is included
in all the PATHs that Libvirt uses. This will ensure that all instances of the
VM gets a unique PATH.
4) How is the Local Migration Designed ?
Libvirt manages all the VM domain objects using two hash tables which are
indexed using either the UUID or Name.During the Live migration the domain
entry in the source node gets deleted and a new entry gets populated in the
target node, which are indexed using the same name/UUID.But for the Local
migration, there is no remote node. Both the source and the target nodes are
same. So inorder to model the remote node, two more hashtables are introduced
which represents the hash tables of the remote node during migration.
The Libvirt migration involves 5 stages
1) Begin
2) Prepare
3) Perform
4) Finish
5) Confirm
Begin,Perform and Confirm gets executed on the source node where as Prepare
and Finish gets executed on the target node. In the case of Local Migration
Perform and Finish stages uses the newly introduced 'remote hash table' and
rest of the stages uses the 'source hash tables'. Once the migration is
completed, that is after the confirm phase, the VM domain object is moved from
the 'remote hash table' to the 'source hash table'. This is required so that
other Libvirt commands like 'virsh list' can display all the VMs running in the
node.
5) How to test Local Migration?
A new flag 'local' is added to the 'virsh migrate' command to enable local
migration. The syntax is
virsh migrate --live --local 'domain-id' qemu+ssh://ip-address/system
6) What are the known issues?
SeLinux policies is know to have issues with the creating /dev/hugepages entries
during VM launch. In order to test local migration disable SeLinux using 'setenforce 0'.
Shaju Abraham (6):
Add VIR_MIGRATE_LOCAL flag to virsh migrate command
Introduce remote hash tables and helper routines
Add local migration support in QEMU Migration framework
Modify close callback routines to handle local migration
Make PATHs unique for a VM object instance
Move the domain object from remote to source hash table
include/libvirt/libvirt-domain.h | 6 +
src/conf/virdomainobjlist.c | 232 +++++++++++++++++++++++++++++--
src/conf/virdomainobjlist.h | 10 ++
src/libvirt_private.syms | 4 +
src/qemu/qemu_conf.c | 4 +-
src/qemu/qemu_domain.c | 28 +++-
src/qemu/qemu_domain.h | 2 +
src/qemu/qemu_driver.c | 46 +++++-
src/qemu/qemu_migration.c | 59 +++++---
src/qemu/qemu_migration.h | 5 +
src/qemu/qemu_migration_cookie.c | 121 ++++++++--------
src/qemu/qemu_migration_cookie.h | 2 +
src/qemu/qemu_process.c | 3 +-
src/qemu/qemu_process.h | 2 +
src/util/virclosecallbacks.c | 48 +++++--
src/util/virclosecallbacks.h | 3 +
tools/virsh-domain.c | 7 +
17 files changed, 471 insertions(+), 111 deletions(-)
--
2.24.1
4 years, 8 months
[PATCH] rpc: 'getaddrinfo' function support both IPv4 and IPv6
by Zhimin Feng
If only IPv6 is configured and nscd is started, getaddrinfo
function reture value is -9. So hints.ai_flags should include
the AI_V4MAPPED flag.
The following is the partial implementation of getaddrinfo(glibc):
if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET)
at->family = AF_INET;
else if (req->ai_family == AF_INET6 && (req->ai_flags & AI_V4MAPPED))
{
at->addr[3] = at->addr[0];
at->addr[2] = htonl (0xffff);
at->addr[1] = 0;
at->addr[0] = 0;
at->family = AF_INET6;
}
else
{
result = -EAI_ADDRFAMILY;
goto free_and_return;
}
Signed-off-by: Zhimin Feng <fengzhimin1(a)huawei.com>
---
src/rpc/virnetsocket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index a217404fa6..c547acefc0 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -575,7 +575,7 @@ int virNetSocketNewConnectTCP(const char *nodename,
memset(&hints, 0, sizeof(hints));
hints.ai_family = family;
- hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
+ hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG | AI_V4MAPPED;
hints.ai_socktype = SOCK_STREAM;
int e = getaddrinfo(nodename, service, &hints, &ai);
--
2.19.1
4 years, 8 months
[PATCH] qemu: Don't compare local and remote hostnames on migration
by Michal Privoznik
Libvirt tries to forbid migration onto the same host and it does
that by checking if local and remote hostnames are the same and
whether local and remote UUIDs are the same. Well, the latter
makes sense but the former doesn't really because libvirtd can be
running inside an UTS namespace and hostnames can appear the same
on both sides of migration. On the other hand, host UUIDs are
unique, so rely on them when trying to prevent migration onto the
same host.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1639596
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_migration_cookie.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index a5a9edffc3..1d88ac1d22 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1230,19 +1230,17 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
}
VIR_FREE(tmp);
- /* Check & forbid "localhost" migration */
if (!(mig->remoteHostname = virXPathString("string(./hostname[1])", ctxt))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("missing hostname element in migration data"));
goto error;
}
- if (STREQ(mig->remoteHostname, mig->localHostname)) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Attempt to migrate guest to the same host %s"),
- mig->remoteHostname);
- goto error;
- }
+ /* Historically, this is the place where we checked whether remoteHostname
+ * and localHostname are the same. But even if they were, it doesn't mean
+ * the domain is migrating onto the same host. Rely on UUID which can tell
+ * for sure. */
+ /* Check & forbid localhost migration */
if (!(tmp = virXPathString("string(./hostuuid[1])", ctxt))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("missing hostuuid element in migration data"));
--
2.24.1
4 years, 8 months