6

I’m trying to load a VM via Vagrant. It’s my first time attempting anything like this.

I'm using Windows 10 64bit and trying to run my MS Server 2016 standard.

I created a new VM in VirtualBox and added MS2016 standard.

I have created a box.

From Powershell (as admin), I type in vagrant up and the problem is I get the following error message

SSH auth method: password

The VM still loads, and I can CTRL ALT DELETE and log in fine. However, the powershell window doesn't progress from the message above

Now this is quite well documented on StackOverflow and GitHub but all the posts about this are very old. And, my issue is not solved by what I've read, which I'll try to cover here without boring you with a massive list.

And they come down to enable VT-X and ensure network path https://superuser.com/a/1051626/293658 shows I need to enabled VT-X (which I have) but disable Virtualisation in the BIOS. I don’t have the option to disable Virtualisation in the BIOS on my ASUS p8z77-v motherboard

https://www.vagrantup.com/docs/boxes/base.html provides what I need to do for Windows, which I have done:

  • Turn off UAC (including registry edit)
  • Disable complex passwords
  • Disable "Shutdown Tracker"
  • Disable "Server Manager" starting at login (for non-Core)

On my computer, I disabled all anti virus and firewall stuff.

The only point I can think of is, I didn't provide Vagrant any username/password details but the admin on the virtual machine is (user) vagrant and (password) vagrant

I also tried using the VagrantFile as many complain about the network cable so my VagrantFile is

Vagrant.configure("2") do |config|

   config.vm.provider "virtualbox" do |vb|
     vb.gui = true
     config.ssh.username = "vagrant"
     config.ssh.password = "vagrant"
     config.ssh.insert_key = false
     vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
   end

  config.vm.provision 'Task', :type => 'shell', :path => "Task.ps1", :powershell_elevated_interactive => false

end

When the VM boots via Vagrant , this is the bottom toolbar to show that all parts are "working"

enter image description here

If I go to Control Panel -> Programs and Software and choose from the menu on left Turn on or Turn off Windows functions it shows Hyper-V is not enabled

Why does it not log into my Windows Desktop?

VirtualBox version 5.2.8
Vagrant version 2.0.2

7
  • Are you on Ubuntu?
    – harrymc
    Mar 2, 2018 at 11:05
  • @harrymc, updated. I'm running Win10 64bit and trying to run W2016 64bit in a VM Mar 2, 2018 at 11:26
  • 1
    I don't use Vagrant under Windows, but have you put the Vagrant public key found in github.com/mitchellh/vagrant/tree/master/keys, file vagrant.pub, in the folder .ssh/authorized_keys or its equivalent under Windows? See section "vagrant" User in vagrantup.com/docs/boxes/base.html.
    – harrymc
    Mar 2, 2018 at 18:51
  • I have no idea where this folder is and have been looking since yesterday :( @harrymc Mar 4, 2018 at 11:45
  • Look for a folder named authorized_keys . If not found let me know your SSH distribution.
    – harrymc
    Mar 4, 2018 at 15:02

3 Answers 3

0

SSH is not included in the Windows Installer. You need "ssh.exe" in your Windows path on the vagrant box.

On the vagrant box:

  1. Install Git http://git-scm.com/downloads
  2. You want to select "Use Git and optional Unix tools from the Windows Command Prompt".

SOURCE: http://tech.osteel.me/posts/2015/01/25/how-to-use-vagrant-on-windows.html

1
  • Your source has this error message for the absence of ssh : "'ssh` executable not found in any directories". The poster is getting an error message from ssh.
    – harrymc
    Mar 7, 2018 at 7:26
0

You need to put the Vagrant public key found in github, file name vagrant.pub, in the SSH folder of authorized_keys.

See the section "vagrant" User in the Vagrant documentation.

Under Linux this folder is in .ssh/authorized_keys and under Windows in C:\Users\vagrant\.ssh\authorized_keys,

0

My experience:

  • halt did not work
  • change different Vagrantfile options did not work
  • destroy did not work
  • try a different VM box did not work

Restarting Windows 10 did it... I should have imagined it!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .