server create: --block-device not available

asked 2017-01-11 16:59:14 -0600

sergiofbsilva gravatar image


I am trying to use the new openstack-client to achieve the same goal as the following nova command

nova boot --flavor m1.medium --block-device source=image,id=<image-id>,dest=volume,size=8,shutdown=preserve,bootindex=0 --nic net-id=<net-id> --key-name mykey xpto

According to these docs ( it should be possible

openstack server create --flavor FLAVOR --block-device \ source=SOURCE,id=ID,dest=DEST,size=SIZE,shutdown=PRESERVE,bootindex=INDEX \ NAME

however --block-device is not available on openstack server create as seen in the client documentation (

Am I missing something here ?

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-12 18:12:10 -0600

brian.andrus gravatar image

The correct syntax for newer versions of openstackclient is --block-device-mapping <id>:<type>:<size(gb)&gt;:<delete_on_terminate>


--block-device-mapping vda=<image-id>:::0

Regardless, I couldn't make it work in a "one-step" command as nova boot allows. I had to do it in multiple steps for my use-case as detailed here: (

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-01-11 16:58:42 -0600

Seen: 1,911 times

Last updated: Jan 12 '17