Manage Virtual Box VMs with command line interface

  1. Download the extension pack that matches your VirtualBox release.
  2. Open the VirtualBox GUI.
  3. Click File | Preferences.
  4. Go to the Extensions section.
  5. Click the downward-pointing arrow .
  6. Navigate to where you saved the Extension Pack and select the .vbox-extpack file.
  7. Click Open.
  8. When prompted, type your admin password for the host machine.
  9. Click OK.

On windows, if there is an error that can't rename directory xxx to yyy, please run Virtual Box with administrator.

On windows, should add the directory of virtual box exist to path environment variable. For the key command VBoxManage is at there.

Commands:

VBoxManage list vms

VBoxManage startvm "ubuntu 14" --type headless

VBoxManage controlvm "ubuntu 14" pause --type headless

VBoxManage controlvm "ubuntu 14" resume --type headless

VBoxManage controlvm "ubuntu 14" poweroff --type headless

 

Note: for the source article please refer to https://www.techrepublic.com/article/how-to-run-virtualbox-virtual-machines-from-the-command-line

posted @ 2021-01-04 15:34  耕读编码  阅读(69)  评论(0编辑  收藏  举报