LoginSignup
6
6

More than 3 years have passed since last update.

VirtualBoxの仮想マシンを、コマンドラインから操作する

Last updated at Posted at 2019-09-13

VBoxManage

VBoxManageというコマンドを使うと、VirtualBoxの仮想マシンをコマンドラインから操作することができます。

いくつか、よく使いそうなものを試してみましょう。

コマンド自体の情報は、こちら。

VBoxManage

以下でも確認できますが、出力内容が膨大になります…。

$ VBoxManage help

環境

OS

$ sw_vers 
ProductName:    Mac OS X
ProductVersion: 10.14.5
BuildVersion:   18F132

VirtualBox

$ VBoxManage -v
6.0.10r132072

仮想マシンの一覧

VBoxManage list

起動しているもの、停止しているものなど含めて全部の仮想マシンの一覧。

$ VBoxManage list vms

現在実行中の仮想マシンの一覧。

$ VBoxManage list runningvms

仮想マシンの起動

VBoxManage startvm

$ VBoxManage startvm "[仮想マシン名]"

## headlessの場合
$ VBoxManage startvm "[仮想マシン名]" --type headless

仮想マシンの名前は、listで確認しましょう。

仮想マシンの停止

VBoxManage controlvm

$ VBoxManage controlvm "[仮想マシン名]" poweroff

仮想マシンの情報を確認する

VBoxManage showvminfo

$ VBoxManage showvminfo "[仮想マシン名]"

OSのインストールなどはさておき、これくらいあれば、作成済みの仮想マシンの操作で困らないでしょう。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6