def _stop_instance(self):
try:<EOL><INDENT>vm_stop = self.compute.virtual_machines.power_off(<EOL>self.running_instance_id, self.running_instance_id<EOL>)<EOL><DEDENT>except Exception as error:<EOL><INDENT>raise AzureCloudException(<EOL>'<STR_LIT>'.format(error)<EOL>)<EOL><DEDENT>vm_stop.wait()<EOL>
Stop the instance.