# CoreOS installation on KVMMar 28, 2017 1 minute read
CoreOS is a lightweight Linux distribution designed specifically to run containers. KVM is the default virtualization infrastructure for Ubuntu. Unfortunately, creating a CoreOS virtual machine for KVM is not a simple process. I built a tool to automate this process and here’s how to use it.
git clone --depth 1 https://github.com/camilin87/kvm-automation.git && cd kvm-automation
Create the virtual machine
This command creates a CoreOS virtual machine named
vm1 in the
~/vms folder. The new machine will have two CPUs, four GB of RAM, seven GB of hard drive, and will use the bridge network adapter
ruby vm_task.rb CoreOsVmCreationTask \ --path ~/vms/ --name vm1 --dwnld true \ --cpu 2 --ram 4096 --hdd 7 --br br0 \ --key ~/.ssh/id_rsa.pub
How does it work?
kvm-automation generates a hard drive after downloading the latest Stable CoreOS QEMU Image. It then builds a
cloud-config.yml out of the public RSA key and the machine name. The tool then uses this information to create a KVM virtual machine that will autostart on system boot.
- Supports only CoreOS and Ubuntu
- Designed to use exclusively bridge network adapters using DHCP
- Does not allow guest customization through the
- Deletes pre-existing machines with the specified name