Vagrant 命令究竟做了什么? [英] What exactly do the Vagrant commands do?
问题描述
令人惊讶的是,除了整个入门"教程中的参考外,没有关于 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 VMinit
- prepare a directory with a new Vagrantfilepackage
- 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...) stagereload
- modify the VM configuration (eg, reapply Vagrantfile), reboot the VM, reprovisionresume
- un-suspend (ie, unhibernate)ssh
- open an SSH shell connection to the VMssh-config
status
suspend
- hibernate the VMup
- some or all of: copy a VM image to create a new VM, apply configuration to it, boot it
我有这些权利吗?其他人是什么?我仍然有点不清楚 reload
和 destroy
/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屋!