Ask Your Question

Revision history [back]

Be aware that block device mapping is not only used to boot an instance, but generally to attach storage to an instance. You can attach storage at boot time or later using the openstack server add command.

"the source, in fact, can be many types (volume, snapshot, image, and blank) the dest can be volume and local" That's the answer to the first question. Not all combinations make sense or are supported.

Local means ephemeral storage. Very often, an instance has source=image and dest=local. This combination can be achieved without the --block-device option; just use the --image option. Recent versions of the dashboard have a default of source=image, dest=volume.

Source=blank and dest=local creates a blank ephemeral disk. You need to specify the size. Source=blank and dest=volume (not sure if it works) implies that a volume is created from scratch, then attached to the instance. Obviously, you can't boot from such a block device.

Source=volume and dest=volume attaches an existing volume to the instance.

You can use the --image option and one or more --block-device options to connect two or more disks to the instance right at boot time. The first disk is the boot and root disk, the other disks might be blank volumes or pre-existing volumes.