Yeah, that makes sense, the vm has to be running before being saved.
I will add the following line before saving the RAM state
session = vm.wait_for_login()

Thanks for the review