hva: remove code duplication in booting instance process.
Merge pull request #402 from axsh/fix-instance-boot-code

hva: clean code duplication.