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

[Xen-users] Cannot boot file-based guest from non-LVM file



I happen to have a problem to make a guest boot from a formatted sparse 
file and hope somebody can point me in the right direction.
CentOS 5.latest. Xen 3.4.x

Some background.
From my first experiments with Xen I still have two old paravirtualized 
guests that reside in sparse files. All other VMs have their own 
partitions. Some days ago I found I should better increase the size of one 
of the file-based guests and was wondering about the best way. I came up 
with adding a second sparse file and mounting /var on it. So far, so good. 
When I did that I found out that the original installation (via CentOS 
Virt Manager I guess) created two LVM partitions on it. One for the system 
and one for swap. I hadn'd ever noticed this before.

I figured I would like to change this for performance reasons, so that it 
uses its own swap file and avoid use of LVM at all. Using a different swap 
file works fine. Adding a third file for /var works fine. But I cannot 
make the VM boot from the "non-LVM" file that holds all of /.
Right on xm create it says "Error: Boot loader didn't return any data!"
The file was created with dd as a sparse file and then formatted with 
ext3. The other files not used for boot work fine this way. I can loop-
mount the file fine and look around, so the file system on it is ok and 
accessible. Using tap:aio: instead of file: doesn't make a difference.

Some googling tells me it might have to do with not finding /boot. I tried 
to fix this, but couldn't find the correct way. Then I realized that the 
boot root is set in grub.conf, too, and changed it there as well. However, 
it's still giving the same error. So, where else would I need to fix this? 
Or can't I boot directly from a "formatted-only" file? Do I need to 
partition it? Or keep using LVM on it? Do I have to recompile initrd?

Below are some relevant lines from the working and non-working configs. 
Note, the working guest is basically setup the same as before, just with 
two file drives added. The non-working guest doesn't want to boot from the 
ext3 formatted file.

xen create file:
working:
disk = [ "file:/home2/vm/vm1-lvm,xvda,w", "file:/home2/vm/vm1-var,xvdb,w", 
"file:/home2/swap/vm1.swap,xvdc,w" ]
non-working:
disk = [ "file:/home2/vm/vm1-root,xvda,w", "file:/home2/vm/vm1-
var,xvdb,w", "file:/home2/swap/vm1.swap,xvdc,w" ]

vm-lvm: the old file, partitoned with LVM
vm-root: new file with ext3 on it and all necessary stuff from /bin to 
/usr copied over with rsync.

grub.conf:
working:
kernel /vmlinuz-2.6.18-406.el5xen ro root=/dev/VolGroup00/LogVol00
non-working:
kernel /vmlinuz-2.6.18-406.el5xen ro root=/dev/xvda

fstab:
(note, there is really no xvdb1 etc., as these are not on a partitioned 
fs)
working:
/dev/VolGroup00/LogVol00 /                  ext3    noatime     1 1
LABEL=/boot             /boot               ext3    noatime     1 2
#/dev/VolGroup00/LogVol01 swap              swap    defaults    0 0
/dev/xvdb              /var                 ext3    noatime     1 2   
/dev/xvdc              swap                 swap    defaults    0 0

(shows the old swap entry, it mounts /boot in it's own mount point, but I 
think that's not necessary, it's only for changing the fs check option.)

non-working:
/dev/xvda     /           ext3    noatime         1 1
/dev/xvdb     /var        ext3    noatime         1 2
/dev/xvdc     swap        swap    defaults        0 0

Thanks for any hints.

Kai



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

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