From Fedora Project Wiki


Download, Install, Configure and autologin Fedora CoreOS as a virtual machine with Podman


  1. Install podman by running sudo dnf install podman -y
  2. Download and verify the desired image for QEMU

How to test

  1. Create an working directory by running mdkir ~/coreos && cd ~/coreos. Please skip this step if you already have a working directory.
  2. Download the latest Fedora CoreOS QCOW2 image, we will grab coreos-installer by runningpodman pull
  3. Generate Ignition configuration from Fedora CoreOS Config files, we will grab fcct by runningpodman pull
  4. Validate Ignition configuration files, we will need ignition-validate by running podman pull
  5. To make config easier, add the following alias
$ alias coreos-installer='podman run --pull=always            \
                        --rm --tty --interactive            \
                        --security-opt label=disable        \
                        --volume ${PWD}:/pwd --workdir /pwd \
$ alias ignition-validate='podman run --rm --tty --interactive \
                         --security-opt label=disable        \
                         --volume ${PWD}:/pwd --workdir /pwd \
$ alias fcct='podman run --rm --tty --interactive \
            --security-opt label=disable        \
            --volume ${PWD}:/pwd --workdir /pwd \
  1. Using coreos-installer to download and decompress the image $coreos-installer download -p qemu -f qcow2.xz --decompress
  2. Execute touch fcct-autologin.yaml and make sure it has the following content
variant: fcos
version: 1.2.0
    - name: serial-getty@ttyS0.service
      - name: autologin-core.conf
        contents: |
          # Override Execstart in main unit
          # Add new Execstart with `-` prefix to ignore failure`
          ExecStart=-/usr/sbin/agetty --autologin core --noclear %I $TERM
    - path: /etc/hostname
      mode: 0644
        inline: |
    - path: /etc/profile.d/
      mode: 0644
        inline: |
          # Tell systemd to not use a pager when printing information
          export SYSTEMD_PAGER=cat
    - path: /etc/sysctl.d/20-silence-audit.conf
      mode: 0644
        inline: |
          # Raise console message logging level from DEBUG (7) to WARNING (4)
          # to hide audit messages from the interactive console

  1. Run $ fcct --pretty --strict fcct-autologin.yaml --output autologin.ign to convert the above yaml into a ignition config by fcct
  2. Setup the correct SELinux label to allow access to the config $ chcon --verbose --type svirt_home_t autologin.ign
  3. Start FCOS VM by running
virt-install --name=fcos --vcpus=2 --ram=2048 --os-variant=fedora-coreos-stable \
    --import --network=bridge=virbr0 --graphics=none \
    --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${PWD}/autologin.ign" \

<note> always remember to substitute the xxxyzzz with the downloaded image name </note>

Expected Results

  1. The system shows up and autologin is sucessful
  2. You can read the IP address of the machine from the serial console.
  3. You can run $ cat /etc/hostname to get test as output