Cannot launch whole disk image with xen+libvirt

Bug #1253626 reported by Alvaro Lopez
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Alvaro Lopez

Bug Description

Hi.

I am unable to launch an instance with a whole-disk image (that is, a file containing a full disk with partitions).

The generated XML file for libvirt contains the following:

      <os>
        <type>xen</type>
        <root>/dev/xvda</root>
        <boot dev="hd"/>
      </os>

So when the machine starts it fails since the above is passed as a cmdline "root=/dev/xvda" being passed to the kernel that pygrub is launching, resulting in the following error during boot:

    mount: mounting /dev/xvda on /root failed: Invalid argument
    mount: mounting /dev on /root/dev failed: No such file or directory
    mount: mounting /sys on /root/sys failed: No such file or directory
    mount: mounting /proc on /root/proc failed: No such file or directory
    Target filesystem doesn't have requested /sbin/init.
    No init found. Try passing init= bootarg.

Removing that line from the libivrt XML solves this issue.

Tags: libvirt xen
Alvaro Lopez (aloga)
Changed in nova:
assignee: nobody → Alvaro Lopez (aloga)
Michael Still (mikal)
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
Alvaro Lopez (aloga)
Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/58999

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/58999
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5453732235d0d1a7bee0c2347b3cf8bb38a1d38f
Submitter: Jenkins
Branch: master

commit 5453732235d0d1a7bee0c2347b3cf8bb38a1d38f
Author: Alvaro Lopez Garcia <email address hidden>
Date: Thu Nov 28 09:56:41 2013 +0100

    Do not set root device for libvirt+Xen

    Currently we are setting the root device for Xen when using libvirt.
    When a user is booting an image that contains a full partitioned disk it
    fails, since the root device will be passed as "root=/dev/whatever" as
    the cmdline to the booting kernel.

    Closes-Bug: 1253626
    Change-Id: Ia5e3ee8891759c68ee51b219d1a7f80d0afbeffc

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.