Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant-vcenter doesn't add post-fix to template name as in rbvmomi #44

Open
unklhe opened this issue Mar 29, 2017 · 0 comments
Open

Vagrant-vcenter doesn't add post-fix to template name as in rbvmomi #44

unklhe opened this issue Mar 29, 2017 · 0 comments

Comments

@unklhe
Copy link

unklhe commented Mar 29, 2017

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

@unklhe unklhe changed the title Vagrant-vcenter doesn'nt add post-fix to template name as in rbvmomi Vagrant-vcenter does'nt add post-fix to template name as in rbvmomi Mar 30, 2017
@unklhe unklhe changed the title Vagrant-vcenter does'nt add post-fix to template name as in rbvmomi Vagrant-vcenter doesn't add post-fix to template name as in rbvmomi Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant