如何为 .NET 开发设置 virtualbox

发布于 2024-07-13 16:38:38 字数 506 浏览 14 评论 0原文

我正在尝试在虚拟机中运行我的开发工具,并且想知道有关设置此类环境的任何提示

一些细节:

  • 我正在使用 VirtualBox。
  • 我的主机电脑是 WindowsXP,
  • 我希望在虚拟机中安装 Vista。
  • 我将需要 VS 2008 及其附带的所有标准内容
  • 我将需要 CodeRush、Refactor Pro!、Testdriven.Net、ASP MVC 和其他一些小型附加组件的空间
  • 我将把所有代码放在共享目录中在主机上,因此代码不会直接在虚拟机上

我有一些具体问题:

  • 我应该为虚拟硬盘分配多少空间? 我第一次尝试为其设置了 12GB,但在标准 VS2008 安装(一直失败)之后,我只剩下 500 MB
  • 我应该为 VM 分配多少基本内存?
  • 还有其他提示/技巧/建议吗? 我还没有完全确定该过程的任何部分(尽管我很确定我想尝试 Vista)

I'm trying to make the jump to running my development tools in virtual machines and am wondering about any tips as far as setting up such an environment

Some specifics:

  • I am using VirtualBox.
  • My host pc is WindowsXP
  • I am looking to install Vista in the VM.
  • I will need VS 2008 with all the standard stuff that it comes with
  • I will need room for CodeRush, Refactor Pro!, Testdriven.Net, ASP MVC and some other small add-ons
  • I will be putting all of my code in a shared directory on the host computer so no code will be directly on the VM

Some specific questions that I have:

  • How much room should I allot for the virtual hard drive? I set up 12GB for it on the first attempt but after a standard VS2008 install (which kept failing) I would have been left with only 500 MB
  • How much base memory should I allot for the VM?
  • Any other tips/tricks/advice? I'm not completely settled on any part of the process (though I'm pretty sure I would like to try Vista)

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

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

发布评论

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

评论(5

青芜 2024-07-20 16:38:38

我不太确定 VirtualBox,但我已经安装了很多 VMWare。

磁盘空间是唯一真正的问题,因为扩展起来很痛苦。 然而,如果您设置了 80G,它不会立即使用所有这些; 它根据需要扩展。 希望 VirtualBox 是类似的,在这种情况下,根据需要分配尽可能多的资源。 我通常选择 80G,

对于内存来说,1G 通常就足够了,但您应该检查开发应用程序的最低要求。 无论需要如何,VMWare 都会从主机获取所有这些,因此您需要平衡主机需求与(可能是多个)虚拟机的需求。

另一个提示是,摆脱虚拟机中多余的硬件。 我总是抛弃软盘、声卡和所有不是绝对必要的东西。 为了您的开发,您需要网络、CD/DVD。 RAM 和磁盘,可能就没有其他东西了。

I'm not entirely sure about VirtualBox but I've set up a lot of VMWare installations.

Disk space is the only real problem there since it's a pain to expand. However, if you set up 80G, it doesn't use all of that straight away; it expands as needed. Hopefully VirtualBox is similar, in which case allocate as much as you need. 80G is what I usually go for,

For memory, 1G is usually sufficient although you should check the minimum requirements for your development apps. VMWare grabs ALL of that from the host regardless of needs so you need to balance the host needs against your (possibly multiple) VMs.

One other hint, get rid of superfluous hardware in the VM. I always ditch the floppy, sound cards and everything not absolutely necessary to the purpose. For your development, you'll need network, CD/DVD. RAM and a disk, and probably not much else.

早茶月光 2024-07-20 16:38:38

我会在虚拟机中使用WindowsXP。 内存和磁盘的重量要轻得多。 1-2Gb 内存对于 XP 开发来说就足够了,但如果您需要运行 Vista,我建议使用更多内存。

I'd go WindowsXP in the VM. Much lighter weight for memory and disk. 1-2Gb of memory would be fine for XP development, but I'd recommend more if you need to run Vista.

天荒地未老 2024-07-20 16:38:38

如果您遇到空间问题,请改用 Virtual PC。 它也是免费的,与 VirtualBox 一样快,并且允许您将可扩展磁盘映像用于 VM 驱动器。

JSYK,Vista 在虚拟机方面确实很糟糕。

我发现分配给 VM(对于 XP)的 1GB 内存足以用于开发和测试。 如果使用 Vista,我会加倍。

If you're having space difficulties, use Virtual PC instead. It's also free, just as fast as VirtualBox, and lets you use expandable disk images for the VM drive.

JSYK, Vista really sucks in a VM.

I find 1GB of memory allocated to the VM (for XP) to be adequate for development and testing. Using Vista, I'd double that.

鱼窥荷 2024-07-20 16:38:38
* How much room should I allot for the virtual hard drive? I set up 12GB for it on the first attempt but after a standard VS2008 install (which kept failing) I would have been left with only 500 MB

我认为您至少需要 40-80GB 来安装 Vista 和所有开发工具。 拥有多总是比拥有少好。 如果空间不足,您可以随时安装额外的虚拟磁盘(我忘记 VirtualBox 是否可以做到这一点)。

* How much base memory should I allot for the VM?

基础内存应该是2GB。 然而,如果你关闭所有不需要的东西,你就可以少花钱。 幸运的是,这可以在虚拟机中轻松更改。

* Any other tips/tricks/advice? I'm not completely settled on any part of the process (though I'm pretty sure I would like to try Vista)

如果您要使用 Vista,您应该关闭所有不需要的服务、索引、系统还原。 也关闭所有效果。 不要使用 Aero(尽管不认为它会在虚拟机中激活)。

正如其他人所说,Vista 并不是一个非常好的虚拟机操作系统。 我在 Virtual PC 和 Virtual Box 中尝试过,但都运行不好。 Virtual Box 对我来说更快,但我仍然不会使用 Vista。 我会在虚拟机中使用 XP pro。 但如果 Vista 适合您,那就太好了。

* How much room should I allot for the virtual hard drive? I set up 12GB for it on the first attempt but after a standard VS2008 install (which kept failing) I would have been left with only 500 MB

I think you are going to want at least 40-80GB to install Vista and all your development tools. It's always better to have more than less. You could always mount additional virtual disks if you run out of room (I forget if VirtualBox can do this).

* How much base memory should I allot for the VM?

The base should be 2GB. However, if you turn off all the uneeded things you can get away with less. Luckily this is easily changed in a virtual machine.

* Any other tips/tricks/advice? I'm not completely settled on any part of the process (though I'm pretty sure I would like to try Vista)

If you are going to use Vista you should turn off all uneeded services, indexing, system restore. Turn off all effects as well. Don't use Aero (although don't think it gets activated in a virtual machine).

As others have said Vista isn't a very good OS in a virtual machine. I have tried it in Virtual PC and Virtual Box and neither run well. Virtual Box is faster for me but I still would not use Vista. I would use XP pro in a Virtual machine. But if Vista works well for you that's great.

痴骨ら 2024-07-20 16:38:38

多年后来看,这是我当前的设置:

主机:

  • Ubuntu 64 位(尽管 Windows 7 工作得很好)
  • 确保 CPU 虚拟化已启用(通常默认情况下启用,但可能需要在 BIOS 中调整它)
  • Virtual Box Expansion pack for USB 设备支持
  • 2 个 HDD,一个大型存储设备位于我的笔记本电脑的 DVD 插槽中,通过一个 HDD 盒和一个快速 100GB SSD,我的 Ubuntu 和主 VM 驻留在

其中 访客:

  • Windows 7
  • VS 2010 以及大量其他内容
  • 注意拥有正确的版本来宾添加(始终在升级 vbox 版本后安装)
  • 共享主机的 ~/Downloads 文件夹,以便轻松传输文件
  • 2 个虚拟磁盘
    • 常规内存动态分配为 50GB,操作系统及其上的所有软件通常保持在 30GB 左右
    • 较小的 5GB 用于代码。 该驱动器设置为可共享模式,因为所有代码都在源代码控制中,无论如何我不想在该驱动器上使用快照,并且我想将其附加到其他虚拟机。 阅读手册对此非常有帮助

我也不认为快照非常有用,并且实际上在协调过程中遇到了快照爆炸的麻烦。 我经常使用 vbox 管理器将我的主磁盘克隆到我的存储硬盘上进行备份。

总体而言,SSD 是使此设置发挥作用的巨大变化。 我多年来一直使用缓慢的硬盘,并且不断遇到问题,我必须恢复虚拟机才能恢复,现在 99% 的时间里一切都在顺利进行。

Looking at this many years later, here's my current setup:

Host:

  • Ubuntu 64bit (though windows 7 works just fine)
  • Make sure CPU virtualization is enabled (usually enabled by default but might have to twiddle it in the BIOS)
  • Virtual Box Expansion pack for usb device support
  • 2 HDDs a large storage one in my laptop's DVD slot via an HDD caddy and a fast 100GB SSD where my Ubuntu and main VM reside

Guest:

  • Windows 7
  • VS 2010, and tons of other stuff
  • Care taken to have the correct version of Guest Additions (always install after upgrading vbox version)
  • Share my host's ~/Downloads folder for easy transfer of files
  • 2 virtual disks
    • Regular one dynamically allotted to 50GB which usually stays around 30GB with the OS and all software on it
    • A smaller 5GB one for code. This one is set to shareable mode since all code is in source control anyways I don't want to use snapshots with this drive and I want to attach it to other VMs. Reading the manual was super helpful for this.

I also don't find snapshots to be terribly useful and have actually gotten into trouble with them bombing out during reconciliation. I fairly often clone my main disk with vbox manager to my storage HDD for backups.

Overall the SSD was the huge change that made this setup work. I was working for years with a slow hard disk and constantly having problems that I would have to restore the VM to recover from, now everything zips along 99% of the time.

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