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

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



Thanks for the prompt response. Please find answers inline


On 27 September 2013 15:00, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
On Fri, Sep 27, 2013 at 02:18:45PM +0200, Aastha Mehta wrote:
> Hello,
>
> I am having trouble with creating a guest domain with a modified kernel.
>
> I used the xen-create-image command with following arguments:
> xen-create-image --boot --force --install=1 --keep --arch=x86_64 --dhcp
> --passwd \
> --kernel=/boot/vmlinuz-3.11.0-guest --initrd=/boot/initrd-3.11.0-guest \
> --modules=/lib/modules/3.11.0-guest --size=20G --swap=512M --memory=128M \
> --hostname=ubuntu-3.11.0-guest1
>
> However, it fails and here is the partial log:
> <snip>
> Done
> Installation method: debootstrap
> Using /usr/sbin/debootstrap as debootstrap command
>
> Copying files from host to image.
> Copying files from /var/cache/apt/archives/ ->
> /tmp/UxsUPuN66R/var/cache/apt/archives
> Done
> Done
> I: Retrieving Release
> I: Retrieving Release.gpg
> I: Checking Release signature
> I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5)
> E: Invalid Release file, no entry for main/binary-x86_64/Packages

Something went wrong when debootstrap tried to build your image. It has
nothing to do with your customized kernel (yet).

You need to fix debootstrap first. It could be something wrong with your
mirror. I believe xen-create-image has an option to speicify which
mirror to use -- you can try other working mirrors.

Here is the top of the log for the guest1 that I tried to create using custom kernel:
<Guest1-log>
General Information
--------------------
Hostname       :  ubuntu-3.11.0-guest1
Distribution   :  precise
Mirror         :  http://de.archive.ubuntu.com/ubuntu/
Partitions     :  swap            512M  (swap)
                  /               20G   (ext3)
Image type     :  sparse
Memory size    :  128M
Kernel path    :  /boot/vmlinuz-3.11.0-guest
Module path    :  /lib/modules/3.11.0-guest/
Initrd path    :  /boot/initrd.img-3.11.0-guest
...
</Guest1-log>

This is the same mirror which I used in the second case, where I managed to create the image using the mirror:
<Precise-log>
General Information
--------------------
Hostname       :  precise-guest
Distribution   :  precise
Partitions     :  swap            128M  (swap)
                  /               20G   (ext3)
Image type     :  sparse
Memory size    :  512mb
...
Done
Installation method: debootstrap
Using /usr/sbin/debootstrap as debootstrap command

Copying files from host to image.
Copying files from /var/cache/apt/archives/ -> /tmp/Jk_qr78n4J/var/cache/apt/archives
Done
Done
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://de.archive.ubuntu.com/ubuntu...
I: Validating adduser
I: Validating apt
I: Validating apt-utils
I: Validating base-files
...
</Precise-log>
What do I need to checkout about the debootstrap?
 
> WARNING (/usr/bin/xt-install-image): The installed system at
> /tmp/UxsUPuN66R doesn't seem to be a full system.
> WARNING (/usr/bin/xt-install-image): The installed system is missing the
> common file: /bin/ls.
> WARNING (/usr/bin/xt-install-image): The installed system at
> /tmp/UxsUPuN66R doesn't seem to be a full system.
> WARNING (/usr/bin/xt-install-image): The installed system is missing the
> common file: /bin/cp.
>
> Copying files from new installation to host.
> Copying files from /tmp/UxsUPuN66R/var/cache/apt/archives ->
> /var/cache/apt/archives/
> Done
> Done
> Done
> System installation failed.  Aborting
> umount: /tmp/UxsUPuN66R/proc: not found
> Running command 'umount /tmp/UxsUPuN66R/proc 2>&1' failed with exit code
> 256.
> Aborting
> </snip>
>
> I also tried to download a precise image from mirror and then use the
> modified kernel and ramdisk image from above. In this case, I see the
> following error while trying to do:
> # xl create /etc/xen/precise.cfg
> [56369.665439] init: Failed to spawn network-interface (vif1.0) pre-start
> process: unable to change root directory: No such file or directory
> [56369.677040] init: Failed to spawn network-interface-security
> (network-interface/vif1.0) pre-start process: unable to change root
> directory: No such file or directory
> [56369.683333] init: Failed to spawn network-interface (vif1.0) post-stop
> process: unable to change root directory: No such file or directory
> [56369.696917] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready
> [56369.822639] device vif1.0 entered promiscuous mode
> [56369.826883] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready
> [56369.973214] xenbr0: port 3(vif1.0) entered disabled state
> [56369.973420] device vif1.0 left promiscuous mode
> [56369.973424] xenbr0: port 3(vif1.0) entered disabled state
>

How did you install Xen? Do you have the hotplug scripts in /etc/xen?
What's the content of your guest config file?
Xen (4.4-unstable) is also custom built. I have following hotplug scripts in /etc/xen/scripts:
hotplugpath.sh 
hotplugpath.sh.dpkg-dist
xen-hotplug-common.sh
xen-hotplug-common.sh.dpkg-dist
vtpm-hotplug-common.sh
xen-hotplug-cleanup

Below is the content of the guest1 config file:
<begin-config>
kernel     = '/boot/vmlinuz-3.11.0-guest'
ramdisk  = '/boot/initrd-3.11.0-guest'
vcpus     = '1'
memory = '2048'
root       = '/dev/xvda2 ro'
disk      = [
                  'file:/home/domains/ubuntu-3.11.0-guest1/disk.img,xvda2,w',
                  'file:/home/domains/ubuntu-3.11.0-guest1/swap.img,xvda1,w',
               ]
name    = 'ubuntu-3.11.0-guest1'
dhcp     = 'dhcp'
vif         = [ 'mac=00:16:35:46:82:E4' ]
>
<end-config>
 
Wei.

> Can someone point out where the problem is?
>
> Thanks a lot
>
> --
> Aastha Mehta
> MPI-SWS, Germany
> E-mail: aasthakm@xxxxxxxxxxx <aasthakm@xxxxxxxxx>

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



Thanks


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

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