Saturday, November 8, 2014

Setting up VirtualBox on Windows with i7-4790K

Windows Edition: Windows 7 Professional Service Pack 1 (64-bit)
Processor: Intel Core i7-4790K
Memory: 8 GB

I recently upgraded my home workstation to an i7-4790k, effectively jumping several generations of processors. Now that I have all this idle processing power, I want to utilize it more effectively by running some virtual machines to help with my personal software projects.

The purpose of this post is to remind me what I did to get Oracle VirtualBox fully working after flashing my bios (or reinstalling the operating system) at some later date.

1.) Download the latest Oracle VirtualBox installer from their website.

The file/version that I received was: VirtualBox-4.3.18-96516-Win.exe

2.) Run the installer, the wizard is nifty. I just used all defaults.  I figure the installer has to be given rights to tie into the operating system and such. As a result, there were a couple "do you trust Oracle" dialogs that popped up.

Note: Your computer's network will flicker while the networking components are installed. As a result, you will lose network connectivity for a few moments.

3.) Fire it up.


Seems simple enough. At this point you may be wondering why I wrote a post about this.  Mainly the next few problems that I ran into after installing.


Problem 1: 64-bit and Multi-CPU Support
  • When I click New to create a virtual machine, I only see 32-bit versions of Operating Systems.  The 64-bit options are not appearing in the operating system version drop down.
  • After creating a new virtual machine, the processor configuration options appear disabled.
Solution:
  • The issue was that the Intel Virtualization Technology option was disabled in my workstation's BIOS. After enabling that in the Advanced CPU options of the BIOS, the 64-bit versions started showing up. I was also able to configure virtual machines with more than one CPU.

Problem 2: Network Connectivity
  • I cannot ping the virtual machine from the host operating system.  The whole point of me using virtual machines is to be able to try out software/services on fresh machines and use it from my existing development box. If I can't ping the virtual machine, I can't use the services installed on the virtual machine
Solution:
  • Change the network adapter "Attached to:" drop down to "Bridged Adapter".  This appears to make the virtual machine apart of my home network and receive an IP Address from my router. One more thing I did here was configure my router to give the virtual machines static IPs. I then created host entries on my machines so I can connect to the VMs more easily from my other machines.

Problem 3: Operating System Stability
  • Ubuntu 14.04.1 Desktop appears to be unstable when running on the virtual machine. I reviewed virtual box's verified guest operating system list and picked another one to try. It also appeared a bit unstable.
Solution:
  • I ended up moving to Debian 7.6.0 64-bit.  This appears to be working just fine. I'm writing this post a while after going through these issues. I cannot recall if the stability issues, I was experiencing with Ubuntu, was before or after I updated the BIOS setting referred to in problem one. If Ubuntu is what you want, give it a shot and let me know.  Next time I have a minute I will do some more troubleshooting to verify.  I have also found that VirtualBox's documentation mentions Ubuntu Server as requiring PAE support to be enabled on the Processor tab. I have not tried that.

Problem 4: Graphics/Video Stability
  • My video card drivers keep crashing and recovering.  My monitors flicker, and then a message box pops up in the system tray area saying something along the lines of "video driver stopped responding and has recovered".
Solution:
  • The issue appears to have been that the Enable 3D and 2D Acceleration options for my virtual machines were on. I figure the problem was that multiple virtual machines were attempting to use the hardware acceleration at the same time. Bad things were happening like the host video crashing and recovering.  After disabling those options in the virtual machines, I no longer had video crashing issues.
Also, I've found that configuring the virtual machines for two CPUs is plenty for my purposes.

The Virtual Box manual is actually really good at explaining the how, and how not, to configure virtual machines.  It is available through the "end-user docs" link on their landing page.

Things appear to be rolling smoothly. I hope this saves someone else a couple hours of troubleshooting/experimentation.


UPDATE (2014-11-15):

Since this original post, I have upgraded to Windows 8.1. I followed the same steps above to get VirtualBox working. However, after a few days of the VMs running fine, I ran into the following issue this morning.


Problem 5: VT-x is not available. (VERR_VMX_NO_VMX)
  • Not sure why this happened all of the sudden. But this morning I was not able to fire up any of the Virtual Machines due the following error "VT-x is not available. (VERR_VMX_NO_VMX)". I verified that my BIOS still had Intel Virtualization Technology enabled.


Solution:
  • After some searching found some posts regarding the Windows Hyper-V platform replacing, or overriding VT-x or something like that.  Disabling that feature in Windows appears to have solved this issue.



    1 comment:

    1. Hi. your UPDATE (2014-11-15) section helped me.

      I had Hyper-V installed and wanted to debug something using VirtualBox. My BIOS had VT-x enabled but I couldn't select 64bit OS types or increase number of vCPUs in VirtualBox, but your post enlightended me that two hypervisors on one host doesn't bode well (or at least the mix of Hyper-V and VirtualBox anyway).

      Thanks!

      ReplyDelete