How to use VMWARE VSPHERE/ESXI AS A PROVIDER FOR VAGRANT ?

1,026 views
Skip to first unread message

Venkatesh Venigalla

unread,
Oct 28, 2015, 3:32:00 PM10/28/15
to Vagrant
Hello All,

I have installed vagrant and vagrant-vsphere plugin in my laptop. Could you please help in my creating the vagrant config file ? I have go through the below links but config.vm.box_url 
 option is not clear and not able to create that.


Thanks,
Venkatesh

Alvaro Miranda Aguilera

unread,
Oct 29, 2015, 1:10:08 AM10/29/15
to vagra...@googlegroups.com
Hello,

Got your mail but will be doing a better reply here.

How much experience you have got with Vagrant? Virtualbox?

How much familiar are you with VMWare Vsphere? Can you create from
template? from VM?

I will suggest trying to get some hands on experience on both before
jumping into this, or you will miss the fun :)


basically the instructions goes like this.

To be done on the Machine that have Vagrant

- You install the plugin
- You create the dummy machine
- Create a Vagrantfile
- run vagrant up

The readme on the vsphere plugin include all the information, maybe is
too much, but requires you are familiar with vsphere.

The pieces you need are:

Vagrant on the host requires a dummy box, that does nothing, thats why
is empty, just metadata.
on the vsphere server is where you select your starting point, a VM or
a template.

You need to tell the plugin the destination datastore. Be sure the
source VM/Template exist on the same datastore. Not sure if mandatory,
but when I tried, it failed if I tried to use different datastores.

On this issue I did leave a sample Vagranfile.

Ensure the Datacenter name, ip, datastore, etc are replaced.

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

Alvaro.
> --
> 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 vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/0ad0e645-16ae-4fc0-962e-bd4f5f247046%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Venkatesh Venigalla

unread,
Oct 29, 2015, 1:54:43 AM10/29/15
to Vagrant
Hi Alvaro,

Thanks for the reply. So far, I did the things described below.

As I am working on all the below components from a long time, I believe that I have enough knowledge to proceed further...:)

Created the Ubuntu 14.04 VM through vCenter.
Created the template for that.
Installed Vagrant on my laptop and installed the vagrant-vsphere plugin.
Created the configuration file and updated the vCenter and ESXi Server details in the file.
Ran the vagrant up --provider=vsphere then, it failed with config.vm.box_url error.

As I mentioned earlier my only question and confusion is on what to use for  config.vm.box and config.vm.box_url.

Most of the documents are using dummy and dummy.box but no proper explanation on where or how to create those.

It would be so grateful if you could explain about config.vm.box and config.vm.box_url with examples including the details of full path and/ or location.

Thanks

Alvaro Miranda Aguilera

unread,
Oct 29, 2015, 2:00:07 AM10/29/15
to vagra...@googlegroups.com
Hello

I got other email from you.

So, replying here for duplicates

so you can do

config.vm.box = “dummy”
config.vm.box_url = “path/to/dummy.box”


To create the dummy box:
Download this file:
https://github.com/nsidc/vagrant-vsphere/blob/master/example_box/metadata.json

Run this command

tar cvzf dummy.box ./metadata.json

or use dummy box attached.

Alvaro
> --
> 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 vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/bfbefc42-ac0e-4ada-9ab8-0859c8eeccd9%40googlegroups.com.
dummy.box
Reply all
Reply to author
Forward
0 new messages