Installing CoreOS on Fedora KVM - plembo/onemoretech GitHub Wiki

Installing CoreOS on Fedora KVM

Been learning Docker the last couple of days and thought it might be nice to try it on a Linux machine optimized as a container platform. The two main choices right now are Red Hat's Atomic and CoreOS, the latter being the odds-on favorite mostly because it got there first.

Besides the fact that CoreOS now uses its own container engine, Rocket, I was immediately struck by the sheer wonkiness of the instructions for creating a KVM (libvirt) virtual machine for it. After several hours of struggling with it, I decided to take a break and install the CentOS 7 beta release of Atomic. Took about 15 minutes using the documentation provided. That demonstrates perhaps as dramatically as any other example the difference between documentation created by sysadmins and developers.

Sorry.

Returning to CoreOS, I finally got a clue when I decided to look at the doc for other platforms, including VMware. Installation/Configuration of CoreOS OVA image in the VMware Knowledge Base clinched it for me.

You see, the main problem in deploying CoreOS anywhere but in the cloud is that the default user account, core, doesn't have a password. The official way of connecting to a deployed machine is to ssh in using the private key that corresponds to the public key that is configured during installation.

Right.

The trick in my case was to first download the latest production image for QEMU using the link given in the doc for a libvirt install.

Then I downloaded the create-basic-configdrive tool referenced in the [Running CoreOS on VirtualBox] (https://coreos.com/os/docs/latest/booting-on-virtualbox.html) doc. The concept of attaching an iso containing the basic config to the guest during installation was familiar to me from the setup procedure used for Atomic.

Creating a configdrive.iso that included my ssh public key, I then copies the CoreOS production qcow2 image to my active libvirt images directory (on my systems its under /data/virt/images).

Then I fired up virt-manager and proceeded to do a standard import of the qcow2 image as virtio storage and also created an IDE CDROM device connected to the configdrive.iso file.

Finally, I booted the image in virt-manager and hit the "e" key when the kernel menu came up. Following the instructions in the VMware KB article, I inserted the magic "coreos.autologin" option after each $usr_uuid statement and then CTRL-X to boot.

The new instance booted up as expected and logged the console in as the core user. I was then able to set core's password to something and proceed with my customizations.

Copyright 2004-2019 Phil Lembo

⚠️ **GitHub.com Fallback** ⚠️