{"action":"opened","issue":{"url":"https://api.github.com/repos/ezrapagel/knife-vsphere/issues/190","labels_url":"https://api.github.com/repos/ezrapagel/knife-vsphere/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/ezrapagel/knife-vsphere/issues/190/comments","events_url":"https://api.github.com/repos/ezrapagel/knife-vsphere/issues/190/events","html_url":"https://github.com/ezrapagel/knife-vsphere/issues/190","id":101189039,"number":190,"title":"VMDK add function returns unauthorized","user":{"login":"dpmitchell","id":6079192,"avatar_url":"https://avatars.githubusercontent.com/u/6079192?v=3","gravatar_id":"","url":"https://api.github.com/users/dpmitchell","html_url":"https://github.com/dpmitchell","followers_url":"https://api.github.com/users/dpmitchell/followers","following_url":"https://api.github.com/users/dpmitchell/following{/other_user}","gists_url":"https://api.github.com/users/dpmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/dpmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpmitchell/subscriptions","organizations_url":"https://api.github.com/users/dpmitchell/orgs","repos_url":"https://api.github.com/users/dpmitchell/repos","events_url":"https://api.github.com/users/dpmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/dpmitchell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-15T16:43:19Z","updated_at":"2015-08-15T16:43:19Z","closed_at":null,"body":"Hi,\r\n\r\nBumped into an issue where when adding a disk to a VM:\r\n\r\nknife vsphere vm vmdk add vmd-test-app1 30 -f \"Test\" --vmdk-type \"thin\"\r\nDatastore: NoBackup-* (2.71 TB(2981151899648) / 7.00 TB)\r\nChoosing: NoBackup-*\r\nNext vmdk name is => [NoBackup-*] vmd-test-app1/vmd-test-app1_1.vmdk\r\nERROR: RuntimeError: #<Net::HTTPUnauthorized 401 Unauthorized readbody=true>\r\n\r\nThis happens wether the VM is powered off or on.\r\n\r\nRunning with -VV I get the following stack trace:\r\n/Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/rbvmomi-1.8.2/lib/rbvmomi/vim/Datastore.rb:19:in `exists?': #<Net::HTTPUnauthorized 401 Unauthorized readbody=true> (RuntimeError)\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/knife-vsphere-1.2.2/lib/chef/knife/vsphere_vm_vmdk_add.rb:89:in `run'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/chef-12.4.1/lib/chef/knife.rb:425:in `block in run_with_pretty_exceptions'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/chef-12.4.1/lib/chef/local_mode.rb:39:in `with_server_connectivity'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/chef-12.4.1/lib/chef/knife.rb:424:in `run_with_pretty_exceptions'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/chef-12.4.1/lib/chef/knife.rb:215:in `run'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/chef-12.4.1/lib/chef/application/knife.rb:142:in `run'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/gems/chef-12.4.1/bin/knife:25:in `<top (required)>'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/bin/knife:23:in `load'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/bin/knife:23:in `<main>'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'\r\n\tfrom /Users/daniel.mitchell/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'\r\n\r\nI don't think this is a permission issue as I'm able to add disks via the GUI. Also it's the unauthorized message instead of a forbidden one. \r\n\r\nCheers"}}