{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/17061","labels_url":"https://api.github.com/repos/saltstack/salt/issues/17061/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/17061/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/17061/events","html_url":"https://github.com/saltstack/salt/issues/17061","id":47374755,"number":17061,"title":"salt-cloud vsphere cloning and creating vm's","user":{"login":"ingwa","id":434709,"avatar_url":"https://avatars.githubusercontent.com/u/434709?v=3","gravatar_id":"","url":"https://api.github.com/users/ingwa","html_url":"https://github.com/ingwa","followers_url":"https://api.github.com/users/ingwa/followers","following_url":"https://api.github.com/users/ingwa/following{/other_user}","gists_url":"https://api.github.com/users/ingwa/gists{/gist_id}","starred_url":"https://api.github.com/users/ingwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingwa/subscriptions","organizations_url":"https://api.github.com/users/ingwa/orgs","repos_url":"https://api.github.com/users/ingwa/repos","events_url":"https://api.github.com/users/ingwa/events{/privacy}","received_events_url":"https://api.github.com/users/ingwa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Carbon","name":"Carbon","color":"fbca04"},{"url":"https://api.github.com/repos/saltstack/salt/labels/RIoT","name":"RIoT","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-Cloud","name":"Salt-Cloud","color":"006b75"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Won't%20Fix%20For%20Now","name":"Won't Fix For Now","color":"bfe5bf"},{"url":"https://api.github.com/repos/saltstack/salt/labels/ZD","name":"ZD","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"techhat","id":287147,"avatar_url":"https://avatars.githubusercontent.com/u/287147?v=3","gravatar_id":"","url":"https://api.github.com/users/techhat","html_url":"https://github.com/techhat","followers_url":"https://api.github.com/users/techhat/followers","following_url":"https://api.github.com/users/techhat/following{/other_user}","gists_url":"https://api.github.com/users/techhat/gists{/gist_id}","starred_url":"https://api.github.com/users/techhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techhat/subscriptions","organizations_url":"https://api.github.com/users/techhat/orgs","repos_url":"https://api.github.com/users/techhat/repos","events_url":"https://api.github.com/users/techhat/events{/privacy}","received_events_url":"https://api.github.com/users/techhat/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2600,"closed_issues":2732,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-10-12T15:56:19Z","due_on":null,"closed_at":null},"comments":32,"created_at":"2014-10-31T09:26:32Z","updated_at":"2015-10-12T16:18:56Z","closed_at":"2015-08-09T22:47:55Z","body":"Hi there, \r\n\r\nI've finally managed to get salt cloud talking correctly to esxi and vsphere in general. Turns out to clone images or create vm's on esxi, you MUST have vsphere center server or similar orchestration management system from them in place to expose those elements of the api. The esxi api does not have that in place. \r\n\r\nHaving issues now on machine creation, seems there is a string int mixup somewhere: \r\n\r\n```\r\n[DEBUG   ] clone_kwargs are set to {'datastore': None,\r\n 'folder': None,\r\n 'host': None,\r\n 'name': 'newlinux',\r\n 'resourcepool': 'resgroup-11',\r\n 'template': False}\r\n[ERROR   ] There was a profile error: string indices must be integers, not str\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/salt/cloud/cli.py\", line 239, in run\r\n    self.config.get('names')\r\n  File \"/usr/local/lib/python2.7/dist-packages/salt/cloud/__init__.py\", line 1364, in run_profile\r\n    ret[name] = self.create(vm_)\r\n  File \"/usr/local/lib/python2.7/dist-packages/salt/cloud/__init__.py\", line 1234, in create\r\n    output = self.clouds[func](vm_)\r\n  File \"/usr/local/lib/python2.7/dist-packages/salt/cloud/clouds/vsphere.py\", line 248, in create\r\n    deploy_kwargs = _deploy(vm_)\r\n  File \"/usr/local/lib/python2.7/dist-packages/salt/cloud/clouds/vsphere.py\", line 308, in _deploy\r\n    ip_address = wait_for_ip(vm_['name'])\r\n  File \"/usr/local/lib/python2.7/dist-packages/salt/cloud/clouds/vsphere.py\", line 293, in wait_for_ip\r\n    log.debug('Pulling VM {0} {1} seconds for an IP address'.format(vm_['name']))\r\nTypeError: string indices must be integers, not str\r\n```\r\n\r\nHere is my profile: \r\n\r\n```\r\nmy-ubuntu-vm:\r\n  provider: my-provider\r\n  image: ubuntu\r\n  minion:\r\n    master: 192.168.1.15\r\n  ssh_username: userabc\r\n  ssh_password: passxyz\r\n  script_args: -c /tmp/\r\n  resourcepool: resgroup-11\r\n```\r\n\r\nI called it like this: \r\n\r\nsalt-cloud -p my-ubuntu-vm newlinux -l debug\r\n\r\nAny ideas on what I'm doing wrong? "},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/147450211","html_url":"https://github.com/saltstack/salt/issues/17061#issuecomment-147450211","issue_url":"https://api.github.com/repos/saltstack/salt/issues/17061","id":147450211,"user":{"login":"rallytime","id":6547906,"avatar_url":"https://avatars.githubusercontent.com/u/6547906?v=3","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T16:18:56Z","updated_at":"2015-10-12T16:18:56Z","body":"@molixrawdi - There is a salt-cloud driver named `vmware.py` in  the `salt/cloud/clouds/` directory of Salt, which is the salt-cloud driver I was referring to above. The docs that I linked in my earlier comment explain how to use that driver. The salt-cloud vmware.py driver depends on the `pyVmomi` package installable through pip.\r\n\r\nDoes that help clear things up?"}}