WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Can you convert Windows LVM domU to sparse img file?

To: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
Subject: Re: [Xen-users] Can you convert Windows LVM domU to sparse img file?
From: Ross Walker <rswwalker@xxxxxxxxx>
Date: Thu, 15 Jan 2009 09:25:14 -0500
Cc: Xen Users Mailing List <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 15 Jan 2009 06:26:03 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=646T5mCg9vUUEtswCqqClbSI9/K2vsjQxcJDttT5B08=; b=KGcPgLeioTkPylWSggG4+FSqZmbRH+0SxFCfhE7aScV5LSZ6Hah53fEZ1dFgcNlhx/ uPuZ/cwtgSdNoBv2uehvxXuUjy6/s8qaKqTekSKcLlZdlzXFXAXkU70y2QXU8jXLM0AU yuGvz26bLTohdFprhVv0mmtXIrIb8El7mXFgM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=E9MDHDfdMZr5WJHO5zgl0QcsJEm8SalUFmcYpiv4r/moeWarqxyNmgo2rNbbB3c/PO S1ERPKpCE4HTYzoeYlIo5C7oziZZnCH4O5nQCFYuIykZZXnElQfjcXTpPG6ybigsFb3F QjkFeGqORTQXWOiOnAKCRfrzR/UYUx5uGUuW4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <496EF093.8090605@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <1231982574.7185.11.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <496EDED7.70201@xxxxxxxx> <496EF093.8090605@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Jan 15, 2009, at 3:15 AM, "Fajar A. Nugraha" <fajar@xxxxxxxxx> wrote:

Māris Ruskulis wrote:
You can do this by dd.
for example:
dd if=/dev/vg/winpart of=/home/myuser/winimage.img bs=4096
bs set to your block size, as i remember ntfs has 4096 by default.

bs=32M (or whatever "PE Size" that pvdisplay shows) will probably be faster.
dd won't give you SPARSE img file though. Then again, your LV could be
"dirty" (e.g contain deleted data) so that any "normal" attempt to
create sparse file will not be effective.

I'd suggest you just accept the full,non-sparse file that dd gives you. An alternative would be to use ntfsresize and ntfsclone, but it requires a lot more effort (including using kpartx,fdisk, and having a "good" MBR
handy).

1) create a sparse file the size needed

2) add it as a loop device

3) fdisk the loop device

4) ntfsclone the lv to the loop device.

That should do it in theory.

-Ross



James Pifer wrote:
I have a Windows 2000 domU running in an LVM partition. I need to move it to another host, but none of my other xen servers have lvm or free space to create an lvm. So I'd like to convert it to a sparse img file.
The file system in the domU is ntfs.
Can anyone suggest how to do this?

Thanks,
James



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users