Vagrant up issue

I got an issue when i try to run the command above.

Hi rohz,

Are Vagrantfile in your current directory. Please change your directory to where you have extracted the vagrant folder.

Try running vagrant up there and let me know.

Kanika

I’m in the right path i think…

image

Hi rohz,

You have to run from m103-vagrant-env directory. You must have downloaded this m103-vagrant-env.zip.

Now create a folder in your home directory called m103. Copy the handout to this directory and then navigate to the handout directory m103-vagrant-env in your terminal. Bring up your Vagrant environment by running these commands (this will take a few minutes):

vagrant up --provision

This command brings up your virtual machine, if it’s not already running. It also builds directories in the VM and downloads all the software and validation scripts necessary to complete this course.

vagrant ssh

Kanika

config.vm.synced_folder ‘/host/path’, ‘/guest/path’, SharedFoldersEnableSymlinksCreate: false
==> mongod-m103: Clearing any previously set network interfaces…
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: [“hostonlyif”, “create”]

Stderr: 0%…
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage.exe: error: Context: “enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

Hi rohz,

Can you take a look here?
Let me know if it works!

Kanika

i have the same issue even with Hyper V active

Here are more solutions:

Let me know if it works!

Kanika

i am truly sorry… i have no success. Will try to find another pc for this but i’m not sure to able to as soon as the due date…will try

New machine…new error… PLEASE HELP

Hi rohz,

Are Vagrant file is in the current directory?

The error simply suggests the machine is on path D:/m103/provision-mongod .

Change the directory to D:/m103/provision-mongod and then try running again.

Kanika

But that path doesn’t exists.

Hi rohz,

I found this solution on the internet:

Okay, got the new box and was able to reproduce the path error you were encountering. The underlying cause is that the path is expanded from the vagrant working directory. Updating the script path to use an expanded path based on the location of the custom Vagrantfile makes things work as expected:

Vagrant.configure(“2”) do |config|

config.vm.box = “ubuntu/xenial64”

dir = File.expand_path("…", FILE)
puts “DIR: #{dir}”

config.vm.provision “shell”, path: File.join(dir, “script.sh”)

end
(the puts is there just to provide some output on up showing it getting the correct location).

Easy solution can be destroy the machine completely, remove the vagrant.
Re-download and install it from scratch!

Kanika

Thabks a lot for your help. I think the time is against me. Fue date is for noon… Beside, your solution is for ubuntu… Im on windows :frowning:

Hi rohz,

Share your Vagrantfile if you can.

Lets see what dir mentioned in there.

Kanika

doesn’t allwow to upload files…only jpeg

Screenshot maybe?

Kanika

Thank you for your support. I won’t continue with the course even. I’m totally disappointed, pretty poor description on installation, i recognize your effort for help and I’m really appreciate it but i don’t want to keep just shooting bullets to the air praying to hit something. This seems to be dark field and I’ll wait for next schedule course hopping this part gets solved. Thanks a lot Kanika

Hi rohz,

Sad to see you leaving :frowning:

Hope to see you back!

Kanika