Unable to vagrant up to ubuntu 18.04

182 views
Skip to first unread message

Jonathan Gossage

unread,
Aug 6, 2018, 8:19:50 PM8/6/18
to Vagrant
I am attempting to create a Ubuntu 18.04 server virtual machine on Windows 10 using VirtualBox 5.2.16. I get the following messages on the vagrant up command:

D:\Apache>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'generic/ubuntu1804' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.


Command: ["startvm", "2fb0ece3-53ed-4a06-b08d-530e9e0bd327", "--type", "headless"]


Stderr: VBoxManage.EXE: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.EXE: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
VirtualBox shows that the virtual machine has been created. The only unusual (to me) item in the configuration is that it uses a PS2 mouse rather than a USB mouse and the USB controller is disabled.

Any ideas on how to fix this?


Hayk Aleksanyan

unread,
Aug 7, 2018, 1:24:09 AM8/7/18
to Vagrant
I'm getting the same error; vagrant used to work fine until this morning. 
I assume it's some Windows update that messed things up. Although cannot still figure out what exactly has happened. 

dan...@hashicorp.com

unread,
Aug 7, 2018, 3:45:56 AM8/7/18
to Vagrant
Hi there,

From the error you are getting it seems that something is locking access to VT-Hardware in your machine.

This often means that you have Hyper-V service enabled in Windows.
If this is the case Hyper-V will lock access to VT resources to avoid stability/performance issues.

If you do not need it you can disable the Hyper-V service and see if it helps but be aware that this will prevent you from running Hyper-V VMs until you re-enable the service.

Other possible causes are:
  • You have Docker installed (in this case Docker might be the one that enabled the Hyper-V service).
  • You have VT-x disabled in your machine BIOS (unlikely, but worth a shot if nothing of the above works) 
Hope this helps.

Daniele

Hayk Aleksanyan

unread,
Aug 7, 2018, 7:22:40 AM8/7/18
to Vagrant
Daniele, thanks for the reply!

just to confirm:

  • I do not have Hyper-V service running on Windows (I checked through control panel-> Turn Windows Features on and off)
  • I do not have Docker installed
  • VT-x is not disabled from BIOS
Well, everything was working all right until this morning. The crush of vagrant is of no apparent reason.
The only suspect to me here, is a Windows update which might have broken something. Since otherwise I did not install/update anything myself in the last few days.


Anyways, nothing helped, and eventually I had to destroy the VM, uninstall Oracle Virtual Box, and Vagrant Hashicorp, 
then installed the two, rebooted the computer, and the error with vagrant up was gone.

This is an utterly undesirable workaround, as a lot of set-up goes away, and I need to start from the scratch.

It would be most helpful, if one can point out 
  • what are the (other) potential causes of the aforementioned error ?
  • how to fix the error without uninstall/reinstall ?

Many thanks,
Hayk


Other possible causes are:
  • You have Docker installed (in this case Docker might be the one that enabled the Hyper-V service). 
  • You have VT-x disabled in your machine BIOS (unlikely, but worth a shot if nothing of the above works)  

dan...@hashicorp.com

unread,
Aug 7, 2018, 10:18:07 AM8/7/18
to Vagrant
Hi Hayk,

Glad to know that you managed to get stuff working even if with some effort.

The three options I listed to you were the only things I could think about given the error reported and, in your case, we did not even had the Vagrant output.

Considering the fact you now solved the issue there is probably nothing we can do to investigate further unless you manage to reproduce the error somehow.

In case the issue re-surfaces we can collect some extra data and see if we can find something extra.

Also, maybe we can get some extra insight if also Jonathan is having the same issue (no Hyper-V, no Docker, BIOS ok).

Daniele

Jonathan Gossage

unread,
Aug 7, 2018, 11:19:47 AM8/7/18
to vagra...@googlegroups.com
I am also in the same situation - no Hyper-v no Docker BIOS is OK and I am able to run Ubuntu 18.04 successfully on Hyper-v when I do turn it on but not on the latest version of VirtualBox which is also broken in the same way.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/619928a9-d75a-4b9b-ad62-169f3cc585f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dan...@hashicorp.com

unread,
Aug 8, 2018, 11:46:27 AM8/8/18
to Vagrant
 Hi Jonathan,

You mentioned:
> but not on the latest version of VirtualBox which is also broken in the same way.

Does it means you are not able to use VirtualBox at all even without using Vagrant as wrapper?
If this is the case it is most probably an issue with VirtualBox (or Windows) itself rather than with Vagrant.

Can you check if there is any machine in VirtualBox left in an incorrect state?

Also, according to the Vagrant output, the vagrant up operation failed on the execution of the following command:
VBoxManage.exe startvm 2fb0ece3-53ed-4a06-b08d-530e9e0bd327 --type headless

You should check:
  • Is the machine listed in
    VBoxManage.exe list vms

  • If so, does executing the startvm command above works?
If the command does not work from the commandline, then the issue is not related to Vagrant and you should open a ticket with VirtualBox support/community.

Daniele
Reply all
Reply to author
Forward
0 new messages