FreeBSD can run as VM in QEMU. FreeBSD 13.1-RELEASE supports for virtio devices.
This example installs FreeBSD 13.1-RELEASE using the following environment/settings:
Host:
Guest:
qemu-img create -f qcow2 freebsd-disk.qcow2 100G
qemu-system-ppc64 -smp 8 -m 4g -drive file=freebsd-disk.qcow2,format=qcow2,if=virtio -net nic,model=virtio -machine pseries,cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken -vga none -nographic -cdrom FreeBSD-13.1-RELEASE-powerpc-powerpc64-disc1.iso -boot d
Same command used for installing it, but removing -cdrom and -boot options:
qemu-system-ppc64 -smp 8 -m 4g -drive file=freebsd-disk.qcow2,format=qcow2,if=virtio -net nic,model=virtio -machine pseries,cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken -vga none -nographic
The methods outlined below for Linux for other ways of acquiring images work for FreeBSD host, but with the same command line differences to take out kvm acceleration.
FreeBSD can run as VM in QEMU. FreeBSD 13.1-RELEASE supports for virtio devices. Huge Pages is also not mandatory anymore when running the VM on Linux hosts
This example installs FreeBSD 13.1-RELEASE using the following environment/settings:
Host:
Guest:
qemu-img create -f qcow2 freebsd-disk.qcow2 100G
qemu-system-ppc64 -enable-kvm -smp 8 -m 4g -drive file=freebsd-disk.qcow2,format=qcow2,if=virtio -net nic,model=virtio -machine pseries,accel=kvm,cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken -vga none -nographic -cdrom FreeBSD-13.0-RELEASE-powerpc-powerpc64-disc1.iso -boot d
Same command used for installing it, but removing -cdrom and -boot options:
qemu-system-ppc64 -enable-kvm -smp 8 -m 4g -drive file=freebsd-disk.qcow2,format=qcow2,if=virtio -net nic,model=virtio -machine pseries,accel=kvm,cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken -vga none -nographic
FreeBSD CI infrastructure builds a bootable disk image in qcow2 format that's normally used by CI scripts to validate FreeBSD sanity every time a change is made in the code base. This can also be used by a user or developer wanting to test stuff with a minimal pre-installed, pre-configured system without installing it from the classic CD/DVD disc.
1. Take latest snapshot
wget/fetch https://artifact.ci.freebsd.org/snapshot/head/latest_vm/powerpc/powerpc64/disk.qcow2.zst
2. Uncompress it
unzstd /home/alfredo.junior/tmp/disk.qcow2.zst
3. Boot
qemu-system-ppc64 -enable-kvm -smp 8 -m 4g -drive file=disk.qcow2,format=qcow2,if=virtio -net nic,model=virtio -machine pseries,accel=kvm,cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken -vga none -nographic
Default user is root without a password.
The UNICAMP Minicloud is a OpenPower Cloud maintained by University of Campinas (Brazil). They are an academic member of the OpenPower Foundation and provides free access to POWER virtual machines that can be used for development, testing or migration of applications to POWER. The virtual machines of Minicloud run on OpenStack, which supports running a large number of virtual machines.
Since 20200404 a FreeBSD 13-CURRENT pre-made image has been made available for the public. It can be found in the list of pre-made images under the name “FreeBSD13-head-r359571”.
After launching “FreeBSD13-head-r359571”, it is recommended to:
echo 'ifconfig_vtnet0=DHCP' >> /etc/rc.conf service netif restart
Run the command bellow and take notes from partition 3 size (16GB at the time of this writing) and the free size.
gpart show
Resize partition 3 to the new size. If 'gpart show ' shows 16G used on partition 3 and 23G are free, you can resize it to rougly 38G (16-23-1)
gpart resize -i 3 -s 38g -a 4k vtbd0
Resize UFS filesystem
growfs /