Setting Up the Vagrant Environment on Windows Issues

Hello. I’m having trouble finishing the setup and I suspect it’s because I’m missing something obvious or I’m mistyping something in my command prompt (specifically, messing up the commands for the windows command prompt that I’m using because the instructor is using a mac terminal in the video and our commands will be slightly different) and help or input would be greatly appreciated.

Steps I’ve Completed
I successfully completed all of the steps under “Installing Vagrant on Windows” in the lecture notes. At first I was having trouble creating the university and m103 directories on my machine, but found this post (Syntax from class in command line doesnt work in windows) on the board and solved that problem.

Now my issue is I’m having trouble copying the m103-vagrant-env directory into my m103 folder. The path for my m103 folder on my computer is “C:\Users\username\university\m103”. The command I tried in my command prompt is “copy -r m103-vagrant-env/ C:\Users\username\university\m103”. The error I get is “The system cannot find the file specified.”.

I feel like I’m missing the step where the 103-vagrant-env directory came from and think that’s why I’m getting that error, because it can’t find the 103-vagrant-env directory. Was I supposed to download that directory and put it somewhere at some point and just missed that step in the lecture notes or video?


Okay, I’ve figured it out, sorry to the person I see replying right now.

For future reference if anyone else happens on this post and has the same issue:

The m103-vagrant-env directory is in the handouts sections on Chapter 0. I’m not sure how I was supposed to add that to the folder from the command prompt, but I manually downloaded m103/ and moved it inside of “C:\Users\username\university\m103”.


Good Morning @Ellie_43912,

Try not to over think it, go slow, and try a different tactic.
Close (all) Command Prompts.

Use the Windows File Explorer:

  • Verify the Directory exists, if not … create it
  • Copy or Move the m103-vagrant-env zip file into the Directory
  • Unzip the files
  • Position your Mouse Pointer to directory path, right click to " Copy Address " ; paste this into notepad or other text editor.

Open the Command Prompt:
From here you are going to change into the directory you copied to clipboard or txt

  • Type " cd [paste the dir path] "
    It should look similar to cd C:\university\m103\m103-vagrant-env

  • Type vagrant up --provision (this will take several minutes to complete)

Then follow the rest of the Lessons / Instructions. :sunglasses:

For future reference if anyone else happens on this post and has the same issue:

What you describe is literally what you had to do :slight_smile:

  1. Download
  2. Move file into your m103 dir.

Good luck with the rest of the course!

Hi I tried the recommendations above but keep getting the error below; what could I be doing wrong

C:\Users\mongod\university\m103\m103-vagrant-env>vagrant up --provision
Vagrant failed to initialize at a very early stage:

The directory Vagrant will use to store local environment-specific
state is not accessible. The directory specified as the local data
directory must be both readable and writable for the user that is
running Vagrant.

Local data directory: C:/Users/mongod/university/m103/m103-vagrant-env/.vagrant

Thanks for sharing this Ellie. I was similarly confused. Now I know where to find the m103-vagrant-env data.

@ngarianthony: In your case I would say, delete the m103-vagrant directory and all its contents and then unzip the course handouts again. Seems that some permissions got mixed up somehow.

Thanks @Tess_Sluijter. I got past that point. Now Im stuck at Vagrant Up…When I run Vagrant Status it tells me that Virtual Box is not running. What do I need to do. Thanks for you help.

PS C:\Users\mongod\university\m103\m103-vagrant-env> vagrant status
Current machine states:

mongod-m103 not created (virtualbox)

The environment has not yet been created. Run vagrant up to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.
PS C:\Users\mongod\university\m103\m103-vagrant-env> dir

Directory: C:\Users\mongod\university\m103\m103-vagrant-env

Mode LastWriteTime Length Name

d----- 19-Nov-18 9:57 PM .vagrant
-a---- 19-Nov-18 9:50 AM 4681 provision-mongod
-a---- 19-Nov-18 9:50 AM 811 Vagrantfile

1 Like

Vagrant up gives me the error below

PS C:\Users\mongod\university\m103\m103-vagrant-env> vagrant up
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Importing base box ‘ubuntu/trusty64’…
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\HP\.vagrant.d\boxes\ubuntu-VAGRANTSLASH-trusty64\20180419.0.0\virtualbox\box.ovf”, “–vsys”, “0”, “–vmname”, “ubuntu-cloudimg-trusty-vagrant-amd64_1542700971853_6643”, “–vsys”, “0”, “–unit”, “6”, “–disk”, “C:\Users\HP\VirtualBox VMs\ubuntu-cloudimg-trusty-vagrant-amd64_1542700971853_6643\box-disk1.vmdk”]

Stderr: 0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Interpreting \?\C:\Users\HP.vagrant.d\boxes\ubuntu-VAGRANTSLASH-trusty64\20180419.0.0\virtualbox\box.ovf…
VBoxManage.exe: error: Appliance import failed
VBoxManage.exe: error: Error opening ‘\?\C:\Users\HP.vagrant.d\boxes\ubuntu-VAGRANTSLASH-trusty64\20180419.0.0\virtualbox\box-disk1.vmdk’ for reading (VERR_FILE_NOT_FOUND)
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component ApplianceWrap, interface IAppliance
VBoxManage.exe: error: Context: “enum RTEXITCODE __cdecl handleImportAppliance(struct HandlerArg *)” at line 886 of file VBoxManageAppliance.cpp

Hi ngarianthony,

I googled around regarding your problem, this is some solutions that worked for some people:

I had a similar issue but the problem was that I downloaded the box as root. ‘chown’ ing it to my user fixed the problem.

I am also seeing the same error as @campherkurt and the others. Using Vagrant via Cygwin/Mintty on Windows 7 64-bit.
In my case, I had a previous VM already running in Virtualbox. I then started my Vagrant box. After I ran vagrant halt then vagrant destroy , I noticed the precise64 base box was still listed in Virtualbox. I right-clicked and removed it, but not the underlying files. That’s when I started seeing the error. I checked the permissions on the .vagrant.d/boxes folder and it’s descendents after finding this issue. Unlike @gmanricks, I didn’t notice anything abnormal. I halted the original VM and closed the Virtualbox GUI, then tried vagrant up again. Now it’s working again – go figure.

Here is the link:


1 Like

Hi @Kanika what version of Vagrant are you using for this course?

Basically they always recommend to just grab the most recent version.

1 Like