Nova boot from volume

Asked by kallel-ameni

Hello,
I want to launch machine that boot from volume using curl.
I read this document: https://blueprints.launchpad.net/nova/+spec/boot-from-volume. and i tried this command:

 curl -u admin:passwd -H X-Auth-Token:8942df4e5f6b414b8b156a45aa3f76ff -H "Content-Type: application/json" -X POST -d '{"server": {"name":"yoshi", "imageRef":"d54cb1e0-6846-42ef-95c7-0892816e11a5", "flavorRef": "1", "volumes": {"id":"2", "mountpoint":"/dev/vda"}}}' http://192.168.1.5:8774/v2/1db3a28efe3e4c45b541ceacbde0d05f/servers

the machine is created with success but no volume is attached to it .
Can you help me to resolve this issue.
thinks.

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
yashiang (yashiang1986) said :
#1

Hi,

curl -i http://192.168.3.5:8774/v1.1/db963098c9c642f9834e3913e916a32b/os-volumes_boot -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: a169d59ec6194647a843acf7d8617fa7" -d '{"server": {"name": "testyy", "imageRef": "c9dc8ba4-d14d-4223-9795-fdbbcdc61817", "block_device_mapping": [{"volume_size": "", "volume_id": "5c50a138-4f44-4432-98b5-6701bf7e396d", "delete_on_termination": "1", "device_name": "vda"}], "flavorRef": "1", "max_count": 1, "min_count": 1}}'

Revision history for this message
John Garbutt (johngarbutt) said :
#2

Try using the nova cli first, and use the --debug option.
It should let you know exactly what you need to send.

Can you help with this problem?

Provide an answer of your own, or ask kallel-ameni for more information if necessary.

To post a message you must log in.