Show VM list
VBoxManage list vms
```
"windowsXP" {4e7e6120-131c-4b55-80e8-a7c88427c1d0}
"winXP" {63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3}
"gentoo" {95c51fce-6088-47f0-ae24-14d241eb5019}
"winXP2" {746a78d8-b60a-41e6-adb0-f63ea6d1257b}
"windowXP_1" {dd684655-1087-46d8-9fb3-e69b51088702}
```
Start VM
Open VM and put in the background
VBoxManage startvm "VM name || uuid" --type headless
VBoxManage startvm 63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3 --type headless
With GUI
VBoxManage startvm 63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3 --type gui
Shutdown ALL VM
vboxmanage list runningvms | sed -r 's/.*\{(.*)\}/\1/' | xargs -L1 -I {} VBoxManage controlvm {} savestate
Shutdown VM
Show help message
VBoxManage controlvm ?
VBoxManage controlvm 63999bea-f6f4-4b8d-bb6b-22cf6bf52ba3 poweroff
VM change network interface
VBoxManage controlvm <vmname || uuid> <vm virtual network interface> bridged <physical network interface>
VBoxManage controlvm winXP nic1 bridged eth1
VM take snapshot & restore snapshot
Take a snapshot VBoxManage
<Name_of_VM> take <Name_of_Snapshot>
Restore a snapshot
VBoxManage
<Name_of_VM> restore <Name_of_Snapshot>
List a snapshot
VBoxManage
<Name_of_VM> list
Reference :
- How to start a Virtualbox machine via command line (without GUI)?
- Shutting down all VirtualBox (vagrant) VMs in one easy to use bash command (that can be put into a bash file)
0 意見:
張貼留言