Page 1 of 1

Vagrant Centos-7 Guest [Win10Pro] - VBox/vmdk Not Accessible

Posted: 6. Apr 2020, 20:47
by Blazer2020
Problem:
Recently installed Virtualbox and vagrant (I'm new to vagrant) on Windows 10 Pro host. Installed both VirtualBox and Vagrant as user that is a member of the administrator group, pulled down the centos-7 vagrant box and followed the steps to "up" the box. The virtualbox guest boots but hangs with no ability to login. No login prompt from the VB console or via ssh. I have re-installed VirtualBox twice. I'm not sure if this is a VirtualBox issue or a vagrant issue. I've spent the better part of a day googling, searching the VirtualBox forums and some half-hearted vagrant searchs. The errors I'm seeing are in the VirtualBox VBoxSVC.log so I've focused my efforts more toward VirtualBox (for now).

Windows 10 Pro [1909], VT-x enabled in UEFI.
Virtual Box : 6.1.4r136177 (Qt5.6.2)
Vagrant : 2.2.7
Vagrant Box : bento/centos-7 (202002.04.0)

Vagrant Startup Output :

Code: Select all

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/centos-7' version '202002.04.0' 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: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key <-- (Hangs here but VB guest is "Running")
The VirtualBox logs are zipped and attached but entries I believe to be relevant are pasted below.

File Locations

Code: Select all

C:\Users\pitwipe\.VirtualBox\VirtualBox.xml
C:\Users\pitwipe\.VirtualBox\VBoxSVC.log
C:\Users\pitwipe\VirtualBox VMs\pitwipe_default_1586194851525_7330\centos07.7-x86_64-disk001.vmdk
C:\Users\pitwipe\VirtualBox VMs\pitwipe_default_1586194851525_7330\pitwipe_default_1586194851525_7330.vbox
C:\Users\pitwipe\VirtualBox VMs\pitwipe_default_1586194851525_7330\Logs\VBox.log
C:\Users\pitwipe\VirtualBox VMs\pitwipe_default_1586194851525_7330\Logs\VBoxHardening.log
C:\Users\pitwipe\Vagrantfile
Looking through the VBoxSVC.log it appears the local .vmdk image cannot be found as it appears to be referencing a path to the disk image file that does not exist.
It's also referring to the wrong VBox machine name. At no point did I manually configure either of these items.
Here are the relevant log entries:

Code: Select all

<...snip...>
00:04:04.636849          ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={d0a0163f-e254-4e5b-a1f2-011cf991c38d} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'centos-7.7-x86_64'}, preserve=false aResultDetail=0
00:04:04.637028          ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={ad47ad09-787b-44ab-b343-a082a3f2dfb1} aComponent={MediumWrap} aText={Could not find file for the medium 'C:\Users\pitwipe\VirtualBox VMs\centos-7.7-x86_64\centos-7.7-x86_64-disk001.vmdk' (VERR_PATH_NOT_FOUND)}, preserve=false aResultDetail=-103
00:04:04.691481          Import settings with version "1.16-macosx"
00:04:04.691542          ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={d0a0163f-e254-4e5b-a1f2-011cf991c38d} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'centos-7.7-x86_64'}, preserve=false aResultDetail=0
00:04:04.691698          ERROR [COM]: aRC=VBOX_E_FILE_ERROR (0x80bb0004) aIID={ad47ad09-787b-44ab-b343-a082a3f2dfb1} aComponent={MediumWrap} aText={Could not find file for the medium 'C:\Users\pitwipe\VirtualBox VMs\centos-7.7-x86_64\centos-7.7-x86_64-disk001.vmdk' (VERR_PATH_NOT_FOUND)}, preserve=false aResultDetail=-103
00:04:08.636695 createImport Saving settings file "C:\Users\pitwipe\.VirtualBox\VirtualBox.xml" with version "1.12-windows"
00:04:08.645090 ApplImp  Saving settings file "C:\Users\pitwipe\VirtualBox VMs\centos-7.7-x86_64_1586194846576_35423\centos-7.7-x86_64_1586194846576_35423.vbox" with version "1.16-windows"
00:04:08.651453 ApplImp  Saving settings file "C:\Users\pitwipe\.VirtualBox\VirtualBox.xml" with version "1.12-windows"
00:04:08.796945          ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85632c68-b5bb-4316-a900-5eb28d3413df} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 0 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:04:08.797027          ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85632c68-b5bb-4316-a900-5eb28d3413df} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 0 of controller 'IDE Controller'}, preserve=false aResultDetail=0
00:04:08.797127          ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85632c68-b5bb-4316-a900-5eb28d3413df} aComponent={SessionMachine} aText={No storage device attached to device slot 1 on port 0 of controller 'IDE Controller'}, preserve=false aResultDetail=0
<...snip...>
Looking at the log output above:

The path to this newly created VirtualBox VM (via vagrant) is :
  1. Reported  :  C:\Users\pitwipe\VirtualBox VMs\centos-7.7-x86_64\centos-7.7-x86_64-disk001.vmdk
    Actual    :  C:\Users\pitwipe\VirtualBox VMs\pitwipe_default_1586194851525_7330\centos07.7-x86_64-disk001.vmdk
Related to above it's also claiming a different VBox guest name:
  1. Reported                                    : centos-7.7-x86_64
    Actual dynamically created VBoxguest name   : pitwipe_default_1586194851525_7330
Lastly, this does not exist either:
  1. C:\Users\pitwipe\VirtualBox VMs\centos-7.7-x86_64_1586194846576_35423\centos-7.7-x86_64_1586194846576_35423.vbox
The vagrant auto-generated config file has only a few line:

Code: Select all

  Vagrant.configure("2") do |config|
    config.vm.box = "bento/centos-7"
  end
I've been looking through VirtualBox and vagrant config files but I'm fairly new to both of these and haven't found anything matching the log data above. Apologies if this is a common issue but I found no references in the FAQ or elsewhere. I've destroyed and rebuilt the VM a number of times trying different things.. deleting the resulting vagrant config files, deleting the logs to try and keep things as clean as possible. Any help would be appreciated.

Re: Vagrant Centos-7 Guest [Win10Pro] - VBox/vmdk Not Accessible

Posted: 6. Apr 2020, 23:22
by fth0
Blazer2020 wrote:I'm not sure if this is a VirtualBox issue or a vagrant issue.
It's neither. It's an Hyper-V issue. Please take a look at the following post of scottgus1: viewtopic.php?f=6&t=97501&p=473074#p473074.

Re: Vagrant Centos-7 Guest [Win10Pro] - VBox/vmdk Not Accessible

Posted: 6. Apr 2020, 23:32
by Blazer2020
Through Control Panel then "Turn Windows features on or off" it shows that Hyper-V is not selected...

Re: Vagrant Centos-7 Guest [Win10Pro] - VBox/vmdk Not Accessible

Posted: 7. Apr 2020, 00:41
by fth0
There are a lot of Windows 10 components implicitly using Hyper-V (even on Windows 10 Home). Focus on the bcdedit command which implicitly disables the Hyper-V core functionality that affects VirtualBox.

Re: Vagrant Centos-7 Guest [Win10Pro] - VBox/vmdk Not Accessible

Posted: 7. Apr 2020, 04:28
by Blazer2020
This worked - much appreciated.

The instructions I was following did indicate ensuring Hyper-V was disabled, which appeared to be so as evidenced by the unchecked box in the Control Panel. Apparently not.
Looking at the bcdedit /enum output showed that the hypervisorlaunchtype setting was set to "auto" and not explicitly off.

Sending a virtual Weihenstephaner...