In one of our recent posts we have covered how to install CoreOS with VirtualBox.
In this post, we learn how to run CoreOS without VirtualBox.
This setup is specific to OS X as it uses xhyve, which is built on top of
Hypervisor.framework introduced in OS X 10.10.
We’re going to use the CoreOS VM application, which is an independent open source project that bundles CoreOS into a VM for running on OS X.
The CoreOS VM app uses the new corectl tool to manage xhyve-based VMs.
First, download the CoreOS VM app.
The CoreOS VM App does not have many dependencies to download. Everything needed is already included. However, the app will perform some automatic downloads on your behalf., they include CoreOS ISO file needed to run the VM, as well as Docker and fleetctl clients for OS X.
You can double click the app to run it.
When you run the app for first time it checks to see if you have iTerm2 installed. If not, this software gets installed automatically into your Applications folder.
You’ll then be asked what disk size you want for the VM and which CoreOS release channel to use. Don’t worry. You can change this later.
That’s it. You’re good to go.
All app’s files get installed under “~/coreos-osx” folder. No other files or folders are changed.
Look for this icon in your task bar:
Click it, and you should see a menu like this:
You can do lots of things from here, including: starting, halting, reloading, ssh, and opening an OS shell with some pre-set environment variables.
Here’s the booted VM with the opened pre-set shell window in iTerm:
The OS shell presets these variables:
When you start your VM, Docker Registry gets started (outside of the VM) on
192.168.64.1:5000. You can then push you Docker images to that IP and port number so you can share them with other VMs you might be running on your Mac.
If you destroy your VM (via the menu) Docker registry will persist the images. Docker registry is running as an OS X background service, with Docker images stored directly on your Mac’s disk, and not inside the VM.
Selecting Fleet-UI from menu will open the list of currently running CoreOS fleet units in your default web browser:
Selecting DockerUI (the web interface for Docker) will similarly show running Docker containers and other info about your Docker images:
You can check your running VM with
$ corectl ps
[corectl] found 1 running VMs, summing 2 vCPUs and 2048MB in use.
- core-01, beta/877.1.0, PID 1502 (detached=true), up 6m47.506766498s
corectl -h will show all available commands:
rm Removes one or more CoreOS images from local fs
kill Halts one or more running CoreOS instances
ls Lists locally available CoreOS images
load Loads CoreOS instances defined in an instrumentation file.
version Shows corectl version information
ps Lists running CoreOS instances
pull Pulls a CoreOS image from upstream
run Starts a new CoreOS instance
ssh Attach to or run commands inside a running CoreOS instance
put copy file to inside VM
Other useful things can be done from the application menu:
- You can upload Docker images to your VM
- You can update your local fleetctl and Docker OS X clients after you have downloaded the lastest CoreOS ISO version
We have learned how it is easily to install and use CoreOS VM on OS X without needing to use VirtualBox.
For more about Docker, see:
For more about CoreOS, see: