- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在学习了几天之后,我很高兴能够成功设置我的 VM 并运行 Laravel 起始页。在那里很开心:)
有人可以澄清“何时”使用 Vagrant 函数。我的问题:
halt
或 suspend
? (我猜halt
)如果我忘记做这两个中的任何一个,会不会有问题? up
或 resume
? vagrant suspend
? 最佳答案
简而言之
1. 关机
“关闭”方法在关闭/打开 VM 时的速度和 VM 占用的磁盘空间量方面有所不同。来自 更快/更多磁盘消耗至 更慢/更少的磁盘消耗 ,命令是:vagrant suspend
, vagrant halt
和 vagrant destroy
.
2. 开启
只需使用 vagrant up
. “启动”方法之间的区别在于 vagrant resume
将在 vagrant up
时“唤醒”VM在此之前将进行一些配置检查。例如,它会检查你的 vagrant box 是否有更新的版本,并通过运行 vagrant box update
通知你可以更新。 .
您也可以使用 vagrant resume
仅在先前暂停的 VM 上。在时间上,在悬挂的机器上使用时,两者之间没有明显差异。
有关更多详细信息,请参阅下面的文档引用。
3. sleep /休眠
将您的计算机置于 sleep 状态或什至使其休眠应该不会造成任何伤害。前者只是低功耗状态,而后者将 RAM 保存到存储驱动器,然后在您启动计算机时将其恢复。这是操作系统级别的东西,除非发生 sleep 失败或其他问题,否则它不会影响任何事情。
引用文档
Vagrant documentation有一个部分介绍了不同命令的作用:
Suspending the virtual machine by calling
vagrant suspend
will save the current running state of the machine and stop it. When you're ready to begin working again, just runvagrant up
, and it will be resumed from where you left off. The main benefit of this method is that it is super fast, usually taking only 5 to 10 seconds to stop and start your work. The downside is that the virtual machine still eats up your disk space, and requires even more disk space to store all the state of the virtual machine RAM on disk.Halting the virtual machine by calling
vagrant halt
will gracefully shut down the guest operating system and power down the guest machine. You can usevagrant up
when you're ready to boot it again. The benefit of this method is that it will cleanly shut down your machine, preserving the contents of disk, and allowing it to be cleanly started again. The downside is that it'll take some extra time to start from a cold boot, and the guest machine still consumes disk space.Destroying the virtual machine by calling
vagrant destroy
will remove all traces of the guest machine from your system. It'll stop the guest machine, power it down, and remove all of the guest hard disks. Again, when you're ready to work again, just issue avagrant up
. The benefit of this is that no cruft is left on your machine. The disk space and RAM consumed by the guest machine is reclaimed and your host machine is left clean. The downside is thatvagrant up
to get working again will take some extra time since it has to reimport the
vagrant up
和
vagrant resume
:
Command:
vagrant up
This command creates and configures guest machines according to your Vagrantfile.
This is the single most important command in Vagrant, since it is how any Vagrant machine is created. Anyone using Vagrant must use this command on a day-to-day basis
Command:
vagrant resume
This resumes a Vagrant managed machine that was previously suspended, perhaps with the suspend command.
$ vagrant resume
==> default: Resuming suspended VM...
==> default: Booting VM...
...
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Resuming suspended VM...
==> default: Booting VM...
...
期间
vagrant up
你可以看到签到阿克顿。例如,如果您的盒子有更新版本,您将收到通知:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: A newer version of the box 'laravel/homestead' is available! You currently
==> default: have version '0.3.3'. The latest is version '0.5.0'. Run
==> default: `vagrant box update` to update.
==> default: Resuming suspended VM...
==> default: Booting VM...
关于vagrant - 我应该使用 vagrant resume 还是 vagrant up?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25966283/
我的几个 Android 应用程序在 logcat 输出中显示以下类型的消息: I/UsageStats( 59): Unexpected resume of com.totsp.test whi
因此,在“On Error GoTo 执行一次”下出现了几个 SO 问题和 Google 结果,几乎在每种情况下,推荐的解决方案都是添加 Err.Clear或者Resume的一些论坛清除错误。 VBA
我正在构建一个基于文本的 RPG,并且我已经成功地向我的程序添加了一些 .wav 文件,我也能够正常播放它们而没有问题任何一个。 目前发生了什么? 我有 2 个 .wav 文件,一个用于一般背景音乐
在那里, 我修改了 Lua 5.0 在线文档中的“perm”示例:http://www.lua.org/pil/9.3.html .我所做的是将 __call() 元方法重新指向 perm() 函数。
我意识到这是一个较旧的编程环境,但我必须清理一些 VB6代码,我发现它大部分使用: On Error Resume Next 使用On Error Resume Next的普遍共识是什么? ? 当然,
当我尝试恢复挂起(可恢复)编排实例时,出现以下错误。 场景:请求通过 DB2 静态请求 - 响应端口,但由于访问权限被拒绝而失败。我可以在管理控制台中看到两个暂停的实例,一个与端口相关,另一个与编排相
如何从最后上传的 block 中获取响应数据?我在任何地方都找不到它,我唯一发现的是您只能在错误时访问该消息 谢谢 最佳答案 找到了!如果您想从上传的文件中检索数据,您需要: r.on('fi
我无法建立exe: 1> ------ Assembly started: project: B, Configuration: Debug Any CPU B.vb (38.9): error BC
我在 aframe (ar.js) 中有一个 360° 旋转动画,我想暂停并继续它,而我所能做的就是暂停但从头开始重新开始。 Animation docum
我认为答案是否定的,但 Twilio 是否提供暂停/恢复录制的功能?用例正在录制通话,但在收集敏感信息时暂停录制。从 REST 文档来看,它似乎不是受支持的功能。认为有人可能已经找到了满足此要求的一些
我有一个包含 5 个模块的多模块 maven 项目。这些模块是分层的,因此一些依赖于构建的第一个(它是我的模型类),而一些依赖于构建的第二个(那些是核心应用程序类)。最后一个构建的是一个依赖于所有其他
如果我运行一个异步调用 onResume 是否有一个好的方法来检测异步调用是否正在运行以不再调用它? 因为我在 fragment 的 onResume 中使用 AsynTask 进行网络调用,它似乎被
如何向这个 javascript 倒数计时器添加恢复按钮? JS $(document).ready(function () { var $worked = $("#timer"); function
找不到明确的答案,基本上我有一个 EditText 字段的 Activity 。软键盘在 list 中设置为可见,因此当 Activity 开始时键盘是可见的,但是如果用户导航离开并使用后退按钮返回,
我正在看generators in Rust ,并决定试一试。我实现了我能找到的最基本的例子: #![feature(generators, generator_trait)] use std::op
我知道这之前已经发布过,但我是 swift 的新手,我想根据我的情况寻求帮助。所以我需要运行一个计时器,当 stopMusic() 被调用时(在我的应用程序中的某个地方),我需要暂停计时器,然后当 p
Android 中的共享首选项有问题 - 我希望能够将一些字符串(保存图片的 ID)作为下一次发布的最爱 - 它工作完美,它可以识别 ID 是否已经在共享首选项并在必要时将其删除,但是当我通过按下主页
我在我的 Node.js-express 应用程序中使用 Resumable.js。我可以知道文件传输成功了,因为我可以 console.log(req.body) 并在下面看到这个...... {
一年好景君须记,最是橙黄橘绿时。金三银四,秣马厉兵,没有一个好看的简历模板怎么行?无论是网上随便下载还是花钱买,都是一律千篇的老式模版,平平无奇,味同嚼蜡,没错,蜡都要沿着嘴角流下来了。本次我们基于
启用或禁用错误处理程序。 说明 如果在您的代码中未使用OnErrorResumeNext语句,所发生的运行时错误将显示错误信息,同时,代码的执行也随之终止。但是具体操作由运行代码的主机决定。主机
我是一名优秀的程序员,十分优秀!