When attempting to create a machine on DigitalOcean, specifying an OS type using --digitalocean-image centos-7-x86_64
, I'm getting the following error.
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation
I can specify almost any other Linux distribution supported on DigitalOcean, but not CentOS, and I've tried different ways of passing the image name to the command.
What is the recommended naming scheme for specifying a CentOS image to docker-machine create
?
Are you sure you have the slug right?
Is it centos-7-x64
?
Please re-open if you have confirmed that the URL slug is 100% accurate and the issue persists
But wasn't that precisely the question being asked: "What's the naming scheme?" or "Where's the list?"
The list is available through the DigitalOcean API.
It would be really nice if this info were in the docs. Or at least something like the command below was in the docs.
FYI, a bunch of them, including the Ubuntu ones which are often referenced in tutorials, appear to not/no longer have slugs and/or no longer exist(?!?). For instance, I don't see Ubuntu LTS releases below.
$ http get https://api.digitalocean.com/v2/images "Authorization: Bearer ${TOKEN}" | jq -r '.images[] | [.id, .slug, .name, .distribution] | @csv'
18539132,"coreos-beta","1081.5.0 (beta)","CoreOS"
6372321,"centos-5-8-x64","5.10 x64","CentOS"
6372425,"centos-5-8-x32","5.10 x32","CentOS"
10144573,"freebsd-10-1-x64","10.1","FreeBSD"
13321858,"freebsd-10-2-x64","10.2","FreeBSD"
14238961,"fedora-23-x64","23 x64","Fedora"
14782899,"centos-6-5-x32","6.7 x32","CentOS"
14782952,"centos-6-5-x64","6.7 x64","CentOS"
15621816,,"15.10 x64","Ubuntu"
15621817,,"15.10 x32","Ubuntu"
16071652,,"cloudbench-ycsb-on-1404.030216-1","Ubuntu"
16071743,,"cloudbench-hibench-on-1404.030216-1","Ubuntu"
16082940,,"cloudbench-nullworkload-on-1404.030316-6","Ubuntu"
16623283,"debian-7-0-x32","7.10 x32","Debian"
16623308,"debian-7-0-x64","7.10 x64","Debian"
17384153,,"7.2 x64","CentOS"
17550956,,"hadoop1","Ubuntu"
17551182,,"cassandra1","Ubuntu"
18027532,"fedora-24-x64","24 x64","Fedora"
18290419,,"7.11 x32","Debian"
Following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-provision-and-manage-remote-docker-hosts-with-docker-machine-on-ubuntu-16-04
I get this:
$DOTOKEN=MY_TOKEN
docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN docker-multi-environment
Running pre-create checks...
Creating machine...
(docker-multi-environment) Creating SSH key...
(docker-multi-environment) Creating Digital Ocean droplet...
Error creating machine: Error in driver during machine creation: POST https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.
Not sure what I'm missing...
@staxmanade That's almost identical scenario and error message which brought me here. I'm new to DO but from what I posted above it sure seems like the available set of images has changed and some of the images which are still there may be missing necessary metadata.
I'm facing the same issue, either I specify or not specify the image name, it fails with the same issue.
Could somebody reopen this issue? I don't have the button to Reopen.
I had the same issue, and specified an image like this --digitalocean-image ubuntu-14-04-x64
That solved it for me
@ringling Any chance you could run the httpie + jq query above and compare your results? I wasn't getting an Ubuntu 14.04 at all let alone an image referencable by slug.
Odd, the defaults should work. Hopefully DO didn't just change their image slugs all of a sudden. I'll look into it. This is with Machine 0.7.0? Have you tried the 0.8.0-rc2?
@nathanleclaire docker-machine version 0.8.0-rc2, build 4ca1b85
@nathanleclaire docker-machine version 0.7.0, build a650a40
@nathanleclaire Works with --digitalocean-image
on docker-machine version 0.6.0, build e27fb87
, yesterday it worked without !
@nrvale0
18539132,"coreos-beta","1081.5.0 (beta)","CoreOS"
6372321,"centos-5-8-x64","5.10 x64","CentOS"
6372425,"centos-5-8-x32","5.10 x32","CentOS"
10144573,"freebsd-10-1-x64","10.1","FreeBSD"
13321858,"freebsd-10-2-x64","10.2","FreeBSD"
14238961,"fedora-23-x64","23 x64","Fedora"
14782899,"centos-6-5-x32","6.7 x32","CentOS"
14782952,"centos-6-5-x64","6.7 x64","CentOS"
15621816,,"15.10 x64","Ubuntu"
15621817,,"15.10 x32","Ubuntu"
16071652,,"cloudbench-ycsb-on-1404.030216-1","Ubuntu"
16071743,,"cloudbench-hibench-on-1404.030216-1","Ubuntu"
16082940,,"cloudbench-nullworkload-on-1404.030316-6","Ubuntu"
16623283,"debian-7-0-x32","7.10 x32","Debian"
16623308,"debian-7-0-x64","7.10 x64","Debian"
17384153,,"7.2 x64","CentOS"
17550956,,"hadoop1","Ubuntu"
17551182,,"cassandra1","Ubuntu"
18027532,"fedora-24-x64","24 x64","Fedora"
18290419,,"7.11 x32","Debian"
I got it working with: (the id for the --digitalocean-image 15621816
- I just picked out the id from list from above...
docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN --digitalocean-image 15621816 docker-multi-environment
Would be ideal to get the default
working as it used to...
I have no idea why but it looks like they pulled the slugs for several images including the Ubuntu one that was our default.
Please consider filing a ticket with DigitalOcean support. In the interim I'll also continue investigating whether or not this is intentional behavior on their end, and what we should do about it for Machine.
$ curl -s -X GET "https://api.digitalocean.com/v2/images" -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" | jq . | grep slug
"slug": "coreos-beta",
"slug": "centos-5-8-x64",
"slug": "centos-5-8-x32",
"slug": "freebsd-10-1-x64",
"slug": "freebsd-10-2-x64",
"slug": "fedora-23-x64",
"slug": "centos-6-5-x32",
"slug": "centos-6-5-x64",
"slug": null,
"slug": null,
"slug": null,
"slug": null,
"slug": null,
"slug": "debian-7-0-x32",
"slug": "debian-7-0-x64",
"slug": null,
"slug": null,
"slug": null,
"slug": "fedora-24-x64",
"slug": null,
Maybe we can switch to using the ID instead like you suggest @staxmanade
Yeah ID seems to work so I will probably switch to that for the quick fix.
I filed a ticket w/ DO support as well.
I've been having this for the past couple of days and figured that it must be something to do with the image it was trying to use.
I'm using it with docker-machine, and it seems from the documentation that the default image is ubuntu-15-10-x64, if not explicitly provided (see https://docs.docker.com/machine/drivers/digital-ocean/).
Having changed that to DIGITALOCEAN_IMAGE="ubuntu-16-04-x64" solves the issue for me.
馃憤
Had the same issue, docker-machine create --driver digitalocean --digitalocean-access-token <token> --digitalocean-image ubuntu-16-04-x64 do-manager-1
worked for me.
This should be fixed with 0.8.0 which was just released.
yes it is ^
Most helpful comment
This should be fixed with 0.8.0 which was just released.