diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-09-10 21:02:02 -0700 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-11 18:33:34 -0700 |
| commit | c9194b12185dc0be68184376fb2935d82b6cf6ae (patch) | |
| tree | 40f509b7d37938dfe835ec414b19e7fa8fafca55 /README.md | |
| parent | Initial Commit (diff) | |
| download | site-server-images-c9194b12185dc0be68184376fb2935d82b6cf6ae.zip | |
Add afterboot vm initialization setup script and makefile
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 44 |
1 files changed, 12 insertions, 32 deletions
@@ -8,53 +8,33 @@ that is the only configuration that is actively tested. ## Installation -You can also build the box yourself with the following: +First, ensure you have QEMU installed: ```sh brew install qemu -cp /opt/homebrew/share/qemu/edk2-arm-vars.fd ./edk2-arm-vars.fd -export PACKER_LOG=1 -packer init -packer build -var-file=openbsd79-arm64-macos.pkvars.hcl ``` -## Usage - -Once your image is built, you can run it. - -First, the efivars are stateful. So, make a copy of the ones you used during the -build to use for your particular run. +Then, you can build the box with the following: ```sh -cp build/efivars.fd build/efivars-run.fd +make ``` -Then, run the following command: +## Usage + +Once your image is built, you can run it: ```sh -qemu-system-aarch64 \ - -machine type=virt,accel=hvf \ - -cpu host \ - -m 4096M \ - -smp 1 \ - -nographic \ - -device qemu-xhci,id=xhci \ - -device usb-kbd,bus=xhci.0 \ - -device virtio-gpu-pci \ - -netdev user,id=net0,hostfwd=tcp::2222-:22 \ - -device virtio-net,netdev=net0 \ - -drive file=build/openbsd-7.9-aarch64.qcow2,if=virtio,cache=writeback,discard=ignore,format=qcow2 \ - -drive file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd,if=pflash,unit=0,format=raw,readonly=on \ - -drive file=build/efivars-run.fd,if=pflash,unit=1,format=raw +make run ``` -If you want a display (rather than a headless VM over SSH), replace `-nographic` -with `-display cocoa`. - -Once the system is up, you can SSH in using your admin user and private key: +Once the system is up, you can SSH in using: ```sh -> ssh -p 2222 eugene@127.0.0.1 +make ssh +``` + +``` The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established. ED25519 key fingerprint is: SHA256:GnVug9cxjtROdVCbDsaxG7Co/E1j060B9U+bmY2lqOk This key is not known by any other names. |