Run an x86 virtual machine using the v86 WASM engine.

Synopsis

v86 <start|ls|type|key|mouse|screenshot|text|serve|serial|state|stop> [args]

Description

Boots and controls a lightweight x86 VM in the browser via the v86 engine. Requires the v86 package: ipk add -g v86@0.5.445.

Options

start [boot options] Boot a VM in the background (prints pid).

ls List running VMs.

type [-n name] <text> Type text on the keyboard ('\n' = Enter).

key [-n name] <chord> [...] Send key chords: enter, tab, esc, f1..f12, ctrl-alt-del, ctrl-c, alt-tab, ...

mouse [-n name] move <dx> <dy> / click [left|right|middle] [--double] / --to <x>,<y>

screenshot [-n name] [<file.png>] Save the VGA output as PNG.

text [-n name] Dump the text-mode screen as plain text.

serve [-n name] [--fps <1-10>] / --stop Stream the screen as live frames for viewing.

serial [-n name] --send <text> / [--tail <lines>] Interact with the guest serial console.

state [-n name] save|load <file> Save or restore full VM state.

stop [-n name] [--force] Power off (--force hard-kills).

--version Print the engine version.

-n, -name <name> VM name (default: vm0); -m <MiB> Guest RAM (default 128, max 512).

-cdrom / -hda / -fda <vfs-path> Attach an ISO, disk, or floppy image.

-kernel / -initrd / -append Direct Linux boot.

-net <ne2k|virtio>[,relay=fetch] Guest NIC model; relay=fetch routes guest networking through the SLICC fetch proxy.

Examples

$ v86 start -cdrom alpine.iso -m 256

Boot a VM from an ISO with 256 MiB RAM.

$ v86 type 'ls -la\n'

Type a command into the running VM.

$ v86 screenshot vm-state.png

Capture the current VGA output.

Notes

x86 only, no KVM: expect a fraction of native speed. Small guests (Alpine, FreeDOS, Buildroot Linux) work best. BIOS blobs are not bundled and must be downloaded once into /workspace/.v86/.

See Also

esptool, serial