I wanted to run Fedora CoreOS as VM on Proxmox VE but I couldn't find good resources on it. I somehow figured it out and decided to share my learnings.
Proxmox VE doesn't officially support Ignition which is what Fedora CoreOS uses to commission VMs. Here's the overview of the steps:
Spin up your favorite LXC container. Install Apache server on it:
Change the listen port to 8080:
Now start and enable the service:
Verify if the server is running:
Create Ignition Config for Flatcar Container Linux:
Create ignition file from butane config:
Move this file to the Apache web root directory:
Test if everything is okay:
2) Run Live ISO image on Proxmox as VM
Download the Live ISO image of Fedora CoreOS. Upload the ISO on your proxmox server, provision Storage, and memory according to your needs, and start the VM. Once the Live ISO is booted up do the following:
Find the drive to install Fedora CoreOS:
Download the Ignition file:
Install CoreOS:
Assuming
Credits:
https://computingforgeeks.com/install-flatcar-container-linux-in-proxmox-ve/
https://0a6160f0.wirywolf-com.pages.dev/2022/12/coreos-template-on-proxmox-with-packer
https://blog.cloudbending.dev/posts/fedora-coreos-on-proxmox/
Proxmox VE doesn't officially support Ignition which is what Fedora CoreOS uses to commission VMs. Here's the overview of the steps:
- Run an HTTP server in an LXC that will serve the Ignition file
- Run Live ISO image on Proxmox as VM and install CoreOS using the hosted Ignition file
Spin up your favorite LXC container. Install Apache server on it:
Bash:
##On Debian/Ubuntu
sudo apt update && sudo apt install apache2
##On CentOS/Rocky/Alma Linux
sudo yum install -y httpd
Change the listen port to 8080:
Bash:
##On Debian/Ubuntu
sudo sed -i 's/Listen 80/Listen 8080/' /etc/apache2/ports.conf
##On CentOS/Rocky/Alma Linux
sudo sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf
sudo setsebool -P httpd_read_user_content 1
Now start and enable the service:
Bash:
##On Debian/Ubuntu
sudo systemctl enable apache2
sudo systemctl restart apache2
##On CentOS/Rocky/Alma Linux
sudo systemctl enable httpd
sudo systemctl restart httpd
Verify if the server is running:
curl localhost:8080
Create Ignition Config for Flatcar Container Linux:
vim coreos.bu
JSON:
variant: fcos
version: 1.5.0
passwd:
users:
- name: core
groups: ["wheel", "sudo", "systemd-journal"]
ssh_authorized_keys:
- replace-me-with-public-ssh-key
password_hash: your password has using 'openssl passwd -1 -salt your-salt'
shell: /bin/bash
storage:
files:
- path: /etc/hostname
mode: 0644
overwrite: true
contents:
inline: "replace-me-with-your-hostname"
systemd:
units:
- name: "install-qemu-guest-agent.service"
enabled: true
contents: |
[Unit]
Description=Ensure qemu-guest-agent is installed
Wants=network-online.target
After=network-online.target
Before=zincati.service
ConditionPathExists=!/var/lib/%N.stamp
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=rpm-ostree install --allow-inactive --assumeyes --reboot qemu-guest-agent
ExecStart=/bin/touch /var/lib/%N.stamp
[Install]
WantedBy=multi-user.target
Create ignition file from butane config:
Bash:
dnf install -y butane
butane --pretty --strict coreos.bu > coreos.ign
Move this file to the Apache web root directory:
Bash:
mkdir /var/www/html/coreos
cp coreos.ign /var/www/html/coreos
Test if everything is okay:
curl localhost:8080/coreos/coreos.ign
2) Run Live ISO image on Proxmox as VM
Download the Live ISO image of Fedora CoreOS. Upload the ISO on your proxmox server, provision Storage, and memory according to your needs, and start the VM. Once the Live ISO is booted up do the following:
Find the drive to install Fedora CoreOS:
lsblk
Download the Ignition file:
curl -o coreos.ign http://<ip-address>:8080/coreos/coreos.ign
Install CoreOS:
coreos-installer install /dev/sda -i coreos.ign
Assuming
/dev/sda
is the drive you want to install CoreOSCredits:
https://computingforgeeks.com/install-flatcar-container-linux-in-proxmox-ve/
https://0a6160f0.wirywolf-com.pages.dev/2022/12/coreos-template-on-proxmox-with-packer
https://blog.cloudbending.dev/posts/fedora-coreos-on-proxmox/