Docker-machine add existing amazon instance


I’m trying to add an existing amazon instance to docker-compose but when I run the docker-machine:

docker-machine create -d generic --generic-ip-address= --generic-ssh-key key_rhel.pem --generic-ssh-user ec2-user test6
Running pre-create checks…
Creating machine…
(test6) Importing SSH key…
Waiting for machine to be running, this may take a few minutes…
Detecting operating system of created instance…
Waiting for SSH to be available…
Detecting the provisioner…
Error creating machine: Error detecting OS: OS type not recognized

and when I check the os-release:

cat /etc/os-release
NAME="Amazon Linux AMI"
ID_LIKE="rhel fedora"
PRETTY_NAME="Amazon Linux AMI 2016.03"

Is there an existing fix for this?


Amazon Linux AMI is not a base OS supported by Machine. Use Ubuntu LTS.

Note: You must use a base operating system supported by Machine.

“For cloud providers, the base operating system is the latest Ubuntu LTS the provider supports.”

Can we resolve this without me needing to recreate the entire instance?

No, the base operating system must be supported by Machine and Amazon Linux AMI is not. Use Ubuntu LTS.

Will UCP have this same problem?

Yes. Should be Ubuntu.