Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Unable to register a VM using rbvmomi and RegisterVM_Task

$
0
0

It doesn't seem to matter how I construct the datastore path, nothing works.

 

/Users/matt/.rvm/gems/ruby-1.9.2-p320@veewee/gems/rbvmomi-1.6.0/lib/rbvmomi/vim/Task.rb:11:in `wait_for_completion': InvalidDatastorePath: Invalid datastore path '[EMC-0156-1013]'. (RbVmomi::Fault)

  from register.rb:15:in `<main>'

 

Here is where I try to register the VM...

 

vm = dc.vmFolder.RegisterVM_Task(:path => '[EMC-0156-1013] rbvmomi_test/rbvmomi_test.vmx',

                                 :asTemplate => false,

                                 :pool => dc.vmFolder._connection.rootFolder.childEntity[0].hostFolder.childEntity[0].resourcePool)

 

I can test the location of the file and that returns true...

 

ds = dc.find_datastore('EMC-0156-1013')

puts ds.exists?('rbvmomi_test/rbvmomi_test.vmx') # => true

 

Any insight on how to construct the path would be awesome.


Viewing all articles
Browse latest Browse all 179681

Trending Articles