def stop_vm(self):
if self.vagrant is not None:<EOL><INDENT>if self.destroy:<EOL><INDENT>self.vagrant.destroy()<EOL>shutil.rmtree(self.vagrant.root, ignore_errors=True)<EOL>self.vagrant = None<EOL><DEDENT>else:<EOL><INDENT>self.vagrant.halt()<EOL><DEDENT><DEDENT>
Stops or destroys the VM used to launch tasks.