The use of the VirtualBox command-line tool (VBoxManage)

VBoxManage is the command line tool for VirtualBox, allowing you to manage and control VirtualBox through it.

Below are some common VBoxManage commands and their usages:

  1. View the list of virtual machines:
VBoxManage list vms
  1. Start the virtual machine.
VBoxManage startvm <虚拟机名称|UUID>
  1. Shut down the virtual machine.
VBoxManage controlvm <虚拟机名称|UUID> poweroff
  1. Reset the virtual machine.
VBoxManage controlvm <虚拟机名称|UUID> reset
  1. Pause the virtual machine.
VBoxManage controlvm <虚拟机名称|UUID> pause
  1. Restore virtual machine.
VBoxManage controlvm <虚拟机名称|UUID> resume
  1. reboot the virtual machine.
VBoxManage controlvm <虚拟机名称|UUID> acpipowerbutton
  1. Create a virtual machine.
VBoxManage createvm --name <虚拟机名称> --register
  1. Delete the virtual machine.
VBoxManage unregistervm <虚拟机名称|UUID> --delete
  1. Specify the number of CPUs for the virtual machine:
VBoxManage modifyvm <虚拟机名称|UUID> --cpus <CPU数量>
  1. Adjust the memory size of the virtual machine:
VBoxManage modifyvm <虚拟机名称|UUID> --memory <内存大小,单位为MB>

These are just a few of the commands available in VBoxManage, which also offers many other features for managing various aspects of virtual machines, such as network settings, storage settings, display settings, and more. More information can be found in the VBoxManage help documentation or official documentation.

广告
Closing in 10 seconds
bannerAds