Cannot boot from volume

Asked by A.T. Cheng on 2012-06-28

I have a multi-host and multi-volume setup in my environment. Each compute node has nova-api, nova-network, nova-compute, and nova-volume running. When I follow the instruction on the document for trying to boot from volume, the instance shows running. However, it says no bootable device in the vnc console and the instance hangs.

On the compute node, I check the iscsi section and it shows session activated to the host holds the volume.
On the volume node, I check the volume has an initiator which is the compute host.

The related settings of xml is the following:

    <devices>
            <disk type='block'>
                     <driver name='qemu' type='raw' cache='none'/>
                     <source dev='/dev/disk/by-path/ip-10.64.178.202:3260-iscsi-iqn.2010-10.org.openstack:volume-00000020-lun-1'/>
                     <target dev='vda' bus='virtio'/>
                 </disk>

        <interface type='bridge'>
            <source bridge='br100'/>
            <mac address='fa:16:3e:79:7a:32'/>
            <model type='virtio'/>
            <filterref filter="nova-instance-instance-00000072-fa163e797a32">
                <parameter name="IP" value="192.168.100.31" />
                <parameter name="DHCPSERVER" value="192.168.100.18" />
            </filterref>
        </interface>
    </devices>

It seems like the iscsi session has been activated and the disk is setup properly.
Look into logs of nova and libvirt and still don't have any clue.

Help please!

Question information

Language:
English Edit question
Status:
Expired
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
2012-06-29
Last reply:
2012-07-27
Vish Ishaya (vishvananda) said : #1

Did you format the volume and install an operating system? Sounds like the instance is booting just fine but you have no data on the volume.

A.T. Cheng (cheng-aiti-taiwan) said : #2

Thanks Vish for the replay.

I follow the the instruction here:
http://docs.openstack.org/trunk/openstack-compute/admin/content/boot-from-volume.html

I format the volume, download the cirros rootfs image, mount the image and copy all the data to the volume.

Anything missed?

RubEn (rvalles) said : #3

Hi,

I have the same set up with the same problem.

The instance is running and via VNC I get

Boot failed: Could not read the boot disk
No bootable device.

I have exactly followed the info in this link http://docs.openstack.org/trunk/openstack-compute/admin/content/boot-from-volume.html

Do you know any other sample to follow to try it work?

Thanks a lot in advance,

        RubEn

Launchpad Janitor (janitor) said : #4

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

howie (howie) said : #5

Hi

I also follow the instruction http://docs.openstack.org/trunk/openstack-compute/admin/content/boot-from-volume.html
But still get
Boot failed: Could not read the boot disk
No bootable device.

howie (howie) said : #6

Hi All

I find out a alternate solution.
Use dd to copy bootable image to volume, instead of copy.

kiku4 (kiku4) said : #7

Hi Howie.

I tried dd command.
  dd if=/tmp/cirros-0.3.0-x86_64-rootfs.img of=/dev/vdb
But got a same error ' No bootalbe device'

Can I get more information about the alternate solution?
Did you use 'cirros-0.3.0-x86_64-rootfs.img.gz' as the bootable image?
And, how use 'dd' command?

Thanks a lot in advance, kiku4

howie (howie) said : #8

Hi kiku4

I did not use cirros-0.3.0-x86_64-rootfs.img.gz as the bootable image
I just use any xen or kvm based bootable img. You can try again.

RubEn (rvalles) said : #9

Hi guys,

I created an ubuntu .img using virtmanager and following howie advice of using dd instead of cp , it worked perfectly.

I just copied the ubuntu.img file with scp to my instance and attached the destination volume to the instance.

Then dd if=ubuntu.img of=/dev/vdc

Thanks a lot , howie!!!!

The issue is that the image must be a bootable one, otherwise it will not work.

This is a very interesting feature, since it allows you to modify an instance keeping its changes, also it boots very quickly since it needs no copy of any data, just booting from the volume.

Here is the command I used to boot it:
nova boot --image image_id --flavor m1.tiny --key_name your_key --block_device_mapping vda=id_of_your_volume:::0 name_of_the instance.

Do you know if it is planned to be able to boot from a volume using Horizon web dashboard??

Best Regards,

howie (howie) said : #10

Hi RubEn

According to my test, It actually can boot from a volume using dashboard. (But not like aws ec2's way)

1. First Create a bootable volume.
2. Boot this instance with this bootable volume.
3. Snapshot this bootable volume as a template.

Next time you can create a instance use this template snapshot (nova will auto clone a vloume from this snapshot. )