You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VBox 3a: vboxapi crate: attach to a VM and read guest memory #274
A minimal Rust crate (vboxapi, unpublished, under ~/vmi) binding VirtualBox's C API glue, loaded at runtime from the installed VirtualBox, able to attach a shared session to a running VM by name and read guest physical memory through IMachineDebugger.
Acceptance criteria
Example program dumps a guest physical page; bytes match the core dump
Clear error when VirtualBox libraries are not found or the VM is not running
Binding surface limited to what the MachineDebugger method needs
Implemented in local repo ~/vmi/vboxapi (unpublished per the spec, no remote, so no PR): commits 08cc563, 120b810.
Vm::attach(name) (shared session, process-wide IVirtualBoxClient loaded once via dlopen of VBoxXPCOMC.so; VBOX_APP_HOME or /opt/VirtualBox, /usr/lib/virtualbox), Vm::read_physical(paddr, buf) (1 MiB chunks, checked arithmetic).
Errors: LibraryNotFound, LibraryIncompatible (C API version check), VmNotFound, VmNotRunning, AddressOutOfRange, Api { call, rc, text }.
Verified against the patched build (vmi/machinedebugger): 8 pages + a 3 MiB block byte-identical to a dumpvmcore core; the three error cases give clear messages; two Vms at once, attach/drop/attach and attach from another thread work.
Code-reviewed (9 findings, all fixed: drop order vs. shutdown, double uninit, single process-wide client, null out-pointers, no env mutation, bounded chunks, checked addresses, version message + unit test).
Activity
Wenzel commentedon Oct 11, 2026
Implemented in local repo
~/vmi/vboxapi(unpublished per the spec, no remote, so no PR): commits08cc563,120b810.Vm::attach(name)(shared session, process-wideIVirtualBoxClientloaded once via dlopen ofVBoxXPCOMC.so;VBOX_APP_HOMEor/opt/VirtualBox,/usr/lib/virtualbox),Vm::read_physical(paddr, buf)(1 MiB chunks, checked arithmetic).LibraryNotFound,LibraryIncompatible(C API version check),VmNotFound,VmNotRunning,AddressOutOfRange,Api { call, rc, text }.vmi/machinedebugger): 8 pages + a 3 MiB block byte-identical to adumpvmcorecore; the three error cases give clear messages; twoVms at once, attach/drop/attach and attach from another thread work.virtualbox-apiWindows CI build from VirtualBox driver: MachineDebugger and VBoxVMI access methods (phase 1: VM state access) #269 needs follow-up.Left open for maintainer review.
Wenzel commentedon Oct 11, 2026
Done (see comment above); closing as the work is verified and in use by later tickets.