From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Migration issue - disk image was not updated. Date: Mon, 18 Jul 2011 18:07:48 +0300 Message-ID: <4E244C44.2060005@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: sirmax , kvm@vger.kernel.org To: Stefan Hajnoczi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60616 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991Ab1GRPH6 (ORCPT ); Mon, 18 Jul 2011 11:07:58 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 07/18/2011 05:39 PM, Stefan Hajnoczi wrote: > On Mon, Jul 18, 2011 at 2:08 PM, sirmax wrote: > > Node B with VM started: > > > > VM_IMAGE="/usr/local/virtual/img/win-xp-test-migrate.img" > > VM_NAME="win-xp-test-m" > > DEV0="kvm_m1" > > > > TMPDIR="/var/tmp/" /usr/bin/kvm \ > > -hda $VM_IMAGE \ > > -net nic -net tap,ifname=${DEV},script=no,downscript=no \ > > -boot c \ > > -vnc :15 \ > > -usbdevice tablet \ > > -usb \ > > -snapshot \ > > -monitor tcp:127.0.0.1:4415,server,nowait \ > > -monitor unix:/tmp/${VM_NAME}.fifo,server,nowait \ > > -incoming tcp:172.16.253.1:9999 > > The -snapshot command works by creating a temporary qcow2 image file > based on the disk image. In your case the effect is something like: > qemu-img create -f qcow2 -o backing_file=$VM_IMAGE /tmp/... > > This temporary file is now your disk image. All write operations from > the guest will touch the temporary file and *not* the base image > ($VM_IMAGE). > > When you combine -snapshot with live migration QEMU creates the > temporary image before performing the block migration. Therefore the > block migration copies over all data into the temporary file (doh!). > > Seems like a special case to me that would need to be carefully fixed > by performing snapshotting after block migration. > Why? It seems to me -snapshot means "don't write into this image". What I'd expect is that all data be written into the temporary image, perhaps with the optimization that unchanged data is taken from the backing file. -- error compiling committee.c: too many arguments to function