How to install Fedora CoreOS on Hyper-V

Last update: 03/02/2025

  • Fedora CoreOS is a lightweight, container-optimized distribution.
  • Use Ignition for initial machine setup.
  • Hyper-V provides an ideal environment for running Fedora CoreOS.

Fedora CoreOS It has become one of the most attractive distributions for those users looking for a Lightweight, secure and designed operating system especially for container environments. However, Its installation can be a challenge, especially if your virtualization platform is Hyper-V, Microsoft's virtualization manager. Algo que allows us to run multiple operating systems as virtual machines on the same hardware.

Fedora CoreOS focuses on offering an optimized solution for working with containers, so combining them is an excellent option for both developers and system administrators.

¿Qué es Fedora CoreOS?

Fedora CoreOS

Fedora CoreOS is a distribution liviana Linux kernel optimized for container environments. It is designed to be immutable, meaning that your file system is read-only, proporcionando una mayor seguridad y stability.

Exclusive content - Click Here  How to install Arduino?

Additionally, it uses Ignition, a sistema de configuración which runs once during the first boot to customize the machine.

Necessary preparations before installation

Antes de comenzar, necesitarás algunos elementos esenciales:

  • Fedora CoreOS ISO Image: Download the stable image from the official Fedora CoreOS site.
  • Hyper-V enabled: Make sure you have Hyper-V configured and running on your Windows operating system.
  • Ignition Settings: Fedora CoreOS uses Ignition configuration files to customize the machine during first boot.

Creating the Ignition Configuration File

Necessary preparations before installing Fedora CoreOS

Ignition is the componente central of Fedora CoreOS to customize the system. Start by creating a FCC (Fedora CoreOS Config) file using a text editor such as nano or Vim. A ejemplo básico configuration is:


variant: fcos
version: 1.0.0
passwd:
  users:
    - name: core
      password_hash: "$y$j9T$A0Y3wwVOKP69S.1K/zYGN.$S596l11UGH3Xj..."
systemd:
  units:
    - name: install-rpms.service
      enabled: true
      contents: |
        [Unit]
        Description=Instalar paquetes
        After=network-online.target

        [Service]
        ExecStart=rpm-ostree install nano htop docker-compose --reboot

Once the FCC file is created, you will need the Butane transpiler to convert it to an Ignition file. Run the following command:


docker run -i --rm quay.io/coreos/butane --pretty --strict < myconfig.fcc > myconfig.ign

Creating the virtual machine in Hyper-V

Hyper-V

With Ignition configured, the next step is Create your virtual machine in Hyper-V:

  • Open Hyper-V Manager and select «New» > «Virtual Machine».
  • Configura la RAM memory recommended (for example, 2048 MB) and allocate an appropriate number of CPUs.
  • In the hard disk section, select “Create a virtual hard disk” and assign at least 10 GB.
  • Finally, attach the imagen ISO of Fedora CoreOS as the boot drive.
Exclusive content - Click Here  Where is the microphone on the Lenovo Yoga 510?

Additional configuration during installation

When you boot the virtual machine for the first time, Fedora CoreOS will automatically look for a valid Ignition file that you have configured. There are several ways to provide this file:

  • Por USB: You can copy the Ignition file to a USB flash drive and attach it as a storage device in Hyper-V.
  • Via HTTP server: Set up a lightweight web server like nginx to host the Ignition file.

For example, to configure nginx, you can use the following commands:


apt install nginx
mkdir /var/www/html/fcos
touch /var/www/html/fcos/myconfig.ign
systemctl start nginx

Advanced options and post-configuration

Once Fedora CoreOS is installed, you may need to perform additional configurations, such as set a static IP or adjust network routes. For this, you can use tools like nmcli:


nmcli connection mod 'Wired Connection' \
  ipv4.method manual \
  ipv4.addresses 192.168.1.100/24 \
  ipv4.gateway 192.168.1.1 \
  ipv4.dns 8.8.8.8
systemctl restart NetworkManager

Finally, You can further customize your instance by adding container services using docker-compose or trying new configurations according to your needs.

Mastering Fedora CoreOS Installation on Hyper-V Not only will it allow you to take advantage of the benefits of this distribution, but it will also will enable you to create an efficient and secure environment to manage your containersWith the tools and knowledge provided here, you'll be ready to explore its full potential.

Exclusive content - Click Here  How to lock apps on iPhone with Face ID or a password