*** SOS *** I'm trying to install my first Centos OS on Oracle VM VirtualBox using Vagrant

87 views
Skip to first unread message

Majid Chavoshi

unread,
Nov 22, 2020, 6:33:58 AM11/22/20
to Vagrant
Please assist with the following issue. Many thanks in advance!

I installed Oracle VM VirtualBox & Vagrant on my Windows 10 64-bit laptop. I end up with the following error:

C:\HashiCorp\Vagrant>vagrant init centos/8 A Vagrantfile has been placed in this directory. You are now ready to vagrant up your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on vagrantup.com for more information on using Vagrant.

C:\HashiCorp\Vagrant>vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'centos/8'... There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Command: ["import", "\\?\C:\Users\Owner\.vagrant.d\boxes\centos-VAGRANTSLASH-8\1905.1\virtualbox\box.ovf", "--vsys", "0", "--vmname", "CentOS-8-Vagrant-8.0.1905-1.x86_64_1605986687739_31676", "--vsys", "0", "--unit", "10", "--disk", "C:/Users/user/VirtualBox VMs/CentOS-8-Vagrant-8.0.1905-1.x86_64_1605986687739_31676/CentOS-8-Vagrant-8.0.1905-1.x86_64.vmdk"]

Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interpreting \?\C:\Users\Owner.vagrant.d\boxes\centos-VAGRANTSLASH-8\1905.1\virtualbox\box.ovf... OK. 0%... Progress state: E_FAIL VBoxManage.exe: error: Appliance import failed VBoxManage.exe: error: Could not create a directory 'C:\Users\user\VirtualBox VMs\CentOS-8-Vagrant-8.0.1905-1.x86_64_1605986687739_31676' to save the settings file (VERR_ACCESS_DENIED) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleImportAppliance(struct HandlerArg *)" at line 957 of file VBoxManageAppliance.cpp

C:\HashiCorp\Vagrant>

dragon788

unread,
Nov 23, 2020, 9:49:49 AM11/23/20
to Vagrant
You don't actually want to run `vagrant init` from the folder where vagrant is installed, if you installed it correctly you should be able to run the `vagrant` command from anywhere because it is in your PATH.

Usually you'll run it from `%USERPROFILE%/projects` or a similar directory stored in your home directory.

Folders outside of your home directory on the C drive typically require elevated permissions and will cause that type of error.

The way vagrant works is it stores a copy of the box in your home directory and then in the project folder where you are running the init it will add some metadata and make a link or another copy of the box depending on the virtualization tool used.

Majid Chavoshi

unread,
Nov 23, 2020, 10:20:07 AM11/23/20
to vagra...@googlegroups.com
Thanks sooo much for your suggestion, but it did the same thing:


C:\WINDOWS\system32>vagrant init centos/8

A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

C:\WINDOWS\system32>vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/8'...
There was an error while executing `VBoxManage`, a CLI used by Vagrant

for controlling VirtualBox. The command and stderr is shown below.

Command: ["import", "\\\\?\\C:\\Users\\Owner\\.vagrant.d\\boxes\\centos-VAGRANTSLASH-8\\1905.1\\virtualbox\\box.ovf", "--vsys", "0", "--vmname", "CentOS-8-Vagrant-8.0.1905-1.x86_64_1606144620034_50907", "--vsys", "0", "--unit", "10", "--disk", "C:/Users/user/VirtualBox VMs/CentOS-8-Vagrant-8.0.1905-1.x86_64_1606144620034_50907/CentOS-8-Vagrant-8.0.1905-1.x86_64.vmdk"]

Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting \\?\C:\Users\Owner\.vagrant.d\boxes\centos-VAGRANTSLASH-8\1905.1\virtualbox\box.ovf...

OK.
0%...
Progress state: E_FAIL
VBoxManage.exe: error: Appliance import failed
VBoxManage.exe: error: Could not create a directory 'C:\Users\user\VirtualBox VMs\CentOS-8-Vagrant-8.0.1905-1.x86_64_1606144620034_50907' to save the settings file (VERR_ACCESS_DENIED)

VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleImportAppliance(struct HandlerArg *)" at line 957 of file VBoxManageAppliance.cpp

C:\WINDOWS\system32>

All the best,

Majid Chavoshi |Email: majid.c...@gmail.com | Tel: (818) 925-4872



--
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/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
---
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/5dccee4e-769c-4c6f-9c36-90a58f539a08n%40googlegroups.com.

dragon788

unread,
Nov 23, 2020, 11:40:14 AM11/23/20
to Vagrant
It looks like you are running in an administrator elevated prompt so the first thing you need to do after you open that prompt is `cd %USERPROFILE%` if using the C,d prompt or `cd $HOME` or `cd $env:USERPROFILE` if using Powershell.

Try that and see if running vagrant init from that directory works.

Majid Chavoshi

unread,
Nov 23, 2020, 12:33:42 PM11/23/20
to vagra...@googlegroups.com
Well, I open cmd as an administrator, so I'd think it keeps that level for that entire session, right?

All the best,

Majid Chavoshi |Email: majid.c...@gmail.com | Tel: (818) 925-4872


Reply all
Reply to author
Forward
0 new messages