在软件开发中使用虚拟化的关键用例有哪些?

发布于 2024-07-07 21:39:43 字数 579 浏览 17 评论 0原文

使用虚拟化的关键用例是什么——即使用 VMWareMicrosoft Virtual PC --用于软件开发?

另外,是否还有其他虚拟化实例/用途未包含在我上面的定义中(使用 MS Virtual PC 或 VMWare 等工具),并且对开发人员有用?

我提出这个问题的动力是 StackOverflow 评论。 com/users/9664/metro-smurf">Metro Smurf 在谈到虚拟化的使用时断言“你会想知道没有它你是如何开发的!”。

(每个回复请仅包含一个用例。谢谢!)

What are the key use cases for the use of virtualization -- that is, running one or more "virtual PCs" using software such as VMWare and Microsoft Virtual PC -- for software development?

Also -- are there other instances/uses of virtualization that aren't covered by my definition above (use of a tool like MS Virtual PC or VMWare), and that are useful to developers?

My impetus for asking is this StackOverflow comment by Metro Smurf asserting "You'll wonder how you ever developed without it!", regarding use of virtualization.

(Please include just one use case per response. Thanks!)

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

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

发布评论

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

评论(16

酒绊 2024-07-14 21:39:43

据我所知,在多个环境中进行应用程序测试是虚拟化的一种明显用途。 在其他操作系统上测试您的应用程序(不需要额外的物理计算机来执行此操作),以及涉及通常只允许您在给定计算机上安装单个版本的软件的测试(例如 Internet Explorer 浏览器;同时运行 IE6) (同一台计算机上的 IE7 不是官方支持的配置),是虚拟机使用的良好候选者。

Application testing in multiple environments is one obvious use of virtualization that I'm aware of. Testing your application on other operating systems (without requiring additional physical computers to do so), as well as testing that involves software that generally only allows you to install a single version on a given machine (such as the Internet Explorer browser; running both IE6 and IE7 on the same machine is not an officially supported configuration), are good candidates for virtual machine usage.

只是偏爱你 2024-07-14 21:39:43

如果您的构建服务器在虚拟机中运行,您可以为每个软件版本制作快照,以便 100% 确定您可以重新创建构建环境(例如,如果您想对旧版本进行修补) )。

If your build-server is running in a VM, you can make a snapshots of it for every software release in order to be 100% sure that you can recreate the build environment (in case you want to make patches to old releases, for example).

妄司 2024-07-14 21:39:43

如果您设置了开发环境的快照(并对其进行备份),那么当您的计算机发生故障时,可以很容易地恢复生产力。 当您的机器在发布之前发生故障时,您可以在安装和配置所有工具后立即恢复,这可能是您的救星。

If you set up snapshots of your development environment (and back them up) it can be very easy to resume productivity if your computer breaks down. When your machine breaks down right before your release - and you can resume immediately with all your tools installed and configured, it can be a lifesaver.

送你一个梦 2024-07-14 21:39:43

适用于我当前情况的最简单的情况是,我们有一个复杂的客户端-服务器环境,并且通过虚拟化,每个开发人员都可以非常快速地获得一组基准操作系统来部署其本地构建并验证端到端功能。

在本地,您有您的开发盒和 N 个客户端盒,每次您想要尝试构建时,它们都会被重新初始化为新的操作系统。 本质上,它是相当于“清理”的测试环境,甚至客户端工作站也被新操作系统替换。

The simplest case which applies to my current situation is that we have a complex client-server environment and with virtualization every developer can very quickly get a baseline set of operating systems to deploy their local build to and verify end to end functionality.

Locally you have your dev box, and N client boxes which get re-initialized as fresh OSes each time you want to try a build. Essentially it's the test environment equivalent of a 'make clean' where even the client workstation gets replaced with a new OS.

夜空下最亮的亮点 2024-07-14 21:39:43

在团队成员之间快速分配环境是虚拟化的一个非常好的用例,特别是如果您有大量不同的组件、工具等。这可以为您节省大量与新员工、承包商或其他需要虚拟化的个人的时间。环境很快。

Quickly distributing environments between team members is a very nice use case to for virtualization especially if you have a lot of various components, tools, etc.. This can save you a ton of time with new hires, contractors, or other individuals who need an environment quickly.

潦草背影 2024-07-14 21:39:43

许多演示者使用虚拟机进行演示 - 它允许他们立即恢复以重置第二天的演示,在计算机之间快速传输所有演示材料,而不必向与会者展示杂乱的“我的文档”文件夹。

Many presenters use a VM for presentations - it allows them to revert immediately to reset the presentation for the next day, transfer all presentation materials quickly between computers, and not have to show your attendees your messy My Documents folder.

凉薄对峙 2024-07-14 21:39:43

将虚拟化用于销售活动也是一个很好的用例。 您可以在特定时间拍摄快照,并将其保存为演示基线。 然后,一旦您完成演示并更改数据等,您就可以恢复到以前的基线以供将来的演示。 您还可以捕获多个基线并选择最适合即将推出的演示的基线。

Using virtualization for sales activities is also a great use case. You can take a snapshot at a particular time that you can save as your demo baseline. Then once you run through the demonstration and change the data, etc. you can restore back to your previous baseline for future demonstrations. You can also capture multiple baselines and pick and choose which baseline best fits the upcoming demo.

凝望流年 2024-07-14 21:39:43

测试环境。 如果您的系统需要针对多个设置(例如 Windows 和 Linux、XP 和 Vista),那么一台具有大量 RAM 和 VMWare(或其他)的计算机是管理该系统的好方法。环境。

另一种是在一个系统上开发并针对另一个系统。 例如,有一次我在一台运行 Linux 的工作站上做了一些 J2EE 工作,其中客户端是 IE 5.5。 使用 Windows 2000 和 IE 5.5 的虚拟机可以让我测试该应用程序。

Test environments. If you have more than one setup that a system needs to be targeted for (e.g. Windows & Linux, XP & Vista) then a machine with lots of RAM and VMWare (or on of the others) is a good way to manage the environments.

Another is developing on one system and targeting another. For example, at one point I did some J2EE work on a workstation running Linux where the client was I.E. 5.5. A VM with Windows 2000 and IE 5.5 would let me test the application.

苏璃陌 2024-07-14 21:39:43

我使用虚拟机进行开发的原因。

  • 隔离不同的开发环境。
  • 测试环境。
  • 由于计算机硬件故障/升级而轻松恢复。
  • 如果某些东西损坏了开发环境,则能够“回滚”对开发环境的更改。

目前,我使用 VirtualBox 进行虚拟机设置。 我曾经使用 VirtualPC,但我真的很讨厌没有任何类型的“快照”功能(像 VMware 和 VirtualBox 那样)。

Reasons I use virtual machines for development.

  • Isolate different development environments.
  • Testing environments.
  • Easy recovery due to computer hardware failure/upgrade.
  • Ability to "roll-back" changes to your development environment if something corrupts it.

Currently, I am using VirtualBox for my VM setup. I used to use VirtualPC, but I REALLY hated not having any type of "snapshot" feature (like VMware and VirtualBox have).

埖埖迣鎅 2024-07-14 21:39:43

我们开发用于SaaS应用程序的软件,我们的生产环境有大量服务器,它们的软件环境需要绝对可预测; 我们不能在我们的开发机器上额外安装任何东西,也不能缺少任何东西。

此外,我们的应用程序需要许多不同的服务器类型才能正常运行(我上次数过至少有 7 个); 大多数情况下,它们不能安装在同一台(虚拟)机器上 - 至少,不能不违反“与生产环境相同的软件”要求。

为了拥有一致的环境,有必要使用虚拟机。 我不知道没有他们怎么办。

快照和回滚也很好,但我只是偶尔使用它们(在安装/升级测试期间非常有用)。

假设您正在开发软件的新版本,并检查先前版本的升级是否正常工作......在无法回滚盒子的情况下进行测试周期需要多长时间? 是否必须重新安装操作系统然后旧版本? 你能保证卸载真的卸载所有东西吗?

We develop software for use in our SaaS application, our production environment has a large number of servers and their software environment needs to be absolutely predictable; we can't have ANYTHING installed extra, or absent from our development machines.

Moreover, our application requires a number of different server types in order to function properly (at least 7 last time I counted); mostly they can't be installed on the same (virtual) machine - at least, not without violating the "same software as production" requirement.

In order to have a consistent environment, it's necessary to use VMs. I don't know how anyone ever manages without them.

Snapshots and rollbacks are nice too, but I use them only occasionally (really useful during installation / upgrade tests).

Suppose you're developing a new version of your software, and checking that the upgrade from the previous version works correctly... how long does it take to do a test cycle without being able to rollback the box? Do you have to reinstall the OS then the old version? Can you guarantee that the uninstall really uninstalls everything?

九局 2024-07-14 21:39:43

能够测试/重新测试您的部署过程可以节省大量资金。

Being able to test/retest your deployment process is a huge savings.

无语# 2024-07-14 21:39:43
  • 为不同版本的 Microsoft Office 开发加载项(使用 Visual Studio Tools for Office)。

我的主要工作机器有 Office 2007。当我使用 Office 2003 加载项时,我使用带有 Visual Studio 和 Office 2003 的虚拟机。

  • Developing Add-Ins for different versions of Microsoft Office (using Visual Studio Tools for Office).

My main work machine has Office 2007. When I work with Add-Ins for Office 2003 I use a virtual machine with Visual Studio and Office 2003.

皇甫轩 2024-07-14 21:39:43

我很惊讶没有人提到 VMware 录制/重播功能 (很棒的视频演示),非常适合调试。

我有一台运行 ESXi 的无头服务器,它运行各种机器来构建安装程序(因此我不必放弃桌面上的处理能力)、自动化测试(服务器比任何桌面都快)和各种测试环境(大约 20 种不同的配置) ),以便支持团队可以轻松跳转到与客户系统紧密匹配的配置。

当您拥有一台非常强大的服务器运行可以在支持、测试和开发团队之间共享的虚拟机时,您就可以节省大量成本。 总之,我们在 ESXi(双四核 Xeon 2.5G + 8Gb RAM)上运行约 25 个虚拟机,由 5-10 人共享,一些开发人员使用 Virtual PC,然后我在桌面上使用 VMware Workstation。 这里的所有 Mac 用户也都使用 VMware Fusion

I'm suprised that nobody has mentioned the VMware record/replay feature (awesome video demo) which is great for debugging.

I have a headless server running ESXi which runs various machines for building installers (so I don't have to give up processing power on my desktop), automated testing (server is faster than any desktop) and various test environments (about 20 different configurations) so that the support team can easily jump onto a configuration that closely matches a customers system.

When you have one really beefy server running VMs that can be shared between support, test and dev teams, you introduce huge cost savings. In all, we're running ~25 VMs on ESXi (dual-quad core Xeon 2.5G + 8Gb RAM) shared between 5-10 people, some of the developers use Virtual PC and then I use VMware Workstation on my desktop. All of the Mac users here use VMware Fusion as well

泛滥成性 2024-07-14 21:39:43

令我惊讶的是,没有人提到通过隔离不同虚拟机中的数据库服务器和 Web 服务器等来提高安全性的好处。

I am surprised that no one has mentioned the benefit of increased security by isolating, for example, the database server and web server in different VM's.

四叶草在未来唯美盛开 2024-07-14 21:39:43

一些服务器应用程序也可以使用虚拟机。 当一台虚拟机使用不多时,服务器可以将资源分配给其他虚拟机。

Some server applications can use VMs too. When one vm is not used much, the server can locate the resources to other vms.

为你拒绝所有暧昧 2024-07-14 21:39:43

某种测试环境:如果您正在调试恶意软件(编写或开发针对它的药丸),那么使用真正的操作系统并不明智。 唯一可能的缺点是病毒可以检测到它们正在虚拟化中运行。 :( 这样做的可能性之一是因为 VM 引擎可以模拟一组有限的硬件。

Some sort of test environment: if you are debugging malware (either writing or developing a pill against it) it is not clever to use the real OS. The only possible disadvantage is that the viruses can detect that they are being run in the virtualization. :( One of the possibilities to do it is because the VM engines can emulate a finite set of hardware.

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