Fajar A. Nugraha wrote:
On Thu, Dec 31, 2009 at 12:17 PM, Gerry Reno <greno@xxxxxxxxxxx> wrote:
bootloader = "/usr/bin/pygrub"
disk = [ "tap:aio:/var/lib/xen/images/CLOUD-CC-1.img,xvda5,w" ]
First of all, where on earth did you get your conversion instructions
from?
This looks like it:
http://lists.centos.org/pipermail/centos-virt/2009-November/001306.html
The example there says to map the disk as xvda :)
The original kvm guest had:
/dev/vda5 /boot
/dev/mapper/vg.... /
So I changed all references of /dev/vda5 to /dev/xvda5 in guest. I figured
the lvm would take care of itself.
yes, you need to change it on the guest.
Let's try some things:
(1) Keep the disk mapped as xvda on domU config file.
(2) assign /var/lib/xen/images/CLOUD-CC-1.img to a loopback device,
and use kpartx on it (something like "LOOP=`losetup -f`;losetup $LOOP
/var/lib/xen/images/CLOUD-CC-1.img;kpartx -av $LOOP")
(3) run "fdisk -l $LOOP"
(4) mount the partition on domU (something like "mount
/dev/mapper/loop0p5 /mnt/tmp")
(5) ls -la /mnt/tmp /mnt/tmp/boot/grub/menu.lst (or whatever your
mount point is)
(6) paste the content of menu.lst (relevant parts only, no need to
paste commented entries)
(7) run "/usr/bin/pygrub -i /var/lib/xen/images/CLOUD-CC-1.img"
Here are the results:
root@grp-01-23-02:/var/lib/xen/images# LOOP=`losetup -f`
root@grp-01-23-02:/var/lib/xen/images# echo $LOOP
/dev/loop0
root@grp-01-23-02:/var/lib/xen/images# losetup $LOOP
/var/lib/xen/images/CLOUD-CC-1.img
root@grp-01-23-02:/var/lib/xen/images#
root@grp-01-23-02:/var/lib/xen/images# kpartx -av $LOOP
add map loop0p1 (252:5): 0 251160147 linear /dev/loop0 63
add map loop0p2 (252:6): 0 498015 linear /dev/loop0 251160210
add map loop0p5 (252:7): 0 497952 252:6 63
root@grp-01-23-02:/var/lib/xen/images#
root@grp-01-23-02:/var/lib/xen/images# fdisk -l $LOOP
Disk /dev/loop0: 128.8 GB, 128849018880 bytes
255 heads, 63 sectors/track, 15665 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000438c1
Device Boot Start End Blocks Id System
/dev/loop0p1 * 1 15634 125580073+ 8e Linux LVM
/dev/loop0p2 15635 15665 249007+ 5 Extended
/dev/loop0p5 15635 15665 248976 83 Linux
root@grp-01-23-02:/var/lib/xen/images#
root@grp-01-23-02:/var/lib/xen/images# ls /mnt
boot iso
root@grp-01-23-02:/var/lib/xen/images# mkdir /mnt/tmp
root@grp-01-23-02:/var/lib/xen/images# mount /dev/mapper/loop0p5 /mnt/tmp
root@grp-01-23-02:/var/lib/xen/images# ls -la /mnt/tmp
/mnt/tmp/boot/grub/menu.lst
ls: cannot access /mnt/tmp/boot/grub/menu.lst: No such file or directory
/mnt/tmp:
total 87516
drwxr-xr-x 5 root root 1024 2009-12-30 14:57 .
drwxr-xr-x 5 root root 4096 2009-12-31 00:50 ..
-rw-r--r-- 1 root root 623709 2009-10-16 12:44 abi-2.6.31-14-server
-rw-r--r-- 1 root root 105771 2009-10-16 12:44 config-2.6.31-14-server
-rw-r--r-- 1 root root 105086 2009-12-27 20:05 config-2.6.31.6
drwxr-xr-x 2 root root 1024 2009-12-30 18:13 grub
drwxr-xr-x 2 root root 5120 2009-12-30 14:03 grub_backup
-rw-r--r-- 1 root root 7424257 2009-12-12 20:06 initrd.img-2.6.31-14-server
-rw-r--r-- 1 root root 68728004 2009-12-27 21:10
initrd.img-2.6.31.6-fromHost
drwx------ 2 root root 12288 2009-12-06 23:36 lost+found
-rw-r--r-- 1 root root 128796 2009-10-23 12:24 memtest86+.bin
-rw-r--r-- 1 root root 2129198 2009-10-16 12:44 System.map-2.6.31-14-server
-rw-r--r-- 1 root root 2087202 2009-12-27 20:58 System.map-2.6.31.6
-rw-r--r-- 1 root root 1335 2009-10-16 12:50 vmcoreinfo-2.6.31-14-server
-rw-r--r-- 1 root root 3934784 2009-10-16 12:44 vmlinuz-2.6.31-14-server
-rw-r--r-- 1 root root 3953856 2009-12-27 20:58 vmlinuz-2.6.31.6
root@grp-01-23-02:/var/lib/xen/images# ls -la /mnt/tmp/grub/menu.lst
-rw-r--r-- 1 root root 4631 2009-12-30 15:56 /mnt/tmp/grub/menu.lst
root@grp-01-23-02:/var/lib/xen/images#
root@grp-01-23-02:/var/lib/xen/images# cat /mnt/tmp/grub/menu.lst | sed
-e '/^$/d' -e '/ *#.*$/d'
default 0
timeout 3
hiddenmenu
title Ubuntu 9.10, kernel 2.6.31.6
root (hd0,4)
kernel /vmlinuz-2.6.31.6 root=/dev/mapper/grp--01--40--51-root
ro quiet splash
title Ubuntu 9.10, kernel 2.6.31.6 (recovery mode)
root (hd0,4)
kernel /vmlinuz-2.6.31.6 root=/dev/mapper/grp--01--40--51-root
ro single
title Ubuntu 9.10, kernel 2.6.31-14-server
root (hd0,4)
kernel /vmlinuz-2.6.31-14-server
root=/dev/mapper/grp--01--40--51-root ro quiet splash
initrd /initrd.img-2.6.31-14-server
title Ubuntu 9.10, kernel 2.6.31-14-server (recovery mode)
root (hd0,4)
kernel /vmlinuz-2.6.31-14-server
root=/dev/mapper/grp--01--40--51-root ro single
initrd /initrd.img-2.6.31-14-server
title Ubuntu 9.10, memtest86+
root (hd0,4)
kernel /memtest86+.bin
root@grp-01-23-02:/var/lib/xen/images#
root@grp-01-23-02:/var/lib/xen/images# /usr/bin/pygrub -i
/var/lib/xen/images/CLOUD-CC-1.img
Traceback (most recent call last):
File "/usr/bin/pygrub", line 676, in <module>
fs = fsimage.open(file, get_fs_offset(file))
IOError: [Errno 95] Operation not supported
root@grp-01-23-02:/var/lib/xen/images#
-Gerry
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|