hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

C:\vagrant not accessible after vagrant up on Windows Server 2016 #8537

Closed sngz closed 7 years ago

sngz commented 7 years ago

Please note that the Vagrant issue tracker is reserved for bug reports and enhancements. For general usage questions, please use the Vagrant mailing list: https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Vagrant version

1.9.2

Host operating system

Windows 7

Guest operating system

VirtualBox with Windows Server 2016 Standard

Vagrantfile

# Copy-paste your Vagrantfile here
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.

Vagrant.configure(2) do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "jacqinthebox/windowsserver2016"
  #config.vm.box_version = ">= 1.0.0.0"
  config.vm.box_download_insecure = true

  config.vm.guest = :windows
  config.vm.communicator = "winrm"

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  # config.vm.network "forwarded_port", guest: 80, host: 8080

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  # config.vm.synced_folder "../data", "/vagrant_data"

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
   config.vm.provider "virtualbox" do |vb|
     # Display the VirtualBox GUI when booting the machine
     vb.gui = true
     vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
     #
     # Customize the amount of memory on the VM:
     vb.memory = "4096"
     # Machine name
     vb.name = "sng.dev.win.2016.standard"
   end

   config.vm.provider "virtualbox" do |v|
    v.customize ["modifyvm", :id, "--vram", "256"]
   end
  #
  # View the documentation for the provider you are using for more
  # information on available options.

  # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  # such as FTP and Heroku are also available. See the documentation at
  # https://docs.vagrantup.com/v2/push/atlas.html for more information.
  # config.push.define "atlas" do |push|
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  # end

  # Enable provisioning with a shell script. Additional provisioners such as
  # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  # documentation for more information about their specific syntax and use.
  # config.vm.provision "shell", inline: <<-SHELL
  #   sudo apt-get update
  #   sudo apt-get install -y apache2
  # SHELL

  #config.vm.provision "shell", path: "scripts/configure-package-management.ps1"
  #config.vm.provision "shell", path: "scripts/fix-corrupt-windows-image.ps1"
  #config.vm.provision "shell", path: "scripts/provision-development-tools.ps1"
  #config.vm.provision "shell", path: "scripts/configure-pull-rcrp.ps1"

  config.vm.provision "chef_zero" do |chef|
    chef.channel = "stable"
    chef.cookbooks_path = "cookbooks"
    chef.nodes_path = "nodes"
    chef.add_recipe "iis"
    chef.add_recipe "web_server::create_app_user"
    chef.add_recipe "web_server::enable_state_service"
    chef.add_recipe "ms_dotnet35"
    chef.add_recipe "ms_dotnet46"
  end

end

Please note, if you are using Homestead or a different Vagrantfile format, we may be unable to assist with your issue. Try to reproduce the issue using a vanilla Vagrantfile first.

Debug output

N/A

Expected behavior

When trying to access C:\vagrant in guest machien it should open up the shared folder

Actual behavior

Location is not available pop up appears. C;\vagrant is not accessible. The network path was not found.

Steps to reproduce

  1. vagrant up with vagrantfile provided
  2. try to access C:\vagrant

References

none that i could find

chrisroberts commented 7 years ago

Please provide the debug output from a vagrant up. My guess is that guest additions are not available within the box but need the debug output to confirm.

sngz commented 7 years ago

seems like that was the issue, i thought the box I used had it preinstalled for some reason

degan93 commented 6 years ago

@sngz Can you please provide details on how you got it to work?

sngz commented 6 years ago

@degan93 as mentioned by @chrisroberts guest additions was not installed.

degan93 commented 6 years ago

@sngz thank you for your quick reply. What guest additions are you talking about? May I ask what you done to the box file to get the SMB connection to work?

sngz commented 6 years ago

@degan93 virtualbox guest additions

degan93 commented 6 years ago

@sngz my apologies, I have misread this. My issue is with connecting to an EC2 instance.

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.