Fireup FreeBSD 14 Instance on AWS ?!?
Install Packages
pkg install gmake go git vim
Install Lima
git clone https://github.com/lima-vm/lima /opt/lima
Patch File
cat << EOF > /opt/lima/pkg/sshutil/sshutil_others.go
//go:build !darwin && !linux
// +build !darwin,!linux
package sshutil
import (
"runtime"
"github.com/sirupsen/logrus"
)
func detectAESAcceleration() bool {
var err error
const fallback = runtime.GOARCH == "amd64"
logrus.WithError(err).Warnf("cannot detect whether AES accelerator is available, assuming %v", fallback)
return fallback
}
EOF
Build
Copy Binaries
cp /opt/lima/_output/bin/* /usr/local/bin/
mkdir -p /usr/local/share/doc/lima && cp -r /opt/lima/_output/share/doc/lima/* /usr/local/share/doc/lima/
cp -r /opt/lima/_output/share/lima /usr/local/share/lima
Install QEMU
Get CPU
root@freebsd:/opt/lima # qemu-system-x86_64 -cpu help | grep -i cascadelake
x86 Cascadelake-Server (alias configured by machine type)
x86 Cascadelake-Server-noTSX (alias of Cascadelake-Server-v3)
x86 Cascadelake-Server-v1 Intel Xeon Processor (Cascadelake)
x86 Cascadelake-Server-v2 Intel Xeon Processor (Cascadelake) [ARCH_CAPABILITIES]
x86 Cascadelake-Server-v3 Intel Xeon Processor (Cascadelake) [ARCH_CAPABILITIES, no TSX]
x86 Cascadelake-Server-v4 Intel Xeon Processor (Cascadelake) [ARCH_CAPABILITIES, no TSX]
x86 Cascadelake-Server-v5 Intel Xeon Processor (Cascadelake) [ARCH_CAPABILITIES, EPT switching, XSAVES, no TSX]
Export CPU
export QEMU_SYSTEM_X86_64="qemu-system-x86_64 -cpu Cascadelake-Server"
Start Lima
switch to user