vinkovsky
vinkovsky

Reputation: 310

Cannot create server from snapshot using openstack sdk

Stuck creating server from snapshot.

I use compute method

server = conn.compute.create_server(
    name='test-a2000-6-16-snapshot',
    image_id=image.id, // id from my snapshot
    flavor_id=flavor.id,
    networks=[{"uuid": network.id}],
)

And got this error

BadRequestException: 400: Client Error for url: https://ru-7.cloud.api.selcloud.ru/compute/v2.1/servers, Can not find requested image

Image is valid and i get it via

image = conn.block_storage.find_snapshot('snap-08.05.24_17.07')

I can’t figure it out why is not working. Snapshot and server are in the same zone. For instance cli command works as expected

openstack server create --snapshot snap-17.01.24_13.18 --flavor GL8.6-16384-0-1GPU test-a2000-6-16-snapshot

How i can achieve it using sdk?

Upvotes: 0

Views: 62

Answers (0)

Related Questions