Tuesday, March 20, 2012

Virtually vapid

[UPDATED 2016-02-23] Now I'm swinging back to VirtualBox on both systems as the overall King of VM. Unfortunately VMWare Player 7 on my Windows machine was freezing up randomly and at one point just refused to work. It turns out that there have been a lot of changes with VirtualBox in the last 4 years, and now not only does VirutalBox include hardware virtualization but it also has valid certs for Windows. Previously there were some scary messages along the lines of, "use at your own risk," which obviously goes without saying so ... why were they saying it? Anyway, the newest VirtualBox 5 is super fast and so far stable. In addition to these obvious performance perks, the fact that VirtualBox is really free, as in FOSS, means that there are tons of great features like cloning and snapshots, and the license allows commercial use with no restrictions. The VMWare player restricts VMWare Player to non-commercial use only, and it was a free lite version of the more powerful VMWare Workstation, so lite on features. So, for now, I'm really happy!

I did it. I installed a Windows VM on Ubuntu using VirtualBox and Ubuntu VM on Windows using VMware 3.1.5 (the PC was too old for 4.0.2). VirtualBox was a breeze and fast, but VMware and Ubuntu took forever (*). You have to install VMware Tools (**) which takes like a million years. It's probably my ancient laptop and the out-of-date VM, but that was the best I could do for now. What's the point? There is no point, it's just cool.
P.S. 99% of problems are solved by cycling vm, shut it down; not sleep.
P.P.S. "user$ sudo ./vmware-install.pl"  (**) since you need root access and your extracted vmware-tools folder is not on your path. "user$ sudo ./bin/vmware-uninstall.pl" to remove.
Update (2012-03-21): (**) Preferred method is to use open-vm-tools from package manager since it updates with your Linux distro. Use apt-get, Synaptic or Ubuntu Software Center. In other words do not use VMware Tools.
Update (2012-03-22): After installing your guest on VirtualBox VM, install guest-additions, to get video, mouse and other drivers. If you're on Ubuntu, use the iso image in the Software Center.
Update (2012-03-23): (*) OK, I've changed my opinion a little bit, after spending an embarrassing number of hours updating from XP to SP3 for the guest VM on the Linux host. What I'm getting at is that installing the guest Linux VM was a lot faster, even though the initial XP install was pretty fast, getting the updates is painfully slow. This is a good time to make a bullet list of lessons learned:

  1. VMware >3 only works on machines with Hardware Assisted Virtualization like Intel VT-x.
  2. VirtualBox works on anything.
  3. If installing a guest Linux VM using VMware, do not download VMware Tools from the internet. Instead use package manager (apt-get, Synaptic or Ubuntu Software Center) to install open-vm-tools package.
  4. If installing VirtualBox on Linux host, use package manager and install virtualbox-qt and virtualbox-guest-additions-iso (which is the VirtualBox equivalent of VMware Tools).
  5. For best performance, install on a system with at least 2GB of RAM and >2 core processor. Although it will work on a single core with 1GB, you noticeably see performance suffer, and you make experience system hangs or BSOD.
  6. If installing a guest Windows XP VM, turn off automatic updates and instead use Windows XP Service Pack 2 Network Installation Package for IT Professionals and Developers followed by Windows XP Service Pack 3 Network Installation Package for IT Professionals and Developers. Otherwise you will spend a very long time waiting for downloads and installing them.
  7. Do not overtax your host machine during critical guest installations, e.g. installing OS. Think of rooting your phone - although the stakes are not as high, you want everything to go alright so you don't have to repeat the entire process on a new VM. It's also a good idea to kill your screensaver/lock/sleep feature on your host during crucial installs, otherwise your hard-drive might turn off.
  8. After installing guest OS, don't forget to run either open-vm-tools for VMware from the package manager or virtual-box-guest-additions-iso for VirtualBox from the devices menus option on your VirtualBox VM after you've downloaded it package manager.
Fork me on GitHub