LoginSignup
2
2

More than 5 years have passed since last update.

Tips 複数VMを定義しているVagrant環境で、特定VMに対して vagrantコマンドを実行する方法

Last updated at Posted at 2016-03-22

Tips 複数VMを定義しているVagrant環境で、特定VMに対して vagrantコマンドを実行する方法

複数VMを定義している環境で特定のVMをコントロールする場合、こちらの通り、

vagrant [up | halt | status | destroy | ssh | ssh-config | etc ...] hoge(VagrantfileでのVM定義名config.vm.define hoge)
としてVMを指定してコマンド実行することができます。

なお、vagrant up /hoge0[1-9]/とすることで複数VM(hoge01〜hoge09)指定することもできます。
また、VM名を省力した場合は、Vagrantfileで定義しているすべてのVMに対してコマンドを実行します。

2
2
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
2
2