code: def find_vmrun(self):
          
  
          # look for vmrun
          vmrun_path = self.config.get_section_config("VMware").get("vmrun_path")
          if not vmrun_path:
              if sys.platform.startswith("win"):
                  vmrun_path = shutil.which("vmrun")
                  if vmrun_path is None:
                      # look for vmrun.exe using the VMware Workstation directory listed in the registry
                      vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation")
                      if vmrun_path is None:
                          # look for vmrun.exe using the VIX directory listed in the registry
                          vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware VIX")
              elif sys.platform.startswith("darwin"):
                  vmrun_path = "/Applications/VMware Fusion.app/Contents/Library/vmrun"
              else:
                  vmrun_path = "vmrun"
  
          if vmrun_path and not os.path.isabs(vmrun_path):
              vmrun_path = shutil.which(vmrun_path)
  
          if not vmrun_path:
              raise VMwareError("Could not find VMware vmrun, please make sure it is installed")
          if not os.path.isfile(vmrun_path):
              raise VMwareError("vmrun {} is not accessible".format(vmrun_path))
          if not os.access(vmrun_path, os.X_OK):
              raise VMwareError("vmrun is not executable")
          if os.path.basename(vmrun_path).lower() not in ["vmrun", "vmrun.exe"]:
              raise VMwareError("Invalid vmrun executable name {}".format(os.path.basename(vmrun_path)))
  
          self._vmrun_path = vmrun_path
          return vmrun_path
docs: Searches for vmrun.
  
          :returns: path to vmrun