GithubHelp home page GithubHelp logo

vagrant-vsphere's Introduction

Build Status Gem Version

Vagrant vSphere Provider

This is a Vagrant 1.6.4+ plugin that adds a vSphere provider to Vagrant, allowing Vagrant to control and provision machines using VMware. New machines are created from virtual machines or templates which must be configured prior to using this provider.

This provider is built on top of the RbVmomi Ruby interface to the vSphere API.

Level of Support

This repository is not actively supported by NSIDC but we welcome issue submissions and pull requests in order to foster community contribution.

See the LICENSE for details on permissions and warranties. Please contact [email protected] for more information.

Requirements

  • Vagrant 1.6.4+
  • VMware with vSphere API
  • Ruby 1.9+
  • libxml2, libxml2-dev, libxslt, libxslt-dev

Current Version

version: 1.13.5

vagrant-vsphere (version: 1.13.5) is available from RubyGems.org

Installation

Install using standard Vagrant plugin method:

vagrant plugin install vagrant-vsphere

This will install the plugin from RubyGems.org.

Alternatively, you can clone this repository and build the source with gem build vSphere.gemspec. After the gem is built, run the plugin install command from the build directory.

Potential Installation Problems

The requirements for Nokogiri must be installed before the plugin can be installed. See the Nokogiri tutorial for detailed instructions.

The plugin forces use of Nokogiri ~> 1.5 to prevent conflicts with older versions of system libraries, specifically zlib.

Usage

After installing the plugin, you must create a vSphere box. The example_box directory contains a metadata.json file that can be used to create a dummy box with the command:

tar cvzf dummy.box ./metadata.json

This can be installed using the standard Vagrant methods or specified in the Vagrantfile.

After creating the dummy box, make a Vagrantfile that looks like the following:

Vagrant.configure("2") do |config|
  config.vm.box = 'dummy'
  config.vm.box_url = './example_box/dummy.box'

  config.vm.provider :vsphere do |vsphere|
    vsphere.host = 'HOST NAME OF YOUR VSPHERE INSTANCE'
    vsphere.compute_resource_name = 'YOUR COMPUTE RESOURCE'
    vsphere.resource_pool_name = 'YOUR RESOURCE POOL'
    vsphere.template_name = '/PATH/TO/YOUR VM TEMPLATE'
    vsphere.name = 'NEW VM NAME'
    vsphere.user = 'YOUR VMWARE USER'
    vsphere.password = 'YOUR VMWARE PASSWORD'
  end
end

And then run vagrant up --provider=vsphere.

Custom Box

The bulk of this configuration can be included as part of a custom box. See the Vagrant documentation and the Vagrant AWS provider for more information and an example.

Supported Commands

Currently the only implemented actions are up, halt, reload, destroy, and ssh.

up supports provisioning of the new VM with the standard Vagrant provisioners.

Configuration

This provider has the following settings, all are required unless noted:

  • host - IP or name for the vSphere API
  • insecure - Optional verify SSL certificate from the host
  • user - user name for connecting to vSphere
  • password - password for connecting to vSphere. If no value is given, or the value is set to :ask, the user will be prompted to enter the password on each invocation.
  • data_center_name - Optional datacenter containing the computed resource, the template and where the new VM will be created, if not specified the first datacenter found will be used
  • compute_resource_name - Required if cloning from template the name of the host or cluster containing the resource pool for the new VM
  • resource_pool_name - the resource pool for the new VM. If not supplied, and cloning from a template, uses the root resource pool
  • clone_from_vm - Optional use a virtual machine instead of a template as the source for the cloning operation
  • template_name - the VM or VM template to clone (including the full folder path)
  • vm_base_path - Optional path to folder where new VM should be created, if not specified template's parent folder will be used
  • name - Optional name of the new VM. If missing, the name will be auto-generated
  • customization_spec_name - Optional customization spec for the new VM
  • data_store_name - Optional the datastore where the VM will be located
  • linked_clone - Optional link the cloned VM to the parent to share virtual disks
  • proxy_host - Optional proxy host name for connecting to vSphere via proxy
  • proxy_port - Optional proxy port number for connecting to vSphere via proxy
  • vlan - Optional vlan to connect the first NIC to
  • memory_mb - Optional Configure the amount of memory (in MB) for the new VM
  • cpu_count - Optional Configure the number of CPUs for the new VM
  • mac - Optional Used to set the mac address of the new VM
  • cpu_reservation - Optional Configure the CPU time (in MHz) to reserve for this VM
  • mem_reservation - Optional Configure the memory (in MB) to reserve for this VM
  • addressType - Optional Configure the address type of the vSphere Virtual Ethernet Card
  • custom_attribute - Optional Add a custom attribute to the VM upon creation. This method takes a key/value pair, e.g. vsphere.custom_attribute('timestamp', Time.now.to_s), and may be called multiple times to set different attributes.
  • extra_config - Optional A hash of extra configuration values to add to the VM during creation. These are of the form {'guestinfo.some.variable' => 'somevalue'}, where the key must start with guestinfo.. VMs with VWware Tools installed can retrieve the value of these variables using the vmtoolsd command: vmtoolsd --cmd 'info-get guestinfo.some.variable'.
  • notes - Optional Add arbitrary notes to the VM
  • real_nic_ip - Optional true/false - Enable logic that forces the acquisition of the ssh IP address for a target VM to be retrieved from the list of vm adapters on the host and filtered for a single legitimate adapter with a defined interface. An error will be raised if this filter is enabled and multiple valid adapters exist on a host.
  • ip_address_timeout - Optional Maximum number of seconds to wait while an IP address is obtained
  • wait_for_sysprep - Optional Boolean. Enable waiting for Windows machines to reboot during the sysprep process (#199). Defaults to false.

Cloning from a VM rather than a template

To clone from an existing VM rather than a template, set clone_from_vm to true. If this value is set, compute_resource_name and resource_pool_name are not required.

Template_Name

  • The template name includes the actual template name and the directory path containing the template.
  • For example: if the template is a directory called vagrant-templates and the template is called ubuntu-lucid-template the template_name setting would be:
vsphere.template_name = "vagrant-templates/ubuntu-lucid-template"

Vagrant Vsphere Screenshot

VM_Base_Path

  • The new vagrant VM will be created in the same directory as the template it originated from.
  • To create the VM in a directory other than the one where the template was located, include the vm_base_path setting.
  • For example: if the machines will be stored in a directory called vagrant-machines the vm_base_path would be:
vsphere.vm_base_path = "vagrant-machines"

Vagrant Vsphere Screenshot

Setting a static IP address

To set a static IP, add a private network to your vagrant file:

config.vm.network 'private_network', ip: '192.168.50.4'

The IP address will only be set if a customization spec name is given. The customization spec must have network adapter settings configured with a static IP address(just an unused address NOT the address you want the VM to be). The config.vm.network line will overwrite the ip in the customization spec with the one you set. For each private network specified, there needs to be a corresponding network adapter in the customization spec. An error will be thrown if there are more networks than adapters.

Auto name generation

The name for the new VM will be automagically generated from the Vagrant machine name, the current timestamp and a random number to allow for simultaneous executions.

This is useful if running Vagrant from multiple directories or if multiple machines are defined in the Vagrantfile.

Setting addressType for network adapter

This sets the addressType of the network adapter, for example 'Manual' to be able to set a manual mac address. This value may depend on the version of vSphere you use. It may be necessary to set this in combination with the mac field, in order to set a manual mac address. For valid values for this field see VirtualEthernetCard api documentation of vSphere.

vsphere.addressType = 'Manual'

Setting the MAC address

To set a static MAC address, add a vsphere.mac to your Vagrantfile. In some cases you must also set vsphere.addressType (see above) to make this work:

vsphere.mac = '00:50:56:XX:YY:ZZ'

Take care to avoid using invalid or duplicate VMware MAC addresses, as this can easily break networking.

Troubleshooting

vCenter

ESXi is not supported. Make sure to connect to a vCenter server and not directly to an ESXi host. ESXi vs vCenter

Permissions

If you have permission issues:

  1. give the connecting user read only access to everything, and full permission to a specific data center. Narrow the permissions down after a VM is created.
  2. Be sure the path to the VM is correct. see the "Template_Name" screenshots above for more information.

Example Usage

FILE: Vagrantfile

VAGRANT_INSTANCE_NAME   = "vagrant-vsphere"

Vagrant.configure("2") do |config|
  config.vm.box     = 'vsphere'
  config.vm.box_url = 'https://vagrantcloud.com/ssx/boxes/vsphere-dummy/versions/0.0.1/providers/vsphere.box'

  config.vm.hostname = VAGRANT_INSTANCE_NAME
  config.vm.define VAGRANT_INSTANCE_NAME do |d|
  end

  config.vm.provider :vsphere do |vsphere|
    vsphere.host                  = 'vsphere.local'
    vsphere.name                  = VAGRANT_INSTANCE_NAME
    vsphere.compute_resource_name = 'vagrant01.vsphere.local'
    vsphere.resource_pool_name    = 'vagrant'
    vsphere.template_name         = 'vagrant-templates/ubuntu14041'
    vsphere.vm_base_path          = "vagrant-machines"

    vsphere.user     = 'vagrant-user@vsphere'
    vsphere.password = '***************'
    vsphere.insecure = true

    vsphere.custom_attribute('timestamp', Time.now.to_s)
  end
end

Vagrant Up

vagrant up --provider=vsphere

Vagrant SSH

vagrant ssh

Vagrant Destroy

vagrant destroy

Version History

See CHANGELOG.md.

Contributing

See DEVELOPMENT.md.

License

The Vagrant vSphere Provider is licensed under the MIT license. See LICENSE.

Code of Conduct

See Code of Conduct.

Credit

This software was developed by the National Snow and Ice Data Center with funding from multiple sources.

vagrant-vsphere's People

Contributors

agrauch avatar bby-bishopclark avatar dataplayer avatar davidhrbac avatar devokun avatar flamingbear avatar gregdomjan avatar henrysher avatar highsineburgh avatar icnocop avatar jkovarik avatar jmartin-tech avatar jwfuller avatar metrix78 avatar mfisher87 avatar michaeljb avatar mikola-spb avatar mkuzmin avatar mlaxer88 avatar niyue avatar olegz-alertlogic avatar parndt avatar rylarson avatar scoop avatar sei-eschwartz avatar sharpie avatar steenhulthin avatar taliesins avatar tim95030 avatar wwestenbrink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vagrant-vsphere's Issues

How to add a box for vagrant-vsphere

I am totally new to vagrant with vsphere and i am following the link
https://github.com/nsidc/vagrant-vsphere to work with vagrant-vsphere

I am using the vagrant command

vagrant box add vsphere https://github.com/nsidc/vagrant-vsphere

to add the vsphere box and getting error

==> box: Adding box 'vsphere' (v0) for provider:
box: Downloading: https://github.com/nsidc/vagrant-vsphere
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

Please help me out
Thanks
Sooraj

Support for SDRS

[Feature request]
Storage DRS uses a different API than the usual route - CloneVM() will always fail. Instead, one has to get a Storage Recommendation, and then apply it. Additionally, you have to identify a StoragePod; the datastore config item could be used for this.

In a private fork, we've successfully implemented support for SDRS; I'm working with the owners of the work to get it explore getting it contributed. In the meantime, I thought I'd open this issue to gauge interest.

Unable to set static ip address using vagrant-vshpere

I am unable to set static IP address using this plugin. I have the template in vSphere [a vCenter template] and it is a SUSE linux . The VM boots up properly, but IP address does not gets correctly assigned.

The contents of my Vagrantfile looks something like this:

Vagrant.configure("2") do |config|
config.vm.box = 'dummy'
config.vm.box_url = './example_box/dummy.box'

config.vm.provider :vsphere do |vsphere , override|
override.vm.network 'private_network' , ip: 'xxx.xxx.xxx.xxx'
vsphere.customization_spec_name = '<My_Customization_Specification_Manager_In_vSphere>'
end

config.vm.provider :vsphere do | vsphere |
vsphere.host = 'xxx.xxx.xxx.xxx'
vsphere.data_center_name = 'My_DataCenter_Name'
vsphere.data_store_name = 'My_Store_Name'
vsphere.template_name = 'Template_Name_In_vSphere'
vsphere.name = 'Name_Of_The_VM'
vsphere.user = ''
vsphere.password = ''
vsphere.insecure = true
vsphere.compute_resource_name = 'xxx.xxx.xxx.xxx'
end

I have also made the necessary settings in the Customization Specification Manager part in vShpere. When i see the virtual machine in the console, it fails to bring up the eth0 on the machine.

Configured compute resource not found

Here's my Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = 'dummy.box'

  config.vm.provider :vsphere do |vsphere|
    vsphere.host = 'vcprodsrv1.***.com'
    vsphere.compute_resource_name = 'esxpsrv5.***.com'
    vsphere.template_name = '***/chefnode'
    vsphere.name = 'vagranttest'
    vsphere.user = 'vagrantadmin'
    vsphere.password = '***'
    vsphere.insecure = true
  end
end

When I run vagrant up --provider=vsphere --debug, I get this:

ERROR warden: Error occurred: Configured compute resource not found
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: Configured compute resource not found
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: Configured compute resource not found
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x007f9040f42900>
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO environment: Released process lock: machine-action-81dbdd568f1311ee6fcc6756033d00fd
 INFO environment: Running hook: environment_unload
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x007f9040ee4878>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: Configured compute resource not found>
ERROR vagrant: Configured compute resource not found
ERROR vagrant: /home/user/.vagrant.d/gems/gems/vagrant-vsphere-0.13.0/lib/vSphere/util/vim_helpers.rb:18:in `get_resource_pool'
/home/user/.vagrant.d/gems/gems/vagrant-vsphere-0.13.0/lib/vSphere/action/clone.rb:117:in `get_location'
/home/user/.vagrant.d/gems/gems/vagrant-vsphere-0.13.0/lib/vSphere/action/clone.rb:29:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:53:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/home/user/.vagrant.d/gems/gems/vagrant-vsphere-0.13.0/lib/vSphere/action/connect_vsphere.rb:19:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:in `action_raw'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in `block in action'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in `lock'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
 INFO interface: error: Configured compute resource not found
Configured compute resource not found
 INFO interface: Machine: error-exit ["VagrantPlugins::VSphere::Errors::VSphereError", "Configured compute resource not found"]

But it has the right name...

vagrant1

vagrant2

I've tried changing vsphere.compute_resource_name to TestDev/esxpsrv5.***.com and also to C***/TestDev/esxpsrv5.***.com, with no luck

I've put some debug tags in vim_helpers.rb

print get_datacenter(connection,machine)
# Datacenter("datacenter-3")
print machine.provider_config.compute_resource_name
# esxpsrv5.***.com

and in lib/rbvmomi/vim/Datacenter.rb:

print path
# esxpsrv5.***.com
print hostFolder
# Folder("group-h5")

Any ideas?

How does the customization_spec_name work?

I'm trying to use a static IP. The main REAME says that customization_spec_name must be set in order to use a static IP but I haven't been able to figure out what it does or how to use it.

I tried these settings:

config.vm.provider :vsphere do |vsphere, override|
    override.vm.network "private_network", ip: "10.10.1.40", auto_config: false
    vsphere.customization_spec_name = 'test'
end

When I try to vagrant up I get permission errors:

$ vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
NoPermission: Permission to perform this operation was denied.
/Users/krisluminar/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/clone.rb:41:in `rescue in call'
/Users/krisluminar/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/clone.rb:27:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
/Users/krisluminar/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/connect_vsphere.rb:19:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/machine.rb:157:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'

How does the customization_spec_name config work and how should I use it?

vmware-vsphere fails to install with vagrant 1.3.1 on Mac OSX

On Mac OSX:

# vagrant --version
Vagrant 1.3.1
# mkdir ~/tmpbuild
# cd ~/tmpbuild
# git clone git://github.com/nsidc/vagrant-vsphere.git
# cd vagrant-vsphere
# gem build vSphere.gemspec
# vagrant plugin install vagrant-vsphere-0.0.1
Installing the 'vagrant-vsphere-0.0.1' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/plugins/commands/plugin/action/install_gem.rb:65:in `call': undefined method `name' for nil:NilClass (NoMethodError)
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/plugins/commands/plugin/command/base.rb:17:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/plugins/commands/plugin/command/install.rb:27:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/plugins/commands/plugin/command/root.rb:52:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/cli.rb:38:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/environment.rb:484:in `cli'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.3.1/bin/vagrant:96:in `<top (required)>'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

"vagrant plugin install vagrant-vsphere" fails

The command "vagrant plugin install vagrant-vsphere" does not work on my Mac. I'm running Vagrant 1.2.1. Here is the output:

jmauntel-mbp:~ jmauntel$ vagrant plugin install vagrant-vsphere
Installing the 'vagrant-vsphere' plugin. This can take a few minutes...
The plugin 'vagrant-vsphere' could not be found in local or remote
repositories. Please check the name of the plugin and try again.
jmauntel-mbp:~ jmauntel$ vagrant -v
Vagrant version 1.2.1
jmauntel-mbp:~ jmauntel$

Error uninitialized constant VagrantPlugins::VSphere::Errors::RsyncError

I have a jenkins server running on Centos 6.5, it is started as a service process and using the user account "build". Running with ruby 1.8.7, nokogiri (1.4.3.1) and vagrant-vsphere-0.7.0 with the fix to rbvmomi suggested here: vmware-archive/rbvmomi#32

If I run "vagrant up --provider=vsphere" in the build directory manually then it works fine. When I run it from the jenkins build I get the error "uninitialized constant VagrantPlugins::VSphere::Errors::RsyncError" (details shown below).

I cannot see what the difference is between running it manually and running it from the build server, I am sourcing the /etc/profile script to get the environment setup correctly (in particular, paths). The build is setup as a freestyle software project and has a short bit of shell script to run the build like so:

source /etc/profile

cd Products/IntegrationTests/AutoDeploy

pwd

vagrant status

vagrant box list

#mvn clean || true # don't care if this fails
vagrant destroy -f || true # don't care if this fails

#mvn integration-test
vagrant up --provider vsphere

vagrant ssh-config > target/ssh-config.txt

The build output is:

+ pwd
/build/hudson/jobs/UDR.Hg-head-AutoDeploy/workspace/Products/IntegrationTests/AutoDeploy
+ vagrant status
Current machine states:
default                   vagrant_vsphere.states.short_running (vsphere)
vagrant_vsphere.states.long_running
+ vagrant box list
CentOS-6.4-x86_64 (aws)
CentOS-6.4-x86_64 (virtualbox)
CentOS-6.4-x86_64 (vsphere)
+ vagrant destroy -f
[default] Calling vSphere PowerOff
[default] Calling vShpere Destroy
+ vagrant up --provider vsphere
Bringing machine 'default' up with 'vsphere' provider...
[default] Calling vSphere CloneVM with the following settings:
[default]  -- Template VM: Centos 6.4 Vagrant Test
[default]  -- Name: autodeployed
[default] Waiting for SSH to become available...
[default] New virtual machine successfully cloned and started
[default] Rsyncing folder: /build/hudson/jobs/UDR.Hg-head-AutoDeploy/workspace/Products/IntegrationTests/AutoDeploy/ => /vagrant
uninitialized constant VagrantPlugins::VSphere::Errors::RsyncError
/home/build/.vagrant.d/gems/gems/vagrant-vsphere-0.7.0/lib/vSphere/action/close_vsphere.rb:18:in `rescue in call'
/home/build/.vagrant.d/gems/gems/vagrant-vsphere-0.7.0/lib/vSphere/action/close_vsphere.rb:12:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:57:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:57:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/home/build/.vagrant.d/gems/gems/vagrant-vsphere-0.7.0/lib/vSphere/action/connect_vsphere.rb:16:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:147:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
No error message 
Build step 'Execute shell' marked build as failure 

Private Network DHCP Settings Not Working

I am trying to set up DHCP on vsphere for my windows machine for one of my network adapters but have the second as a static ip.
it works when assigning a static ip to both adapters:
web_config.vm.network 'private_network', ip: '1.1.1.6'
web_config.vm.network 'private_network', ip: '1.1.1.5'

However, when I use DHCP on one fails:
web_config.vm.network :private_network, type: :dhcp

When I do that I am getting the following error:
undefined method `ipAddress=' for #<RbVmomi::VIM::CustomizationDhcpIpGenerator:0
x54d66c8>

I have tried toggling the customisation spec settings with no luck and it still gives the IpAddress error.
Any help would be appreciated.Thanks.

Vagrant file is:

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

config.vm.define :Gnome_web do |web_config|

Configure base box parameters

Max time to wait for the guest to shutdown

web_config.windows.halt_timeout = 15

Admin user name and password

web_config.winrm.username = "Administrator"
web_config.winrm.password = "*********"

Configure base box parameters

web_config.vm.box = "Gnome-web"
web_config.vm.box_url = "./Gnome-web.box"
web_config.vm.guest = :windows
web_config.winrm.host = "Gnome-web"

#config.winrm.port = "5985"

Port forward WinRM and RDP

web_config.vm.network :forwarded_port, guest: 3389, host: 3389
web_config.vm.network :forwarded_port, guest: 5985, host: 5985

web_config.vm.network :private_network, type: :dhcp

#web_config.vm.network 'private_network', ip: '1.1.1.6'

web_config.vm.network 'private_network', ip: '1.1.1.5'

web_config.berkshelf.enabled = true

web_config.vm.provider :vsphere do |vsphere|
vsphere.host = '10.20.1.67'
vsphere.compute_resource_name = '10.20.1.94'
vsphere.resource_pool_name = 'Provisioning'
vsphere.template_name = 'DevOps_Production_Templates/Web-Template'
vsphere.name = 'Gnome-Web'
vsphere.user = 'administrator'
vsphere.password = '******'
vsphere.insecure = 'false'
vsphere.data_store_name = 'DS-26'
vsphere.customization_spec_name = 'ProdProvisioning'

end

end

Vagrant's access to the guest host

So maybe I am missing something, but does vagrant interact with the guest OS on the vm that it creates at all? I was expecting the same ability to provision the instance with chef. I wanted to start by getting the getting cookbooks to the instance using config.vm.synced_folder but that doesn't seem to be supported as it doesn't do anything, nor does config.vm.provision :chef_solo.

Occasional chef-solo error - "You must specify at least one cookbook repo path"

Occasionally, when I do a provision, I'll get an error from chef-solo indicating that there is no cookbook repo path set. I'm using vagrant-berkshelf and vagrant-vsphere.

vagrant-berkshelf does some "clever" things to manipulate chef-solo's cookbook path, and then it's up to vagrant-vsphere to see that the folder gets rsync'd. Whenever I get this error, I note that only one folder is being rsync'd ( the vagrant root); during a healthy run, berkshelf's cookbook cache path is also rsync'd.

I suspect this is a race condition of some sort; it happens perhaps 10% of the time, and a second provision typically fixes it. Deleting the Berksfile.lock (forcing a new cookbook cache to be touched) may increase the chances of the issue occuring, but that might be a red herring.

The fix may of course be on the vagrant-berkshelf side.

Snippet from a healthy run, showing two folders syncing:
{{{
==> default: Rsyncing folder: /opt/home/c-cwolfe/chef/workflow-v2.0/cookbooks/ops/branches/clinton.wolfe/some-cookbook-feature/ => /vagrant
==> default: Rsyncing folder: /opt/home/c-cwolfe/.berkshelf/default/vagrant/berkshelf-20141015-15679-1tggcsz-default/ => /tmp/vagrant-chef-2/chef-solo-1/cookbooks
==> default: Running provisioner: chef_solo...
}}}

Error during validate

[...]/.vagrant.d/gems/gems/vagrant-vsphere-0.0.1/lib/vSphere/config.rb:17:in validate': undefined local variable or method_detected_errors'

PS. Excited by this initiative - keep up the good work.

Unable to 'vagrant ssh', can ssh from CLI just fine

Hi guys

After using the workaround for issue #28 to force the use of nokogiri 1.5.5, I can successfully create VMs on my VCenter.
However, upon creation, the ssh connection is never made as apparently no hostname value is passed.
This is the debug log:

vagrant@vagrant-jumpbox:~/bug1226155$ VAGRANT_LOG=DEBUG vagrant up
 INFO global: Vagrant version: 1.2.2
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/suspend/plugin.rb
 INFO manager: Registered plugin: suspend command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/resume/plugin.rb
 INFO manager: Registered plugin: resume command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/ssh/plugin.rb
 INFO manager: Registered plugin: ssh command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/plugin/plugin.rb
 INFO manager: Registered plugin: plugin command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/halt/plugin.rb
 INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/provision/plugin.rb
 INFO manager: Registered plugin: provision command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/package/plugin.rb
 INFO manager: Registered plugin: package command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/box/plugin.rb
 INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/reload/plugin.rb
 INFO manager: Registered plugin: reload command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/destroy/plugin.rb
 INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/status/plugin.rb
 INFO manager: Registered plugin: status command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/up/plugin.rb
 INFO manager: Registered plugin: up command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/ssh_config/plugin.rb
 INFO manager: Registered plugin: ssh-config command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/commands/init/plugin.rb
 INFO manager: Registered plugin: init command
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/kernel_v2/plugin.rb
 INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/communicators/ssh/plugin.rb
 INFO manager: Registered plugin: ssh communicator
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/freebsd/plugin.rb
 INFO manager: Registered plugin: FreeBSD host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/opensuse/plugin.rb
 INFO manager: Registered plugin: OpenSUSE host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/bsd/plugin.rb
 INFO manager: Registered plugin: BSD host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/linux/plugin.rb
 INFO manager: Registered plugin: Linux host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/gentoo/plugin.rb
 INFO manager: Registered plugin: Gentoo host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/arch/plugin.rb
 INFO manager: Registered plugin: Arch host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/windows/plugin.rb
 INFO manager: Registered plugin: Windows host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/hosts/fedora/plugin.rb
 INFO manager: Registered plugin: Fedora host
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/providers/virtualbox/plugin.rb
 INFO manager: Registered plugin: VirtualBox provider
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/kernel_v1/plugin.rb
 INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/suse/plugin.rb
 INFO manager: Registered plugin: SUSE guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/freebsd/plugin.rb
 INFO manager: Registered plugin: FreeBSD guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/solaris/plugin.rb
 INFO manager: Registered plugin: Solaris guest.
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/debian/plugin.rb
 INFO manager: Registered plugin: Debian guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/pld/plugin.rb
 INFO manager: Registered plugin: PLD Linux guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/redhat/plugin.rb
 INFO manager: Registered plugin: RedHat guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/linux/plugin.rb
 INFO manager: Registered plugin: Linux guest.
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/openbsd/plugin.rb
 INFO manager: Registered plugin: OpenBSD guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/gentoo/plugin.rb
 INFO manager: Registered plugin: Gentoo guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/arch/plugin.rb
 INFO manager: Registered plugin: Arch guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/ubuntu/plugin.rb
 INFO manager: Registered plugin: Ubuntu guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/guests/fedora/plugin.rb
 INFO manager: Registered plugin: Fedora guest
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/provisioners/puppet/plugin.rb
 INFO manager: Registered plugin: puppet
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/provisioners/cfengine/plugin.rb
 INFO manager: Registered plugin: CFEngine Provisioner
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/provisioners/ansible/plugin.rb
 INFO manager: Registered plugin: ansible
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/provisioners/shell/plugin.rb
 INFO manager: Registered plugin: shell
DEBUG global: Loading core plugin: /usr/share/vagrant/plugins/provisioners/chef/plugin.rb
 INFO manager: Registered plugin: chef
 INFO vagrant: `vagrant` invoked: ["up"]
DEBUG vagrant: Creating Vagrant environment
 INFO environment: Environment initialized (#<Vagrant::Environment:0x000000024240a8>)
 INFO environment:   - cwd: /home/vagrant/bug1226155
 INFO environment: Home path: /home/vagrant/.vagrant.d
 INFO environment: Local data path: /home/vagrant/bug1226155/.vagrant
DEBUG environment: Creating: /home/vagrant/bug1226155/.vagrant
DEBUG environment: Loading plugins from: /home/vagrant/.vagrant.d/plugins.json
 INFO environment: Loading plugin from JSON: vagrant-vsphere
 INFO manager: Registered plugin: vsphere
 INFO environment: Running hook: environment_load
 INFO environment: Initializing config...
 INFO loader: Set :default = "/usr/share/vagrant/config/default.rb"
DEBUG loader: Populating proc cache for "/usr/share/vagrant/config/default.rb"
DEBUG loader: Load procs for pathname: /usr/share/vagrant/config/default.rb
 INFO loader: Set :root = #<Pathname:/home/vagrant/bug1226155/Vagrantfile>
DEBUG loader: Populating proc cache for #<Pathname:/home/vagrant/bug1226155/Vagrantfile>
DEBUG loader: Load procs for pathname: /home/vagrant/bug1226155/Vagrantfile
 INFO loader: Loading configuration in order: [:default, :home, :root]
DEBUG loader: Loading from: default (evaluating)
DEBUG loader: Loading from: root (evaluating)
DEBUG loader: Configuration loaded successfully, finalizing and returning
DEBUG hosts: Host path search classes: [VagrantPlugins::HostFedora::Host, VagrantPlugins::HostWindows::Host, VagrantPlugins::HostArch::Host, VagrantPlugins::HostFreeBSD::Host, VagrantPlugins::HostOpenSUSE::Host, VagrantPlugins::HostGentoo::Host, VagrantPlugins::HostLinux::Host, VagrantPlugins::HostBSD::Host]
 INFO hosts: Host class: VagrantPlugins::HostLinux::Host
 INFO runner: Running action: #<Vagrant::Action::Builder:0x000000024f55e0>
 INFO cli: CLI: [] "up" []
DEBUG cli: Invoking command class: VagrantPlugins::CommandUp::Command []
DEBUG command: 'Up' each target VM...
DEBUG command: Getting target VMs for command. Arguments:
DEBUG command:  -- names: []
DEBUG command:  -- options: {:provider=>nil}
DEBUG command: Loading all machines...
 INFO environment: Getting machine: default (vsphere)
 INFO environment: Uncached load of machine.
 INFO loader: Set :vm_default = []
 INFO loader: Loading configuration in order: [:default, :home, :root, :vm_default]
DEBUG loader: Loading from: default (cache)
DEBUG loader: Loading from: root (cache)
DEBUG loader: Configuration loaded successfully, finalizing and returning
 INFO environment: Provider-supported box formats: [:vsphere]
 INFO box_collection: Searching for box: ubuntu1310 (vsphere) in /home/vagrant/.vagrant.d/boxes/ubuntu1310/vsphere/metadata.json
 INFO box_collection: Box not found: ubuntu1310 (vsphere)
 INFO machine: Initializing machine: default
 INFO machine:   - Provider: VagrantPlugins::VSphere::Provider
 INFO machine:   - Box:
 INFO machine:   - Data dir: /home/vagrant/bug1226155/.vagrant/machines/default/vsphere
 INFO command: With machine: default (vSphere (new))
 INFO interface: info: Bringing machine 'default' up with 'vsphere' provider...
Bringing machine 'default' up with 'vsphere' provider...
 INFO batch_action: Enabling parallelization by default.
 INFO batch_action: Disabling parallelization because provider doesn't support it: vsphere
 INFO batch_action: Batch action will parallelize: false
 INFO batch_action: Starting action: #<Vagrant::Machine:0x00000002be1340> up {:parallel=>true, :provision_enabled=>true, :provision_types=>nil}
 INFO machine: Calling action: up on provider vSphere (new)
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000002a53f78>
 INFO warden: Calling action: #<Vagrant::Action::Builtin::ConfigValidate:0x007ff034f39e00>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x007ff034f39dd8>
 INFO warden: Calling action: #<Vagrant::Action::Builtin::Call:0x007ff034f39db0>
 INFO runner: Running action: #<Vagrant::Action::Builder:0x007ff03408d1b8>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::IsCreated:0x007ff034091bc8>
 INFO machine: Calling action: get_state on provider vSphere (new)
 INFO runner: Running action: #<Vagrant::Action::Builder:0x007ff0344532c0>
 INFO warden: Calling action: #<Vagrant::Action::Builtin::ConfigValidate:0x007ff03449ea68>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x007ff03449ea18>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::GetState:0x007ff03449e9c8>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x007ff03449e978>
 INFO runner: Running action: #<Vagrant::Action::Warden:0x007ff0346a7ad0>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::Clone:0x007ff0346a79b8>
 INFO interface: info: Calling vSphere CloneVM with the following settings:
[default] Calling vSphere CloneVM with the following settings:
 INFO interface: info:  -- Source VM: ubuntu1310
[default]  -- Source VM: ubuntu1310
 INFO interface: info:  -- Name: bug1226155
[default]  -- Name: bug1226155
 INFO interface: info: Waiting for SSH to become available...
[default] Waiting for SSH to become available...
DEBUG ssh: Checking whether SSH is ready...
 INFO machine: Calling action: get_ssh_info on provider vSphere (4225307e-7ec4-e2c0-948e-b7def220653d)
 INFO runner: Running action: #<Vagrant::Action::Builder:0x007ff0344b6118>
 INFO warden: Calling action: #<Vagrant::Action::Builtin::ConfigValidate:0x007ff034517eb8>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x007ff034517e68>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::GetSshInfo:0x007ff034517da0>
 INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x007ff034517cd8>
DEBUG ssh: Checking key permissions: /home/vagrant/.vagrant.d/insecure_private_key
 INFO ssh: Attempting SSH. Retries: 100. Timeout: 30
 INFO ssh: Attempting to connect to SSH...
 INFO ssh:   - Host:
 INFO ssh:   - Port: 22
 INFO ssh:   - Username: vagrant
 INFO ssh:   - Key Path: /home/vagrant/.vagrant.d/insecure_private_key
DEBUG ssh: == Net-SSH connection debug-level log START ==
DEBUG ssh: D, [2014-03-21T12:21:26.086182 #13039] DEBUG -- net.ssh.transport.session[3ff81a1cbe28]: establishing connection to :22
D, [2014-03-21T12:21:26.087878 #13039] DEBUG -- net.ssh.transport.session[3ff81a1cbe28]: connection established
I, [2014-03-21T12:21:26.088026 #13039]  INFO -- net.ssh.transport.server_version[3ff81a1ccff8]: negotiating protocol version
D, [2014-03-21T12:21:26.094173 #13039] DEBUG -- net.ssh.transport.server_version[3ff81a1ccff8]: remote is `SSH-2.0-OpenSSH_6.2p2 Ubuntu-6'
D, [2014-03-21T12:21:26.094279 #13039] DEBUG -- net.ssh.transport.server_version[3ff81a1ccff8]: local is `SSH-2.0-Ruby/Net::SSH_2.6.7 x86_64-linux'
D, [2014-03-21T12:21:26.095910 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: read 1544 bytes
D, [2014-03-21T12:21:26.096069 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: received packet nr 0 type 20 len 1540
I, [2014-03-21T12:21:26.096187 #13039]  INFO -- net.ssh.transport.algorithms[3ff81a756014]: got KEXINIT from server
I, [2014-03-21T12:21:26.096394 #13039]  INFO -- net.ssh.transport.algorithms[3ff81a756014]: sending KEXINIT
D, [2014-03-21T12:21:26.096615 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: queueing packet nr 0 type 20 len 1620
D, [2014-03-21T12:21:26.096735 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: sent 1624 bytes
I, [2014-03-21T12:21:26.096798 #13039]  INFO -- net.ssh.transport.algorithms[3ff81a756014]: negotiating algorithms
D, [2014-03-21T12:21:26.097051 #13039] DEBUG -- net.ssh.transport.algorithms[3ff81a756014]: negotiated:
* kex: diffie-hellman-group-exchange-sha1
* host_key: ssh-rsa
* encryption_server: aes128-cbc
* encryption_client: aes128-cbc
* hmac_client: hmac-sha1
* hmac_server: hmac-sha1
* compression_client: none
* compression_server: none
* language_client:
* language_server:
D, [2014-03-21T12:21:26.097118 #13039] DEBUG -- net.ssh.transport.algorithms[3ff81a756014]: exchanging keys
D, [2014-03-21T12:21:26.097422 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: queueing packet nr 1 type 34 len 20
D, [2014-03-21T12:21:26.097526 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: sent 24 bytes
D, [2014-03-21T12:21:26.100563 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: read 152 bytes
D, [2014-03-21T12:21:26.100683 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: received packet nr 1 type 31 len 148
D, [2014-03-21T12:21:26.103387 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: queueing packet nr 2 type 32 len 140
D, [2014-03-21T12:21:26.103489 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: sent 144 bytes
D, [2014-03-21T12:21:26.107071 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: read 720 bytes
D, [2014-03-21T12:21:26.107169 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: received packet nr 2 type 33 len 700
D, [2014-03-21T12:21:26.109056 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: queueing packet nr 3 type 21 len 20
D, [2014-03-21T12:21:26.109157 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: sent 24 bytes
D, [2014-03-21T12:21:26.109252 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: received packet nr 3 type 21 len 12
D, [2014-03-21T12:21:26.109577 #13039] DEBUG -- net.ssh.authentication.session[3ff81a77adec]: beginning authentication of `vagrant'
D, [2014-03-21T12:21:26.109723 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: queueing packet nr 4 type 5 len 28
D, [2014-03-21T12:21:26.109792 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: sent 52 bytes
D, [2014-03-21T12:21:26.147166 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: read 52 bytes
D, [2014-03-21T12:21:26.147315 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: received packet nr 4 type 6 len 28
D, [2014-03-21T12:21:26.147462 #13039] DEBUG -- net.ssh.authentication.session[3ff81a77adec]: trying none
D, [2014-03-21T12:21:26.147620 #13039] DEBUG -- net.ssh.authentication.session[3ff81a77adec]: Mechanism none was requested, but isn't a known type.  Ignoring it.
D, [2014-03-21T12:21:26.147683 #13039] DEBUG -- net.ssh.authentication.session[3ff81a77adec]: trying publickey
D, [2014-03-21T12:21:26.148074 #13039] DEBUG -- net.ssh.authentication.agent[3ff81a77c5e8]: connecting to ssh-agent
E, [2014-03-21T12:21:26.148236 #13039] ERROR -- net.ssh.authentication.agent[3ff81a77c5e8]: could not connect to ssh-agent
D, [2014-03-21T12:21:26.148500 #13039] DEBUG -- net.ssh.authentication.methods.publickey[3ff81a77c7a0]: trying publickey (dd:3b:b8:2e:85:04:06:e9:ab:ff:a8:0a:c0:04:6e:d6)
D, [2014-03-21T12:21:26.148701 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: queueing packet nr 5 type 50 len 348
D, [2014-03-21T12:21:26.151102 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: sent 372 bytes
D, [2014-03-21T12:21:26.152239 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: read 68 bytes
D, [2014-03-21T12:21:26.152402 #13039] DEBUG -- tcpsocket[3ff81a1ce3a8]: received packet nr 5 type 51 len 44
D, [2014-03-21T12:21:26.152529 #13039] DEBUG -- net.ssh.authentication.session[3ff81a77adec]: allowed methods: publickey,password
D, [2014-03-21T12:21:26.152602 #13039] DEBUG -- net.ssh.authentication.session[3ff81a77adec]: trying password
E, [2014-03-21T12:21:26.152684 #13039] ERROR -- net.ssh.authentication.session[3ff81a77adec]: all authorization methods failed (tried none, publickey, password)

DEBUG ssh: == Net-SSH connection debug-level log END ==
 INFO ssh: SSH not up: #<Vagrant::Errors::SSHAuthenticationFailed: SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.>

However, if I ssh to the box just created with the vagrant private key I can ssh just fine:

vagrant@vagrant-jumpbox:~$ ssh -i ~/.vagrant.d/insecure_private_key 192.168.1.146
The authenticity of host '192.168.1.146 (192.168.1.146)' can't be established.
ECDSA key fingerprint is ea:83:c3:d3:46:16:49:01:8f:20:f8:4e:b3:50:83:0c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.146' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 13.10 (GNU/Linux 3.11.0-12-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Mar 21 12:26:53 CET 2014

  System load:  0.0               Processes:           83
  Usage of /:   2.9% of 35.07GB   Users logged in:     0
  Memory usage: 1%                IP address for eth0: 192.168.1.146
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

90 packages can be updated.
43 updates are security updates.

Last login: Fri Mar 21 12:26:53 2014
vagrant@ubuntu1310:~$

One thing I noted is that 'vagrant ssh-config' won't show any value for HostName:

vagrant@vagrant-jumpbox:~/bug1226155$ vagrant ssh-config
Host default
  HostName
  User vagrant
  Port 22
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile "/home/vagrant/.vagrant.d/insecure_private_key"
  IdentitiesOnly yes
  LogLevel FATAL

I was expecting HostName to be 127.0.0.1 and Port 2222 as with VirtualBox vms?

This is the Vagrantfile, just in case it's also relevant:

vagrant@vagrant-jumpbox:~/bug1226155$ cat Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box = 'ubuntu1310'
  config.vm.box_url = './ubuntu1310.box'

  config.vm.provider :vsphere do |vsphere|
    vsphere.host = '192.168.1.23'
    vsphere.name = 'bug1226155'
    vsphere.clone_from_vm = true
    vsphere.template_name = 'ubuntu1310'
    #vsphere.compute_resource_name = '192.168.1.22'
    #vsphere.resource_pool_name = ''
    vsphere.user = 'root'
    vsphere.password = 'vmware'
    vsphere.insecure = true
  end

end

Unhelpful exception when I misspell vsphere.compute_resource_name

Here's a Vagrantfile that almost works; as you can see, I've deliberately misspelled vsphere.compute_resource_name:

# -*-ruby-*-

Vagrant.configure("2") do |config|
  config.vm.box = 'vsphere-dummy'
  config.vm.box_url = '/Users/erichanchrow/git-repositories/3rd-party/vagrant-vsphere/example_boxdummy.box'

  config.vm.provider :vsphere do |vsphere|
    vsphere.host = '10.6.100.20'
    vsphere.compute_resource_name = '10.6.100.5-misspelled'
    vsphere.resource_pool_name = 'The Resource Pool'
    vsphere.template_name = 'ubuntu-12.04.2-server-amd64-template'
    vsphere.name = 'test vm'
    vsphere.user = 'root'
    vsphere.password = 'vmware'
    vsphere.insecure = true
  end
end

Here's what I see when I run vagrant up:

:) 10:27:47 [erichanchrow@Eric-Hanchrows-iMac vagrant] (vagrant-vsphere *)$ vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
VagrantPlugins::VSphere::Errors::VSphereError

That error isn't in the least helpful; when I first encountered it, it took me a very long time to realize my mistake (it was a much-more-subtle misspelling, obviously).

It would be much more useful if the exception displayed a message like could not find any compute resource named '10.6.100.5-misspelled'.

There's a similar problem with vsphere.template_name, and perhaps other of these entries too.

Vagrant 1.5.2 commands fail with Plugin version 0.7.1

After upgrading Vagrant to version 1.5.2, the majority of vagrant commands (ex: up, plugin list, etc.) fail as seen below:
$ vagrant help plugin
Vagrant failed to initialize at a very early stage:

The plugins failed to load properly. The error message given is
shown below.

uninitialized constant Vagrant::VM

After uninstalling the vagrant-vsphere plugin (i had updated to the latest), vagrant resumes normal functionality.

Add ability to configure via OVF

RBvomi supports importing an OVF. It would be awesome if we could package vsphere boxes as a tar with an OVF and if no template is specified, use the OVF packaged in the box file.

The template having to be in vsphere already is not conducive to treating the box files like individual artifacts.

Unable to set IP using a customization spec

I get the following when trying to run vagrant:

[root@chef vagrantfile]# vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
undefined method `ipAddress=' for #<RbVmomi::VIM::CustomizationUnknownIpGenerator:0x007f6af8f9d520

Here's my Vagrant file, I've verified all the spelling\locations\etc:

[root@chef vagrantfile]# cat Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = 'dummy'
config.vm.box_url = 'dummy.box'

config.vm.provider :vsphere do |vsphere|
vsphere.host = '{vSphere host}'
vsphere.data_center_name = 'Datacenter'
vsphere.compute_resource_name = '{Cluster}'
vsphere.template_name = 'Template 1'
vsphere.user = 'Vagrant'
vsphere.password = 'xxxxx'
vsphere.insecure = 'true'
vsphere.data_store_name = 'LUN 11'
vsphere.customization_spec_name = 'NE Template'
config.vm.network 'private_network', ip: '192.168.1.200'
end
end

Esxi server without templates

Is there any way I can use vagrant-vsphere on a ESXi server? I can't find a way to create a template on the ESXi. The plugin appears to connect, appears to see the resource pool but appears to stop due to no template.

Is this supposed to work on VMware ESXi Free too?

Not an issue per se, but a question for which the answer is not yet found in the documentation:
Is this plugin supposed to work on VMware ESXi 5.5 Free version?

AFAIK cloning is only supported in "Advanced", etc. so that explains this error:

> vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
==> default: Calling vSphere CloneVM with the following settings:
==> default:  -- Template VM: ha-datacenter/vm/psux002
==> default:  -- Target VM: ha-datacenter/vm/vagrant-VM
NotSupported: The operation is not supported on the object.

A template was created with "vmkfstools":

vmkfstools -i /vmfs/volumes/datastore1/ubuntu-12.04-x64_template/*.vmdk -d thin /vmfs/volumes/datastore1/templates/ubuntu-12.04-x64_template.vmdk

However, cloning or templating: both fail so far on the Free-version...

Add the support of VM name auto-generation

It is quite useful when we have multiple machines for one vsphere template and bootstrap each VM differently.

Currently we just can configure only one VM name for each template. So it would be nice to support VM name auto-generation, or add a prefix on the auto-naming.
Thus I could use multiple machine config in Vagrantfile to quick launch VMs.
Like:

  config.vm.define "slave0" do |slave0|
    slave0.vm.box = "dummy"
  end
  config.vm.define "slave1" do |slave1|
    slave1.vm.box = "dummy"
  end

Support "vagrant reload" command

vagrant reload command fails with the next error:

Vagrant attempted to call the action 'reload' on the provider
'vSphere (42065e27-12ce-b5fd-c216-27e4c0795266)', but this provider doesn't support this action. This
is probably a bug in either the provider or the plugin calling this
action, and should be reported.

Configure Network is not invoked

hi,

I am using vagrant-vsphere 0.4.0 with a centos template hosted on an esx server. I have set the template ip as static and config.ssh.host in the vagrant file is this IP.

When the template is cloned the ssh connection is successful and the command "/usr/bin/rsync" is one of the last processes I see in the debug logs.

Should the configure networks invoke at this point? I do not see any information suggestion the configure network is invoked?

Should the vagrant rb files be invoked now that the vagrant-vsphere has cloned and conencted via ssh? Is this an issue? From the loggging below, it appears as though nothing is attempted.

[user@rcartytest example_box]$ VAGRANT_LOG=info vagrant up --provider=vsphere
INFO global: Vagrant version: 1.3.4
INFO manager: Registered plugin: Fedora host
INFO manager: Registered plugin: Gentoo host
INFO manager: Registered plugin: Windows host
INFO manager: Registered plugin: Linux host
INFO manager: Registered plugin: BSD host
INFO manager: Registered plugin: Slackware host
INFO manager: Registered plugin: Arch host
INFO manager: Registered plugin: OpenSUSE host
INFO manager: Registered plugin: FreeBSD host
INFO manager: Registered plugin: status command
INFO manager: Registered plugin: halt command
INFO manager: Registered plugin: ssh command
INFO manager: Registered plugin: package command
INFO manager: Registered plugin: resume command
INFO manager: Registered plugin: plugin command
INFO manager: Registered plugin: suspend command
INFO manager: Registered plugin: init command
INFO manager: Registered plugin: provision command
INFO manager: Registered plugin: box command
INFO manager: Registered plugin: destroy command
INFO manager: Registered plugin: help command
INFO manager: Registered plugin: reload command
INFO manager: Registered plugin: up command
INFO manager: Registered plugin: ssh-config command
INFO manager: Registered plugin: ssh communicator
INFO manager: Registered plugin: puppet
INFO manager: Registered plugin: shell
INFO manager: Registered plugin: chef
INFO manager: Registered plugin: file
INFO manager: Registered plugin: ansible
INFO manager: Registered plugin: CFEngine Provisioner
INFO manager: Registered plugin: salt
INFO manager: Registered plugin: kernel
INFO manager: Registered plugin: VirtualBox provider
INFO manager: Registered plugin: Fedora guest
INFO manager: Registered plugin: Gentoo guest
INFO manager: Registered plugin: RedHat guest
INFO manager: Registered plugin: Solaris 11 guest.
INFO manager: Registered plugin: Ubuntu guest
INFO manager: Registered plugin: OmniOS guest.
INFO manager: Registered plugin: Solaris guest.
INFO manager: Registered plugin: CoreOS guest
INFO manager: Registered plugin: Linux guest.
INFO manager: Registered plugin: Debian guest
INFO manager: Registered plugin: SUSE guest
INFO manager: Registered plugin: PLD Linux guest
INFO manager: Registered plugin: Arch guest
INFO manager: Registered plugin: Darwin guest
INFO manager: Registered plugin: OpenBSD guest
INFO manager: Registered plugin: FreeBSD guest
INFO manager: Registered plugin: kernel
INFO vagrant: vagrant invoked: ["up", "--provider=vsphere"]
INFO environment: Environment initialized (#Vagrant::Environment:0x00000001fd6bb8)
INFO environment: - cwd: /home/user/vagrant-vsphere-master/FromGit/vagrant-vsphere/example_box
INFO environment: Home path: /home/user/.vagrant.d
INFO environment: Local data path: /home/user/vagrant-vsphere-master/FromGit/vagrant-vsphere/example_box/.vagrant
INFO environment: Loading plugin from JSON: vagrant-vsphere
INFO manager: Registered plugin: vsphere
INFO environment: Running hook: environment_load
INFO environment: Initializing config...
INFO loader: Set :default = "/opt/vagrant/embedded/gems/gems/vagrant-1.3.4/config/default.rb"
INFO loader: Set :root = #Pathname:/home/user/vagrant-vsphere-master/FromGit/vagrant-vsphere/example_box/Vagrantfile
INFO loader: Loading configuration in order: [:default, :home, :root]
INFO hosts: Host class: VagrantPlugins::HostFedora::Host
INFO runner: Running action: #Vagrant::Action::Builder:0x00000002593740
INFO cli: CLI: [] "up" ["--provider=vsphere"]
INFO environment: Getting machine: default (vsphere)
INFO environment: Uncached load of machine.
INFO loader: Set :vm_default = []
INFO loader: Loading configuration in order: [:default, :home, :root, :vm_default]
INFO box_collection: Searching for box: vSphere (vsphere) in /home/user/.vagrant.d/boxes/vSphere/vsphere/metadata.json
INFO box_collection: Box not found: vSphere (vsphere)
INFO machine: Initializing machine: default
INFO machine: - Provider: VagrantPlugins::VSphere::Provider
INFO machine: - Box:
INFO machine: - Data dir: /home/user/vagrant-vsphere-master/FromGit/vagrant-vsphere/example_box/.vagrant/machines/default/vsphere
INFO command: With machine: default (vSphere (new))
INFO interface: info: Bringing machine 'default' up with 'vsphere' provider...
Bringing machine 'default' up with 'vsphere' provider...
INFO batch_action: Enabling parallelization by default.
INFO batch_action: Disabling parallelization because provider doesn't support it: vsphere
INFO batch_action: Batch action will parallelize: false
INFO batch_action: Starting action: #Vagrant::Machine:0x00000002bde1e0 up {:destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil, :provider=>"vsphere"}
INFO machine: Calling action: up on provider vSphere (new)
WARNING: Nokogiri was built against LibXML version 2.7.6, but has dynamically loaded 2.8.0
INFO runner: Running action: #Vagrant::Action::Builder:0x007f754009f210
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540fd7c78
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540fd7c50
INFO warden: Calling IN action: #Vagrant::Action::Builtin::Call:0x007f7540fd7c28
INFO runner: Running action: #Vagrant::Action::Builder:0x007f7540554cd8
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::IsCreated:0x007f75405518d0
INFO machine: Calling action: get_state on provider vSphere (new)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f75401bb770
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540008018
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540007fc8
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetState:0x007f7540007f50
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540007f00
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540007f00
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetState:0x007f7540007f50
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540007fc8
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540008018
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::IsCreated:0x007f75405518d0
INFO runner: Running action: #Vagrant::Action::Warden:0x007f7540c8e800
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::Clone:0x007f7540c8e6c0
INFO interface: info: Calling vSphere CloneVM with the following settings:
[default] Calling vSphere CloneVM with the following settings:
INFO interface: info: -- Template VM: MxCosTemplate243
[default] -- Template VM: MxCosTemplate243
INFO interface: info: -- Name: MxCosSRP1
[default] -- Name: MxCosSRP1
INFO machine: New machine ID: "4221687f-05ab-381a-56ec-a7290cb3177b"
INFO interface: info: Waiting for SSH to become available...
[default] Waiting for SSH to become available...
INFO machine: Calling action: get_ssh_info on provider vSphere (4221687f-05ab-381a-56ec-a7290cb3177b)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f75403380f8
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f75403edc78
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f75403edb88
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f75403edb10
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f75403edac0
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f75403edac0
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f75403edb10
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f75403edb88
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f75403edc78
INFO ssh: Attempting SSH connnection...
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 192.168.81.243
INFO ssh: - Port: 22
INFO ssh: - Username: vagrant
INFO ssh: - Key Path: /home/user/.ssh/id_rsa
INFO retryable: Retryable exception raised: #<Timeout::Error: execution expired>
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 192.168.81.243
INFO ssh: - Port: 22
INFO ssh: - Username: vagrant
INFO ssh: - Key Path: /home/user/.ssh/id_rsa
INFO retryable: Retryable exception raised: #<Errno::ECONNREFUSED: Connection refused - connect(2)>
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 192.168.81.243
INFO ssh: - Port: 22
INFO ssh: - Username: vagrant
INFO ssh: - Key Path: /home/user/.ssh/id_rsa
INFO ssh: SSH is ready!
INFO interface: info: New virtual machine successfully cloned and started
[default] New virtual machine successfully cloned and started
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::Clone:0x007f7540c8e6c0
INFO warden: Calling IN action: #Vagrant::Action::Builtin::Call:0x007f7540fd7bd8
INFO runner: Running action: #Vagrant::Action::Builder:0x00000002b06650
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::IsRunning:0x00000002b91908
INFO machine: Calling action: get_state on provider vSphere (4221687f-05ab-381a-56ec-a7290cb3177b)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f75400331c8
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f754008e960
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f754008e898
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetState:0x007f754008e730
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f754008e640
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f754008e640
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetState:0x007f754008e730
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f754008e898
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f754008e960
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::IsRunning:0x00000002b91908
INFO runner: Running action: #Vagrant::Action::Warden:0x007f7540418478
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540fd7b88
INFO warden: Calling IN action: #Vagrant::Action::Builtin::Provision:0x007f7540fd7b60
INFO provision: Checking provisioner sentinel if we should run...
INFO provision: Sentinel not found.
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::SyncFolders:0x007f7540fe4568
INFO machine: Calling action: get_ssh_info on provider vSphere (4221687f-05ab-381a-56ec-a7290cb3177b)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f7540f39b40
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540f3e140
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540f3e0f0
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7540f3e078
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540f3e000
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540f3e000
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7540f3e078
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540f3e0f0
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540f3e140
INFO interface: info: Rsyncing folder: /home/user/vagrant-vsphere-master/FromGit/vagrant-vsphere/example_box/ => /vagrant
[default] Rsyncing folder: /home/user/vagrant-vsphere-master/FromGit/vagrant-vsphere/example_box/ => /vagrant
INFO ssh: Execute: mkdir -p '/vagrant' (sudo=true)
INFO machine: Calling action: get_ssh_info on provider vSphere (4221687f-05ab-381a-56ec-a7290cb3177b)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f7540fa3630
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540fa1dd0
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540fa1da8
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7540fa1d80
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540fa1d30
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540fa1d30
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7540fa1d80
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540fa1da8
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540fa1dd0
INFO ssh: Execute: echo; printf $SSH_AUTH_SOCK (sudo=false)
INFO machine: Calling action: get_ssh_info on provider vSphere (4221687f-05ab-381a-56ec-a7290cb3177b)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f7540479f20
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f75405a5458
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f75405a5408
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f75405a53b8
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f75405a5368
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f75405a5368
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f75405a53b8
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f75405a5408
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f75405a5458
INFO ssh: Setting SSH_AUTH_SOCK remotely: /tmp/ssh-oRsCkf2147/agent.2147
INFO ssh: Execute: chown vagrant '/vagrant' (sudo=true)
INFO machine: Calling action: get_ssh_info on provider vSphere (4221687f-05ab-381a-56ec-a7290cb3177b)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f7540e1f7a0
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540a516a0
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540a515d8
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7540a51498
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540a513f8
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540a513f8
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7540a51498
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540a515d8
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540a516a0
INFO ssh: Execute: echo; printf $SSH_AUTH_SOCK (sudo=false)
INFO machine: Calling action: get_ssh_info on provider vSphere (4221687f-05ab-381a-56ec-a7290cb3177b)
INFO runner: Running action: #Vagrant::Action::Builder:0x007f7541008440
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7541006b90
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7541006b68
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7541006b40
INFO warden: Calling IN action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7541006b18
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7541006b18
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::GetSshInfo:0x007f7541006b40
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7541006b68
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7541006b90
INFO ssh: Setting SSH_AUTH_SOCK remotely: /tmp/ssh-oRsCkf2147/agent.2147
INFO subprocess: Starting process: ["/usr/bin/rsync", "--verbose", "--archive", "-z", "--exclude", ".vagrant/", "-e", "ssh -p 22 -o StrictHostKeyChecking=no -i '/home/user/.ssh/id_rsa'", "/home/user/vagrant-vsphere-master/FromGit/vagrant-vsphere/example_box/", "[email protected]:/vagrant"]
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::SyncFolders:0x007f7540fe4568
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::Provision:0x007f7540fd7b60
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::CloseVSphere:0x007f7540fd7b88
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::Call:0x007f7540fd7bd8
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::Call:0x007f7540fd7c28
INFO warden: Calling OUT action: #VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f7540fd7c50
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::ConfigValidate:0x007f7540fd7c78
INFO environment: Running hook: environment_unload
INFO runner: Running action: #Vagrant::Action::Builder:0x000000025a8d20
[user@rcartytest example_box]$ pwd

"vagrant halt" and "vagrant suspend" emit scary error messages

Unfortunately I don't know enough about either Vagrant or vSphere to describe in detail what I did. But I successfully did "vagrant up", and observed (from the vSphere web client) that there was a new virtual machine; then I tried "vagrant halt" and saw this:

:( 1 10:02:55 [erichanchrow@Eric-Hanchrows-iMac vagrant] (vagrant-vsphere)$ vagrant halt
Vagrant attempted to call the action 'halt' on the provider
'vSphere (42094cca-9310-8a1a-0fa5-7d31210fe7d0)', but this provider doesn't support this action. This
is probably a bug in either the provider or the plugin calling this
action, and should be reported.
:( 1 10:02:55 [erichanchrow@Eric-Hanchrows-iMac vagrant] (vagrant-vsphere)$ vagrant suspend
Vagrant attempted to call the action 'suspend' on the provider
'vSphere (42094cca-9310-8a1a-0fa5-7d31210fe7d0)', but this provider doesn't support this action. This
is probably a bug in either the provider or the plugin calling this
action, and should be reported.

vagrant up for dummy.box fails with /Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'

I followed the instructions on the README.
I can see vsphere-dummy listed by
vagrant box list

but
vagrant up --provider=vsphere
gives

[kbroughton@mb-kbroughton:tools/vagrant-vsphere + (master)] vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in connect' /Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:inblock in connect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in timeout' /Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:inconnect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:862:in do_start' /Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:857:instart'
/Users/kbroughton/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/trivial_soap.rb:56:in restart_http' /Users/kbroughton/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/trivial_soap.rb:20:ininitialize'
/Users/kbroughton/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:31:in initialize' /Users/kbroughton/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:34:innew'
/Users/kbroughton/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:34:in connect' /Users/kbroughton/.vagrant.d/gems/gems/vagrant-vsphere-0.8.2/lib/vSphere/action/connect_vsphere.rb:15:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/config_validate.rb:25:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in block in run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:inbusy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in run' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:196:inaction_raw'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:173:in block in action' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:434:inlock'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:inaction'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
No error message

Although it appears to be bailing at the connect step, If i feed in bad user or vcenter url it errors at the same spot.

Here is the Vagrantfile

Vagrant.configure("2") do |config|
config.vm.box = 'dummy'
config.vm.box_url = './example_box/dummy.box'

config.vm.provider :vsphere do |vsphere|
vsphere.host = 'https://vcenter.example.com:9332'
vsphere.compute_resource_name = 'esx_host1.example.com'
vsphere.resource_pool_name = 'Default Resource Pool'
vsphere.template_name = 'ubuntu-14.04-server-amd64' # i see this in vsphere client
vsphere.name = 'test-vagrant-vsphere-from-ubuntu-box'
vsphere.user = 'username i login to vsphere client websphere'
vsphere.password = 'password for same'
end
end

Oddly, when i cd into vagrant-vsphere i get a message

[kbroughton@mb-kbroughton:git/tools] cd vagrant-vsphere/
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /Users/kbroughton/vcp/git/tools/vagrant-vsphere/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.

ruby-2.0.0-p481 is not installed.
To install do: 'rvm install ruby-2.0.0-p481'

i tried
rvm install ruby-2.0.0-p481

Any ideas what i'm missing?

kesten

get_vm_by_uuid requires broad permissions to traverse object tree

Our vcenter permission scheme prevents me from using vagrant-vsphere because of the way vim_helpers uses connection.serviceInstance.find_datacenter().

I made a fork here [email protected]:kindjal/vagrant-vsphere.git that introduces a couple new functions that remove the need to traverse the object tree.

I also add the use of target_folder and resource pools.

I don't want to issue a pull request until someone can take a look at my proposal to see if it makes sense and could be considered to merge. Would you be interested in reviewing my fork and letting me know if you are interested in this approach?

Network configuration

I would like to see if there is any chance we could allow vsphere provider to configure public/private network IP address for cloned VM.

I saw this issue #6 which requested similar feature:
But it was closed because customization spec is not supported previously.

And I saw the support for customization spec was added in v 0.3, and it works well for me. But at this moment, we can only specify the name for the customization spec, which typically will ask vSphere to assign a dynamic/fixed IP address which cannot be controlled in Vagrantfile.

Is there any way we can add the support to specify public/private network IP address in Vagrantfile for vsphere provider? I think this can be done via modifying customization_spec but we don't have it implemented yet.

'destroy' command fails when vm is in poweroff state

Need to detect poweroff state, and then skip attempt to poweroff VM.

[c-cwolfe@devops-chefsdk001 vsphere-try]$ vagrant status
Current machine states:

default vagrant_vsphere.states.short_poweroff (vsphere)

vagrant_vsphere.states.long_poweroff

[c-cwolfe@devops-chefsdk001 vsphere-try]$ vagrant destroy
==> default: Calling vSphere PowerOff
InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
[c-cwolfe@devops-chefsdk001 vsphere-try]$ vagrant --version
Vagrant 1.6.3
[c-cwolfe@devops-chefsdk001 vsphere-try]$ vagrant plugin list
vagrant-berkshelf (2.0.1)

  • Version Constraint: 2.0.1
    vagrant-login (1.0.1, system)
    vagrant-share (1.1.0, system)
    vagrant-vsphere (0.11.0)
  • Version Constraint: 0.11.0
    [c-cwolfe@devops-chefsdk001 vsphere-try]$ vagrant plugin list vagrant-vsphere

Building a vagrant-friendly VMDK and/or VM for chef

Hi, thanks to vagrant-vsphere I have successfully gotten vagrant to launch a instance via vSphere that is a clone of an existing VM on my ESX. The next step would appear to be to make a proper VMDK that will bootstrap with chef-client. Should I be following the Vagrant documented guidelines on how to create a VMDK vagrant box and work from there or is there something else that I should be doing? I would like to work with the Ubuntu precise image with chef client as that is what I have been using locally with virtualbox, but it looks like I will be needing to make it by hand. If you could point me in the right direction I would be happy to document my process and link it here to help others.

Thanks so much for making this project possible and keep up the good work!

Vagrant destroy should accept existing powered off state and continue past failure to power off

I didn't know that the VM had to be running for vagrant destroy to work.

C:\SomeProj>vagrant destroy
==> default: Calling vSphere PowerOff
ERROR warden: Error occurred: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
ERROR warden: Error occurred: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
ERROR warden: Error occurred: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
ERROR warden: Error occurred: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).>
ERROR vagrant: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered off).
ERROR vagrant: C:/Users/gdomjan/.vagrant.d/gems/gems/vagrant-vsphere-0.11.0/lib/vSphere/action/connect_vsphere.rb:23:in `rescue in call'
C:/Users/gdomjan/.vagrant.d/gems/gems/vagrant-vsphere-0.11.0/lib/vSphere/action/connect_vsphere.rb:14:in `call'
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'

It would be nice if vagrant destroy could ignore a failure to power off when already powered off. Or perhaps first check for the power state before trying to power off.

Plugin has broken dependencies with Vagrant 1.6.5

Vagrant bundled nokogiri is higher than required by plugin, this brokes plugin installation.

vagrant plugin install vagrant-vsphere                                                                                                                                                      
Installing the 'vagrant-vsphere' plugin. This can take a few minutes...
The plugin(s) can't be installed due to the version conflicts below.
This means that the plugins depend on a library version that conflicts
with other plugins or Vagrant itself, creating an impossible situation
where Vagrant wouldn't be able to load the plugins.

You can fix the issue by either removing a conflicting plugin or
by contacting a plugin author to see if they can address the conflict.

Vagrant could not find compatible versions for gem "nokogiri":
  In Gemfile:
    vagrant-vsphere (>= 0) ruby depends on
      nokogiri (= 1.5.10) ruby

    vagrant (= 1.6.5) ruby depends on
      nokogiri (1.6.3.1)

Resource pools not supported by VSphere Standard Edition

I've found that when you clone from a template, the code expects to get the resource pool of the compute resource, and then search for a child resource pool underneath that.

However, VSphere Standard Edition does not support resource pools (well, it has a root resource pool, but doesn't support child resource pools).

I propose a change to use the root resource pool if no other resource_pool_name is supplied.

(pull request to follow shortly)

Configuring Network

Hi, I have been trying to get started by making my own base VM that vagrant will clone to use to provision hosts and I am looking to see how Vagrant can configure the network on these hosts. Ideally, I would want to be able to assign IPs to these hosts in the Vagrantfile and have them join an existing network. Is this possible or must I completely rely on what is set up in the image? Is there a way to make Vagrant "see" into the guest OS? That is kind of essential since the goal here is to be able to provision these instances with chef.

Installing nokogiri using vagrant plugin install seems to require vmware-workstation?

An issue for me, because I'm new to Ruby and gems

C:\>vagrant plugin install nokogiri
Installing the 'nokogiri' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

Net::HTTPNotFound: No gems found matching "vagrant-vmware-workstation" "2.5.2" nil

Following that I tried

C:>vagrant plugin install vagrant-vmware-workstation
Installing the 'vagrant-vmware-workstation' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vmware-workstation (2.5.2)'!

C:\>vagrant plugin install nokogiri
Installing the 'nokogiri' plugin. This can take a few minutes...
Installed the plugin 'nokogiri (1.5.11)'!

C:\someproj>vagrant up
A valid license is required to run the Vagrant VMware
provider. Please visit http://www.vagrantup.com to purchase
a license. Once you purchase a license, you can install it
using `vagrant plugin license`.

Of course I don't want to use VMWare workstation, or pay for the license.

Unable to Clone

First off, thanks for creating this plugin. I'm highly interested in getting this working in our environment.

I have a problem and it's apparent in the debug log it's failing on the clone process, here's the snippet:

INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x007f3170731b50>                                                                                             [4/218]
INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::GetState:0x007f3170731ad8>
INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x007f3170731a88>
INFO runner: Running action: #<Vagrant::Action::Warden:0x007f31707b5fe0>
INFO warden: Calling action: #<VagrantPlugins::VSphere::Action::Clone:0x007f31707b5ec8>
ERROR warden: Error occurred: uninitialized constant VagrantPlugins::VSphere::Action::Clone::Error
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: uninitialized constant VagrantPlugins::VSphere::Action::Clone::Error
INFO warden: Beginning recovery process...
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x007f3170d36e60>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
ERROR warden: Error occurred: VagrantPlugins::VSphere::Errors::VSphereError
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO environment: Running hook: environment_unload
INFO runner: Running action: #<Vagrant::Action::Builder:0x007f3170cd8c20>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: VagrantPlugins::VSphere::Errors::VSphereError>
ERROR vagrant: VagrantPlugins::VSphere::Errors::VSphereError
ERROR vagrant: /home/jskarbek/.vagrant.d/gems/gems/vagrant-vsphere-0.0.1/lib/vSphere/action/connect_vsphere.rb:18:in `rescue in call'
/home/jskarbek/.vagrant.d/gems/gems/vagrant-vsphere-0.0.1/lib/vSphere/action/connect_vsphere.rb:14:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/warden.rb:34:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/builder.rb:116:in `call'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/action/runner.rb:61:in `run'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/machine.rb:147:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
INFO interface: error: VagrantPlugins::VSphere::Errors::VSphereError
VagrantPlugins::VSphere::Errors::VSphereError

Looking into the logs on the vcenter instance, I'm connecting to the host and making at least one API call. My example config file is here: https://gist.github.com/jtslear/0b7639c0626f1a8e4926

I'd love to help troubleshoot, I just don't know how. I am using the latest version of vagrant 1.3.1

Ruby Vers. Issue?

I'm not exactly sure what's going on but I'm getting this output when trying to Vagrant up w/ the vsphere plugin:

Bringing machine 'default' up with 'vsphere' provider...
/opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in connect' /opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:inblock in connect'
/opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in timeout' /opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:inconnect'
/opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:862:in do_start' /opt/vagrant/embedded/lib/ruby/2.0.0/net/http.rb:857:instart'
/root/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:56:in restart_http' /root/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:20:ininitialize'
/root/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:31:in initialize' /root/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:innew'
/root/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:in connect' /root/.vagrant.d/gems/gems/vagrant-vsphere-0.7.0/lib/vSphere/action/connect_vsphere.rb:15:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/action/builtin/config_validate.rb:25:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/action/builder.rb:116:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/action/runner.rb:69:in block in run' /opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/util/busy.rb:19:inbusy'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/action/runner.rb:69:in run' /opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/machine.rb:147:inaction'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.2/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

Any ideas on what's going on with this? I did a fresh VM install so the machine pretty much just has requirements for vagrant-vsphere installed... Thanks!

stack trace on "vagrant up --provider=vsphere"

Hi there,

How can I figure out what the issue is here:

$ vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:857:in `start'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:56:in `restart_http'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/trivial_soap.rb:20:in `initialize'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/connection.rb:31:in `initialize'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:in `new'
/Users/tehranian/.vagrant.d/gems/gems/rbvmomi-1.8.1/lib/rbvmomi/vim.rb:36:in `connect'
/Users/tehranian/.vagrant.d/gems/gems/vagrant-vsphere-0.7.0/lib/vSphere/action/connect_vsphere.rb:15:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:147:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
No error message

It doesn't seem to be making any outbound http connection to vSphere, as the whole invocation fails within 1/2 second.

FWIW I'm running OS X Mavericks and am seeing this with Vagrant 1.4.3 and 1.5.1.

Thanks,
Dan

"No Error Message" successfully authenticating

Hi,

I seem to be getting an error that is reporting as "No Error Message". For the record I have tried different vagrant versions etc. For testing I am using the root account on my test vsphere box. Using VMware ESXi and vcenter, 5.5.0.

I have confirmed that I am authenticating against vsphere fine.

Here is my Vagrantfile


# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
      config.vm.box = 'dummy'
      config.vm.box_url = 'dummy.box'

  config.vm.provider "vsphere" do |vsphere|
    vsphere.name = 'amazingtest'
    vsphere.host = 'vsphere-test.domain'
    vsphere.user = 'root'
    vsphere.password = 'testpass'
    vsphere.compute_resource_name = vsphere-test.domain'
    vsphere.resource_pool_name = 'vagrant'
    vsphere.template_name = 'vagrantbasebox'
    vsphere.data_store_name = 'DATASAN'
    vsphere.insecure = true
  end

  #config.vm.synced_folder "/Users/#{LOCALUSER}/Documents/Vagrantstuff", "/home/vagrant/Vagrantstuff"
  #Optional add synced folder if desired.

end

Here is the log


VAGRANT_LOG=debug vagrant up --provider vsphere
 INFO global: Vagrant version: 1.5.3
 INFO global: Ruby version: 2.0.0
 INFO global: RubyGems version: 2.0.14
 INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.5.3/bin/vagrant"
 INFO global: VAGRANT_LOG="debug"
 INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
 INFO global: VAGRANT_INSTALLER_VERSION="2"
 INFO global: VAGRANT_DETECTED_OS="Darwin"
 INFO global: VAGRANT_INSTALLER_ENV="1"
 INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
 INFO global: Plugins:
 INFO global:   - builder = 3.2.2
 INFO global:   - bundler = 1.5.3
 INFO global:   - i18n = 0.6.9
 INFO global:   - log4r = 1.1.10
 INFO global:   - micromachine = 1.1.0
 INFO global:   - mime-types = 2.2
 INFO global:   - nokogiri = 1.5.11
 INFO global:   - trollop = 2.0
 INFO global:   - rbvmomi = 1.6.0
 INFO global:   - rest-client = 1.6.7
 INFO global:   - vagrant-login = 1.0.1
 INFO global:   - vagrant-share = 1.0.1
 INFO global:   - vagrant-vbguest = 0.10.0
 INFO global:   - vagrant-vsphere = 0.8.1
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/box/plugin.rb
 INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/destroy/plugin.rb
 INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/halt/plugin.rb
 INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/help/plugin.rb
 INFO manager: Registered plugin: help command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/init/plugin.rb
 INFO manager: Registered plugin: init command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/list-commands/plugin.rb
 INFO manager: Registered plugin: list-commands command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/package/plugin.rb
 INFO manager: Registered plugin: package command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/plugin/plugin.rb
 INFO manager: Registered plugin: plugin command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/provision/plugin.rb
 INFO manager: Registered plugin: provision command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/reload/plugin.rb
 INFO manager: Registered plugin: reload command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/resume/plugin.rb
 INFO manager: Registered plugin: resume command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/ssh/plugin.rb
 INFO manager: Registered plugin: ssh command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/ssh_config/plugin.rb
 INFO manager: Registered plugin: ssh-config command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/status/plugin.rb
 INFO manager: Registered plugin: status command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/suspend/plugin.rb
 INFO manager: Registered plugin: suspend command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/commands/up/plugin.rb
 INFO manager: Registered plugin: up command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/communicators/ssh/plugin.rb
 INFO manager: Registered plugin: ssh communicator
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/arch/plugin.rb
 INFO manager: Registered plugin: Arch guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/coreos/plugin.rb
 INFO manager: Registered plugin: CoreOS guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/darwin/plugin.rb
 INFO manager: Registered plugin: Darwin guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/debian/plugin.rb
 INFO manager: Registered plugin: Debian guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/esxi/plugin.rb
 INFO manager: Registered plugin: ESXi guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/fedora/plugin.rb
 INFO manager: Registered plugin: Fedora guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/freebsd/plugin.rb
 INFO manager: Registered plugin: FreeBSD guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/funtoo/plugin.rb
 INFO manager: Registered plugin: Funtoo guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/gentoo/plugin.rb
 INFO manager: Registered plugin: Gentoo guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/linux/plugin.rb
 INFO manager: Registered plugin: Linux guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/netbsd/plugin.rb
 INFO manager: Registered plugin: NetBSD guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/omnios/plugin.rb
 INFO manager: Registered plugin: OmniOS guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/openbsd/plugin.rb
 INFO manager: Registered plugin: OpenBSD guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/pld/plugin.rb
 INFO manager: Registered plugin: PLD Linux guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/redhat/plugin.rb
 INFO manager: Registered plugin: RedHat guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/smartos/plugin.rb
 INFO manager: Registered plugin: SmartOS guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/solaris/plugin.rb
 INFO manager: Registered plugin: Solaris guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/solaris11/plugin.rb
 INFO manager: Registered plugin: Solaris 11 guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/suse/plugin.rb
 INFO manager: Registered plugin: SUSE guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/tinycore/plugin.rb
 INFO manager: Registered plugin: TinyCore Linux guest.
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/guests/ubuntu/plugin.rb
 INFO manager: Registered plugin: Ubuntu guest
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/arch/plugin.rb
 INFO manager: Registered plugin: Arch host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/bsd/plugin.rb
 INFO manager: Registered plugin: BSD host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/freebsd/plugin.rb
 INFO manager: Registered plugin: FreeBSD host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/gentoo/plugin.rb
 INFO manager: Registered plugin: Gentoo host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/linux/plugin.rb
 INFO manager: Registered plugin: Linux host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/null/plugin.rb
 INFO manager: Registered plugin: null host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/opensuse/plugin.rb
 INFO manager: Registered plugin: OpenSUSE host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/redhat/plugin.rb
 INFO manager: Registered plugin: Red Hat host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/slackware/plugin.rb
 INFO manager: Registered plugin: Slackware host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/hosts/windows/plugin.rb
 INFO manager: Registered plugin: Windows host
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/kernel_v1/plugin.rb
 INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/kernel_v2/plugin.rb
 INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/providers/hyperv/plugin.rb
 INFO manager: Registered plugin: Hyper-V provider
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/providers/virtualbox/plugin.rb
 INFO manager: Registered plugin: VirtualBox provider
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/ansible/plugin.rb
 INFO manager: Registered plugin: ansible
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/cfengine/plugin.rb
 INFO manager: Registered plugin: CFEngine Provisioner
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/chef/plugin.rb
 INFO manager: Registered plugin: chef
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/docker/plugin.rb
 INFO manager: Registered plugin: docker
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/file/plugin.rb
 INFO manager: Registered plugin: file
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/puppet/plugin.rb
 INFO manager: Registered plugin: puppet
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/salt/plugin.rb
 INFO manager: Registered plugin: salt
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/provisioners/shell/plugin.rb
 INFO manager: Registered plugin: shell
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/synced_folders/nfs/plugin.rb
 INFO manager: Registered plugin: NFS synced folders
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/synced_folders/rsync/plugin.rb
 INFO manager: Registered plugin: RSync synced folders
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/synced_folders/smb/plugin.rb
 INFO manager: Registered plugin: SMB synced folders
 INFO global: Loading plugins!
 INFO manager: Registered plugin: vagrant-login
 INFO manager: Registered plugin: vagrant-share
 INFO manager: Registered plugin: vagrant-vbguest
 INFO manager: Registered plugin: vsphere
 INFO vagrant: `vagrant` invoked: ["up", "--provider", "vsphere"]
DEBUG vagrant: Creating Vagrant environment
 INFO environment: Environment initialized (#<Vagrant::Environment:0x00000100d3fb98>)
 INFO environment:   - cwd: /Users/lutaylor/test/new
 INFO environment: Home path: /Users/lutaylor/.vagrant.d
 INFO environment: Local data path: /Users/lutaylor/test/new/.vagrant
DEBUG environment: Creating: /Users/lutaylor/test/new/.vagrant
 INFO environment: Running hook: environment_plugins_loaded
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000100e99c00>
 INFO environment: Running hook: environment_load
 INFO loader: Set :root = #<Pathname:/Users/lutaylor/test/new/Vagrantfile>
DEBUG loader: Populating proc cache for #<Pathname:/Users/lutaylor/test/new/Vagrantfile>
DEBUG loader: Load procs for pathname: /Users/lutaylor/test/new/Vagrantfile
 INFO loader: Loading configuration in order: [:home, :root]
DEBUG loader: Loading from: root (evaluating)
DEBUG loader: Configuration loaded successfully, finalizing and returning
 INFO host: Autodetecting host type for [#<Vagrant::Environment: /Users/lutaylor/test/new>]
DEBUG host: Trying: arch
DEBUG host: Trying: freebsd
DEBUG host: Trying: gentoo
DEBUG host: Trying: opensuse
DEBUG host: Trying: redhat
DEBUG host: Trying: slackware
DEBUG host: Trying: bsd
 INFO host: Detected: bsd!
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000100f5abf8>
 INFO cli: CLI: [] "up" ["--provider", "vsphere", "--"]
DEBUG cli: Invoking command class: VagrantPlugins::CommandUp::Command ["--provider", "vsphere", "--"]
DEBUG command: 'Up' each target VM...
DEBUG command: Getting target VMs for command. Arguments:
DEBUG command:  -- names: []
DEBUG command:  -- options: {:provider=>"vsphere"}
DEBUG command: Loading all machines...
 INFO environment: Getting machine: default (vsphere)
 INFO environment: Uncached load of machine.
 INFO loader: Set "2152971060_machine_default" = []
 INFO loader: Loading configuration in order: [:home, :root, "2152971060_machine_default"]
DEBUG loader: Loading from: root (cache)
DEBUG loader: Configuration loaded successfully, finalizing and returning
 INFO box_collection: Box not found: dummy (vsphere)
 INFO machine: Initializing machine: default
 INFO machine:   - Provider: VagrantPlugins::VSphere::Provider
 INFO machine:   - Box:
 INFO machine:   - Data dir: /Users/lutaylor/test/new/.vagrant/machines/default/vsphere
 INFO command: With machine: default (#<VagrantPlugins::VSphere::Provider:0x00000100d3fe40 @machine=#<Vagrant::Machine: default (VagrantPlugins::VSphere::Provider)>, @cap_logger=#<Log4r::Logger:0x00000100d3f648 @fullname="vagrant::capability_host::vagrantplugins::vsphere::provider", @outputters=[], @additive=true, @name="provider", @path="vagrant::capability_host::vagrantplugins::vsphere", @parent=#<Log4r::Logger:0x00000100ad5510 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x00000100b25ab0 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x00000100b25a38>, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x00000100b2e700 @depth=7>, @out=#<IO:<STDERR>>>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x00000100ad53a8 @level=0, @outputters=[]>, @level=1, @trace=false>, @level=1, @trace=false>, @cap_host_chain=[[:vsphere, #<#<Class:0x00000100d3fe18>:0x00000100d77728>]], @cap_args=[#<Vagrant::Machine: default (VagrantPlugins::VSphere::Provider)>], @cap_caps={:hyperv=>#<Vagrant::Registry:0x00000100d3fc10 @items={:public_address=>#<Proc:0x00000100bac790@/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/providers/hyperv/plugin.rb:25>}, @results_cache={}>, :virtualbox=>#<Vagrant::Registry:0x00000100d3fa30 @items={:forwarded_ports=>#<Proc:0x00000100bc6528@/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/plugins/providers/virtualbox/plugin.rb:27>, :public_address=>#<Proc:0x00000100c6f6c8@/Applications/Vagrant/embedded/gems/gems/vagrant-share-1.0.1/lib/vagrant-share.rb:39>}, @results_cache={}>}>)
 INFO interface: info: Bringing machine 'default' up with 'vsphere' provider...
Bringing machine 'default' up with 'vsphere' provider...
 INFO batch_action: Enabling parallelization by default.
 INFO batch_action: Disabling parallelization because provider doesn't support it: vsphere
 INFO batch_action: Batch action will parallelize: false
 INFO batch_action: Starting action: #<Vagrant::Machine:0x00000100ba6ca0> up {:destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil, :provider=>"vsphere"}
 INFO machine: Calling action: up on provider vSphere (new)
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000100c8e8e8>
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000010205e878>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x0000010205e850>
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::Call:0x0000010205e828>
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000100d1d818>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::IsCreated:0x00000100d2e3c0>
 INFO machine: Calling action: get_state on provider vSphere (new)
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x00000100dcc4d0>
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x00000100e83e28>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x00000100e83e00>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::GetState:0x00000100e83dd8>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x00000100e83d38>
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x00000100e83d38>
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::GetState:0x00000100e83dd8>
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x00000100e83e00>
 INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::ConfigValidate:0x00000100e83e28>
 INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::IsCreated:0x00000100d2e3c0>
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Warden:0x00000103168e70>
 INFO warden: Calling IN action: #<Proc:0x000001031d8b30@/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:94 (lambda)>
 INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::Clone:0x00000103168d58>
ERROR warden: Error occurred: uninitialized constant VagrantPlugins::VSphere::Action::Clone::Error
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: uninitialized constant VagrantPlugins::VSphere::Action::Clone::Error
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: uninitialized constant VagrantPlugins::VSphere::Action::Clone::Error
 INFO warden: Beginning recovery process...
 INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x0000010205e828>
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Recovery complete.
/Users/lutaylor/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/clone.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builtin/call.rb:51:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Users/lutaylor/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/connect_vsphere.rb:19:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/machine.rb:157:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'
ERROR warden: Error occurred: No error message
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
 INFO environment: Running hook: environment_unload
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x000001034ca848>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: No error message>
ERROR vagrant: No error message
ERROR vagrant: /Users/lutaylor/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/connect_vsphere.rb:22:in `rescue in call'
/Users/lutaylor/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/connect_vsphere.rb:14:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builder.rb:116:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:in `block in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/util/busy.rb:19:in `busy'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:in `run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/machine.rb:157:in `action'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'
 INFO interface: error: No error message
No error message
 INFO interface: Machine: error-exit ["VagrantPlugins::VSphere::Errors::VSphereError", "No error message"]

Is there a way to select/connect network adapters

Unfortunately our templates do not have a network adapter selected
image

Is there some way to select/connect the network adapter to a specific VLAN before bringing the VM up?
The rbvmomi examples show initial config using VirtualEthernetCardNetworkBackingInfo to configure network but I am unable to locate any usage/anything similar in vagrant-vsphere.

Would there be a way to make an automatic selection from a pool of networks?

no implicit conversion of nil into String

ERROR warden: Error occurred: no implicit conversion of nil into String
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO environment: Released process lock: machine-action-d69bac12b3c8d67265f557bab57df204
INFO environment: Running hook: environment_unload
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 1 hooks defined.
INFO runner: Running action: #Vagrant::Action::Builder:0x007fc8c9073520
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: no implicit conversion of nil into String>
ERROR vagrant: no implicit conversion of nil into String
ERROR vagrant: /home/nspecht/.vagrant.d/gems/gems/vagrant-vsphere-0.10.0/lib/vSphere/action/connect_vsphere.rb:23:in rescue in call' /home/nspecht/.vagrant.d/gems/gems/vagrant-vsphere-0.10.0/lib/vSphere/action/connect_vsphere.rb:14:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/config_validate.rb:25:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in block in run' /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:inbusy'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in run' /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:inaction_raw'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in block in action' /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:inlock'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:inaction'
/opt/vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
INFO interface: error: no implicit conversion of nil into String
no implicit conversion of nil into String
INFO interface: Machine: error-exit ["VagrantPlugins::VSphere::Errors::VSphereError", "no implicit conversion of nil into String"]

Configured template/source VM could not be found

What is supposed to go into the template name?

  config.vm.box = 'dummy'
  config.vm.box_url = 'dummy.box'

  config.vm.provider :vsphere do |vsphere|
    vsphere.host = '10.0.20.2'
    vsphere.name = 'dummytest'
 vsphere.clone_from_vm = true
 vsphere.template_name = '???'
    vsphere.user = 'root'
    vsphere.password = '***'
    vsphere.insecure = true
  end

I've tried a few different things, but it hasn't been working

SMB shared folders doesn't appear to work

Hi

I am trying to use vagrant 1.6.2 and test the shared folder functionality with vagrant-vsphere and it appears to always try and default to rsync. Am I doing something horribly wrong or is this just not supported yet with the vsphere provider?
I am using a windows host and guest,
My vagrantfile is as follows:

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

config.vm.define :TestBox do |config|
config.windows.halt_timeout = 15
config.winrm.username = "Administrator"
config.winrm.password = "******"
config.vm.box = "TestBox"
config.vm.communicator = "winrm"
config.berkshelf.enabled = true

config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct:true

config.vm.box_url = "./TestBox.box"
config.vm.synced_folder ".", "/vagrant", type: "smb"

config.vm.provision "chef_solo" do |chef|
chef.log_level = :info
chef.custom_config_path = "Vagrantfile.chef"
chef.add_recipe "windows::TestRunBook"

end

config.vm.provider :vsphere do |vsphere|
vsphere.host = '10.20.1.67'
vsphere.compute_resource_name = '10.20.1.97'
vsphere.resource_pool_name = 'Provisioning'
vsphere.template_name = 'DevOps_Production_Templates/DevOps_Windows2008R2'
vsphere.name = 'TestBox'
vsphere.user = 'administrator'
vsphere.password = '************'
vsphere.insecure = 'false'
vsphere.data_store_name = 'QA-DS100'

end

end

end

Output is:

C:\vagrant-vsphere>vagrant provision TestBox
Updating Vagrant's berkshelf: 'C:/Users/DevOps_Admin/.berkshelf/TestBox/vagrant/
berkshelf-20140515-456-pdunpi-TestBox'
Resolving cookbook dependencies...
Using chef_handler (1.1.6)
Using windows (1.31.0)
Vendoring chef_handler (1.1.6) to C:/Users/DevOps_Admin/.berkshelf/TestBox/vagra
nt/berkshelf-20140515-456-pdunpi-TestBox/chef_handler
Vendoring windows (1.31.0) to C:/Users/DevOps_Admin/.berkshelf/TestBox/vagrant/b
erkshelf-20140515-456-pdunpi-TestBox/windows
==> TestBox: Warning! Folder sync disabled because the rsync binary is
==> TestBox: missing. Make sure rsync is installed and the binary can
==> TestBox: be found in PATH.
==> TestBox: Running provisioner: chef_solo...
Generating chef JSON and uploading...
==> TestBox: Running chef-solo...
==> TestBox: [2014-05-21T09:33:16-07:00] INFO: *** Chef 11.12.4 ***
==> TestBox: [2014-05-21T09:33:16-07:00] INFO: Chef-client pid: 1524
==> TestBox: [2014-05-21T09:33:45-07:00] INFO: Setting the run_list to ["recipe[
windows::TestRunBook]"] from CLI options
==> TestBox: [2014-05-21T09:33:45-07:00] INFO: Run List is [recipe[windows::Test
RunBook]]
==> TestBox: [2014-05-21T09:33:45-07:00] INFO: Run List expands to [windows::Tes
tRunBook]
==> TestBox: [2014-05-21T09:33:45-07:00] INFO: Starting Chef Run for Template-CI
.T-BX.COM
==> TestBox:
==> TestBox: [2014-05-21T09:33:45-07:00] INFO: Running start handlers
==> TestBox: [2014-05-21T09:33:45-07:00] INFO: Start handlers complete.
==> TestBox: [2014-05-21T09:33:46-07:00] INFO: WindowsPackage light-weight resou
rce already initialized -- overriding!
==> TestBox: [2014-05-21T09:33:48-07:00] INFO: Chef Run complete in 2.886037 sec
onds
==> TestBox: [2014-05-21T09:33:48-07:00] INFO: Running report handlers
==> TestBox: [2014-05-21T09:33:48-07:00] INFO: Report handlers complete

Error on "vagrant up --provider=vsphere"

Bringing machine 'default' up with 'vsphere' provider...
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:878:in initialize' /Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:878:inopen'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:878:in block in connect' /Applications/Vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:intimeout'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:877:in connect' /Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:862:indo_start'
/Applications/Vagrant/embedded/lib/ruby/2.0.0/net/http.rb:857:in start' /Users/anish/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/trivial_soap.rb:56:inrestart_http'
/Users/anish/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/trivial_soap.rb:20:in initialize' /Users/anish/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/connection.rb:31:ininitialize'
/Users/anish/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:34:in new' /Users/anish/.vagrant.d/gems/gems/rbvmomi-1.6.0/lib/rbvmomi/vim.rb:34:inconnect'
/Users/anish/.vagrant.d/gems/gems/vagrant-vsphere-0.8.1/lib/vSphere/action/connect_vsphere.rb:15:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builtin/config_validate.rb:25:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/warden.rb:34:incall'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/builder.rb:116:in call' /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:inblock in run'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/util/busy.rb:19:in busy' /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/action/runner.rb:69:inrun'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/machine.rb:157:in action' /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.3/lib/vagrant/batch_action.rb:72:inblock (2 levels) in run'
No error message

How can I figure out what the issue is here:

Please help me Out

Thanks

Sooraj

nokogiri conflict on Windows

The vsphere plugin doesn't work on my system due to a conflict with another version of nokogiri already installed as a dependency of another vagrant plugin:

ERROR root: Failed to load plugin: vagrant-vsphere
ERROR root:  -- Error: #<Gem::LoadError: Unable to activate vagrant-vsphere-0.5.1, because nokogiri-1.6.0-x86-mingw32 conflicts with nokogiri (= 1.5.10)>
ERROR root:  -- Backtrace:
ERROR root: C:/Tools/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts'
C:/Tools/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:746:in `activate'
C:/Tools/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
C:/Tools/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `try_activate'
C:/Tools/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
C:/Tools/Vagrant/embedded/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
C:/Tools/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant.rb:193:in `require_plugin'
C:/Tools/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:744:in `block in load_plugins'
C:/Tools/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:741:in `each'
C:/Tools/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:741:in `load_plugins'
C:/Tools/Vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:132:in `initialize'
C:/Tools/Vagrant/embedded/gems/gems/vagrant-1.3.5/bin/vagrant:74:in `new'
C:/Tools/Vagrant/embedded/gems/gems/vagrant-1.3.5/bin/vagrant:74:in `<top (required)>'
C:/Tools/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `load'
C:/Tools/Vagrant/bin//../embedded/../embedded/gems/bin/vagrant:23:in `<main>'
 INFO interface: error: Failed to load the "vagrant-vsphere" plugin. View logs for more details.

Setup:

  • vagrant (1.3.5)
  • nugrant (1.1.0)
  • sahara (0.0.16)
  • vagrant-berkshelf (1.3.4)
  • vagrant-dns (0.5.0)
  • vagrant-omnibus (1.1.2)
  • vagrant-vbguest (0.9.0)
  • vagrant-vsphere (0.5.1)
  • vagrant-windows (1.2.3)

Here are all the references to nokogiri in the gemspec files of my locally installed plugins or its dependencies:

Searching 48 files for "nokogiri"

C:\Users\ringo_000\.vagrant.d\gems\gems\akami-1.2.0\akami.gemspec:
   15  
   16    s.add_dependency "gyoku", ">= 0.4.0"
   17:   s.add_dependency "nokogiri", ">= 1.4.0"
   18  
   19    s.add_development_dependency "rake",    "~> 0.8.7"

C:\Users\ringo_000\.vagrant.d\gems\gems\nori-1.1.5\nori.gemspec:
   15  
   16    s.add_development_dependency "rake",     "~> 0.8.7"
   17:   s.add_development_dependency "nokogiri", ">= 1.4.0"
   18    s.add_development_dependency "rspec",    "~> 2.5.0"
   19  

C:\Users\ringo_000\.vagrant.d\gems\gems\savon-0.9.5\savon.gemspec:
   21    s.add_dependency "akami",    "~> 1.0"
   22    s.add_dependency "gyoku",    ">= 0.4.0"
   23:   s.add_dependency "nokogiri", ">= 1.4.0"
   24  
   25    s.add_development_dependency "rake",    "~> 0.8.7"

C:\Users\ringo_000\.vagrant.d\gems\gems\vagrant-vsphere-0.5.1\vSphere.gemspec:
   12    s.description = 'Enables Vagrant to manage machines with VMWare vSphere.'
   13    
   14:   # force the use of Nokogiri 1.5.10 to prevent conflicts with older versions of zlib
   15:   s.add_dependency 'nokogiri', '1.5.10'
   16    s.add_dependency 'rbvmomi'
   17    s.add_dependency 'i18n', '~> 0.6.4'

C:\Users\ringo_000\.vagrant.d\gems\gems\wasabi-1.0.0\wasabi.gemspec:
   14    s.rubyforge_project = s.name
   15  
   16:   s.add_dependency "nokogiri", ">= 1.4.0"
   17  
   18    s.add_development_dependency "rake",    "~> 0.8.7"

C:\Users\ringo_000\.vagrant.d\gems\gems\winrm-1.1.3\winrm.gemspec:
   27    s.add_runtime_dependency  'gssapi', '~> 1.0.0'
   28    s.add_runtime_dependency  'httpclient', '~> 2.2', '>= 2.2.0.2'
   29:   s.add_runtime_dependency  'nokogiri', '~> 1.5'
   30    s.add_runtime_dependency  'rubyntlm', '~> 0.1.1'
   31    s.add_runtime_dependency  'uuidtools', '~> 2.1.2'

7 matches across 6 files

Can you make a new release of the plugin that sets a minimum version of nokogiri instead of locking it to 1.5.10?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.