Clean up Vm
Vm cleanup code
Merge pull request #798 from sshveta/cleanupvm

Cleanupvm