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

Re: [Xen-users] how to boot something to get a vm started



On Mon, 2015-07-13 at 19:17 +0200, hw wrote:
> 
> Am 13.07.2015 um 18:22 schrieb Ian Campbell:
> > On Mon, 2015-07-13 at 18:01 +0200, hw wrote:
> >> xc: error: Could not open kernel image (2 = No such file or directory):  
> >> Internal error
> >
> > Strange. This suggests that hvmloader isn't available for some reason.
> > What version of Xen is this? On what distro
> 
> It's an up-to-date Gentoo, not sure how to find out what xen version it has.
> 
> > Do you have $prefix/lib/xen/boot/hvmloader ? If not then is it at some
> > other path?
> 
> 'find / -name hvmloader' doesn't find any files, so I take it it's not 
> available.

Indeed, and it should be, the fact that it is missing is the root cause
of your HVM problems. You should take this up with the Gentoo ebuild
maintainers.

> Am I supopsed to expect that the VM is booting from the ISO when I 
> create it (which is what I do), or am I missing something else?

As far as HVM guests go you are missing at least hvmloader, I can't say
what else might be missing, but if Xen were properly installed this
should Just Work.

> > [...]
> >> '/isolinux/gentoo' is listed in the grub.cfg contained in the ISO, and
> >> it does exist.
> >
> > Booting a PV guest from an ISO is a bit subtle,
> > http://wiki.xen.org/wiki/Debian_Guest_Installation_Using_Debian_Installer#Create_Initial_Guest_Configuration_2
> >  shows how it can be done for Debian, I reckon something similar ought to 
> > be possible for gentoo.
> 
> Thanks, maybe that can somehow be applied to the Gentoo ISO.  It might 
> be easier to create a hvm guest booting from the Gentoo ISO --- if it 
> was possible to boot something at all ...

If (all of) Xen were properly installed then booting an HVM guest would
be trivial.

> I could also boot the whole server from an USB stick to do the 
> installation, but at least for the windoze guest, I have doubts that it 
> would run when virtualized.
> 
> Why do they make it so impossible to install guests on xen to begin with?

I don't know why Gentoo apparently disables HVM support by default.

You could install a PV guest by extracting the kernel+initrd from the
iso and giving them as arguments in the cfg file, or by using some other
tool (like xen-tools.org) to create a guest, or by downloading an image
from somewhere etc.

> What sense would it make to look for files which belong to the guest 
> which is to be installed within the file system of the host?

There are two idioms for booting a PV guest, depending on the trust
given to the guest admin as a host admin you may want to force a VM to
run with a certain kernel which you have supplied. This is (or was)
quite common in cloud environments. This avoids all sorts of sharp edges
from a security perspective like accessing a potentially untrusted guest
filesystem from the toolstack.

In fact the Xen toolstack is not itself capable of reading guest file
systems, it relies on tools such as pygrub to take on the task of
extracting the bootable bits from the guest filesystem such that they
can be booted. Like with hvmloader I don't know why Gentoo apparently
doesn't include pygrub by default.

Pvgrub is another alternative to pygrub which removes some of the
security issues inherent in having pygrub open a guest supplied
filesystem.

>   When 
> specifying such files, of course I expect them to be looked for within 
> the guest.

Then I'm afraid you haven't read the docs properly, e.g. xl.cfg(5) is
pretty explicit about where the kernel= option looks for the file named.

Ian.


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