Refactor the code.
Move `vm` method to Machine model.
Add Cloud::Errors to store error messages.
Extract method `with_vm`.