有人使用虚拟化来创建更快的开发环境灾难恢复吗?

发布于 2024-07-08 23:53:40 字数 213 浏览 6 评论 0原文

我对我的开发盒快死了感到非常厌倦,然后我最终不得不重新安装我在开发中使用的一系列工具。

这次我想我将在 Virtual Box VM 上设置开发环境并将其保存到外部 HDD,这样我可以在修复真实计算机后快速恢复开发环境。

这似乎是进行“与硬件无关的备份”并能够在灾难后快速恢复正常的好方法。

有人尝试过这个吗? 效果如何? 它节省了您的时间吗?

I'm getting pretty tired of my development box dying and then I end up having to reinstall a laundry list of tools that I use in development.

This time I think I'm going to set the development environment up on a Virtual Box VM and save it to an external HDD so that way I can bring the development environment back up quickly after I fix the real computer.

It seems to be like a good way to make a "hardware agnostic backup" and be able to get back up to speed quickly after a disaster.

Has anybody tried this? How well did it work? Did it save you time?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

掀纱窥君容 2024-07-15 23:53:40

我曾经使用 VirtualBox 虚拟化我所有的开发环境。

基本上,我有一个刻在 DVD 上的 Debian vbox 映像文件。 当我有一个新项目时,我将其复制到我的外部硬盘之一并根据我的项目对其进行自定义。

当我的项目交付后,我将图像从外部硬盘复制到空白 DVD 并归档。

I used to virtualize all my development eviroments using VirtualBox.

Basically, i have a Debian vbox image file stamped in a DVD. When i have a new project i copy it to one of my external hdds and customize it to my project.

Once my project was delivery, then i copy the image from my external hdd to a blank DVD and file it.

耳钉梦 2024-07-15 23:53:40

我已经成功地做到了这一点,我们甚至在我们的 QA 环境中也这样做了,我们还会使用撤消磁盘,这样,如果我们想测试例如 Microsoft 补丁,我们可以将盒子回滚到之前的状态。

我们遇到的唯一问题是在 SQL Server 上,特别是当您进行大量磁盘活动时。 我们有两个虚拟机,彼此复制数据,托管在同一个物理盒子上。 磁盘根本跟不上; 然而,对于所有其他层来说,它的工作却轻而易举。

I've done this with good success, we had this in our QA environment even and we'd also make use of Undo disks, so that if we want to test for example Microsoft patches we could roll the box back to it's previous state.

The only case we had issues was on SQL Server's particullary if you do a lot of disk activity. We had two VM's replicating gigs of data btw each other hosted on the same physical box. The disks just couldn't keep up; however, for all the other tiers it worked like a breeze.

み零 2024-07-15 23:53:40

我刚刚看到的一个很酷的想法是使用 VirtualBox,并让您的主机使用带有 ZFS 的 OpenSolaris。 这使得您可以轻松地拍摄映像快照,并在出现问题时或者当您出于 QA 目的想要恢复到已知状态时回滚到快照。

One cool idea I just saw a presentation on is using VirtualBox, and have your host using OpenSolaris with ZFS. That makes it easy to take a snapshot of your image(s), and rollback to the snapshot when things go wrong, or when you want to restore to a known state for QA purposes.

云仙小弟 2024-07-15 23:53:40

我将所有开发都放在虚拟机上。 在多开发人员商店中,如果有人破坏他们的虚拟机(通过服务包或其他方式),这允许快速部署新的开发环境,并允许新开发人员几乎立即加入该项目。

K

I keep all development on virtual machines. In a multi-developer shop this allows for rapid deployment of a new development environment if someone fries their VM (via service pack or whatever) and allows a new developer to join the project almost immediately.

K

时光无声 2024-07-15 23:53:40

我对这个问题的理解与你们其他人有很大不同。 我将其读为OP,询问如何将全新安装的映像保留为虚拟机,然后,当需要重新部署服务器时,您可以从虚拟机的备份进行恢复。

在这种情况下,虚拟机只不过是维护操作系统安装映像的一种不同方式,如果它有效,那么在我看来,这并不是一个坏主意。

I'm reading the question much differently than the rest of you guys. I read it as the OP asking about keeping an image of a fresh install as a VM, then, when a server needs to be redeployed, you can restore from a backup of the VM.

In this case, the VM is nothing more than a different way of maintaining an image of an OS install, and if it works, it's not a half bad idea, IMO.

野却迷人 2024-07-15 23:53:40

在我工作的公司中,我鼓励使用可通过网络安装的操作系统。 通过正确的前期工作,您可以在办公室网络上配置启动服务器,它将安装您的基本操作系统、硬件所需的所有驱动程序以及您将使用的所有软件。 这不仅可以帮助您在失去机器的灾难场景中摆脱困境,而且还可以使为新员工部署硬件变得微不足道。

这在 Linux 上比在 Windows 或 Mac 上更容易,但后两者也可以以这种方式工作。

我也使用相同的网络安装方法在实时环境中部署服务器。

虚拟化方法对于同一问题来说并不是一个糟糕的答案,但对我来说它似乎不太干净。

In the companies I work with, I encourage the use of network installable operating systems. With the right up-front work you can configure a boot server on your office network which will install your base operating system, all the drivers you need for your hardware, and all the software you'll use. Not only will this bail you out in a disaster scenario where you lose a machine, but it makes deploying hardware for new employees trivial.

This is easier with Linux than it is with Windows or Mac, but the latter two can work in this manner too.

I use the same network install methods for deploying servers in a live environment too.

The Virtualisation approach isn't a bad answer to the same problem, but to me it doesn't seem quite as clean.

把回忆走一遍 2024-07-15 23:53:40

那不是要走的路。
当您进行开发时,您希望拥有许多工具,其中一些工具需要大量的计算能力。请记住(IIRC,我在 VBox 网站上找不到它)仅模拟 PIV。
目前只有一个虚拟机模拟双核 CPU,这是非常新的。 这很重要,因为竞争条件只能在多 CPU 机器上看到,因此您需要在多 CPU/核心下测试代码。

我认为更简单更好的做法是制作系统和配置分区的磁盘映像,每月恢复一次以保持干净的系统,然后恢复它
当你的系统变得混乱时。

现在简单介绍一下 Windows,因为我在其他系统上执行此操作没有问题。 您创建的映像分区之间不应进行更改。 没问题
对于其他操作系统,但一些聪明的人决定将 Windows 上的配置文件放入系统文件中。 我只是强调不要在我的个人资料中(或在我的个人资料中的桌面上)放置我不愿意丢失的任何内容。

That's not the way to go.
When you are developing you want to have many tools, some which require a lot of computing power.Keep in mind that (IIRC, I couldn't find it on VBox website ) only emulates a PIV.
At the moment only one VM simulates a dual core CPU, and that's very new. This is important because there are race conditions that can only be seen on multiple CPU machines, so you want to test your code under multiple CPU/cores.

I think a simpler and better thing to do is make a disk image of your system and configuration partitions, restore it once a month to keep a clean system, and restore it
when ever your system gets mussed.

Now a quick word about Windows, since the other systems where I have done this are no problem. The partitions that you image, should not be changed in between. Not a problem
for other OS's, but some briliant person decided to put Profiles on Windows smack dab in the system files. I simply make it a point to not put anything in my Profile (or on my Desktop which is in my Profile ) that I'm not willing to lose.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文