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

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.

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>

kubectl kudo plugin not working after install using brew in linux?

I have installed the kudo plugin on my Linux machine following the instructions in the Kudo CLI page using brew. But it throws error on execution,
user#factotum:~$ kubectl kudo
Error: unknown command "kudo" for "kubectl"
Run 'kubectl --help' for usage.
I tried to list the available plugins, but doesn't have any,
user#factotum:~$ kubectl plugin list
error: unable to find any kubectl plugins
Just installed to reproduce and seems works fine. Have you init it with kubectl kudo init as it mentioned in Install KUDO into your cluster?
My steps(Ubuntu 16.04, 4.15.0-1033-gcp):
$sudo apt install linuxbrew-wrapper
$brew update
$brew vendor-install ruby
$brew update
==> Migrating from Linuxbrew/brew to Homebrew/brew
Linuxbrew/brew has been merged into Homebrew/brew!
Linuxbrew/brew will no longer be updated.
Your git remote has been changed from
https://github.com/Linuxbrew/brew.git
to https://github.com/Homebrew/brew
See the blog post at https://brew.sh/2019/02/02/homebrew-2.0.0/
Already up-to-date.
$brew tap kudobuilder/tap
brew install kudo-cli
==> Downloading https://linuxbrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3.x86_64_linux.bottle.tar.gz
######################################################################## 100.0%
....
....
....
....
🍺 /home/bla/.linuxbrew/Cellar/kudo-cli/0.10.1: 5 files, 38.2MB, built in 6 seconds
==> `brew cleanup` has not been run in 30 days, running now...
==> Caveats
==> kubernetes-cli
Bash completion has been installed to:
/home/bla/.linuxbrew/etc/bash_completion.d
$ kubectl kudo init
$KUDO_HOME has been configured at /home/bla/.kudo
✅ installed crds
✅ installed service accounts and other requirements for controller to run
✅ installed kudo controller
Test:
$ kubectl kudo get instances
List of current installed instances in namespace "default":
.
$ kubectl kudo install redis
operator.kudo.dev/v1beta1/redis created
operatorversion.kudo.dev/v1beta1/redis-0.2.0 created
instance.kudo.dev/v1beta1/redis-instance created
$ kubectl plugin list
The following compatible plugins are available:
/home/bla/.linuxbrew/bin/kubectl-kudo
Hope it helps
Can you execute kubectl-kudo? A kubectl plugin is basically just a binary that starts with kubectl-.
So, check where brew installed the kudo binary and check your $PATH.
And you can use kubectl-kudo instead of kubectl kudo if the plugin mechanism doesn't work for some reason.
Did you remember to add the brew environment variables to your shell?
As pr https://brew.sh/ and their install-script https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh you need to add brew to your PATH among others.
OP is tagging bash here so adding this to your shell configuration file.
There will be slight variations based on what shell the user is running, bash, ksh, csh, tcsh.
# At the bottom of .bashrc or .bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Vagrant r10k not installing modules from PuppetFile Windows 10

I run Vagrant under Windows 10, provisioning it with puppets. I need some modules from forge, so I've added Puppet file and installed vagrant r10k plugin with vagrant plugin install vagrant-r10k
First, I tried puppet modules, so my Puppetfile looked like:
forge 'http://forge.puppetlabs.com'
mod 'stankevich/python'
mod 'saz/locales'
I had to install vagrant plugin puppet as well with vagrant plugin install puppet . However, when I run vagrant up mymachine I get:
==> mymachine: vagrant-r10k: Beginning r10k deploy of puppet modules into c:/test/puppet/vendor using c:/test/puppet/Puppetfile
INFO -> Loading modules from Puppetfile into queue
INFO -> Deploying locales into c:/test/puppet/vendor
ERROR -> Task #<R10K::Task::Module::Sync:0x5afab00> failed while running: Permission denied - puppet module --modulepath c:/test/puppet/vendor --color false install --force saz/locales
INFO -> Deploying python into c:/test/puppet/vendor
ERROR -> Task #<R10K::Task::Module::Sync:0x5afab30> failed while running: Permission denied - puppet module --modulepath c:/test/puppet/vendor --color false install --force stankevich/python
RuntimeError: Permission denied - puppet module --modulepath c:/test/puppet/vendor --color false install --force saz/locales
Not giving up, I tried to use repositories instead, so my Puppetfile looks like:
mod 'locales',
:git => "https://github.com/saz/puppet-locales.git"
mod 'python',
:git => "https://github.com/stankevich/puppet-python.git"
This time, I get:
==> mymachine: Invalid syntax in Puppetfile at c:/test/puppet/Puppetfile
NilClass:
I run everything from command line, tried both normal and administrator mode. Vagrant version: 1.8.6
Ok, so if anyone has such problem:
Install the newest version of Vagrant
Find gem inside Vagrant path (usually c:\HashiCorp\Vagrant\embedded\bin>)
Follow steps given here: http://guides.rubygems.org/ssl-certificate-update/
Install plugins as given in question.

vagrant up fails with cannot load winrm

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.

Resources