Plugin 安装,以 vbinfo 为例
$ vagrant plugin install vbinfo
使用 vbinfo plugin
$ vagrant vbinfo/opt/vagrant/embedded/lib/ruby/2.4.0/find.rb:43:in `block in find': No such file or directory - /home/doraemon/.vagrant (Errno::ENOENT) from /opt/vagrant/embedded/lib/ruby/2.4.0/find.rb:43:in `collect!' from /opt/vagrant/embedded/lib/ruby/2.4.0/find.rb:43:in `find' from /home/doraemon/.vagrant.d/gems/2.4.9/gems/vbinfo-0.0.2/lib/command.rb:22:in `ids' from /home/doraemon/.vagrant.d/gems/2.4.9/gems/vbinfo-0.0.2/lib/command.rb:98:in `execute' from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/cli.rb:66:in `execute' from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:290:in `cli' from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/bin/vagrant:182:in `<main>'
列出已安装的 plugin
$ vagrant plugin list
移除 plugin
$ vagrant plugin uninstall vbinfoUninstalling the 'vbinfo' plugin...Successfully uninstalled mixlib-shellout-2.4.4Successfully uninstalled vbinfo-0.0.2
彻底全部移除 plugin
$ vagrant plugin expungeThis command permanently deletes all currently installed user plugins. Itshould only be used when a repair command is unable to properly fix thesystem.Continue? [N]: YAll user installed plugins have been removed from this Vagrant environment!
彻底全部移除 plugin 后再全部重新安装
$ vagrant plugin expunge --reinstall
$ vagrant plugin --helpUsage: vagrant plugin <command> [<args>]Available subcommands: expunge install license list repair uninstall updateFor help on any individual command run `vagrant plugin COMMAND -h`
Plugins 清单:
https://github.com/hashicorp/vagrant/wiki/Available-Vagrant-Plugins
老师推荐的 Vagrant plugins:
vagrant-vbguestvagrant-winnfs(仅 Windows 适用)vagrant-hostmanagervagrant-netinfovagrant-git