Hi all,
Hopefully you can help me out with this issue, because I can’t seem to figure out why this error is occurring. For many months we have been running our infrastructure without issue and recently we needed to import new VM templates to this particular site. When running the import command we get the following error:
[oneadmin@euopennebula ~]$ onevcenter templates --vcenter euvcenter65 --vuser administrator@vsphere.local --vpass "blah"
Connecting to vCenter: euvcenter65...done!
Looking for VM Templates...done!
Do you want to process datacenter EU (y/[n])? y
* VM Template found:
- Name : testvmtemplate
- Cluster : EU1
- Location : /
Import this VM template (y/[n])? y
For faster deployment operations and lower disk usage, OpenNebula can create new VMs as linked clones.
Would you like to use Linked Clones with VMs based on this template (y/[n])?
Do you want to specify a folder where the deployed VMs based on this template will appear in vSphere's VM and Templates section?
If no path is set, VMs will be placed in the same location where the template lives.
Please specify a path using slashes to separate folders e.g /Management/VMs or press Enter to use defaults:
The existing disks and networks in the template are being imported, please be patient...
There was an error trying to import a vcenter template: undefined method `close' for nil:NilClass/
["/usr/lib/one/ruby/vcenter_driver/virtual_machine.rb:70:in `unlock'", "/usr/lib/one/ruby/vcenter_driver/virtual_machine.rb:333:in `import_vcenter_disks'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:432:in `block (2 levels) in import_templates'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:299:in `each'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:299:in `block in import_templates'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:287:in `each'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:287:in `import_templates'", "/bin/onevcenter:128:in `block (2 levels) in <main>'", "/usr/lib/one/ruby/cli/command_parser.rb:449:in `call'", "/usr/lib/one/ruby/cli/command_parser.rb:449:in `run'", "/usr/lib/one/ruby/cli/command_parser.rb:76:in `initialize'", "/bin/onevcenter:57:in `new'", "/bin/onevcenter:57:in `<main>'"]
[oneadmin@euopennebula ~]$
Versions of the related components and OS (frontend, hypervisors, VMs):
We are running
vCenter 6.5
Opennebula 5.4.3
Steps to reproduce:
Log in through the command line. Have a template ready to import from vCenter. Run the command onevcenter templates to try to import templates from vCenter
Select whatever new template you want to import.
Select the default values provided to you on each question.
Current results:
There was an error trying to import a vcenter template: undefined method close' for nil:NilClass/ ["/usr/lib/one/ruby/vcenter_driver/virtual_machine.rb:70:in
unlock’", “/usr/lib/one/ruby/vcenter_driver/virtual_machine.rb:333:in import_vcenter_disks'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:432:in
block (2 levels) in import_templates’”, “/usr/lib/one/ruby/vcenter_driver/importer.rb:299:in each'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:299:in
block in import_templates’”, “/usr/lib/one/ruby/vcenter_driver/importer.rb:287:in each'", "/usr/lib/one/ruby/vcenter_driver/importer.rb:287:in
import_templates’”, “/bin/onevcenter:128:in block (2 levels) in <main>'", "/usr/lib/one/ruby/cli/command_parser.rb:449:in
call’”, “/usr/lib/one/ruby/cli/command_parser.rb:449:in run'", "/usr/lib/one/ruby/cli/command_parser.rb:76:in
initialize’”, “/bin/onevcenter:57:in new'", "/bin/onevcenter:57:in
'”]
Expected results:
Expected results should be that the shouldn’t get an error on import and that the import will complete successfully.
Thanks and appreciate the help in advance.
Jesus