Closed dmitriy-panasiuk closed 8 years ago
Hi, I was away for a week. I will have a look at these traces once I'm caught up.
Hi, sorry for the delay. I've replicated the problem here. It looks like the identity settings needs to be set up. There is a lot of data that goes into the customization spec, such as licensing information, that should be pulled from a config file or passed as JSON on the command line.
I need to read up a bit on this but unfortunately am going away for a week starting tomorrow. @mheidenr or @tim95030 may have some thoughts here?
@dmitriy-panasiuk please build gem from https://github.com/ezrapagel/knife-vsphere/pull/181 and give it a try
As licenseFilePrintData is required for Sever 2000&2003 only I suppose to let it die slowly
@swalberg this is just an idea and I did not test it
@mheidenr thanks for the patch, I'll wait to hear how it works. When I tested it, though, that entire identity
hash was nil so the block before and after the license assignment was causing error, too.
I haven't had time to look into this. The testing I have done and what I do currently is use a windows cspec and no other customization settings so this is definitely a path I have not tried. I will see if I can try some things over the weekend.
Please reopen if this is still relevant, and post the new error :metal:.
Hi,
I am trying to clone a vm from a template. It works fine, but if i add --chostname and --cdomain params it gives an error'
knife vsphere vm clone lcr_autodeployed_vm --template w2008r2_template --chostname lcr_test --cdomain ams.dev -f Templates --dest-folder test -VV
INFO: Using configuration from C:/chef-repo/.chef/knife.rb DEBUG: value for config item chef_node_name: DEBUG: value for config item vsphere_host: nl1vc03.global.sdl.corp DEBUG: value for config item vsphere_path: /sdk DEBUG: value for config item vsphere_port: 443 DEBUG: value for config item vsphere_nossl: DEBUG: value for config item vsphere_user: global\srv-cmtask DEBUG: value for config item vsphere_pass: srv_tridion_cm DEBUG: value for config item vsphere_insecure: true DEBUG: value for config item proxy_host: DEBUG: value for config item proxy_port: DEBUG: value for config item vsphere_dc: SDL Kiev DEBUG: value for config item folder: Live Content Reach/AutoDeployment DEBUG: value for config item vsphere_dc: SDL Kiev DEBUG: value for config item linked_clone: DEBUG: value for config item resource_pool: DEBUG: value for config item vsphere_dc: SDL Kiev DEBUG: value for config item datastore: DEBUG: value for config item datastorecluster: DEBUG: value for config item customization_vlan: DEBUG: value for config item linked_clone: DEBUG: value for config item datastore: DEBUG: value for config item datastore: DEBUG: value for config item datastorecluster: DEBUG: value for config item thin_provision: DEBUG: value for config item mark_as_template: DEBUG: value for config item annotation: DEBUG: value for config item customization_cpucount: DEBUG: value for config item customization_memory: DEBUG: value for config item customization_vlan: DEBUG: value for config item customization_spec: DEBUG: value for config item customization_dns_ips: DEBUG: value for config item customization_dns_suffixes: DEBUG: value for config item disable_customization: DEBUG: Identified os as windows. C:/Users/Administrator/.chefdk/gem/ruby/2.1.0/gems/knife-vsphere-1.2.3/lib/chef/knife/vsphere_vm_clone.rb:548:ingenerate_clone_spec': undefined method
identification' for #RbVmomi::VIM::CustomizationIdentitySettings:0x6d42710 (NoMethod Error) from C:/Users/Administrator/.chefdk/gem/ruby/2.1.0/gems/knife-vsphere-1.2.3/lib/chef/knife/vsphere_vm_clone.rb:310:inrun' from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife.rb:422:in
block in run_with_pretty_exceptions' from C:/opscode/chefdk/embedded/apps/chef/lib/chef/local_mode.rb:39:inwith_server_connectivity' from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife.rb:421:in
run_with_pretty_exceptions' from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife.rb:214:inrun' from C:/opscode/chefdk/embedded/apps/chef/lib/chef/application/knife.rb:142:in
run' from C:/opscode/chefdk/embedded/apps/chef/bin/knife:25:in<top (required)>' from C:/opscode/chefdk/bin/knife:63:in
load' from C:/opscode/chefdk/bin/knife:63:in `If i add --cspec param it gives different error C:/Users/Administrator/.chefdk/gem/ruby/2.1.0/gems/knife-vsphere-1.2.3/lib/chef/knife/vsphere_vm_clone.rb:551:in
generate_clone_spec': undefined method
autoMode' for nil:NilClass (NoMethodError) from C:/Users/Administrator/.chefdk/gem/ruby/2.1.0/gems/knife-vsphere-1.2.3/lib/chef/knife/vsphere_vm_clone.rb:310:in `run'