Summary
Using Vagrant with Virtualbox and Powershell 5.* I get a message while running any vagrant commands.
PS C:\Users\dharris\SparkleShare\vagrant-salt> vagrant up es-master
Vagrant failed to initialize at a very early stage:
The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.
Installed version: Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name
'AmsiInitFailed'.
Minimum required version: 3
I have tried updating Vagrant, Virtualbox, and Windows 10 to latest but issue persists. I have Downloaded and installed Powershell 7.2.0, but issue still persists.
Versions
Virtualbox: 6.1.30 r148432 (Qt5.6.2)
Vagrant: 2.2.19
Windows 10 Pro: 21H1 build 19043.1387
Powershell: 7.2.0
Debug info below:
PS C:\Users\dharris\SparkleShare\vagrant-salt> vagrant status --debug
INFO global: Vagrant version: 2.2.19
INFO global: Ruby version: 2.7.4
INFO global: RubyGems version: 3.1.6
INFO global: VAGRANT_EXECUTABLE="C:\\HashiCorp\\Vagrant\\embedded\\gems\\2.2.19\\gems\\vagrant-2.2.19\\bin\\vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="C:\\HashiCorp\\Vagrant\\embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/commands/autocomplete/plugin.rb
INFO manager: Registered plugin: autocomplete command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/commands/cap/plugin.rb
INFO manager: Registered plugin: cap command
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/commands/cloud/plugin.rb
INFO manager: Registered plugin: vagrant-cloud
... (Cut similar loading lines due to stackoverflow's body limit)
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/synced_folders/nfs/plugin.rb
INFO manager: Registered plugin: NFS synced folders
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/synced_folders/rsync/plugin.rb
INFO manager: Registered plugin: RSync synced folders
DEBUG global: Loading core plugin: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/synced_folders/smb/plugin.rb
INFO manager: Registered plugin: SMB synced folders
INFO vagrant: `vagrant` invoked: ["status", "--debug"]
DEBUG vagrant: Creating Vagrant environment
INFO environment: Environment initialized (#<Vagrant::Environment:0x0000024f428c8c58>)
INFO environment: - cwd: C:/Users/dharris/SparkleShare/vagrant-salt
INFO environment: Home path: C:/Users/dharris/.vagrant.d
DEBUG environment: Effective local data path: C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant
INFO environment: Local data path: C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant
DEBUG environment: Creating: C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant
DEBUG manager: Enabling localized plugins
INFO manager: Plugins:
INFO manager: - vagrant-vbguest = [installed: 0.30.0 constraint: > 0]
DEBUG solution_file: new solution file instance plugin_file=C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/plugins.json solution_file=C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/bundler/local.sol
DEBUG solution_file: reading solution file - C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/bundler/local.sol
DEBUG solution_file: solution validation check CHECKSUM acf0db25918a838e88442e6b0b4ae9290e70e78ed8c4f922188c13a886b0de24 <-> acf0db25918a838e88442e6b0b4ae9290e70e78ed8c4f922188c13a886b0de24 VERSION 2.2.19 <-> 2.2.19
DEBUG solution_file: loading solution dependency list
DEBUG solution_file: solution dependency list: [#<Gem::Resolver::DependencyRequest:0x0000024f42966598 #dependency=<Gem::Dependency type=:runtime name="log4r" requirements=">= 0">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f429662f0 #dependency=<Gem::Dependency type=:runtime name="concurrent-ruby" requirements="~> 1.0">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f429660c0 #dependency=<Gem::Dependency type=:runtime name="i18n" requirements=">= 0">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f42965c60 #dependency=<Gem::Dependency type=:runtime name="micromachine" requirements=">= 2, < 4">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f42965878 #dependency=<Gem::Dependency type=:runtime name="vagrant-vbguest" requirements="= 0.30.0">, #requester=nil>]
DEBUG bundler: solution file in use for init: <Vagrant::Bundler::SolutionFile:C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/plugins.json:C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/bundler/local.sol:valid>
DEBUG bundler: Generating new builtin set instance.
DEBUG bundler: Generating new plugin set instance. Skip gems - []
DEBUG bundler: Generating new plugin set instance. Skip gems - []
DEBUG bundler: loading cached solution set
DEBUG bundler: activating solution set
DEBUG bundler: Activating solution set: ["log4r-1.1.10", "concurrent-ruby-1.1.9", "i18n-1.8.11", "micromachine-3.0.0", "vagrant-vbguest-0.30.0"]
DEBUG bundler: Activating gem micromachine-3.0.0
DEBUG bundler: Activating gem vagrant-vbguest-0.30.0
INFO manager: Loading plugins...
INFO manager: Loading plugin `vagrant-vbguest` with default require: `vagrant-vbguest`
INFO manager: Registered plugin: vagrant-vbguest
DEBUG manager: Successfully loaded plugin `vagrant-vbguest`.
DEBUG manager: Enabling globalized plugins
INFO manager: Plugins:
INFO manager: - deep_merge = [installed: 1.2.1 constraint: > 0]
INFO manager: - vagrant-vbguest = [installed: 0.30.0 constraint: > 0]
DEBUG solution_file: new solution file instance plugin_file=C:/Users/dharris/.vagrant.d/plugins.json solution_file=C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/bundler/global.sol
DEBUG solution_file: reading solution file - C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/bundler/global.sol
DEBUG solution_file: solution validation check CHECKSUM 93daf05d7b66957da4fcfce1a1306b17d766fdfda4a897f8b1ad57958f5a8cec <-> 93daf05d7b66957da4fcfce1a1306b17d766fdfda4a897f8b1ad57958f5a8cec VERSION 2.2.19 <-> 2.2.19
DEBUG solution_file: loading solution dependency list
DEBUG solution_file: solution dependency list: [#<Gem::Resolver::DependencyRequest:0x0000024f425aa328 #dependency=<Gem::Dependency type=:runtime name="deep_merge" requirements="= 1.2.1">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f425aa0f8 #dependency=<Gem::Dependency type=:runtime name="log4r" requirements=">= 0">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f425a9e50 #dependency=<Gem::Dependency type=:runtime name="concurrent-ruby" requirements="~> 1.0">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f425a9bf8 #dependency=<Gem::Dependency type=:runtime name="i18n" requirements=">= 0">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f425a9720 #dependency=<Gem::Dependency type=:runtime name="micromachine" requirements=">= 2, < 4">, #requester=nil>, #<Gem::Resolver::DependencyRequest:0x0000024f425a9478 #dependency=<Gem::Dependency type=:runtime name="vagrant-vbguest" requirements="= 0.30.0">, #requester=nil>]
DEBUG bundler: solution file in use for init: <Vagrant::Bundler::SolutionFile:C:/Users/dharris/.vagrant.d/plugins.json:C:/Users/dharris/SparkleShare/vagrant-salt/.vagrant/bundler/global.sol:valid>
DEBUG bundler: Generating new builtin set instance.
DEBUG bundler: Generating new plugin set instance. Skip gems - []
DEBUG bundler: Generating new plugin set instance. Skip gems - []
DEBUG bundler: loading cached solution set
DEBUG bundler: activating solution set
DEBUG bundler: Activating solution set: ["deep_merge-1.2.1", "log4r-1.1.10", "concurrent-ruby-1.1.9", "i18n-1.8.11", "micromachine-3.0.0", "vagrant-vbguest-0.30.0"]
DEBUG bundler: Activating gem deep_merge-1.2.1
DEBUG bundler: Activating gem micromachine-3.0.0
DEBUG bundler: Activating gem vagrant-vbguest-0.30.0
INFO manager: Loading plugins...
INFO manager: Loading plugin `deep_merge` with default require: `deep_merge`
DEBUG manager: Successfully loaded plugin `deep_merge`.
INFO manager: Loading plugin `vagrant-vbguest` with default require: `vagrant-vbguest`
DEBUG manager: Successfully loaded plugin `vagrant-vbguest`.
INFO loader: Set :root = ["#<Pathname:C:/Users/dharris/SparkleShare/vagrant-salt/Vagrantfile>"]
DEBUG loader: Populating proc cache for #<Pathname:C:/Users/dharris/SparkleShare/vagrant-salt/Vagrantfile>
DEBUG loader: Load procs for pathname: C:/Users/dharris/SparkleShare/vagrant-salt/Vagrantfile
INFO loader: Loading configuration in order: [:home, :root]
DEBUG loader: Loading from: root (evaluating)
DEBUG loader: Configuration loaded successfully, finalizing and returning
DEBUG push: finalizing
INFO subprocess: Starting process: ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\/powershell.EXE", "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "Write-Output $PSVersionTable.PSVersion.Major"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: 5
DEBUG subprocess: stderr: Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the
name 'AmsiInitFailed'.
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 28
DEBUG subprocess: Exit status: 0
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::PowerShellInvalidVersion: The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.
Installed version: Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name
'AmsiInitFailed'.
Minimum required version: 3>
ERROR vagrant: The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.
Installed version: Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name
'AmsiInitFailed'.
Minimum required version: 3
ERROR vagrant: C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/util/powershell.rb:213:in `validate_install!'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/util/powershell.rb:113:in `execute_cmd'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/util/platform.rb:82:in `block in windows_admin?'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/util/platform.rb:84:in `windows_admin?'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/providers/hyperv/provider.rb:20:in `usable?'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:361:in `block in default_provider'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/registry.rb:49:in `block in each'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/registry.rb:48:in `each'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/registry.rb:48:in `each'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:347:in `default_provider'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:944:in `guess_provider'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:956:in `find_configured_plugins'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:984:in `process_configured_plugins'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:178:in `initialize'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `new'
C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `<main>'
Vagrant failed to initialize at a very early stage:
The version of powershell currently installed on this host is less than
the required minimum version. Please upgrade the installed version of
powershell to the minimum required version and run the command again.
Installed version: Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name 'AmsiInitFailed'.Cannot find a variable with the name 'AmsiContext'.Cannot find a variable with the name
'AmsiInitFailed'.
Minimum required version: 3
SentinelOne just sent an email out that might fix your issue.
The following needs to be added as a policy override:
{
"powershellProtection":false
}
Hopefully you can implement this and it resolved your issue.
EDIT:
I can't find the Release Notes, but here is a screenshot from the announcement email that our security guy sent to me:
There is a new Agent available 21.7.4.1043 (21.7 SP1) - Dec 9, 2021
Release Notes:
New and Improved in Windows Agent 21.7
21.7.4
General bug fixes, including resolving PowerShell module load errors.
Related
I thought I had found something that would make managing the /etc/resolv.conf file easy. https://galaxy.ansible.com/ahuffman/resolv but when I try to install this role as per the documentation like so ...
bash-3.2$ ansible-galaxy install ahuffman.resolv
I get this error ...
Starting galaxy role install process
[WARNING]: - ahuffman.resolv was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
I have never used ansible-galaxy before ... and probably won't ever again :(
Please help.
If I run with -vvvv I see this additional output:
ansible-galaxy 2.10.5
config file = None
configured module search path = ['/Users/red/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible
executable location = /Library/Frameworks/Python.framework/Versions/3.6/bin/ansible-galaxy
python version = 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
No config file found; using defaults
Starting galaxy role install process
Processing role ahuffman.resolv
Initial connection to galaxy_server: https://galaxy.ansible.com
Opened /Users/red/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
[WARNING]: - ahuffman.resolv was NOT installed successfully: Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
Running with --ignore-certs seems to have fixed the problem but the usage from anisble-galaxy does mention a --ignore-certs option:
usage: ansible-galaxy [-h] [--version] [-v] TYPE ...
Perform various Role and Collection related operations.
positional arguments:
TYPE
collection Manage an Ansible Galaxy collection.
role Manage an Ansible Galaxy role.
optional arguments:
--version show program's version number, config file location,
configured module search path, module location, executable
location and exit
-h, --help show this help message and exit
-v, --verbose verbose mode (-vvv for more, -vvvv to enable connection
debugging)
I already have installed JMeter 5.X, I don't know why bzt is trying to download it again.
I edited the .bzt-rc file. Provided path of installed JMeter. Below code from .bzt-rc file.
path: C:\001_team\apache-jmeter-5.2.1\bin # path to local jmeter installation ~/.bzt/jmeter-taurus/{version}/bin/jmeter
Didn't find a way to set the existing path of installed JMeter.
Tried ti use existing JMETER in cmd:
bzt -o modules.jmeter.path=C:\001_Team\apache-jmeter-5.2.1\bin InContact.jmx
C:\001_TeamPlatinum>bzt InContact.jmx
13:29:30 INFO: Taurus CLI Tool v1.14.1[0m
13:29:30 INFO: Starting with configs: ['C:\\Users\\teams\\AppData\\Local\\Temp\\jmx_u679qs83.json'][0m
13:29:30 INFO: Configuring...[0m
13:29:30 INFO: Artifacts dir: C:\001_Team\2020-02-21_13-29-30.812601[0m
13:29:30 INFO: Preparing...[0m
[33m13:29:31 WARNING: Failed to check for updates[0m
13:29:31 INFO: Will install JMeter into C:\Users\teams\.bzt\jmeter-taurus\5.2.1[0m
[31m13:29:31 ERROR: Can't fetch https://jmeter.apache.org/download_jmeter.cgi[0m
13:29:31 INFO: Downloading: https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.2.1.zip[0m
[31m13:29:32 ERROR: Error while downloading https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.2.1.zip: Unsuccessful download from https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.2.1.zip[0m
100% [ ] ETA: --:--:--
[31m13:29:32 ERROR: Internal Error: JMeter download failed: No more links to try[0m
13:29:32 INFO: Post-processing...[0m
13:29:32 INFO: Artifacts dir: C:\001_TeamPlatinum\2020-02-21_13-29-30.812601[0m
[33m13:29:32 WARNING: Done performing with code: 1[0m
This path setting must point to the root folder of your JMeter installation, not to the "bin" subfolder
So change your configuration to look like:
path: C:\001_team\apache-jmeter-5.2.1
or
bzt -o modules.jmeter.path=C:\001_Team\apache-jmeter-5.2.1
and Taurus should pick up your local JMeter installation.
References:
JMeter Location & Auto-Installation
Navigating your First Steps Using Taurus
I installed a vagrant plugin "vagrant-certificates" and added the following config to my ~/.vagrant.d/Vagrantfile
if !['plugin', 'box'].include? ARGV[0]
unless Vagrant.has_plugin?("vagrant-ca-certificates")
raise "Missing required plugin 'vagrant-certificates', run `vagrant plugin install vagrant-certificates`\n"
end
end
config.certificates.enabled = true
config.certificates.certs = Dir.glob('/home/myhomedirectory/.vagrant.d/*.crt')
and the plugin won't run. Other people that I know who are using that plugin get the following output when they run vagrant up:
==> machine: Uploading root certificates to guest instance...
==> machine: -- /var/folders/mb/1pt7p7zd4q736lq4vdq_309w0000gn/T/vagrant-certificates20200122-60457-
wop57o => /usr/share/ca-certificates/private/BA%20ROOT.crt
==> machine: -- /var/folders/mb/1pt7p7zd4q736lq4vdq_309w0000gn/T/vagrant-certificates20200122-60457-
3v8nhs => /usr/share/ca-certificates/private/BA%20NPE%20CA-3%281%29.crt
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
but I see no output related to certs:
and I'm getting an ssl error which indicates that the certs that I need have not been installed.
Can anybody help me debug this?
EDIT: Other ways I've tried to specify the certs:
config.certificates.certs = [
"./certROOT.crt",
"./certNPE_CA_3.crt"
]
config.certificates.certs = [
"http://pki.mycorp.org/certs/certROOT.crt",
"http://pki.mycorp.org/certs/certNPE_CA_3.crt"
]
EDIT 2: Output of vagrant up --debug 2>&1 >/dev/null | grep -i certificate
INFO manager: - vagrant-certificates = [installed: 2.0.0 constraint: > 0]
DEBUG bundler: Current generated plugin dependency list: [<Gem::Dependency type=:runtime name="vagrant-certificates" requirements="= 2.0.0">]
DEBUG bundler: Activating solution set: ["vagrant-certificates-2.0.0"]
DEBUG bundler: Activating gem vagrant-certificates-2.0.0
INFO manager: Loading plugin `vagrant-certificates` with default require: `vagrant-certificates`
INFO manager: Registered plugin: vagrant-certificates
DEBUG manager: Successfully loaded plugin `vagrant-certificates`.
INFO manager: - vagrant-certificates = [installed: 2.0.0 constraint: > 0]
DEBUG bundler: Current generated plugin dependency list: [<Gem::Dependency type=:runtime name="vagrant-certificates" requirements="= 2.0.0">]
DEBUG bundler: Activating solution set: ["vagrant-certificates-2.0.0"]
DEBUG bundler: Activating gem vagrant-certificates-2.0.0
INFO manager: Loading plugin `vagrant-certificates` with default require: `vagrant-certificates`
DEBUG manager: Successfully loaded plugin `vagrant-certificates`.
INFO warden: Calling IN action: #<VagrantPlugins::Certificates::Action::InstallCertificates:0x0000000002eea438>
INFO warden: Calling OUT action: #<VagrantPlugins::Certificates::Action::InstallCertificates:0x0000000002eea438>
DEBUG subprocess: stdout: fatal: [k8s-master]: FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate for packages.cloud.google.com:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificat
s/cacert.org, /etc/ansible. The exception msg was: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)."}
INFO interface: detail: fatal: [k8s-master]: FAILED! => {"changed": false, "msg": "Failed to validate the SSL certificate for packages.cloud.google.com:443. Make sure your managed systems have a valid CA certificate installed. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible. The exception msg was: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)."}
I have been using a vagrant setup with VirtualBox for two weeks now and it was working fine. Yesterday I tried to use vagrant and found that none of the commands work. They all result in an error with a callstack (in Ruby?).
I am using Windows 7 with VirtualBox 4.3.12 (because my corporate environment uses BeyondTrust and 4.3.12 was the only version I could get to work).
windows> vagrant status --debug
...
INFO manager: Registered plugin: SMB synced folders
INFO global: Loading plugins!
INFO manager: Registered plugin: vagrant-share
INFO vagrant: `vagrant` invoked: ["reload", "--debug"]
DEBUG vagrant: Creating Vagrant environment
INFO environment: Environment initialized (#<Vagrant::Environment:0x265c728>)
INFO environment: - cwd: C:/Users/Scott/hootenanny
INFO environment: Home path: C:/Users/Scott/.vagrant.d
INFO environment: Local data path: C:/Users/Scott/hootenanny/.vagrant
DEBUG environment: Creating: C:/Users/Scott/hootenanny/.vagrant
INFO environment: Running hook: environment_plugins_loaded
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 1 hooks defined.
INFO runner: Running action: environment_plugins_loaded #<Vagrant::Action::Builder:0x385ff50>
INFO environment: Running hook: environment_load
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 1 hooks defined.
INFO runner: Running action: environment_load #<Vagrant::Action::Builder:0x3731b38>
INFO cli: CLI: [] "reload" []
DEBUG cli: Invoking command class: VagrantPlugins::CommandReload::Command []
DEBUG command: 'reload' each target VM...
DEBUG command: Getting target VMs for command. Arguments:
DEBUG command: -- names: []
DEBUG command: -- options: nil
DEBUG command: Loading all machines...
INFO loader: Set :root = ["#<Pathname:C:/Users/Scott/hootenanny/Vagrantfile>"]
DEBUG loader: Populating proc cache for #<Pathname:C:/Users/Scott/hootenanny/Vagrantfile>
DEBUG loader: Load procs for pathname: C:/Users/Scott/hootenanny/Vagrantfile
INFO loader: Loading configuration in order: [:home, :root]
DEBUG loader: Loading from: root (evaluating)
DEBUG provisioner: Provisioner defined:
DEBUG provisioner: Provisioner defined:
DEBUG provisioner: Provisioner defined:
DEBUG loader: Configuration loaded successfully, finalizing and returning
DEBUG push: finalizing
INFO loader: Set "23533380_machine_default" = []
INFO loader: Loading configuration in order: [:home, :root, "23533380_machine_default"]
DEBUG loader: Loading from: root (cache)
DEBUG loader: Configuration loaded successfully, finalizing and returning
DEBUG push: finalizing
DEBUG base: Windows, checking for VBoxManage on PATH first
INFO base: VBoxManage path: C:/Program Files/Oracle/VirtualBox/VBoxManage.exe
INFO subprocess: Starting process: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "--version"]
INFO subprocess: Command not in installer, restoring original environment...
INFO environment: Running hook: environment_unload
INFO host: Autodetecting host type for [#<Vagrant::Environment: C:/Users/Scott/hootenanny>]
DEBUG host: Trying: arch
DEBUG host: Trying: darwin
DEBUG host: Trying: freebsd
DEBUG host: Trying: gentoo
DEBUG host: Trying: redhat
DEBUG host: Trying: slackware
DEBUG host: Trying: suse
DEBUG host: Trying: bsd
DEBUG host: Trying: linux
DEBUG host: Trying: null
DEBUG host: Trying: windows
INFO host: Detected: windows!
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 1 hooks defined.
INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x370c440>
C:/HashiCorp/Vagrant/embedded/gems/gems/childprocess-0.5.8/lib/childprocess/windows/handle.rb:12:in `open': Access is denied. (5) (ChildProcess::Error)
from C:/HashiCorp/Vagrant/embedded/gems/gems/childprocess-0.5.8/lib/childprocess/windows/process.rb:70:in `launch_process'
from C:/HashiCorp/Vagrant/embedded/gems/gems/childprocess-0.5.8/lib/childprocess/abstract_process.rb:82:in `start'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/subprocess.rb:122:in `block in execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/safe_chdir.rb:26:in `block (2 levels) in safe_chdir'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/safe_chdir.rb:25:in `chdir'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/safe_chdir.rb:25:in `block in safe_chdir'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/safe_chdir.rb:24:in `synchronize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/safe_chdir.rb:24:in `safe_chdir'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/subprocess.rb:121:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/subprocess.rb:22:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/base.rb:430:in `block in raw'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/base.rb:429:in `raw'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/base.rb:367:in `block in execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/retryable.rb:17:in `retryable'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/base.rb:362:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/meta.rb:159:in `block in read_version'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/retryable.rb:17:in `retryable'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/meta.rb:158:in `read_version'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/meta.rb:46:in `block in initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/meta.rb:41:in `synchronize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/driver/meta.rb:41:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/provider.rb:20:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/providers/virtualbox/provider.rb:20:in `usable?'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:381:in `block in default_provider'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:379:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:379:in `default_provider'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/plugin/v2/command.rb:174:in `block in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/plugin/v2/command.rb:210:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/plugin/v2/command.rb:210:in `block in with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/plugin/v2/command.rb:209:in `map'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/plugin/v2/command.rb:209:in `with_target_vms'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/commands/reload/command.rb:37:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/cli.rb:42:in `execute'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:302:in `cli'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:174:in `<main>'
I have tried:
1) Reinstall vagrant
2) Reinstall VirtualBox
3) Checking permissions in c:/users/scott/.vagrant.d
4) Checking permissions in c:/users/scott/hootenanny/.vagrant
Of course any help is appreciated.
Scott
You could try moving your Vagrant root install directory from C:\Hashicorp to a folder under your User directory ie. C:\Users\Scott\Hashicorp and see if that eliminates any of the issues you have with running. Occasionally IT gets overzealous and anything outside of the user directories get declared read only in case of viruses trying to take over the system.
You may want to see if there is an option to the installer to change the path, otherwise you will probably need to edit the registry entries and shortcuts to point to the new location, which also may require editing your path. If you have administrator access (I'd assume you do if you can uninstall updates) then you should be able to perform all of the above.
I removed all the latest Microsoft security updates for .NET and Windows and Vagrant started working again. They were dated 3/24/2016 on my machine. Then just as I was trying to learn more, the corporate machine I'm on reinstalled the updates. There is nothing I can do about that. My company uses Microsoft Windows 7 Enterprise and I really shouldn't be uninstalling their security updates as I am an engineer, not a system admin.
I hope this information helps someone else who was staring at the same Ruby callstack and wondering what to do.
I have also solved the problem by running Git bash as admin and calling vagrant up through that elevated console.
Thanks to codecomp, who replied on the similiar issue at https://laracasts.com/discuss/channels/servers/vagrant-up-failing-trying-to-add-to-hosts
I had this same problem and it turned out that I did not have VirtualBox installed. As soon as I installed virtualbox, this error disappeared and vagrant status worked as expected (I also am working on a machine which is encumbered by many enterprise security applications, which may be why vagrant did not give me a more helpful error message).
I know this doesn't help OP, but thought I'd share my experience for the next person that follows a google search to this page.
Getting the below error while installing graphite server using puppet
The pupet module installed for graphite
puppet module install dwerder-graphite
This is the content of graphite.pp
cat graphite.pp
The output
class {'graphite':
}
This the Command
puppet apply graphite.pp
The error what i received:
warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_group'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:97
warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_group'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:97
warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_user'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:103
warning: Scope(Class[Graphite::Params]): Could not look up qualified variable 'graphite::gr_web_user'; class graphite has not been evaluated at /etc/puppet/modules/graphite/manifests/params.pp:103
Failed to parse template graphite/opt/graphite/conf/carbon.conf.erb:
Filepath: /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb
Line: 459
Detail: undefined method `[]' for #<Puppet::Parser::Scope:0x7f82caef1e98>
at /etc/puppet/modules/graphite/manifests/config.pp:171 on node test
I'm running on RHEL
cat /etc/redhat-release
Red Hat Enterprise Linux Workstation release 6.4 (Santiago)
Where do you put file graphite.pp? Here is way to test the modules recommend by Puppetlabs.
If you puppet modules is /etc/puppet/modules, then create tests folder under it, and create graphite.pp, then add content in it:
include graphite
When you manually apply the change, run this command:
cd /etc/puppet/modules/tests
puppet apply --modulepath=/etc/puppet/modules graphite.pp