Discussion:
[vagrant-up] Vagrant up error: mkdir -p /vagrant
Carlo Schmid
2018-11-14 07:40:17 UTC
Permalink
*Ubuntu version*

Ubuntu-18.04.1 amd64

*Vagrant version*

2.2.0

*VirtualBox version*

5.2.22

*Issue*

I created my own boxfile. Everything works fine until it wants to create
the /vagrant folder in root.
Tried different versions of VB and Vagrant, no difference.


*Console output*

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> 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: 8080 (guest) => 8080 (host) (adapter 1)
default: 8443 (guest) => 8443 (host) (adapter 1)
default: 9080 (guest) => 9080 (host) (adapter 1)
default: 9443 (guest) => 9443 (host) (adapter 1)
default: 3000 (guest) => 3000 (host) (adapter 1)
default: 3001 (guest) => 3001 (host) (adapter 1)
default: 9000 (guest) => 9000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: password
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /vagrant => C:/VM/update-vm-to-ubuntu18.04/dev-vm
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mkdir -p /vagrant

Stdout from the command:



Stderr from the command:


Vagrant file

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|

config.vm.box = "blank_ubuntu_18_4.box"
config.vm.box_url = "blank_ubuntu_18_4.box"
config.ssh.username="vagrant"
config.ssh.password="vagrant"

# jboss server port forwarding
# Nevis Simulator http
config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip:
"127.0.0.1", protocol: "tcp"
# Nevis Simulator https
config.vm.network "forwarded_port", guest: 8443, host: 8443, host_ip:
"127.0.0.1", protocol: "tcp"
# Jetty (Dropwizard) server port forwarding
# Nevis Simulator http
config.vm.network "forwarded_port", guest: 9080, host: 9080, host_ip:
"127.0.0.1", protocol: "tcp"
# Nevis Simulator https
config.vm.network "forwarded_port", guest: 9443, host: 9443, host_ip:
"127.0.0.1", protocol: "tcp"

# npm browser-sync and/or static server port forwaring
config.vm.network "forwarded_port", guest: 3000, host: 3000, host_ip:
"127.0.0.1", protocol: "tcp"
config.vm.network "forwarded_port", guest: 3001, host: 3001, host_ip:
"127.0.0.1", protocol: "tcp"
config.vm.network "forwarded_port", guest: 9000, host: 9000, host_ip:
"127.0.0.1", protocol: "tcp"
config.vm.provider "virtualbox" do |vb|
vb.name = "blank_ubuntu_18_4"
vb.gui = true
vb.cpus = 4
vb.memory = "20480"
vb.customize ["modifyvm", :id, "--vram", "128", "--paravirtprovider",
"kvm", "--accelerate3d", "off"]
end

config.vm.provision "file", source: "#{Dir.home}/.ssh/id_rsa",
destination: "/home/vagrant/id_rsa"
config.vm.provision "shell" do |s|
ssh_pub_key =
File.readlines("#{Dir.home}/.ssh/id_rsa.pub").first.strip
s.inline = <<-SHELL
SSH_DIR=/home/neo/.ssh
echo #{ssh_pub_key} > $SSH_DIR/id_rsa.pub
mv /home/vagrant/id_rsa $SSH_DIR
chown -R neo:neo $SSH_DIR
chmod 700 $SSH_DIR
chmod 600 $SSH_DIR/*
SHELL
end
end
--
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/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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/a42bc23e-ec2c-4c3f-97ef-feff2f8b1f4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...