hva: remove code duplication in booting instance process.