在虚机启动的时候,可以指定挂在一个存储卷,并指定存储卷的挂在点
The following command will boot a new instance and attach a volume at the same time. The volume of ID 13 will be attached as /dev/vdc. It is not a snapshot, does not specify a size, and will not be deleted when the instance is terminated:
$ nova boot --image 4042220e-4f5e-4398-9054-39fbd75a5dd7 --flavor 2 --key-name mykey --block-device-mapping vdc=13:::0 boot-with-vol-test
参数意义如下:
--block-device-mapping <dev-name=mapping>
The block device mapping format is <dev-name>=<id>:<type>:<size(GB)>:<delete-on-terminate>, where:
其中:
dev-name
A device name where the volume is attached in the system at /dev/dev_name .
id
The ID of the volume to boot from, as shown in the output of nova volume-list.
t