'Start instance.'

def _start(self, auth):

    if self.started:
        display.info(('Skipping    started    %s/%s    instance    %s.' % (self.platform, self.version, self.instance_id)), verbosity=1)
        return
    display.info(('Initializing    new    %s/%s    instance    %s.' % (self.platform, self.version, self.instance_id)), verbosity=1)
    if (self.platform == 'windows'):
        with open('examples/scripts/ConfigureRemotingForAnsible.ps1', 'rb') as winrm_config_fd:
            winrm_config = winrm_config_fd.read().decode('utf-8')
    else:
        winrm_config = None
    data = dict(config=dict(platform=self.platform, version=self.version, public_key=(self.ssh_key.pub_contents if self.ssh_key else None), query=False, winrm_config=winrm_config))
    data.update(dict(auth=auth))
    headers = {'Content-Type': 'application/json'}
    tries = 3
    sleep = 15
    while True:
        tries -= 1
        response = self.client.put(self._uri, data=json.dumps(data), headers=headers)
        if (response.status_code == 200):
            break
        error = self._create_http_error(response)
        if (not tries):
            raise error
        display.warning(('%s.    Trying    again    after    %d    seconds.' % (error, sleep)))
        time.sleep(sleep)
    self.started = True
    self._save()
    display.info(('Started    %s/%s    from:    %s' % (self.platform, self.version, self._uri)), verbosity=1)
    if self.args.explain:
        return {}
    return response.json()
