Ask Your Question
1

server create: --block-device not available

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

sergiofbsilva gravatar image

Hello!

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 http://docs.openstack.org/user-guide/cli-nova-launch-instance-from-volume.html#create-volume-from-image-and-boot-instance (http://docs.openstack.org/user-guide/...) 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 http://docs.openstack.org/developer/python-openstackclient/command-objects/server.html#server-create (http://docs.openstack.org/developer/p...)

Am I missing something here ?

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

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>

example:

--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:

https://bugs.launchpad.net/openstack-manuals/+bug/1656132 (https://bugs.launchpad.net/openstack-...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 1,498 times

Last updated: Jan 12 '17