+++ Monday 20 October 2025 +++ FreeBSD 15.0-BETA2 VM-image in Qemu =================================== FreeBSD not only publishes images for install media, but also VM-images. I downloaded FreeBSD-15.0-BETA2-amd64-zfs.qcow2.xz Which is the qcow2 image of the FreeBSD 15.0 BETA2 VM, with ZFS as file system. Starting the VM from Qemu ------------------------- Firstly, unpack the file with unxz. To start the virtual machine from Qemu, I used the following command: qemu-system-x86_64 \ -m 1024 \ -nic user,model=virtio-net-pci,hostfwd=tcp::10022-:22 \ -device virtio-blk,drive=myhd \ -drive if=none,file=FreeBSD-15.0-BETA2-amd64-zfs.qcow2,id=myhd This starts the VM with 1024 Mb RAM, and a network interface where we can access port 22 via port 10022 on localhost. Boot single mode ---------------- Because the VM-image do not contain password database files, we first have to boot into single mode. Read the notes at: https://lists.freebsd.org/archives/freebsd-stable/2025-October/003466.html Let it boot and at the boot-menu, just choose `2' to boot into single user mode. Get out of read-only mode ------------------------- The root file system will be mounted in read-only mode. To switch to read-write mode: zfs set readonly=off zroot/ROOT/default zfs mount -a Create the password database files ---------------------------------- To create the password database files: pwd_mkdb /etc/master.passwd passwd With this we create the master.passwd file and set a password for the user `root'. Enable sshd ----------- In order to work from the console, we enable sshd. Start `ed' and add a line in /etc/rc.conf: sshd_enable="YES" Create a user ------------- Next, create a user so we can login over ssh and become root. adduser Add a username, and make the user part of the group 'wheel', and perhaps some others, like `operator'. Reboot and access over ssh -------------------------- Reboot the machine. From a console, start ssh to port 10022 to the VM. On our system, Qemu offered a DHCP lease on 10.0.2.15, where 10.0.2.2 is the gateway for the VM to the local machine. The DHCP lease includes the routing. Without further configuration, we can access the internet. Bootstrapping pkg ----------------- Bootstrapping pkg gave some errors: Certificate verification failed for /C=US/O=Let's Encrypt/CN=E8 This is recolved by: certclt rehash After this, we can bootstrap pkg: pkg bootstrap And install some packages: pkg install -y git gnupg emacs-nox lynx rcs and have some fun! Last edited: $Date: 2025/10/20 17:43:49 $