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

Re: [Xen-users] question regarding booting custom guest kernel

On 27 September 2013 18:32, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
On Fri, Sep 27, 2013 at 06:15:28PM +0200, Aastha Mehta wrote: 
> >
> I first added the null hypercall in Xen hypervisor, and tested it through a
> simple test program in dom0 itself. That worked. I am now trying to get an
> application to make a syscall to the guest OS, and then the guest make
> hypercall to Xen.

What I meant is, if you want to use your kernel in a VM created by
xen-create-image, you can start with building a VM with the in-stock
kernel, verify that VM works as expected, then put your kernel in that


I agree. So, this is what I tried. Use xen-create-image to create an image from a mirror.
And the output looks briefly like the following -
General Information
Hostname       :  precise-guest
Distribution   :  precise
Partitions     :  swap            128M  (swap)
                  /               20G   (ext3)
Image type     :  sparse
Memory size    :  512M

Networking Information
IP Address     : DHCP [MAC: 00:16:3E:46:82:E4]

Loopback module not loaded and you're using loopback images
Run the following to load the module:

modprobe loop max_loop=255

Creating partition image: /home/domains/precise-guest/swap.img

Creating swap on /home/domains/precise-guest/swap.img

Creating partition image: /home/domains/precise-guest/disk.img

Creating ext3 filesystem on /home/domains/precise-guest/disk.img
Installation method: debootstrap

Running hooks

No role scripts were specified.  Skipping

Creating Xen configuration file
Setting up root password
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
All done

Installation Summary
Hostname        :  precise-guest
Distribution    :  precise
IP-Address(es)  :  dynamic
RSA Fingerprint :
Root Password   :  N/A

This is successful and I have a config file that looks like this -
bootloader = '/usr/local/lib/xen/bin/pygrub'
vcpus       = '1'
memory      = '512'

root        = '/dev/xvda2 ro'
disk        = [

name        = 'precise-guest'
dhcp        = 'dhcp'
vif         = [ 'mac=00:16:3E:46:82:E4' ]

on_reboot   = 'restart'
on_crash    = 'restart'

Upon calling xl create /etc/xen/precise-guest.cfg, I get the following error:

Parsing config from /etc/xen/precise-guest.cfg
libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader failed - consult logfile /var/log/xen/bootloader.17.log
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: bootloader [31933] exited with error status 1
libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3

And the log file says:
File "/usr/local/lib/xen/bin/pygrub", line 885, in <module>
raise RuntimeError, "Unable to find partition containing kernel"

This error confuses me, as the xen-create-image command shows that it is configuring ext3 on the given disk image:


Aastha Mehta
MPI-SWS, Germany
E-mail: aasthakm@xxxxxxxxxxx

Xen-users mailing list



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