public void process() {
        try {
            VM vm = null;
            Task task = null;

            switch (taskType) {
            case START_VM:
                vm = (VM) target;
                vm.setStatus(VMStatus.PoweringUp);
                log.info("VM {} set to Powering Up state.", vm.getId());
                break;

            case START_VM_AS_UP:
                vm = (VM) target;
                vm.setStatus(VMStatus.Up);
                // store
                updateHost(vm.getHost());
                log.info("VM {} set to Up state.", vm.getId());
                break;

            case FINISH_MIGRATED_FROM_VM:
                vm = (VM) target;
                vm.setStatus(VM.VMStatus.Down);
                vm.setForDelete(true);
                // store
                updateHost(vm.getHost());
                log.info("Migrating VM {} finished on source host {}", vm.getId(), vm.getHost().getName());
                break;

            case FINISH_MIGRATED_FROM_VM_REMOVE_FROM_HOST:
                vm = (VM) target;
                vm.getHost().getRunningVMs().remove(vm.getId());
                // store
                updateHost(vm.getHost());
                log.info("Migrating VM {} removed from source host {}", vm.getId(), vm.getHost().getName());
                break;

            case FINISH_MIGRATED_TO_VM:
                vm = (VM) target;
                vm.setStatus(VM.VMStatus.Up);
                // store
                updateHost(vm.getHost());
                log.info("Migrating VM {} set to Up state on destination host {}", vm.getId(), vm.getHost().getName());
                break;

            case SHUTDOWN_VM:
                vm = (VM) target;
                vm.setStatus(VM.VMStatus.PoweredDown);
                vm.getHost().getRunningVMs().remove(vm.getId());
                // store
                updateHost(vm.getHost());
                log.info("VM {} set to Down state.", vm.getId());
                break;

            case FINISH_START_SPM:
                task = (Task) target;
                Host host = (Host) task.getTarget();
                host.setSpmId(1);
                host.setSpmLver(0);
                host.setSpmStatus(Host.SpmStatus.ACQUIRED); // SPM
                log.info("SPM started.");
                task.setFinished(true);
                break;

            case FINISH_CREATE_VOLUME:
                task = (Task) target;
                log.info("Volume created, task: {}", task.getId());
                task.setFinished(true);
                break;

            default:
                log.error("Unhandled status detected.");
                break;
            }
        } catch (Exception e) {
            log.error("Error during request processing", e);
        }
    }