Talk:Setup OpenCog development environment VM using Vagrant

From OpenCog

Software-only virtualization does NOT works on x86_64

With my machine:

   >lsb_release -a
   Distributor ID:	Ubuntu
   Description:	Ubuntu 13.04
   Release:	13.04
   Codename:	raring
   >uname -a
   Linux tnick-desktop 3.8.0-20-generic #31-Ubuntu SMP Mon May 6 17:03:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I am unable to follow the instructions; I did:

   >vagrant box add precise-base
   >vagrant up
   Bringing machine 'default' up with 'virtualbox' provider...
   [default] Importing base box 'precise-base'...
   [default] Matching MAC address for NAT networking...
   [default] Setting the name of the VM...
   [default] Clearing any previously set forwarded ports...
   [default] Creating shared folders metadata...
   [default] Clearing any previously set network interfaces...
   [default] Preparing network interfaces based on configuration...
   [default] Forwarding ports...
   [default] -- 22 => 2222 (adapter 1)
   [default] Running 'pre-boot' VM customizations...
   [default] Booting VM...
   [default] Waiting for VM to boot. This can take a few minutes.

and it locks there. Starting the box from GUI shows the message:

VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.

Indeed, grep '(vmx|svm)' /proc/cpuinfo returns nothing. I've tried to replace with a 32-bit box:

   >vagrant box remove precise-base
   >vagrant box add precise-base
   >vagrant up

And it worked; bottom line: If no one else has a better idea, I would suggest adding following text in 4 Setup OpenCog development environment (Vagrant VM):

3.1: If your host operating system is 32-bit or 64-bit without virtualization technology ( grep (vmx|svm)' /proc/cpuinfo returns nothing):

Yes, you are right. Quoting Wikipedia article on X86 Virtualization:

The initial version of x86-64 (AMD64) did not allow for a software-only full virtualization due to the lack of segmentation support in long mode, which made the protection of the hypervisor's memory impossible, in particular, the protection of the trap handler that runs in the guest kernel address space. Revision D and later 64-bit AMD processors (as a rule of thumb, those manufactured in 90 nm or less) added basic support for segmentation in long mode, making it possible to run 64-bit guests in 64-bit hosts via binary translation. Intel did not add segmentation support to its x86-64 implementation (Intel 64), making 64-bit software-only virtualization impossible on Intel CPUs, but Intel VT-x support makes 64-bit hardware assisted virtualization possible on the Intel platform.

So, if our x86_64 processor does NOT has VT-x support, 64-bit software-only virtualization isn't possible. I'll add your following suggestion to wiki page:

3.1: If your host operating system is 32-bit or 64-bit without virtualization technology ( grep (vmx|svm)' /proc/cpuinfo returns nothing):

Is VT-x/AMD-V disabled in BIOS? Unless your processor is a Celeron/Pentium or old Athlon 64, it will likely have VT-x/AMD-V features. For Linux-on-Linux hosting, Linux Containers (lxc) are faster than full virtualization systems like VirtualBox, VMware, Xen or KVM, *especially* on systems without hardware virtualization features. dhart (talk) 19:16, 24 August 2013 (CDT)
Thanks 'tnick'! --AmberJ (talk) 08:43, 24 August 2013 (CDT)