Boot straight to init=/usr/bin/vm-guest from /dev/vda; an initramfs is
only used when --initrd asks for one. Plain run attaches the work disk
without host durability and unlinks it while the VM holds it open —
teardown deletes nothing. The clone is warmed sequentially while VZ
starts, the image ships at the default --disk-size so the clone is never
extended, and the cmdline gains printk.time=1 plus mitigations=off (the
guest is disposable and secrets stay host-side in the proxy).
Co-authored-by: Hanzo Dev <[email protected]>
debootstrap arch and the vm-guest musl target now follow uname -m
(amd64/x86_64 alongside the existing arm64/aarch64 path).
Co-authored-by: Hanzo Dev <[email protected]>
Same feature set as the arm64 config (virtio-pci, virtio-console, vsock,
netfilter, cgroup2 + k3s set); the arch section swaps GICv3/PL011 for
PVH direct boot, kvmclock, and ACPI. cloud-hypervisor loads the
uncompressed ELF vmlinux via its PVH entry, so the build strips vmlinux
into Image instead of taking arch/*/boot/Image.
Co-authored-by: Hanzo Dev <[email protected]>
k3s programs iptables from inside the guest; bake /etc/hosts and the
hanzo-vm hostname into the image instead of relying on the guest
fallback.
Co-authored-by: Hanzo Dev <[email protected]>
Crates keep their history: vm (lib, was shuru-vm), hanzo-vm (CLI package
and binary, was shuru-cli), vm-guest, vm-proto, vm-proxy, vm-sdk,
vm-store, vm-darwin, vm-linux; all at 0.1.0, Apache-2.0, hanzoai/vm.
Config is vm.json, data lives in ~/.hanzo/vm (HANZO_VM_HOME), env vars
are HANZO_VM_*, the guest runs as /usr/bin/vm-guest, and assets download
from hanzoai/vm releases. The TypeScript SDK is @hanzo/vm. NOTICE
credits shuru as the origin. prepare-rootfs.sh builds the image natively
on arm64 Linux with mke2fs -d and re-execs in Docker only on macOS.
Includes rustfmt over the tree and fixes for clippy 1.98 lints.
Co-authored-by: Hanzo Dev <[email protected]>
Rust CLI that boots an ARM64 Alpine Linux VM on macOS using Apple's
Virtualization.framework and executes commands inside it over vsock.
- shuru-cli: CLI with `shuru run -- <cmd>` to boot VM and exec commands
- shuru-vz: vendored Virtualization.framework bindings (from virt-fwk)
with added vsock support
- shuru-guest: PID 1 init binary (aarch64-linux-musl) with vsock server
- scripts/prepare-rootfs.sh: downloads Alpine linux-virt kernel,
builds initramfs with VirtIO/ext4 modules, creates ext4 rootfs
Co-authored-by: Hanzo Dev <[email protected]>