Found error creating instance using Vultr-cli API

220 Views Asked by At

I tried putting the code as mentioned in the documentation and I received an error.

vultr-cli instance create --region ewr --plan vc2-1c-1gb --os 148 --label my-instance --ipv6 false

error creating instance : {"error":"Cannot add instance. Specified os_id not available","status":400}

enter image description here

2

There are 2 best solutions below

7
On

Vultr documentation does contain OS ID's, but it also warns:

Do not rely on the OS or Plan IDs listed in this guide; use the appropriate endpoint to retreive values...

Run oslist from the CLI and select an ID from the response. Here is a link to the documentation for the CLI if you need help running the oslist command.

0
On

This is what I found to create an instance via Vultr-cli.

vultr-cli instance create --region ewr --plan vc2-1c-2gb --os 371 --label my-instance --ipv6 false