From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yal2M-0002jL-Ec for qemu-devel@nongnu.org; Wed, 25 Mar 2015 09:08:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yal2J-00077b-PY for qemu-devel@nongnu.org; Wed, 25 Mar 2015 09:07:58 -0400 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:36604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yal2J-00077T-J6 for qemu-devel@nongnu.org; Wed, 25 Mar 2015 09:07:55 -0400 Received: by wgra20 with SMTP id a20so26700206wgr.3 for ; Wed, 25 Mar 2015 06:07:55 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5512B326.9030007@redhat.com> Date: Wed, 25 Mar 2015 14:07:50 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <201501130948157439113@sangfor.com.cn>, <201501131002532239699@sangfor.com.cn>, <201501141041046517018@sangfor.com.cn>, <201501141558472151450@sangfor.com.cn>, <201501151154417870577@sangfor.com.cn>, <201501151756164579870@sangfor.com.cn> <201503101001341072349@sangfor.com.cn> In-Reply-To: <201503101001341072349@sangfor.com.cn> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] question about live migration with storage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhang Haoyu , qemu-devel Cc: Gleb Natapov , Kevin Wolf , Peter Lieven , Stefan Hajnoczi On 10/03/2015 03:01, Zhang Haoyu wrote: > My test results show that when using thin-provisioning qcow2 > image(created by qemu-img create -f qcow2 preallocation=metadata), > even the unallocated sectors will be transferred to destination, so > much data is transferred, so the qcow2 image in destination is full > allocated. Yes, metadata preallocation actually allocates all sectors. Only, the qcow2 image is sparse so the sectors do not consume space on the source. I think you can avoid the problem by passing file.detect-zeroes=unmap in the -drive option of the destination QEMU. Kevin/Peter, can you confirm this should work? Paolo