refactor vm-side heat scripts