Running K4all Locally on Linux (x86_64) - gpillon/k4all GitHub Wiki
Running K4all Locally on Linux (x86_64)
NOTE: NOT YET TESTED! probably the qemu-system-x86_64 command should be fixed... PR ARE WELCOME!
To run K4all on your Linux system, you need to follow the steps outlined below. This guide will help you set up the environment and run the K4all virtual machine using QEMU for the x86_64 architecture.
Prerequisites
-
Install QEMU: Ensure that QEMU is installed on your Linux system. You can install QEMU using your package manager:
# On Fedora / RHEL Based sudo dnf install qemu # On Debian/Ubuntu sudo apt install qemu
-
Set Up the K4all Directory: Open a terminal and create a folder named
k4all
to serve as your working directory:mkdir ~/k4all cd ~/k4all
-
Download UEFI BIOS for QEMU: Download the
edk2-x86_64-code.fd
file (UEFI BIOS) for QEMU and extract it in thek4all
folder:curl -L -O https://github.com/qemu/qemu/raw/master/pc-bios/edk2-x86_64-code.fd.bz2 bunzip2 edk2-x86_64-code.fd.bz2
-
Download the K4all Bootstrap Image: Download the K4all bootstrap image into the
k4all
directory:VERSION=v1.5.3 # on fish shell use 'set VERSION v1.5.3' curl -L -o k4all-bootstrap-$VERSION.qcow2 https://github.com/gpillon/k4all/releases/download/$VERSION/k4all-bootstrap-$VERSION-x86_64.qcow2
Running K4all with QEMU
Use the following command to execute the K4all virtual machine on your Linux system:
qemu-system-x86_64 \
-m 4G \
-smp 4 \
-device virtio-scsi-pci,id=scsi \
-drive file=k4all-bootstrap-$VERSION.qcow2,format=qcow2,if=none,id=disk0 \
-device scsi-hd,drive=disk0 \
-boot d \
-drive if=pflash,format=raw,file=edk2-x86_64-code.fd \
-cpu host \
-device intel-hda -device hda-output \
-device qemu-xhci \
-device virtio-gpu \
-device usb-kbd \
-device virtio-mouse-pci \
-display none \
-vga virtio \
-device virtio-net-device,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::22-:22,hostfwd=tcp::80-:80,hostfwd=tcp::443-:443,hostfwd=tcp::6443-:6443 \
-chardev qemu-vdagent,id=spice,name=vdagent,clipboard=on \
-device virtio-serial-pci \
-device virtserialport,chardev=spice,name=com.redhat.spice.0 \
-vnc :1
Notes
- Ensure that the path to the
edk2-x86_64-code.fd
file is correct in your setup. - You may adjust the amount of memory (
-m
) and the number of CPU cores (-smp
) based on your system’s resources.
This configuration will create a QEMU instance running K4all with network port forwarding for essential services.