我可以在已经通过`vagrant up`运行机器的情况下使用`vagrant box update`吗? [英] Can I use `vagrant box update` while already having the machine running by `vagrant up`?

查看:102
本文介绍了我可以在已经通过`vagrant up`运行机器的情况下使用`vagrant box update`吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Laravel中有一些项目,当我需要对其进行一些维护时,有时当我运行vagrant up时,它警告我我有一个较新版本的laravel box,宅基地,如下面的消息所示:

I have some projects in Laravel, and when I have to give some maintenance to them, sometimes when I run vagrant up, it warns me up that I have a newer version of the laravel box, homestead, like the message below:

A newer version of the box 'laravel/homestead' is available! You currently
have version '1.1.0'. The latest is version '2.0.0'. Run
`vagrant box update` to update.

我的问题是,总是在我运行vagrant box update时,花了十年的时间才下载更新版本的Box,因为hashicorp的服务器似乎处理得不够好...

My question is, always when I run vagrant box update, it tooks like a decade to download the newer version of the box, because it seems like the hashicorp's servers are not too good enough to handle...

记住这一点,我可以在启动机器的同时进行项目维护吗?同时还可以更新机器吗?我真的不知道这是否真的可能,或者这会如何影响事情.

Having that in mind, can I give maintenance to my project while putting the machine up, and in parallel, also update the box? I really don't understand if that's really possible, or how could this impact the things.

非常感谢,我希望问一个其他用户也有的问题.

Thank you very much, I hope to ask a question other users also have.

推荐答案

记住这一点,我可以在启动机器的同时对项目进行维护吗?同时还可以更新盒子吗?

Having that in mind, can I give maintenance to my project while putting the machine up, and in parallel, also update the box?

是-您可以启动运行vagrant up的当前VM并并行更新现有框vagrant box update(甚至可以从任何文件夹中执行此操作,在这种情况下,请指向要更新的框vagrant box update --box laravel/homestead)

Yes - you can start your current VM running vagrant up and in parallel update the existing box vagrant box update (You can even do that from any folder, in this case point to the box to be updated vagrant box update --box laravel/homestead)

请注意,第一次 旋转时该框用于创建VM(无用的基本上是克隆该框以创建新的VM),因此,如果更新该框,则不会影响您的当前的虚拟机

Note that the box is used to create the VM when you first spin up (vagrant is basically cloning the box to create a new VM) so if you update the box, it will not affect your current VM

正如其他人提到的那样,如果您希望您的VM反映此框的更新(例如,第三方软件),则是的,您需要销毁VM并重新创建VM(运行vagrant up)

As mentioned by others, if you want your VM to reflect the update of the box (3rd party software for example), then yes you need to destroy the VM and recreate the VM (running vagrant up)

这篇关于我可以在已经通过`vagrant up`运行机器的情况下使用`vagrant box update`吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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