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. On Sunday, November 22, 2020 at 5:33:58 AM UTC-6 [email protected] wrote: > 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> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/5dccee4e-769c-4c6f-9c36-90a58f539a08n%40googlegroups.com.
