def get_vm_obj(self):
uuid = VcenterInterfaces.get_vcenter_vm_uuid_by_name(self.host, self.user, self.password, self.name)<EOL>vm_obj = self.vcenter_conn.content.searchIndex.FindByUuid(None, uuid, True, True)<EOL>if not vm_obj:<EOL><INDENT>print('<STR_LIT>'.format(uuid))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if not vm_obj.runtime.powerState ==vim.VirtualMachine.PowerState.poweredOff:<EOL><INDENT>print('<STR_LIT>'.format(vm_obj.name))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>return vm_obj<EOL>
Search for vm in vcenter, return the object if found
:return: