CP-4666 improvements to xapi_vm_lifecycle.ml