title: Vagrant on VirtualBox on Ubuntu
body: <p>I need to build Vagrantfile. And I need to use Ansible (so, I can't work with Windows).</p>
  
  <p>But my primary OS - Windows 10. I can install Ubuntu on Hyper-V or VirtualBox.</p>
  
  <p>1) I create Hyper-V machine and install Ubuntu on it. But vagrantfile can't use hyper-v as provider and need virtualbox. </p>
  
  <p>2) If I try to start virtual Ubuntu on VirtualBox, I have an error </p>
  
  <pre><code>Failed to open a session for the virtual machine Ubuntu.
  
  AMD-V is not available (VERR_SVM_NO_SVM).
  
  Result Code: E_FAIL (0x80004005)
  Component: ConsoleWrap
  Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
  </code></pre>
  
  <p>2) If I turn off Hyper-V on Windows, I can launch Ubuntu on VirtualBox. </p>
  
  <p>But when I try <code>vagrant up</code>, I have an error:</p>
  
  <pre><code>There was an error while executing `VBoxManage`, a CLI used by Vagrant
  for controlling VirtualBox. The command and stderr is shown below.
  
  Command: ["startvm", "4e3f95fd-2ad3-423f-a39a-ffd65cfe0d46", "--type", 
  "headless"]
  
  Stderr: VBoxManage: error: AMD-V is not available (VERR_SVM_NO_SVM)
  VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component 
  ConsoleWrap, interface IConsole
  </code></pre>
  
  <p>In VirtualBox settings AMD-V/VT-x is enabled <a href="https://i.stack.imgur.com/UAAFq.jpg" rel="nofollow noreferrer">screenshot</a></p>
  
  <p>Is there an opportunity to work with vagrant on virtual Ubuntu? It's so undesirable to change real main system from Windows to Ubuntu.</p>
  
  <p>Thanks for your help!</p>
  
  <p>UPDATE. I can add my virtualbox and BIOS screenshots, maybe it'll be useful.</p>
  
  <p>VirtualBox:</p>
  
  <p>This is my machine with Ubuntu: <a href="https://i.stack.imgur.com/NC4pz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NC4pz.jpg" alt="Screenshot"></a></p>
  
  <p>AMD-V is enabled: <a href="https://i.stack.imgur.com/SEm7S.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SEm7S.jpg" alt="Screenshot"></a></p>
  
  <p>BIOS:
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/4fe67600624d20d8194edc3d9224db69.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/4fe67600624d20d8194edc3d9224db69.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/6f05e15236404042ff929ad10280a1d1.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/6f05e15236404042ff929ad10280a1d1.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/23e417ab2fb13191780417030960cb82.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/23e417ab2fb13191780417030960cb82.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/fbcd47ad170ece6127592a6ca8d7dad5.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/fbcd47ad170ece6127592a6ca8d7dad5.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/65de25614774edc4f19506c8c10c61fe.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/65de25614774edc4f19506c8c10c61fe.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/ca73abc19ee7d82398f0574cf77789b4.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/ca73abc19ee7d82398f0574cf77789b4.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/8a15b5e490b285c41268cd4f6b0930c3.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/8a15b5e490b285c41268cd4f6b0930c3.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/9c52e945ad8efc009b772b3e88f5672e.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/9c52e945ad8efc009b772b3e88f5672e.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/3357dd1540a2ea57e308a59ae41cf0af.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/3357dd1540a2ea57e308a59ae41cf0af.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/311e96617a120ec3f22f4fe6833d3dc1.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/311e96617a120ec3f22f4fe6833d3dc1.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/4963e3b283d1209e4e88a6b14d133dcd.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/4963e3b283d1209e4e88a6b14d133dcd.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/628f1138d22dfc8b03a20def857e7967.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/628f1138d22dfc8b03a20def857e7967.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/36f8ba9c6a7806914f49b57fceaf7061.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/36f8ba9c6a7806914f49b57fceaf7061.jpg</a>
  <a href="https://s8.hostingkartinok.com/uploads/images/2017/07/5a4df9d13773147f691e6ab3b244a547.jpg" rel="nofollow noreferrer">https://s8.hostingkartinok.com/uploads/images/2017/07/5a4df9d13773147f691e6ab3b244a547.jpg</a></p>
  
  <p>At a result, I successfully configured unix subsystem and installed vbox, vagrant and ansible. But when I type <code>vagrant up</code> I see </p>
  
  <pre><code>VirtualBox is complaining that the installation is incomplete. Please run 
  VBoxManage --version to see the error message which should contain 
  instructions on how to fix this error. 
  </code></pre>
  
  <p>So, I run <code>VBoxManage --version</code> and have </p>
  
  <pre><code>The character device /dev/vboxdrv does not exist. Please install the 
  virtualbox-dkms package and the appropriate headers, most likely linux-
  headers-3.4.0+. You will not be able to start VMs until this problem is 
  fixed   
  </code></pre>
  
  <p>And if I try <code>apt-get install virtualbox-dkms</code> it says that the latest version is installed yet.</p>