Hello,

Please check the Readme of the plugin. you need to use a dummy box in vagrant

and then use a template or vm on vmware vsphere.

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

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.


On Tue, Oct 20, 2015 at 9:49 PM, [email protected]
<[email protected]> wrote:
> Hi
>
> My latest issue..........
> Where is it ooking for the metadata.json file?
> I have it right next to the Vagrantfile.
> ── Baseubuntu14.04
> │   ├── Baseubuntu14.04.box
> │   ├── Baseubuntu14.04-disk1.vmdk
> │   ├── Baseubuntu14.04.mf
> │   ├── Baseubuntu14.04.ovf
> │   └── metadata.json
> ├── Baseubuntu14.04.box
> ├── metadata.json
> └── Vagrantfile
>
>
> vagrant up --provider=vsphere
> ==> default: Box 'Baseubuntu14.04.box' could not be found. Attempting to
> find and install...
>     default: Box Provider: vsphere
>     default: Box Version: >= 0
> ==> default: Box file was not detected as metadata. Adding it directly...
> ==> default: Adding box 'Baseubuntu14.04.box' (v0) for provider: vsphere
>     default: Unpacking necessary files from:
> file:///home/stefaansm/trusty64/Baseubuntu14.04.box
> The "metadata.json" file for the box 'Baseubuntu14.04.box' was not found.
> Boxes require this file in order for Vagrant to determine the
> provider it was made for. If you made the box, please add a
> "metadata.json" file to it. If someone else made the box, please
> notify the box creator that the box is corrupt. Documentation for
> box file format can be found at the URL below:
>
>
>
>
> On Tue, Oct 20, 2015 at 9:49 AM, Alvaro Miranda Aguilera <[email protected]>
> wrote:
>>
>> Hello there.
>>
>> Are you missing the datastore?
>> Where are you telling the plugin you want to use template vs machine?
>>
>>
>> What I have found is template and VM should be on the same datastore.
>>
>> Alvaro.
>>
>>
>> On Tue, Oct 20, 2015 at 7:13 PM, Stefaans Mostert
>> <[email protected]> wrote:
>> >
>> > Morning all
>> > I use vagrant-vsphere to provision vmware boxen to my environment.
>> > https://github.com/nsidc/vagrant-vsphere
>> >
>> > Now........
>> > It constantly gives me "tempate not found" error
>> > I have admin rights on the vsphere.compute_resource_name and on
>> > vsphere.host
>> > I specify the path correctly, to my knowledge and my metadata.json file
>> > is
>> > done correctly.
>> > When I log into vsphere via the interface I can see the file where I put
>> > it.
>> > I have used this to trouble shoot
>> > https://github.com/nsidc/vagrant-vsphere/issues/79
>> > No luck.
>> >
>> > I include my Vagrantfile and metadata.json with this.
>> >
>> > Vagrantfile:
>> > --------------------------------------
>> > agrant.configure("2") do |config|
>> >   config.vm.box = 'Baseubuntu14.04.box'
>> >   #config.vm.box_url = 'ubuntu/trusty64 '
>> >
>> > config.vm.provider :vsphere do |vsphere|
>> >     # The host we're going to connect to
>> >     vsphere.host = '10.1.202.246'
>> >
>> >    # The host for the new VM
>> >     vsphere.compute_resource_name = '10.1.202.246'
>> >
>> >     vsphere.resource_pool_name = ''
>> >
>> >     # The template we're going to clone
>> >     vsphere.template_name = 'Baseubuntu14.04'
>> >
>> >     # Top level where to create
>> >     #vsphere.data_center_name = '10.1.202.10'
>> >
>> >     # Where to create machine
>> >     vsphere.vm_base_path = 'Dev Ops'
>> >
>> >     # The name of the new machine
>> >     vsphere.name = 'Vagrant'
>> >
>> >     # vSphere login
>> >     vsphere.user = 'bigcorp\myuser'
>> >
>> >     # vSphere password
>> >     vsphere.password = 'mypass'
>> >
>> >     # If you don't have SSL configured correctly, set this to 'true'
>> >     vsphere.insecure = true
>> >   end
>> > end
>> >
>> >
>> > metadat.json:
>> > --------------------------------------------
>> > {
>> >   "name": "Baseubuntu14.04",
>> >   "description": "This box contains Ubuntu 14.04 LTS 64-bit.",
>> >   "versions": [{
>> >     "version": "0.2.0",
>> >     "providers": [{
>> >       "name": "vsphere",
>> >     }]
>> >   }]
>> > }
>> >
>> >
>> > Tree of my files, excluding Ansible:
>> > --------------------------------------------------------
>> > ├── Baseubuntu14.04
>> > │   ├── Baseubuntu14.04.box
>> > │   ├── Baseubuntu14.04-disk1.vmdk
>> > │   ├── Baseubuntu14.04.mf
>> > │   ├── Baseubuntu14.04.ovf
>> > │   └── metadata.json
>> > ├── Baseubuntu14.04.box
>> > ├── metadata.json
>> > └── Vagrantfile
>> >
>> >
>> > --
>> > This mailing list is governed under the HashiCorp Community Guidelines -
>> > https://www.hashicorp.com/community-guidelines.html. Behavior in
>> > violation
>> > of those guidelines may result in your removal from this mailing list.
>> >
>> > GitHub Issues: https://github.com/mitchellh/vagrant/issues
>> > IRC: #vagrant on Freenode
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Vagrant" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to [email protected].
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/vagrant-up/ef93a658-ce08-45dc-80b7-f45be5924873%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
>> of those guidelines may result in your removal from this mailing list.
>>
>> GitHub Issues: https://github.com/mitchellh/vagrant/issues
>> IRC: #vagrant on Freenode
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Vagrant" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/vagrant-up/72Mfb4uWkh8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/vagrant-up/CAHqq0eynPmVcfiMbJG62uoGL6LaCRZ%2Bt%2B91fRj-7G2yJ7xDVHg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> J Stefaans Mostert
> Mobile: 0844634590
> Fax: 0867300603
> skype: mozzi_za (kuberboef)
>
> Linux is simple. It just takes a genius to understand its simplicity.
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/CANNCwOWcrf9%2BNTEzObcB56BXwfP%3DX%3DrXDd5Ba-q%2B%3DovzC%3DnD3A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewNLFJZqXMP_ZqL-qsJ0Vf%3Drg%2BHHQT2VNCbhzTevUTBjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to