Updated 2026: CoreOS Container Linux reached end-of-life on May 26, 2020. Its spiritual successor is Flatcar Container Linux, which maintains a compatible cloud-init format. The rkt container runtime (mentioned below as CoreOS’s replacement for Docker) was also deprecated and archived in 2019. The cloud-init concepts in this post remain valid and apply to Flatcar and many other modern Linux distributions.

I’ve been experimenting with CoreOS, a Linux distribution built around the idea that every application runs in its own container. It also brought some interesting innovations to lightweight Linux: clustering with fleet and service discovery with etcd.

I ran it in VMware Fusion on macOS and hit a small but annoying hurdle: how do you configure a fresh CoreOS VM before you can even log in? CoreOS is automation-first, which means there’s no “just set a root password during install” option. Here’s how to handle it.

Option 1: Boot with coreos.autologin Link to heading

For quick debugging, you can boot straight into a root shell without any credentials. At the GRUB menu, edit the current boot entry and append coreos.autologin to the kernel parameters:

coreos.autologin

This gives you an interactive local login (useful for troubleshooting, but not useful for SSH access).

Option 2: Use a cloud-init config-drive Link to heading

This is the right approach for any real use. cloud-init is a standard set of scripts that customize a Linux instance at first boot: you can inject SSH keys, set the hostname, add users, run commands, and more. CoreOS ships with cloud-init support built in.

The workflow has three steps:

1. Write a cloud-config file Link to heading

Create a YAML file that declares your customizations. The only requirement is that the first line is exactly # cloud-config:

# cloud-config
ssh_authorized_keys:
  - "ssh-rsa ... michele@fortknox"
hostname: "coreos-test"

Replace the SSH public key with your own (generate one with ssh-keygen if you don’t have one) and set your desired hostname. Save the file as user_data.

2. Package it as a config-drive ISO Link to heading

CoreOS reads its cloud-init configuration from a drive labeled config-2. You need to package the user_data file into an ISO that VMware can attach as a virtual CD-ROM.

I wrote a small script to automate this: configdrive_creator. Put your user_data file in the same directory, run the script, and it produces the ISO.

3. Attach the ISO and reboot Link to heading

Attach the generated ISO as a CD-ROM drive in VMware Fusion, then boot (or reboot) the CoreOS VM. cloud-init reads the config-drive on startup and applies your settings before the system comes up.

After that, you can SSH directly into the VM using the key you injected:

coreos_ssh

The same config-drive approach works for any cloud-init compatible distribution (not just CoreOS), making it a useful technique to have in your toolkit.