vagrant up fails with cannot load winrm - vagrant

I am trying to run a Vagrant box with SQL Server for local development. I am running Fedora 23. The box in question is this.
vagrant up fails with the following error message:
/usr/share/vagrant/plugins/communicators/winrm/shell.rb:9:in `require':
cannot load such file -- winrm (LoadError)
I have tried to install winrm with gem install winrm, and it installs just fine, but vagrant still fails.
The following ruby script runs without errors:
require "winrm"
puts "hello world"
Does anyone know how to fix this?

The winrm and winrm-fs gems are not packaged with Fedora or Debian. You can run:
$ vagrant plugin install winrm
$ vagrant plugin install winrm-fs
(i.e. vagrant plugin install, not gem install).
Note: Using Vagrant version 1.8.1, the winrm gem failed to install and this fixed it:
$ vagrant plugin install winrm --plugin-version 1.8.1
$ vagrant plugin install winrm-fs

Had the same issue:
With Ubuntu Ubuntu 20.04.1 LTS running ruby 2.7.0p0 and Vagrant 2.2.6
The solution that worked for me -
$ vagrant plugin install winrm
$ vagrant plugin install winrm-fs
$ vagrant plugin install winrm-elevated (this additional error showed after the first two were installed)

Not sure what the problem was, but I fixed it by uninstalling vagrant with dnf, and installing the latest version from vagrantup.com. Seems winrm is included in the latest vagrant version.

Same resolution as here: https://groups.google.com/forum/#!topic/vagrant-up/mBYMUHm-YBI
So this is an issue with the Debian packaged version of Vagrant. Installing the DEB package from https://www.vagrantup.com/downloads.html works (both for 1.6.5 and 1.7+).
780036 has been raised with Debian to track this issue.

Related

The provider 'vmware_desktop' could not be found on macos m1

install both vagrant and vmware via homebrew
brew install --cask vagrant
brew install --cask vmware-fusion
verify that everything is installed
➜ ~ vmrun -T ws list
Total running VMs: 0
➜ ~ vagrant -v
Vagrant 2.3.0
set the default provider as vmware_desktop in my .zshrc (and "sourced" it)
export VAGRANT_DEFAULT_PROVIDER=vmware_desktop
initialize a folder and add a box following official get started
vagrant init hashicorp/bionic64
vagrant box add hashicorp/bionic64
and select the option 3) vmware_desktop
finally run vagrant up from the initialised folder and observe the error
The provider 'vmware_desktop' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.
Vagrant knows about the following providers: docker, hyperv, virtualbox
did I make some mistake in the setup
You miss to install the Vagrant VMWare plugin
First you need to install Vagrant VMware Utility
Then you can install the plugin
vagrant plugin install vagrant-vmware-desktop

Timed out when using vagrant plugin install command on windows

I am trying to install some vagrant plugins so I can create my local VM.
Here is what I got after executing vagrant plugin install vagrant-vbguest command.
I have also tried vagrant plugin install vagrant-vbguest --plugin-clean-sources --plugin-source https://rubygems.org command but I'm still getting the same error.
I also tried to install the plugin by specifying the path to the downloaded GEM file: https://www.vagrantup.com/docs/plugins/usage.html
I download the GEM file to /home/downloads/vagrant-vbguest.gem and then command vagrant plugin install /home/downloads/vagrant-vbguest.gem and still getting the same error.
What do you suggest as a solution guys?
Thank you,
I figured out the problem. There was some restrictions in my network. I just switched to another network and it worked fine.
first get the ipv4 address of rubygems.org with
ping rubygems.org
then try this:
vagrant plugin install <gem_plugin> --plugin-clean-sources --plugin-source https://<ip_address>

GuestAdditions version mismatch

when I use this command:
vagrant up
I obtain this error:
[machine1] GuestAdditions versions on your host (4.3.36) and guest (5.0.10) do not match.
how can I update guest addition from ubuntu shell?
Use the vagrant vbguest plugin
Install the plugin:
vagrant plugin install vagrant-vbguest
Let vagrant up it will install the virtual box client if needed.
If you want to force the installation you can run vagrant vbguest --do install
You need to upgrade your VBoxGuestAdditions ISO either by:
installing/upgrading the package by running:
sudo apt-get install virtualbox-guest-additions-iso
or by downloading ISO file from this Downloads page.
Example for macOS:
sudo wget -O /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso http://download.virtualbox.org/virtualbox/5.0.10/VBoxGuestAdditions_5.0.10.iso
where version of VBoxGuestAdditions (5.0.10) should match installed VirtualBox binaries.
See: How to upgrade to VirtualBox Guest Additions?
Consider also upgrading your VM box by:
vagrant box update
For Linux Ubuntu, also check this page: Setting up VirtualBox Guest Additions.

Vagrant plugin install failing

I'm trying to install the vagrant-hostmanager plugin, but the install keeps failing. Here's the error:
Applications/Vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/state_file.rb:47:in `save!': undefined method `sort!' for {}:Hash (NoMethodError)
Anyone else run into this?
I ran the vagrant uninstall script that comes with the vagrant 1.3.5 install and got the same error. Then I nuked the hidden $HOME/.vagrant.d directory and that did the trick.
For me, there's a showstopper bug in 1.4.0 in configuring networking on RHEL (and variants), so I had to downgrade my development workstations to 1.3.5 (until Vagrant 1.4.1 is released with a fix): https://github.com/mitchellh/vagrant/issues/2614)
Or you can be more selective by figuring out what the issue is:
~/.vagrant.d 06:08:58 516$ grep -R state_file gems/
gems//gems/bindler-0.1.3/lib/bindler/bend_vagrant.rb:require
Vagrant.source_root.join('plugins/commands/plugin/state_file').to_s
So in my case "bindler".
~/.vagrant.d 06:11:43 519$
vagrant plugin uninstall bindler Uninstalling the 'bindler' plugin...
~/.vagrant.d 06:12:39 520$ grep -R state_file gems/
All done!

Vagrant plugin command is not available when running `vagrant plugin install`

I have tried installing vagrant from both an apt repo and gem but here's the output I am getting when I try to run vagrant plugin install (clearly no plugin command in output):
Usage: vagrant [-v] [-h] command [<args>]
-v, --version Print the version and exit.
-h, --help Print this help.
Available subcommands:
box
destroy
gem
halt
init
package
provision
reload
resume
ssh
ssh-config
status
suspend
up
I have tried installing vagrant from both apt and Rubygems and in both cases I get no plugin command. I am running Ubuntu 12.04 LTS.
Install Vagrant from source.
The github repo is here: https://github.com/mitchellh/vagrant
And these instructions should allow you to build and install the bleeding edge version: https://github.com/mitchellh/vagrant/wiki/Installing-Vagrant-from-source
If you want the latest stable version then once you have cloned the repo as described in the link above you should checkout the 1.2.2 tag with git checkout v1.2.2 and then build that.

Resources