They use user-mode networking: VirtualBox NAT for Vagrant, and QEMU
slirp/user-v2 or vz for Lima. With that setup the guest has no address the
host can reach, so ports have to be forwarded to 127.0.0.1. It also
behaves the same on macOS and Windows, which is the main reason it's the
default there.
This is the KrunKit companion to my QEMU walkthrough. I’ll boot an Ubuntu cloud image, share the project directory with the guest, connect over SSH, and run the same Ansible provisioning step. KrunKit runs the VM, Podman supplies gvproxy for networking, and QEMU supplies qemu-img for disk conversion. QEMU walkthrough · KrunKit documentation
Run the snippets in order from the project directory in the same Bash session on an Apple Silicon Mac. This walkthrough uses the project’s existing cloud-init/user-data, cloud-init/meta-data, and playbook.yaml.
brew tap slp/krunNot in hako's Gentoo box today, but that's a project decision, not a limit of Gentoo or VirtualBox. The README says the image's kernel lacks the guest modules, and this was checked directly in the box (kernel 6.18.64-p1).
CONFIG_VBOXGUESTis not set, and there are no vbox modules on disk. Guest Additions'vboxguestandvboxsfcan't be loaded./lib/modules/.../buildpoints to/usr/src/linux-6.18.64-p1, which doesn't exist. Both build-tree paths are dangling symlinks, so there is no kernel source or headers to compile modules against.gccandmakeare installed, but that doesn't help without the tree.
Haswell (4th-gen Core, 2013) was the first Intel generation with AVX2, BMI1, BMI2, FMA3, MOVBE and LZCNT. F16C arrived earlier, with Ivy Bridge.
Model. The i5-1038NG7 is a 10th-gen Ice Lake chip, several generations past Haswell. It also supports AVX-512, which Haswell lacks.
| Feature | What it does | Debuted with Haswell? |
|---|---|---|
| AVX2 | Extends 256-bit SIMD to integer operations. The earlier AVX covered only floating point. It also adds gather loads and per-element variable shifts. | Yes |
| FMA (FMA3) | Fused multiply-add, computing a*b + c in one instruction with a single rounding. It's faster and more accurate for math, ML and graphics. |
Yes |
| BMI1 | Bit-manipulation helpers such as ANDN, BLSR, BEXTR and TZCNT, for isolating, clearing and extracting bits. |
Yes |
| BMI2 | More bit tools: PDEP/PEXT (bit scatter and gather), MULX, BZHI and flag-free shifts and rotates (SHLX, SHRX, RORX). |
Yes |
Research notes on running software in isolated or foreign environments. Roughly ordered from most to least overhead: emulation → VMs → microVMs → containers → WASM.
- QEMU TCG – CPU emulation of any ISA on any host
- Rosetta 2 – x86_64 → ARM64 translation on macOS (also usable in Linux VMs)
I would first establish the workload characteristics and scaling target: current and expected traffic, read/write ratio, latency objective, data volume, availability requirements, regional requirements, and budget. Then I would scale each tier independently, because the application, cache, and database have different bottlenecks and consistency trade-offs.
Before choosing an architecture, I would ask:
- Is traffic steady, bursty, or seasonal?
- Is the application stateless?
- What are the read/write ratios?
- What is the current bottleneck?
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [[ ! -f "./vpc-outputs.env" ]]; then | |
| echo "ERROR: vpc-outputs.env not found in current directory." >&2 | |
| exit 1 | |
| fi | |
| source ./vpc-outputs.env |
| #!/usr/bin/env bash | |
| update_homebrew_path() { | |
| # Google Style: Declare locals at the top. | |
| # Capitalized because these will hold environment-like path strings. | |
| local BREW_PREFIX | |
| local GNU_PATHS | |
| local KEG_PATHS | |
| local RAW_COMBINED | |
| local DEDUPE_LOGIC |
| # Run Script to fetch monitors | |
| # -------------------------------------- | |
| # WORKSPACE=$(terraform workspace show) | |
| # [[ -d "./tfvars" ]] && VAR_DEFS_PATH="./tfvars" | |
| # [[ -d ".././tfvars" ]] && VAR_DEFS_PATH=".././tfvars" | |
| # [[ -z "$VAR_DEFS_PATH" ]] && { echo 'VAR_DEFS_PATH not specified. Aborting' >&2 ; exit 1; } | |
| # DD_API_KEY="$(awk -F'"' '/dd_api_key/{ print $2 }' $VAR_DEFS_PATH/$WORKSPACE.secret.tfvars)" | |
| # DD_APP_KEY="$(awk -F'"' '/dd_app_key/{ print $2 }' $VAR_DEFS_PATH/$WORKSPACE.secret.tfvars)" | |
| # [[ -z "$DD_API_KEY" ]] && { echo 'DD_API_KEY not specified. Aborting' >&2 ; exit 1; } | |
| # [[ -z "$DD_APP_KEY" ]] && { echo 'DD_APP_KEY not specified. Aborting' >&2 ; exit 1; } |