From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzXch-0003xa-64 for qemu-devel@nongnu.org; Tue, 24 Jun 2014 16:47:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzXcY-00015w-5O for qemu-devel@nongnu.org; Tue, 24 Jun 2014 16:47:23 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:58481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzXcX-00015o-Vz for qemu-devel@nongnu.org; Tue, 24 Jun 2014 16:47:14 -0400 Received: by mail-we0-f169.google.com with SMTP id t60so1011681wes.0 for ; Tue, 24 Jun 2014 13:47:13 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53A9E3CD.9010503@redhat.com> Date: Tue, 24 Jun 2014 22:47:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <53A9D388.8080307@redhat.com> <53A9E266.8080506@redhat.com> In-Reply-To: <53A9E266.8080506@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Live Migration with different block devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Xiongzi Ge Cc: qemu-devel@nongnu.org Il 24/06/2014 22:41, Eric Blake ha scritto: >> > >> > I am trying to do migration with two different block devices in the source >> > and destination hosts. For example, in the source the data in /dev/vda >> > are 'aaaaa'. The guest has a cache. These data are cached. In the other >> > host, the data in this device are 'bbbbb'. If we do migration, I want >> > the guest vm recognize this change. How does qemu deal with the cache >> > data? Thanks. > If you want the guest to see different disk contents, then hotunplug the > original and hotplug in the new disk. Migration is NOT supposed to > change disk contents. Your problem is independent of migration. Or if you really do not want to do that, all access to the disk has to be done with O_DIRECT in the guest. Paolo