如何为 .NET 开发设置 virtualbox
我正在尝试在虚拟机中运行我的开发工具,并且想知道有关设置此类环境的任何提示
一些细节:
- 我正在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我不太确定 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.
我会在虚拟机中使用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.
如果您遇到空间问题,请改用 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.
我认为您至少需要 40-80GB 来安装 Vista 和所有开发工具。 拥有多总是比拥有少好。 如果空间不足,您可以随时安装额外的虚拟磁盘(我忘记 VirtualBox 是否可以做到这一点)。
基础内存应该是2GB。 然而,如果你关闭所有不需要的东西,你就可以少花钱。 幸运的是,这可以在虚拟机中轻松更改。
如果您要使用 Vista,您应该关闭所有不需要的服务、索引、系统还原。 也关闭所有效果。 不要使用 Aero(尽管不认为它会在虚拟机中激活)。
正如其他人所说,Vista 并不是一个非常好的虚拟机操作系统。 我在 Virtual PC 和 Virtual Box 中尝试过,但都运行不好。 Virtual Box 对我来说更快,但我仍然不会使用 Vista。 我会在虚拟机中使用 XP pro。 但如果 Vista 适合您,那就太好了。
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).
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.
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.
多年后来看,这是我当前的设置:
主机:
其中 访客:
我也不认为快照非常有用,并且实际上在协调过程中遇到了快照爆炸的麻烦。 我经常使用 vbox 管理器将我的主磁盘克隆到我的存储硬盘上进行备份。
总体而言,SSD 是使此设置发挥作用的巨大变化。 我多年来一直使用缓慢的硬盘,并且不断遇到问题,我必须恢复虚拟机才能恢复,现在 99% 的时间里一切都在顺利进行。
Looking at this many years later, here's my current setup:
Host:
Guest:
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.