Search code examples
windowsbinaryvirtualboxvirtualizationredistributable

How to create a redistributable self contained binary distribution of a VM with VirtualBox?


Is it possible to create a self contained binary distribution of a VM with VirtualBox or some other tool?

My requirements:

  • no VirtualBox install
  • self contained binary/-ies to start and stop VM (with all VirtualBox environment support on it)
  • possibly no administrator rights to start and stop the VM
  • at least windows, but better if cross platform

Solution

  • In theory it is possible to create a giant blob that bundles some kind of hypervisor which will first extract install along with the VM (disk, config. etc.) and then run itself and the extracted VM.

    However, that is only theory. In practice, hypervisors are very complex pieces of software and require some sort of ring-0 access (kernel level) to talk directly with the CPU and other hardware and VirtualBox is no exception. So installing them, on any operating system that cares even a little bit about security, will require admin/root/supervisor access as you cannot install drivers and other kernel components otherwise.

    If performance is of no concern, it may be possible to use an emulator like Qemu/Bochs which can work without ring-0 access. However, I'm not currently aware of any projects that have such self-extracting and runnable emulators for pre-baked VM images (even more so on Windows).