I want to run a basic Windows guest on OSX with Vagrant, but I keep getting authentication failures - windows

I'm trying to run a Windows 10 guest on an OSX host.
I've installed the latest versions of Vagrant, VirtualBox. I set up a very basic Vagrantfile as follows:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "Microsoft/EdgeOnWindows10"
config.vm.box_version = "1.0"
end
When I try to start Vagrant by executing "vagrant up", I get the following console output which ends with a neverending series of Authentication failure error messages.
TCR-C02X29QPJHC9:automation salimfadhley$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'Microsoft/EdgeOnWindows10'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'Microsoft/EdgeOnWindows10' version '1.0' is up to date...
==> default: Setting the name of the VM: automation_default_1548152471264_36082
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
I don't need Edge - I just need Windows and possibly some dot-Net runtimes. I'd like to get started by getting any Windows image up and running.

You probably just need to use the following in your Vagrantfile:
config.vm.communicator = "winrm"
This option is described here, and you can further configure winrm with the settings listed here.

Related

Error when Launching a vagrant box using "vagrant up" on Windows

I'm attempting to set a virtual machine enviroment using vagrant.
I've done a couple of tries with different boxes via vagrantcloud.com, BUT I'm always getting stuck when I try to launch this box: I added a URL on vagrant file for downloads https://app.vagrantup.com/ubuntu/boxes/trusty64, but i doesnt seem to work
λ vagrant init x9 ubuntu/boxes/bionic64
λ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
default: Box 'x9' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
default: Box file was not detected as metadata. Adding it directly... default: Adding box 'x9' (v0) for provider: virtualbox
default: Downloading: https://app.vagrantup.com/ubuntu/boxes/bionic64
default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Failed to connect to app.vagrantup.com port 443: Timed out
Anyone knows how do I proceed ?
it's normal it cannot find this box if you haven't downloaded it yet.
I tried and it works perfect, it downloads and start the box, i share you my basic config (which is what i tested)
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
end
This is my output:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/bionic64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/bionic64'
default: URL: https://vagrantcloud.com/ubuntu/bionic64
==> default: Adding box 'ubuntu/bionic64' (v20200304.0.0) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/ubuntu/boxes/bionic64/versions/20200304.0.0/providers/virtualbox.box
==> default: Box download is resuming from prior download progress
default: Download redirected to host: cloud-images.ubuntu.com
==> default: Successfully added box 'ubuntu/bionic64' (v20200304.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/bionic64' version '20200304.0.0' is up to date...
==> default: Setting the name of the VM: amos_default_1583767787636_71616
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
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: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.2.34
default: VirtualBox Version: 6.1
==> default: Mounting shared folders...
default: /vagrant => /home/amos
The only possible explanation is that you have bad internet connection...try to do a speed test here:
https://www.speedtest.net/
if you have bad connection try restart your modem or contact your internet provider

Getting Started with Openshift using Vagrant

I wanted to stand up a local instance of Openshift, but vagrant up doesn't finish.
I downloaded cdk-2.2.0.zip and rhel-cdk-kubernetes-7.2-29.x86_64.vagrant-virtualbox.box from developers.redhat.com.
Running vagrant up after installation gets stuck at Configuring and enabling network interfaces...:
me:~/cdk/components/rhel/rhel-ose $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'cdkv2'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: rhel-ose_default_1476736433516_4922
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
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: private key
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Registering box with vagrant-registration...
default: Would you like to register the system now (default: yes)? [y|n]y
default: username: me#email.com
default: password:
==> default: Registration successful.
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...
Any ideas how to troubleshoot this? Not sure if it's vagrant or the VM or something else.
Thank you for your time!
Same happened to me but after updating Vagrant to 1.9.1 version the problem was solved.
I am using OSX but it might be the same for all others OS.
the easiest is to install the vagrant vbguest plugin and let it install and configure the Virtual Box Guest Addition for the right version of your VirtualBox

vagrant - The capability 'nfs_mount' could not be found

The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
Cmd
C:\var\www\cc-dev-env>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> 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: Adapter 2: hostonly
==> default: Forwarding ports...
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: private key
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.36
default: VirtualBox Version: 5.0
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: 192.168.100.100 cc.dev
==> default: Mounting NFS shared folders from guest...
The capability 'nfs_mount' could not be found. This is an internal error
that users should never see. Please report a bug.
I am using
Windows 10 64-bit
Vagrant 1.8.1
vagrant-hostsupdater (1.0.2)
vagrant-nfs_guest (0.1.8)
vagrant-share (1.1.5, system)
vagrant-winnfsd (1.1.0)
Of course I would like to not see this error and see the VM that I am trying to boot open.

Can't see the NFS shared directory in Vagrant

I try to create an NFS share directory in the vagrant box, but for some reasons I can not see the shared directory when I login to the box via ssh.
This is my Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.synced_folder "./shared", "/st/data", :nfs => true
config.vm.network "private_network", ip: "192.168.33.10"
end
Vagrant reload output:
vagrant reload
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> 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: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> 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: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
GuestAdditions 5.0.6 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
==> default: Mounting shared folders...
default: /vagrant => /Users/stk/Documents/vagrant
==> default: Check for insecure vagrant key: OK (not present)
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
After vagrant ssh I can't see any nfs directory.
vagrant -v
Vagrant 1.7.4
OSX:
10.10.3
I tried most of the solutions mentioned here, but still no luck.

Vagrant Omnibus Plugin Not Working on My Windows 7 PC

I want to spin up a Fedora-20 VM using Vagrant and Chef on my Windows 7 PC and provision it as a LAMP server. I have Vagrant 1.6.5. and the vagrant-omnibus plugin (1.4.1) is installed.
My Vagrantfile includes the "config.omnibus.chef_version = :latest" statement, but after running "vagrant up", expected provisioning does not occur. Instead,
==> default: Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.
It appears that the omnibus plugin did not install Chef on the VM. What else do I need to do to get this working on my PC?
This is my Vagrant file:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "chef/fedora-20"
config.omnibus.chef_version = :latest
config.vm.network "forwarded_port", guest: 80, host: 4567
config.vm.synced_folder "shared-files", "/var/www"
config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "chef-recipes/cookbooks"
chef.roles_path = "chef-recipes/roles"
chef.add_role "lamp_stack"
end
end
and here is STDOUT:
C:\Users\wbj\f20>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'chef/fedora-20'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'chef/fedora-20' is up to date...
==> default: Setting the name of the VM: f20_default_1413836754304_46591
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 => 4567 (adapter 1)
default: 22 => 2222 (adapter 1)
==> 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: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
default: /var/www => C:/Users/wbj/f20/shared-files
default: /vagrant => C:/Users/wbj/f20
default: /tmp/vagrant-chef-3/chef-solo-2/roles => C:/Users/wbj/f20/chef-recipes/roles
default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => C:/Users/wbj/f20/chef-recipes/cookbooks
==> default: Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.
Thank you!
I ran into this exact problem. The solution was to downgrade to Vagrant 1.6.2 until Vagrant version 1.7.1 was released. Both versions fixed the problem for me.

Resources