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

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



On Thu, Oct 22, 2015 at 5:10 PM, Kai Schaetzl <maillists@xxxxxxxxxxxxx> wrote:
> 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

Egad -- I'm not sure I remember how to debug a system that old. :-/

> 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.

Out of curiosity, why did you not just copy the entire filesystem?
Are you sure, for instance, that you copied /boot?

Also, does the bootloader create a /var/log/xen/bootloader.[domid].log
file?  If so, what's the content of that?

 -George

_______________________________________________
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®.