Saturday, January 17, 2015

Ubuntu 14.04 LTS (Trusty) with Intel Hardware-assisted Virtualization (hypervisor)

Hi Dev! Today, I'm going to install Android Studio in my computer. Since my computer support hypervisor (VT-x),EM64T and Execute Disable(XD) Bit functionality so I'm going to install Intel Hardware-assisted Virtualization (hypervisor)..Oh yeah, forgot to mention here that I'm going to install within my Ubuntu 14.04 LTS (Linux platform). If you looking for Windows platform (HAXM), I already wrote about that HERE. You can refer the official manual HERE or just read my blog post. We need Intel Hardware-assisted Virtualization (hypervisor) because to made our runs significantly faster and smoother which is much much better that before.

Please check what CPU architecture that are your linux operating are using now. Check your bit of kernel mode.
$ getconf LONG_BIT
Now you can see the result, it must be 64 or 32 bit long. I hope you are using x64 bit operating system because that is critical requirement to use and take advantages of Intel Hardware-assisted Virtualization (hypervisor) which is recommended to support and serve RAM more that 2 GB .

Now lets check if your processor supports hardware virtualization via KVM.
$ egrep -c '(vmx|svm)' /proc/cpuinfo
What is your output? If you get 0 it means that your CPU doesn't support hardware virtualization.

To make sure if your processor support KVM or not, you need to check it using CPU-Checker
$ sudo apt-get install cpu-checker
After finished install the CPU-Checker from repository, run "kvm-ok" command from terminal and you should get a result like this :
[email protected]:~$ kvm-ok 
INFO: /dev/kvm exists
KVM acceleration can be used

When done verifying the hardware virtualization, we may proceed to KVM installation:
$ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
Note : Please ignore the Postfix Configuration by selecting "No Configuration".

Next, is to add your username account to the group kvm and libvirtd.
$ sudo adduser user_name kvm
$ sudo adduser user_name libvirtd
Note :Please change the user_name with your own linux username.

Now, you can use the hypervisor with AVD..just put a "-enable-kvm" parameter before lauch the AVD
$ <SDK directory>/tools/emulator-x86 -avd Your_AVD_Name -qemu -m 2047 -enable-kvm

That all from me, great! Thanks for reading my tutorial!

1 comment:

  1. A SCADA Hardware system, a centralized control system used at industries, to achieve optimized control of equipments to ensure smooth operation,

    ReplyDelete