From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7Cww-0002rs-7b for qemu-devel@nongnu.org; Fri, 02 Jan 2015 19:52:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7Cwr-00004x-In for qemu-devel@nongnu.org; Fri, 02 Jan 2015 19:52:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7Cwr-0008WV-9l for qemu-devel@nongnu.org; Fri, 02 Jan 2015 19:52:09 -0500 Date: Sat, 3 Jan 2015 00:52:05 +0000 From: "Richard W.M. Jones" Message-ID: <20150103005205.GA14912@redhat.com> References: <20150102101929.GA10823@stefanha-thinkpad.redhat.com> <20150103004710.GD9693@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150103004710.GD9693@redhat.com> Subject: Re: [Qemu-devel] implement lvm-aware P2V to reduce time cost significantly for linux server List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Haoyu Zhang , qemu-devel , kvm-devel , Paolo Bonzini On Sat, Jan 03, 2015 at 12:47:10AM +0000, Richard W.M. Jones wrote: > On Fri, Jan 02, 2015 at 10:19:29AM +0000, Stefan Hajnoczi wrote: > > On Sat, Dec 27, 2014 at 09:28:53AM +0800, Haoyu Zhang wrote: > > > I want to P2V a redhat server to kvm vm, and lvm was used to manage disks > > > in the redhat server. > > > I want to only migrate the really used storage to vm image, which can > > > reduce the time cost significantly sometimes, > > > so I need the information of logical volume to physical disks bitmap, to > > > know which physical sectors were really used, > > > any ideas? > > > Is there a tool off-the-shelf have implemented the target? > > > > Have you looked at virt-p2v(1)? > > > > http://libguestfs.org/virt-p2v.1.html > > > > I'm not sure if it sparsifies the disk image during conversion or > > whether you would have to run virt-sparsify(1) afterwards > > (http://libguestfs.org/virt-sparsify.1.html). virt-sparsify(1) can > > definitely unmap LVM's unused space. > > It sparsifies automatically during conversion. No need to run > virt-sparsify afterwards :-) I should note this statement only applies to the new version of virt-p2v/virt-v2v, >= 1.28. The old version, 0.9.x, did not do this. The old version is not supported or maintained. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/