Custom Freebsd Images (13.1) on Oracle Cloud ARM64
This is a rather terse guide to doing this. I’m assuming you already know what you’re doing with FreeBSD and are comfortable building your own systems from source. If not, go do that now and comeback here….
Download the diff from here.
If that file is not found, it’s probably been updated. You can find the current version on this page.
Apply the diff in
git apply -p0 D34746.diff
Next up you can do a bit of customising to the image. Edit the file
'/usr/src/release/tools/oci.conf' and change how you see fit, be sure to increase the disk image size so that everything will fit in it. I’d also recommend changing the username to one that you’d like to use.
Then just run
make buildworld buildkernel TARGET=arm64 TARGET_ARCH=aarch64 KERNCONF=GENERIC cd release make -DNOPORTS -DNOSRC KERNCONF=GENERIC WITH_CLOUDWARE=yes CLOUDWARE=OCI TARGET=arm64 TARGET_ARCH=aarch64 cloudware-release
You’ll end up with a qcow2 image in
Upload that to a bucket in Object Storage in OCI, then head over to
Compute->Custom Images. Add
'VM.Standard.A1.Flex' to that list of
'Compatible Shapes' and deselect all the others.
'Image Capabilities', untick the
Firmware(BIOS) option and the
NIC(VFIO) options. Now you can create a compute instance using the image you selected.
However, if you want to use cli tooling, etc, and be more professional/cloudy about all this, check out this awesome post.