code: def get_vm_by_name(content, name, regex=False):
      '''
      Get a VM by its name
      '''
      return get_object_by_name(content, vim.VirtualMachine, name, regexf get_vm_by_name(content, name, regex=False):
      '''
      Get a VM by its name
      '''
      return get_object_by_name(content, vim.VirtualMachine, name, regex)
docs: Get a VM by its name