[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Migrating domU : image file based to LVM partition

  • To: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: Nuno Loureiro Ferreira <nunolf@xxxxxxxxx>
  • Date: Sat, 04 Jul 2009 01:18:38 +0200
  • Delivery-date: Fri, 03 Jul 2009 16:20:25 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=ocDbEMzcqRXYAgInYYS4u6t/95nG7D/poSi4aUuKbJt1WfOCe4W7Uo8EO8ub96LHJl lWdzDWQ6pM0J7fVh4tbCkXb4SPIwm/lqxUopMLsoYxACTPCVjI6pxahIdoit+mrkc2qM EpdkfRyIWyebn55O8RORSnET2HEogahWGZeTk=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Hey *

I've some SL47 PV domU's running on CentOS5.3 running Xen version 3.1.2-128.1.6.el5, created with virt-install. These domU's are image file based, with only one partition inside (/). They are already configured for my purposes and its time to dump these domU's to partitions (LVM partitions already in place) for performance reasons.
And, I'm having problems doing it.

1 - How do I dump the content of a domU to a LVM partition?
    Did the following:
    kpartx -va domu.img
    mount /dev/mapper/loop0p1 /mnt/loop
    mount /dev/vg0/domu  /mnt/domu
    cp -ax  /mnt/loop /mnt/domu
    umount /mnt/domu; umount /mnt/loop;
    kpartx -vd domu.img

A quick look inside /mnt/domu ... and all the original contents of the .img disk file seems to be there.
Is there a more direct way of doing such procedure?

2 - After step 1) I edited the xen config file (see below) as well as the /etc/fstab and /boot/grub/menu.lst accordingly.
But get the following error:

xm create bdii-enmr.xen -c
        Using config file "./bdii-enmr.xen".
        No handlers could be found for logger "xend"
        Error: Disk isn't accessible
        Usage: xm create <ConfigFile> [options] [vars]
        [... snip ...]

name = "domu"
maxmem = 512
memory = 512
vcpus = 1
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vfb = [  ]
# Previously :
#disk = [ "tap:aio:/data/enmr/domU/bdii/bdii-enmr.img,xvda,w",
#         "phy:vg0/domu.bdii_enmr.swap,/dev/xvda2,w"
#       ]
# Currently :
disk = [ "phys:vg0/domu.main,xvda1,w",
vif = [ "mac=00:16:3E:0F:51:53,bridge=xenbr0" ]

A couple of months ago I had some domu's LVM based created by virt-install. And I was not having problems booting up the VM's


P.S.Did the test, because I'm not receiving my own e-mails.
Went to the xen-users mailing list membership configuration, and all seems ok.

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.