SyntaxeVIRT-12-S
Cheatsheet VBoxManage
Lister / infos
- VM :
VBoxManage list vms· en cours :VBoxManage list runningvms - Détails :
VBoxManage showvminfo "VM1"
Créer / modifier
- Créer :
VBoxManage createvm --name "VM1" --ostype Debian_64 --register - Config :
VBoxManage modifyvm "VM1" --memory 2048 --cpus 2 --nic1 bridged
Démarrer / arrêter
- Démarrer :
VBoxManage startvm "VM1" --type headless - Arrêter :
VBoxManage controlvm "VM1" acpipowerbutton(oupoweroff)
Disques & snapshots
- Disque :
VBoxManage createmedium disk --filename VM1.vdi --size 20000 - Snapshot :
VBoxManage snapshot "VM1" take "avant-maj"·... restore "avant-maj"
⚠️ Pièges — poweroff = coupure brutale (préférer acpipowerbutton). Vérifier l'--ostype (VBoxManage list ostypes). headless = sans fenêtre graphique.
Réf. : man VBoxManage · doc VirtualBox.