基于虚拟盒的 Windows 开发
我想将我的整个开发设置转换为基于虚拟盒的环境。
是否有一个最小操作系统可以安装在我们的笔记本电脑上并运行基于虚拟机的 Windows XP 或 Vista 或 7 甚至 Linux 来进行开发?
我的问题是,如果我安装了 Windows XP 或 7,那么我可以分配给该虚拟机运行时的内存量将被限制为可用物理内存的 50% 左右。
因此,最终我希望生成的客户映像具有最大的 RAM,并且主机可以是一个简单的操作系统。
我在 stackoverflow 上看到一些答案,它们已经很旧了。但我相信 virtualbox 中应该有一些更新的最新版本,可能值得了解。
I would like to convert my entire development setup to a virtual box based environment.
Is there a minimal-OS which we can install on our laptop and run virtual box based windows XP or Vista or 7 or even linux on which we can do the development?
My problem is if I have a windows xp or 7 installed, then the amount of memory I can allocate to this virtual box runtime gets limited to around 50% of my available physical memory.
So ultimately I would like the resultant guest image to have the maximum RAM and the host can be a no-brainer OS.
I see some answers in stackoverflow which are quite old. But I believe there should be some updated latest versions in virtualbox which are probably worth knowing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这个问题的答案取决于您所谈论的开发类型。如果您正在编写脚本或小型应用程序,那么虚拟机中的性能可能就足够了。如果您正在构建中型或大型 C/C++ 应用程序,那么性能可能会非常糟糕。任何依赖大量 I/O 的开发活动(例如 C/C++ 编译)都会在 VM 中受到影响。我相信虚拟机可以获得相当不错的 CPU 性能,因此如果您的开发活动更多的是 CPU 而非磁盘绑定,那么这可能是可行的。如果您只将 50% 的 RAM 分配给虚拟机,那么性能将受到进一步限制。
The answer to this depends on what sort of development you're talking about. If you're writing scripts or small applications then performance in a VM may be adequate. If you're building moderate or large C/C++ applications then the performance is likely to be horrendous. Any development activity that relies on a large amount of I/O such as C/C++ compilation will suffer in a VM. I believe that VMs can get quite decent CPU performance, so if your development activity is more CPU than disk bound then this might be workable. If you're only allocating 50% of your RAM to the VM then performance is going to be constrained even further.
老问题,但仍然是 2016 年的更新。
我花了一整天的时间尝试。我在工作中有一项实验任务要做。在将其移动到真实服务器之前,我在 Virtualbox(Win 2008 服务器主机)上的 3 个 Linux VM 上运行它。
我尝试了像 Lubuntu 和 Bodhi 这样的轻量级 Linux 变体。 Lubuntu 在图形方面存在问题。如果我改变屏幕尺寸,它就会变成空白。 Bodhi 很好,但有点不直观。
我发现带有 XFCE 的 Linux Mint 是轻量级、功能性和 UI 体验之间的最佳折衷方案。当 VirtualBox 窗口最大化时,它会自动调整大小。安装来宾添加也没有问题。
去年早些时候,我在 LinuxMint 17.3 上运行 IntelliJ Idea 作为在 Ubuntu 14.04.x LTS 主机上的 Virtualbox 上运行的来宾虚拟机。它相当快,不过我有一个带有 16 GB RAM 的 Core i7。
Old question, but still an update for 2016.
I spent the whole day trying. I have an experimental task to do at work. I am running it on 3 Linux VMs on Virtualbox (Win 2008 server host) before moving it to real servers.
I tried lightweight Linux variants like Lubuntu and Bodhi. Lubuntu had problems with graphics. It would go blank if I change the screen size. Bodhi is good but a bit unintuitive.
I found Linux Mint with XFCE to be the best compromise between lightweight, functionality and UI experience. It resizes automatically when VirtualBox window is maximised. No problems installing guest additions too.
Earlier last year, I had run IntelliJ Idea on LinuxMint 17.3 as guest VM running on Virtualbox on a Ubuntu 14.04.x LTS host. It was fairly fast, I had a Core i7 with 16 GB of RAM though.
松弛软件?如果你真的想减少一些事情。否则,复制到 HD 并修改为包含 VirtualBox 的 LiveCD 变体应该可以工作。
Slackware? If you really want to cut down on things. Otherwise, a LiveCD variant, copied to the HD, and modified to include VirtualBox should work.
我是做跨平台开发的。虽然 Visual Studio 比 Linux 同类产品更强大,但它在虚拟机中仍然表现出色。我相信 Windows 在 32 位系统上将物理 RAM 分成两个相等的块。一半用于内核,一半用于用户进程。 VirtualBox 就遭受了这种分裂。 VMware Player 似乎没有同样的问题。在 Linux VirtualBox 上运行似乎更快乐,而且 Linux 的重量可以非常轻。我选择最小化安装 Debian 或 CentOS。
在比较虚拟机开发环境和真实环境时,我发现虚拟机比在主机上编译(虚拟机关闭)要慢 10-15%,但是主机有更多的内存和更多的 CPU 可供使用。该虚拟机可以轻松部署在您想要的任何地方 - 真的很酷。
你想做的事情是有意义的。如果您正在处理相当大的项目,只需确保 MSVS2008 的 VM 中有 2-4 个 CPU 和至少 1.5-2GB 内存(也许不要使用 2010,除非它专门为您提供了您想要的功能)更需要资源)。
唯一耗费大量时间的编译事情是通过网络进行构建时。 SMB 很糟糕,而 NFS 和 Nix 在大多数情况下你几乎不会注意到使用本地磁盘的区别。
希望这有帮助。哦,是的,我一直在一个大小为 GB 的项目上使用 Windows XP 开发虚拟机(源代码方面)。
祝你好运。 T。
I do cross platform development. Whilst Visual Studio is more hungry than the Linux equivalents it's still good in a VM. Windows I believe splits physical ram into two equal chunks on 32 bit systems. Half for the kernel and half for the user process. VirtualBox suffers from this split. VMware player doesn't seem to have the same issue. Running on Linux VirtualBox seems much happier and Linux can be VERY light weight. Minimal install of Debian or CentOS would be my choice.
When comparing VM dev environments and real ones, I found that the VM one was slower by say 10-15% percent compared to compiling on the host (VMs shut down), However the host had more memory and more CPUs at its disposal. The VM can be easily deployed where ever you want was well - really cool.
What you want to do makes sense. Just make sure you have 2-4 CPUs and at least 1.5-2GB of memory in your VM for MSVS2008 if you are dealing with a fairly large project (perhaps refrain from using 2010 unless it specifically gives you a feature that you want as it is more resource hungry).
The only compilation thing that sucks big time is when building over a network. SMB is dreadful, NFS and Nix you'd hardly notice the difference to using a local disk most of the time.
Hope this helps. Oh and yes I have been using a Windows XP dev VM on a project that is GBs in size (source code wise).
Good luck. T.