From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzcfS-0001hW-8O for qemu-devel@nongnu.org; Tue, 24 Jun 2014 22:10:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzcfN-00032X-1Q for qemu-devel@nongnu.org; Tue, 24 Jun 2014 22:10:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzcfM-00032N-C4 for qemu-devel@nongnu.org; Tue, 24 Jun 2014 22:10:28 -0400 Message-ID: <53AA2F92.2020103@redhat.com> Date: Tue, 24 Jun 2014 20:10:26 -0600 From: Eric Blake MIME-Version: 1.0 References: <53A9EDAC.6040808@theiggy.com> <53AA06BC.5090604@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OBLVwn3isoGHX6Jp9FApQQoilaqv6QRqE" Subject: Re: [Qemu-devel] Live Migration with different block devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xiongzi Ge Cc: Brian Jackson , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OBLVwn3isoGHX6Jp9FApQQoilaqv6QRqE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/24/2014 06:08 PM, Xiongzi Ge wrote: > Hi Eric, [we tend to avoid top-posting on technical lists] >=20 > This really works if I set up the same configuration (/dev/vda in the > guest) but the physical block devices are not the same after migration.= The > ABI is the same. When the guest cache stores a page like 'aaa' which i= s in > the block device of Host A. If the cache in the guest is also migrated = to > Host B, but data in the block device actually are "bbb" in Host B now. The ABI is NOT the same if the two host files do not have identical contents; it's just that qemu cannot diagnose your bug. > What > will happen? Will the cache data in the guest be migrated to the other= > host? The vmstate function in the qemu seems doing something to save t= he > vm state and the device state. >=20 Who knows what happen? You're in undefined territory, because you violated the premise that migration does not change disk contents behind the guest's back. > Should the guest re-open the block device and delete the previous cache= > data or just check the consistency of the cache and the block device? Rather than trying to figure out what happens with undefined behavior, how about you hot-unplug the old host device, then migrate, then hot-plug the new host device. That way, the guest will KNOW it it is connecting to a second disk, and not be confused by anything it cached about the first. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --OBLVwn3isoGHX6Jp9FApQQoilaqv6QRqE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTqi+SAAoJEKeha0olJ0Nq5v8H/ir8WlKaD4rPAfB1l5MC3zwc r525MUgr7CzQJJ/nDFjpRgi4WtV9DHrS58iFRRQSag5hkff5ui8Q5nKAEjiGpeEE W21cgPuscpjVUXkeQOVgWiwCumj7s0iClBB9YRYBW+0GN2f/6j2cRGBF8txrDC3M 0ebRucbJAgsHFfdcCXJ2W5dxSTrACBDUZFV2CC593nW9ThjOHWLx3PHVwA+JP4Yy gXW+rMrn5tAfh2qAScUQDYknhtJAG/upBc82a+MgE/47pX7YYxN8o/aIitfikU4l +rNeEvH/tiyYSt21HOvkv8o2D3PJysw5CagyWGrvJwXRph9OftAPREqZxudvG2A= =BSFd -----END PGP SIGNATURE----- --OBLVwn3isoGHX6Jp9FApQQoilaqv6QRqE--