Examples of StopCommand


Examples of com.cloud.agent.api.StopCommand

                        } else {
                            if (s_logger.isDebugEnabled()) {
                                s_logger.info("The guru did not like the answers so stopping " + vm);
                            }

                            StopCommand cmd = new StopCommand(vm, _mgmtServer.getExecuteInSequence());
                            StopAnswer answer = (StopAnswer) _agentMgr.easySend(destHostId, cmd);
                            if (answer == null || !answer.getResult()) {
                                s_logger.warn("Unable to stop " + vm + " due to " + (answer != null ? answer.getDetails() : "no answers"));
                                _haMgr.scheduleStop(vm, destHostId, WorkType.ForceStop);
                                throw new ExecutionException("Unable to stop " + vm + " so we are unable to retry the start operation");
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        }
    }

    protected <T extends VMInstanceVO> boolean sendStop(VirtualMachineGuru<T> guru, VirtualMachineProfile<T> profile, boolean force) {
        VMInstanceVO vm = profile.getVirtualMachine();
        StopCommand stop = new StopCommand(vm, _mgmtServer.getExecuteInSequence());
        try {
            Answer answer = _agentMgr.send(vm.getHostId(), stop);
            if (!answer.getResult()) {
                s_logger.debug("Unable to stop VM due to " + answer.getDetails());
                return false;
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        if (vm.getState() != State.Stopping) {
            throw new CloudRuntimeException("We cannot proceed with stop VM " + vm + " since it is not in 'Stopping' state, current state: " + vm.getState());
        }

        vmGuru.prepareStop(profile);
        StopCommand stop = new StopCommand(vm, _mgmtServer.getExecuteInSequence());
        boolean stopped = false;
        StopAnswer answer = null;
        try {
            answer = (StopAnswer) _agentMgr.send(vm.getHostId(), stop);
            stopped = answer.getResult();
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        VirtualMachineGuru<? extends VMInstanceVO> guru = _vmGurus.get(type);
        return guru.findById(vmId);
    }

    public Command cleanup(VirtualMachine vm) {
        return new StopCommand(vm, _mgmtServer.getExecuteInSequence());
    }
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

    public Command cleanup(VirtualMachine vm) {
        return new StopCommand(vm, _mgmtServer.getExecuteInSequence());
    }

    public Command cleanup(String vmName) {
        return new StopCommand(vmName, _mgmtServer.getExecuteInSequence());
    }
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

                        } else {
                            if (s_logger.isDebugEnabled()) {
                                s_logger.info("The guru did not like the answers so stopping " + vm);
                            }

                            StopCommand cmd = new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()));
                            StopAnswer answer = (StopAnswer) _agentMgr.easySend(destHostId, cmd);
                            if ( answer != null ) {
                                if (vm.getType() == VirtualMachine.Type.User) {
                                    String platform = answer.getPlatform();
                                    if (platform != null) {
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        }
    }

    protected boolean sendStop(VirtualMachineGuru guru, VirtualMachineProfile profile, boolean force) {
        VirtualMachine vm = profile.getVirtualMachine();
        StopCommand stop = new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()));
        try {
            StopAnswer answer = (StopAnswer) _agentMgr.send(vm.getHostId(), stop);
            if ( answer != null ) {
                if (vm.getType() == VirtualMachine.Type.User) {
                    String platform = answer.getPlatform();
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

        if (vm.getState() != State.Stopping) {
            throw new CloudRuntimeException("We cannot proceed with stop VM " + vm + " since it is not in 'Stopping' state, current state: " + vm.getState());
        }

        vmGuru.prepareStop(profile);
        StopCommand stop = new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()));
        boolean stopped = false;
        StopAnswer answer = null;
        try {
            answer = (StopAnswer)_agentMgr.send(vm.getHostId(), stop);
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

            throw new CloudRuntimeException("Failed to reboot the vm on host " + dest.getHost());
        }
    }

    public Command cleanup(VirtualMachine vm) {
        return new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()));
    }
View Full Code Here

Examples of com.cloud.agent.api.StopCommand

    public Command cleanup(VirtualMachine vm) {
        return new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()));
    }

    public Command cleanup(String vmName) {
        return new StopCommand(vmName, getExecuteInSequence(null));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.