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/
Home Products Support Community News


Re: [Xen-users] Questions on qcow, qcow2 versus LVM

On Thu, Dec 24, 2009 at 11:56 PM, Matthew Law <matt@xxxxxxxxxxxxxxxxxx> wrote:
> # domU backing store
> lvcreate -C y -L 10G -n myvm VolGroupVM
> parted /dev/VolGroupVM/myvm mklabel msdos
> parted /dev/VolGroupVM/myvm mkpartfs primary ext2 0 1024000
> kpartx -p "" -av /dev/VolGroupVM/myvm
> tune2fs -j /dev/mapper/myvm1
> kpartx -d /dev/VolGroupVM/myvm

hmm ... kpartx -d part looks OK. I use something like


no parted/kpartx involved, since the filesystem and swap is directly on the LV

> # domU swap
> lvcreate -C y -L 512 -n myvm-swap VolGroupVM
> parted /dev/VolGroupVM/myvm-swap mklabel msdos
> parted /dev/VolGroupVM/myvm-swap mkpartfs primary linux-swap 0 512
> mkswap /dev/mapper/VolGroupVM-myvm--swapp1
> lvscan | sort | grep ${NAME}

what, no "kpartx" here? Not even "kpartx -a"? How did you get
/dev/mapper/VolGroupVM-myvm--swapp1, was it automatically created by
parted without the need to manually run kpartx?

> Then it is basically a case of (from memory):
> mount -t ext3 /dev/mapper/myvm1 /mnt/vminstall
> tar -xzf /home/vmimages/image.tar.gz -C /mnt/vminstall
> umount /mnt/vminstall

looks good.

> I have cobbled together these commands based on what I have read at
> various places.  Have I screwed up somewhere?

I'd say the biggest difference from my setup is that you use
partitions with parted and kpartx. I haven't tested that, but it might
be your source of problem. Try partionless setup that I mentioned
earier to narrow down the source of problem.


Xen-users mailing list