Move calculation of VM resources to Utils