changes to shrink and prepare VM before packaging