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

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

To: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] Migrating domU : image file based to LVM partition
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=O4XiM4M+GhbjpTLKA2tD/AYeeBeH9Mty9kP/l4RyO/s=; b=VhC4X1R19ZDhYaAj5AUJqvzLJRG59+zN1u9BoE84ZjgxbMa5dDJxEsWI3JyCPxkq2f J99Lnjpky28osdLh7vX8QBqiVJ8uQaYvfhT7q4+sf5GXrStf19zVunYtH4mAqsaIxx2U VEYAUTnK8dQFebayHcz/qLRzfIE2jbmd4pGig=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)
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",
           "phy:vg0/domu.swap,xvda2,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

Cheers,
N.

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
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>