Python command-line wizard dedicated to VirtualBox, which automates the creation, cloning and management of virtual machines.
Thanks to a system of JSON templates, it lets you define a “typical” VM (OS, resources, snapshot, network) and duplicate it in one command, without ever reinstalling.
Once launched, each VM benefits from automatic SSH redirection and an interactive menu: view its information, connect via SSH, pause it, resume it, save its status, cleanly shut it down or delete it.
-
Launch & configure the ISO you want to use
-
Shutdown the machine (IMPORTANT) and create a snapshot
$ VBoxManage list vms $ VBoxManage snapshot "" take "" $ VBoxManage snapshot "" list
-
Use or edit templates into
/templates
-
Configure NAT :
$ VBoxManage.exe list vms $ VBoxManage.exe modifyvm "" --nic1 nat $ VBoxManage.exe modifyvm "" `--natpf1 "guestssh,tcp,127.0.0.1,2222,,22" $ VBoxManage.exe showvminfo "" --details | Select-String natpf1
python .\__main__.py create --src-vm Ubuntu-Server-Original --snapshot template-snap --memory 2048 --disk 4096 --cpus 1 --host-port 2222 --name MaVMPerso --headless
python -m vbox_manager.main create --template vbox_manager/templates/example_config.json --name MaNouvelleVM --host-port 2222 --headless
python .\__main__.py interactive