class AutonomiccsSystemVmDeploymentService implements InitializingBean {

    public HostVO searchForAnotherRandomHostToStartSystemVm(VMInstanceVO vmInstance) {
        Long hostId = vmInstance.getHostId();
        if (hostId == null) {
            Long podId = vmInstance.getPodIdToDeployIn();
            return searchForRandomHostInPodToDeployAutonomiccsSystemVm(podService.findPodById(podId));
        }
        HostVO hostInWhichVmWasRunning = hostService.findHostById(hostId);
        return searchForAnotherRandomHostInTheClusterToStartSystemVmExcludingHost(hostInWhichVmWasRunning);
    }

}