I would answer your question...but where is the text?
This is a Simile.
There is no hidden meaning for it to be a metaphor, and it uses the form as something or like something, which makes it a simile.
Answer:
i) Anil has made a terrible mistake
ii) He has sounded the fire alarm