跳到主要内容

虚拟化 is technology to run operating systems within other operating systems.  For developers, this has many 方便, security, and efficiency advantages.

  • 方便.  Virtual machines are easy to use to try a new technology.  Installing an operating system is far simpler in a virtual machine than directly on your system.  使用快照工具, it is easy to try something and roll back to a previous known state if it does not work as desired.
  • 安全. Running experimental or developer software often involves installing thousands of packages maintained by unknown authors.  Installing packages directly on your system exposes your system to any security flaws those packages have, whether introduced intentionally or unintentionally.  Developing on a virtual machine isolates those packages vulnerabilities from the outside world, including your host operating system.
  • 效率. Installing multiple versions of packages for different projects and courses can lead to impossible configuration conflicts.  Keeping versions isolated into virtual machines means those problems no longer exist. Working with others with different operating systems makes collaborations much harder, as does having consistent results compared to a classroom instructor for unknown OS / package / install reasons.  And the snapshot feature can save many painful hours of reinstall and cleanup when a misstep happens.

The two main choices for laptop / workstation virtualization that are cross-platform are VMWare and VirtualBox.  Here is a trade-off summary of the two options:

VMWare

VirtualBox

成本

Free for academic use for CSE students and faculty through VMWare Academic Program, which requires license renewal every 18 months.  商业许可证大约250美元.

Free for personal and academic use.  Commercial license for the extension pack, which provides very basic features like USB 3, is $5000 ($50 license with minimum 100 order).

方便

VMWare is a mature product and easy to use, relative to the features it provides.  Virtual machines are maintained in folders which can be copied and shared, with only the 网络 (mac) address of the interface requiring updates if the same virtual machines are on the same 网络.

Keeping the licensing updated through the VMAP program is inconvenient.

VirtualBox’s use after configuration is pretty easy, but installs can be hard and updates are frequent.  VirtualBox uses a global unique identifier model for resources, which means copying virtual machines will eventually break everything, and must be correctly imported and exported instead (which loses snapshot information).

网络

The default NAT 网络 of virtual machines can see each other, 外部网络, 宿主系统.  This is usually a great way to test systems while protecting them from 外部网络.

The NAT 网络 of virtual machines can see each other, 外部网络, 但不是主机.  此外,在CMU, the default NAT 网络 address conflicts with the 网络 address scheme on campus.  This means the NAT 网络 must be customized, and an additional host-only interface must be configured for host-vm communication.

兼容性

Works fine along with VirtualBox but not Hyper-V (Windows 虚拟化) which must be disabled.  

Works fine with VMWare, but not Hyper-V (Windows 虚拟化) which must be disabled.


使用这个 form 请求 access to the VMAP portal (these get processed slowly), where you can download VMWare licenses.  VirtualBox 可以直接从Oracle获得.

" class="hidden">文玩商城