Install Fedora CoreOS as a VM

Page content

In this post I will show you how you can Install Fedora CoreOS(FCOS) in virtualization environment.

  • First you need Fedora CoreOS Config (FCC) - This is a YAML file that specifies the configuration of a machine.
  • Fedora CoreOS Config Transpiler to validate your FCC and convert it to an Ignition config.
  • Finally launch a Fedora CoreOS machine and use Ignition config to perform the installation.

Create FCC

Create password hash for default user

$ mkpasswd --method=yescrypt
nano fcos01.fcc
variant: fcos
version: 1.0.0
    - name: core
      password_hash: "$y$j9T$A0Y3wwVOKP69S.1K/zYGN.$S596l11UGH3XjN..."
        - docker
    - name: install-rpms.service
      enabled: true
      contents: |
        Description=Install packages
        ExecStart=rpm-ostree install nano git docker-compose htop --reboot
    - path: /etc/ssh/sshd_config.d/20-enable-passwords.conf
      mode: 0644
        inline: |
          # Fedora CoreOS disables SSH password login by default.
          # Enable it.
          # This file must sort before 40-disable-passwords.conf.
          PasswordAuthentication yes
    - path: /etc/hostname
      mode: 0644
        inline: fcos01.mydomain.intra

Convert FCC to Ignition

docker run -i --rm --pretty --strict <fcos01.fcc > fcos01.ign

# validate config
docker run --rm -i - < fcos01.ign

Install Fedora CoreOS

At the install stap you need to boot from the Fedora CoreOS ISO and use the Ignition config to install. So you need a solution to share this files with the running LiveOS. You can use an usb pendrive or a web-server for that. I will use a webserver for thet now.

apt install nginx

mkdir /var/www/html/fcos
cp fcos01.ign /var/www/html/fcos
cd /var/www/html/fcos

systemct start nginx
cd ~/

3 2 1 … Ignition

After the live OS bootid star Fedora CoreOS install:

sudo su -
coreos-installer install /dev/sda \
--ignition-url \

init 6

You need --insecure-ignition for insecure http connection.

Set static IP

nmcli connection show
NAME              UUID                                  TYPE      DEVICE
Wired Connection  f36f48e0-f75f-4925-ac78-de6119a2fcbb  ethernet  enp0s3

nmcli connection mod 'Wired Connection' \
  ipv4.method manual \
  ipv4.addresses \
  ipv4.gateway \
  ipv4.dns \
  +ipv4.dns \
  connection.autoconnect yes

nmcli connection show 'Wired Connection'
systemctl restart NetworkManager