Virtual Machine Lifecycle Management in Grid and Cloud Computing