Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Boot from ISO, install to volume, reboot from volume


this is the very classic case where you have software in an ISO image (e.g. a Linux Debian installer ISO), you want to install it on a disk, and then always boot from your disk.

This was easily done with Grizzly, however I don't seem to be able to achieve the same with Icehouse. How do I achieve it in Icehouse?

On my Devstack/Icehouse setup running on Ubuntu 14.04 with KVM I've tried the following (e0cba508-981e-476d-a7fc-9e2d49c84b7b is the ID of my ISO image, which (FYI) is a Debian Jessie Net installer):

1) nova boot --flavor 2 --block-device source=image,id=e0cba508-981e-476d-a7fc-9e2d49c84b7b,dest=volume,size=2,shutdown=remove,bootindex=0 --nic net-id=5dedde68-3b6f-4ce3-b289-cfdeb143eef5 MyVM-1

This works with qcow2 images but not with ISO images, which fail with "No bootable device". While it is probably expected, IMHO documentation at should explicitly mention it.

2) nova boot --flavor 2 --image e0cba508-981e-476d-a7fc-9e2d49c84b7b --block-device source=volume,id=3b0d0f7f-2738-471a-acbc-16c61b4abb35,dest=volume,shutdown=remove --nic net-id=5dedde68-3b6f-4ce3-b289-cfdeb143eef5 MyVM-2

This boots the image from ISO and I can install the software on the volume. However, VM will always boot from CDROM and never from the volume

$ virsh dumpxml instance-00000047|grep 'boot dev'
    <boot dev='cdrom'\/>

3) nova boot --flavor 2 --image e0cba508-981e-476d-a7fc-9e2d49c84b7b --block-device source=volume,id=3b0d0f7f-2738-471a-acbc-16c61b4abb35,dest=volume,shutdown=remove,bootindex=0 --nic net-id=5dedde68-3b6f-4ce3-b289-cfdeb143eef5 MyVM-3

ERROR (BadRequest): Block Device Mapping is Invalid: Boot sequence for the instance and image/block device mapping combination is not valid. (HTTP 400) (Request-ID: req-70a7f366-e54e-48c2-8451-a1c2563f5c9d)

How do I force something like

<boot dev='hd'/>
<boot dev='cdrom'/>

in libvirt's domain config so that it boots from cdrom when hd is not bootable?

So far the only way I could achieve something similar to what I wanted is use option 2) with shutdown=preserve, install my software on the volume, terminate my instance and later on boot from volume or a snapshot of that volume. However this is a nightmare and I cannot possibly think of doing this for all my different ISOs.

Thank you in advance.

Kind Regards,