[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-users] Re: Get rid of the partition table in a domU LVM
As an example to complement, the step by step protocol, knowing the following: 1 - dom0 is a CentOS 54 x86_64 AMD server2 - /dev/vg1/domu.pristine hosts a SL 54 x86_64 PV domU which runs just fine; For simplicity, only one partition resides inside this LVM (/dev/xvda1 --> /). 3 - /dev/vg1/test will be my new LV domU host (lvcreate -L5G -n test vg1 ; mkfs.ext3 /dev/vg1/test) 4 - domU to copy is down. [dom0]# lvscan ACTIVE '/dev/vg1/test' [5.00 GB] inherit ACTIVE '/dev/vg1/domu.pristine' [4.00 GB] inherit [dom0]# fdisk -l /dev/vg1/domu.pristine Disk /dev/vg1/domu.pristine: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System /dev/vg1/domu.pristine1 * 1 522 4192933+ 83 Linux [dom0]# kpartx -l /dev/vg1/domu.pristine domu.pristine1 : 0 8385867 /dev/vg1/domu.pristine 63 [dom0]# kpartx -av /dev/vg1/domu.pristine add map domu.pristine1 : 0 8385867 linear /dev/vg1/domu.pristine 63 [dom0]# ls /dev/mapper/ | grep domu.pristine domu.pristine1 [dom0]# mount /dev/vg1/test /mnt/test [dom0]# mount /dev/vg1/domu.pristine /mnt/loop/ [dom0]# cp -ax /mnt/loop/* mnt/test [dom0]# umount /mnt/loop/ [dom0]# kpartx -dv /dev/vg1/domu.pristine After some tweeking on the new domU : [dom0]# cat /mnt/test/etc/fstab /dev/xvda1 / ext3 defaults 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 [dom0]# cat /mnt/test/etc/grub.conf ... snip ... default=0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu title Scientific Linux (2.6.18-164.2.1.el5xen) root (hd0,0)kernel /boot/vmlinuz-2.6.18-164.2.1.el5xen ro root=/dev/xvda1 console=xvc0 rhgb quiet initrd /boot/initrd-2.6.18-164.2.1.el5xen.img [dom0]# umount /mnt/test [dom0]# cat test.xen name = "test" maxmem = 512 memory = 512 vcpus = 1 bootloader = "/usr/bin/pygrub" on_reboot = 'restart' on_crash = 'restart' on_poweroff = "destroy" disk = [ "phys:/dev/vg1/test,xvda1,w" ] vif = [ "bridge=xenbr0" ] [dom0]# xm dry-run test.xen Using config file "./test.xen". Checking domain: test: PERMITTED Checking resources: phys:/dev/vg1/test: PERMITTED Dry Run: PASSED [dom0]# xm create -c test.xen Using config file "./test.xen".Error: Device 51713 (vbd) could not be connected. Hotplug scripts not working. Pygrub shows up with one entry ... but then nothing else happens, just the above Error. Cheers, N. _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |