|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Migrating DomUs from file VBD to LVM Backend
On Tuesday 24 April 2007 15:42, Ross S. W. Walker wrote:
> > -----Original Message-----
> > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> > [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> > Reinhard Brandstädter
> > Sent: Tuesday, April 24, 2007 9:25 AM
> > To: xen-users@xxxxxxxxxxxxxxxxxxx
> > Subject: [Xen-users] Migrating DomUs from file VBD to LVM Backend
> >
> > Hello,
> >
> > what would be the easiest and fastest way to migrate a file
> > based DomU to a
> > LVM based DomU. Given that the file contains a partition
> > table + partitions.
> >
> > I tried with an dummy approach:
> >
> > dd if=/path/to/file.img of=/dev/volumegroup/logical-volume.
> >
> > That gives me a logical volume that xm create refuses to use....
>
> What format is file.img, is it a sparse file created with dd, or
> is it a qcow qemu file?
It's a sparse file.
I found a solution which works, but not really elegant:
1. I created a LVM Volume with the size of the image
2. created a partition table on that volume (same layout as within the disk
image)
3. used kpartx to get device mappings from the file and the LVM volume
4. used 'dd' to dump the single partitions from the image to the single
partitions of the LVM volume.
Now I only wonder why dumping the image directly to the LVM volume doesn't
work.
Reinhard
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|