Vagrant 命令究竟做了什么? [英] What exactly do the Vagrant commands do?

查看:29
本文介绍了Vagrant 命令究竟做了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

令人惊讶的是,除了整个入门"教程中的参考外,没有关于 Vagrant 命令功能的文档.

There is surprisingly no documentation on what the Vagrant commands do, other than references throughout the "getting started" tutorial.

到目前为止我所做的:

  • box - 管理"
  • destroy - 关闭虚拟机然后删除其存储的映像?
  • 宝石
  • halt - 关闭虚拟机
  • init - 准备一个包含新 Vagrantfile 的目录
  • package - 关闭虚拟机,然后将其转换为可以变成盒子的包"?(或其他)
  • provision - 仅运行配置(例如,Chef、Puppet...)阶段
  • reload - 修改 VM 配置(例如,重新应用 Vagrantfile),重新启动 VM,重新配置
  • resume - 取消挂起(即取消休眠)
  • ssh - 打开到 VM 的 SSH shell 连接
  • ssh-config
  • 状态
  • suspend - 休眠虚拟机
  • up - 部分或全部:复制 VM 映像以创建新 VM,对其应用配置,启动它
  • box - manage "boxes"
  • destroy - shut down the VM then delete its stored image?
  • gem
  • halt - shut down the VM
  • init - prepare a directory with a new Vagrantfile
  • package - shut down the VM, then convert it to a 'package' which can be turned into a box? (Or something)
  • provision - run just the provisioning (eg, Chef, Puppet...) stage
  • reload - modify the VM configuration (eg, reapply Vagrantfile), reboot the VM, reprovision
  • resume - un-suspend (ie, unhibernate)
  • ssh - open an SSH shell connection to the VM
  • ssh-config
  • status
  • suspend - hibernate the VM
  • up - some or all of: copy a VM image to create a new VM, apply configuration to it, boot it

我有这些权利吗?其他人是什么?我仍然有点不清楚 reloaddestroy/up 之间的确切区别.

Do I have these right? What are the others? I'm still a bit unclear on the exact difference between reload and destroy/up.

推荐答案

我不确定它何时更改,但当前版本 (1.6.3) 具有正确的命令列表,并且正在运行 vagrant list-命令给出了更完整的列表:

I'm not sure when it changed, but the current version (1.6.3) has a proper list of commands, and running vagrant list-commands gives an even more complete list:

box             manages boxes: installation, removal, etc.
connect         connect to a remotely shared Vagrant environment
destroy         stops and deletes all traces of the vagrant machine
docker-logs     outputs the logs from the Docker container
docker-run      run a one-off command in the context of a container
global-status   outputs status Vagrant environments for this user
halt            stops the vagrant machine
help            shows the help for a subcommand
init            initializes a new Vagrant environment by creating a Vagrantfile
list-commands   outputs all available Vagrant subcommands, even non-primary ones
login           log in to Vagrant Cloud
package         packages a running vagrant environment into a box
plugin          manages plugins: install, uninstall, update, etc.
provision       provisions the vagrant machine
rdp             connects to machine via RDP
reload          restarts vagrant machine, loads new Vagrantfile configuration
resume          resume a suspended vagrant machine
rsync           syncs rsync synced folders to remote machine
rsync-auto      syncs rsync synced folders automatically when files change
share           share your Vagrant environment with anyone in the world
ssh             connects to machine via SSH
ssh-config      outputs OpenSSH valid configuration to connect to the machine
status          outputs status of the vagrant machine
suspend         suspends the machine
up              starts and provisions the vagrant environment
version         prints current and latest Vagrant version

单独运行 vagrant 时,从完整列表中遗漏的唯一命令是 docker 和 rsync.无论如何,在我的系统上.

The only commands left out from the complete list when running vagrant by itself are the docker and rsync ones. On my system, anyway.

这似乎是最终的答案.

这篇关于Vagrant 命令究竟做了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆