Move vm_setup to directly after connect