In vcenter_upload_box in inventory_check.rb, to check if a template exists the original template name is used.
Refer to inventory_check.rb, line 50: cfg.template = cfg.datacenter.find_vm(box_to_search)
So when executing vagrant up, the result is, the template is uploaded successfully with a name "mytemplate-computename", but the VM can't be created because it still try to find template with name "mytemplate".
Vagrant error :
The Virtual Machine Template_folder/mytemplate was not found in this environment.
This should not happen, please log an issue on Github
Workaround:
after first vagrant up, rename mytemplate-computename to mytemplate, then re-execute vagrant up
In vcenter_upload_box in inventory_check.rb, to check if a template exists the original template name is used. Refer to inventory_check.rb, line 50: cfg.template = cfg.datacenter.find_vm(box_to_search)
But in rbvmomi when it uploads template a post-fix #{@compute.name} will be added to the target template name. Refer to https://github.com/vmware/rbvmomi/blob/master/lib/rbvmomi/utils/deploy.rb , line 151 : vm_name = template_name+"-#{@computer.name}"
So when executing vagrant up, the result is, the template is uploaded successfully with a name "mytemplate-computename", but the VM can't be created because it still try to find template with name "mytemplate". Vagrant error : The Virtual Machine Template_folder/mytemplate was not found in this environment. This should not happen, please log an issue on Github
Workaround: after first vagrant up, rename mytemplate-computename to mytemplate, then re-execute vagrant up