virtualbox comes with it’s own command line utility:
Announcement
You can find all my latest posts on medium.https://www.virtualbox.org/manual/ch08.html#vboxmanage-list
to make use of this you first have to cd to the vboxmanage.exe which is in the virtualbox program file’s folder:
C:\Program Files\Oracle\VirtualBox
here are some examples:
Start a vm
use the following:
.\VBoxManage.exe startvm {vm’s name}
Note: the vm’s name is case sensitive. I think.
e.g.:
[powershell]
PS C:\Program Files\Oracle\VirtualBox=> .\VBoxManage.exe startvm Centos7
Waiting for VM "Centos7" to power on…
VM "Centos7" has been successfully started.
[/powershell]
List running vms
This is done like this:
[powershell]
PS C:\Program Files\Oracle\VirtualBox=> .\VBoxManage.exe list runningvms
"Centos7" {6cfe3d82-b4ae-46f1-9188-d5e6a603474e}
PS C:\Program Files\Oracle\VirtualBox=>
[/powershell]
Shutdown a VM
To shutdown a vm, do:
[powershell]
PS C:\Program Files\Oracle\VirtualBox=> .\VBoxManage.exe controlvm Centos7 savestate
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
PS C:\Program Files\Oracle\VirtualBox=>
[/powershell]