问题描述
vagrant box repackage
(docs) 和 vagrant 包
(docs)?
我意识到 vagrant package
仅适用于 VirtualBox 提供程序,但如果仅使用 VirtualBox - 有什么区别?也许创建 vagrant package
有特定原因?
I realise that vagrant package
works only with the VirtualBox provider, but in case only VirtualBox is used - what's the difference? Maybe there's a specific reason vagrant package
was created?
推荐答案
vagrant package
如果你有一个正在运行的 VirtualBox 虚拟机,你首先在没有 vagrant 的情况下创建,使用 VirtualBox 做你的事情,现在你想使用 Vagrant 来管理这个虚拟机.由于 vagrant 需要 box 来启动 VM,您将运行 vagrant package
基于现有的 VirtualBox VM 创建一个 vagrant box
If you have a running VirtualBox VM, you created without vagrant first, did your things using VirtualBox, and you now want to use Vagrant to manage this VM. As vagrant needs box to start VM, you will run vagrant package
to create a vagrant box based on the existing VirtualBox VM
流浪者重新打包
当您的系统上安装了现有的 vagrant box 时,您将使用此选项.因此,您将 vagrant 与给定的框一起使用,再次对 VM 进行更改,并且希望将这些更改(已安装的软件...)保存为一个新框,您将在其上运行 vagrant repackage
框,它将创建此框的更新版本,以便将其用作新 VM 的起始框.
You will use this option when you have an existing vagrant box installed on your system. So you use vagrant with a given box, again you will make change to the VM and you want to save those changes (software installed ...) as a new box, you will run vagrant repackage
on this box, and it will create an updated version of this box so it can be used as starting box for new VM.
这篇关于打包和重新打包之间的流浪区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!