Wednesday, January 23, 2013

Enabling multiple cores in VirtualBox

This post is a follow up to my earlier post Moving from VMWare Player to VirtualBox.

Once you have set up your VirtualBox instance, the first challenge you will face is that the guest OS may possibly be very slow due to the fact that the number of cores allowed is only one. Hence you will have to increase the number of cores that your guest OS can make use of. Open the VirtualBox manager, click on your VM, then click on the Settings button. In the Settings window, click on the System on the left pane and select the Processor tab on the right.
In this page, you can increase the number of processors. If you haven't already enabled the virtualization in your processor, you are likely to get an error when you click on OK. The error message will look like this:

Failed to open a session for the virtual machine Lubuntu.
VD: error VERR_NOT_SUPPORTED opening image file 'C:\VMs\Lubuntu.vmdk' (VERR_NOT_SUPPORTED).
Result Code: E_FAIL (0x80004005)Component: ConsoleInterface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}

If you see this error, you haven't possibly enabled the virtualization in the processor. Virtualization can be enabled only from the BIOS. Please refer to your computer's manufacturer web site to find out how to enable this. For your reference, I am giving a link to how to enable it in ThinkPad W520 (which I own).

Once the virtualization is enabled, you can restart your computer and try to increase the number of cores dedicated your guest OS again. Hopefully, you will not get the same error again.

Thats it. Boot your guest OS and enjoy!

Tuesday, January 08, 2013

Moving from VMWare Player to VirtualBox

This is my first post this year. Wishing you a happy New Year.

Until a week back, I was using VMWare Player for my personal use to learn different OSes. Using VMWare Player, I was trying out various Linux distros. I have been a fan of VMWare Player for six years now. Offlate I started seeing theese limitations:

  • I bought a new i7 quad core laptop. Even though I have 8 cores, my VMWare Player will not allow me to create a VM with more than 2 cores.
  • I used to enjoy the vmnetcfg command line tool which used to come with VMWare Player. But it has been removed from recent installations. Due to this, I was unable to configure NAT port-forwarding.
  • I used to be able perform packet sniffing using vnetsniffer command line tool. That also has been removed in the recent distributions.
  • You cannot run a 64bit guest OS in VMWare Player. Hence I could not run my guest Linux OS distros with more than 3 GB of RAM.
Before I started using VMWare Player primarily, I was evaluating VirtualBox. At that time, it was not mature. It used to be relatively slower than VMWare Player. Hence I gave up my hope on VirtualBox and stuck with VMWare Player. But the recent restrictions in VMWare Player prompted me to evaluate VirtualBox once again.

It is very easy to switch from VMWare Player to VitualBox. You can use the same images that you were using in VMWare Player. VirutalBox offers the following features, which I felt very compelling for me to start using:
  • It allows you to create VMs with as many as 32 cores (as long as the host can support that many cores).
  • You can configure NAT port-forwarding with an easy to use GUI.
  • The tools integration is excellent. VirtualBox supports the same set of facilities found in VMWare Player, like shared clipboard, shared folders, drag-and-drop of objects, etc.
  • It makes the best use of vitualization technology. If you would like to create a VM with more than one core, you must enble virtualization in your processor through BIOS (more on this in a separate post).
  • From the performance point of view, I don't see that much of a difference between VMWare Player and VirtualBox. In fact, I feel VirtualBox is slightly better.
I had a Lubuntu VM running in VMWare Player. Here are the steps I followed to migrate from VMWare Player to VirtualBox.
  • Download and install VirtualBox from here.
  • Shutdown the VM running inside the VMWare Player.
  • Launch VirtualBox Manager. Click on "New" icon to create a new VM.
  • You can accept defaults for most of the settings. When you come to the disk section, instead of specifying a new disk, you can select the existing vmdk file. In my case, I chose the vmdk file corresponding to my Lubuntu VM.
  • Save the settings. 
  • Start the VM from the VirtualBox Manager. It will start the VM in a new window, leaving the VirtualBox manager window intact.
  • Once launched, login to your VM and make sure things are working fine.
The only catch is your VM is running with default number of cores (which is only one) and possibly with low memory. How to increase the number of cores and memory is the discussion of my next post.

SublimeText 3/Anaconda error

When I installed Anaconda manually by downloading and untarring the file (as given in the manual installation instructions here ), I got th...