Skip to content

Instantly share code, notes, and snippets.

@nathanleclaire
Created March 3, 2017 19:43
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanleclaire/3578805ffcfed3355fc09ff37719a8e1 to your computer and use it in GitHub Desktop.
Save nathanleclaire/3578805ffcfed3355fc09ff37719a8e1 to your computer and use it in GitHub Desktop.
Create CoreOS VM on AWS with Docker Machine

This is slightly trickier than I anticipated so noting it down for future reference.

The command should be along these lines (assuming AWS keys are configured via environment variables or config file):

$ docker-machine create \
  -d amazonec2 \
  --amazonec2-region us-west-1 \
  --amazonec2-ami ami-818bd5e1 \
  --amazonec2-zone b \
  --amazonec2-ssh-user core \
  --amazonec2-device-name "/dev/xvda" \
  coreosvm

Since CoreOS SSH user is core you must specify that. Likewise, the root device is not /dev/sda as usual but rather /dev/xvda so you must be specific about this. You can get the AMIs from CoreOS website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment