Created
October 23, 2015 12:57
-
-
Save rondinelisaad/a7fa3e286bc73fe9fcc0 to your computer and use it in GitHub Desktop.
Vagrantfile with vsphere plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = 'dummy' | |
config.vm.box_url = './example_box/dummy.box' | |
config.vm.provider :vsphere do |vsphere| | |
# The host we're going to connect to | |
vsphere.host = '[ip_vcenter]' | |
# The host for the new VM | |
vsphere.compute_resource_name = '[cluster_vcenter]' | |
# The resource pool for the new VM | |
vsphere.resource_pool_name = 'Vagrant' | |
#Path to folder where new VM will be created | |
vsphere.vm_base_path = 'VagrantVMs' | |
# The template we're going to clone | |
#vsphere.template_name = 'Templates/CentOS_7/centos7.template.vagrant' | |
vsphere.template_name = 'VagrantVMs/vagrant-centos7' | |
vsphere.clone_from_vm = true | |
# The name of the new machine | |
vsphere.name = 'Centos7-Vagrant' + "_#{(Time.now.to_f * 1000.0).to_i}_#{rand(100000)}" | |
# vSphere login | |
vsphere.user = '[user_vcenter]' | |
# vSphere password | |
vsphere.password = '[password user_vcenter]' | |
# If you don't have SSL configured correctly, set this to 'true' | |
vsphere.insecure = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment