[tl;dr Your difficulty is quite natural. You set yourself a problem that doesn't have a good solution.]
The schema that takes
(1) John ate the worms.
(2) The worms were eaten.
is one that transforms
- the sentence (1) in the active voice with the agentive verb "to eat" connecting the agent
- the passive voice sentence (2), where the main verb is an auxiliary (the stative verb to be), the former agent vanishes, and the former patient becomes the subject.
By the way, note also that the passive form need not conceal the agent:
(3) The worms were eaten by John.
This scheme cannot be made to work with
(4) John tried to eat the worms.
because (4) has no agentive verb connecting John with the worms. Instead "tried" is a catenative verb, and "to eat" is an infinitive that has no subject. Neither verb is in the active voice, which exists only with agentive verbs.
Hence there is no analogous conversion of this sentence to the passive.
At this point, you have to ask yourself what you really want. There seem to be many examples that give you some of the properties
- A passive construction with the worms as subject
- Concealment of John's agency
- Something that keeps to try and to eat as its verbs, and may only introduces auxiliaries like "were"
but I think you can't have 1&3 together because of constraints on the ways you can use "to try". For example:
- 1&2, Lynn's example: The worms were nearly eaten. But "nearly" isn't "tried", so it's not clear it means quite the same thing.
- 2&3: Someone tried to eat the worms. It doesn't try to be passive.
To see the difficulty with the third, spot the two ways in which this fails to satisfy the third property:
- 1&?: The worms were subjected to John's try at eating
I've tried to link to definitions of the least widely known grammatical terms, but weirdly I found no good link for agentive verb. These are verbs where there is an actor and optionally a patient, that is, they are the action verbs that show someone or something doing something.