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

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





Am 14.07.2015 um 09:36 schrieb Ian Campbell:
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.

It seems that there is a USE flag 'hvm' which needs to be enabled. For unknown reasons, this USE flag is disabled which makes it not show up when the flags are queried and leaves me unable to enable it.

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

Well, I thought it would be relatively easy ...

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.

Usually, you check what USE flags there are and enable just the ones you need and disable others you don't need. Like there's no point in building emacs with X11 support when you will never use that anyway, there's no need to enable HVM support in case you don't need it. That's perfectly fine, however, in this case, the USE flag isn't disabled in the usual way but in such a way that you cannot use the flag at all.

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.

HVM support is required in the first place, and before that doesn't work, I don't want to waste time with trying to get a PV guest to work. Those really need to be much simpler to install.

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.

Then why not make it so that you need to explicitly specify that the guest shall read files residing on the host?

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.

That still doesn't make sense to me. Why can't I just boot a system which is capable to run as a PV guest without all this ado? Without xen, I plug in the USB stick and boot from it. Xen makes it complicated by not letting me boot from the stick or the ISO it was created from when I want to install a PV guest.


   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.

Xen is extremely confusing and nothing but frustrating, and the docs on the wiki are a mess. That a guest reads files residing on the host just like that is a good example for bad design. Of course, the kernel does not reside on the host, and if I wanted to force reading a file residing on the host, the option for that should at least give a hint that it does this. Why not use something like 'hostside_kernel' instead of 'kernel', and/or invent a naming convention for items that are on the host and items that are confined within the guest?

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