Examples of removeSnapshot()


Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

            } finally {
                if(vmMo != null){
                    ManagedObjectReference snapshotMor = vmMo.getSnapshotMor(snapshotUuid);
                    if (snapshotMor != null) {
                        vmMo.removeSnapshot(snapshotUuid, false);
                    }
                }

                try {
                    if (workerVm != null) {
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

            exportVolumeToSecondaryStroage(vmMo, volumePath, secStorageUrl, "volumes/" + volumeFolder, exportName,
                    hostService.getWorkerName(hyperHost.getContext(), cmd, 1));
            return new Pair<String, String>(volumeFolder, exportName);

        } finally {
            vmMo.removeSnapshot(exportName, false);
            if (workerVm != null) {
                //detach volume and destroy worker vm
                workerVm.detachAllDisks();
                workerVm.destroy();
            }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

        } catch (Exception e) {
            String msg = e.getMessage();
            s_logger.error("failed to create snapshot for vm:" + vmName + " due to " + msg);
            try {
                if (vmMo.getSnapshotMor(vmSnapshotName) != null) {
                    vmMo.removeSnapshot(vmSnapshotName, false);
                }
            } catch (Exception e1) {
            }
            return new CreateVMSnapshotAnswer(cmd, false, e.getMessage());
        }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

                return new DeleteVMSnapshotAnswer(cmd, false, msg);
            } else {
                if (vmMo.getSnapshotMor(vmSnapshotName) == null) {
                    s_logger.debug("can not find the snapshot " + vmSnapshotName + ", assume it is already removed");
                } else {
                    if (!vmMo.removeSnapshot(vmSnapshotName, false)) {
                        String msg = "delete vm snapshot " + vmSnapshotName + " due to error occured in vmware";
                        s_logger.error(msg);
                        return new DeleteVMSnapshotAnswer(cmd, false, msg);
                    }
                }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

            exportVolumeToSecondaryStroage(vmMo, volumePath, secStorageUrl, destVolumePath, exportName,
                    hostService.getWorkerName(hyperHost.getContext(), cmd, 1));
            return new Pair<String, String>(destVolumePath, exportName);

        } finally {
            vmMo.removeSnapshot(exportName, false);
            if (workerVm != null) {
                //detach volume and destroy worker vm
                workerVm.detachAllDisks();
                workerVm.destroy();
            }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

                }
            } finally {
                if(vmMo != null){
                    ManagedObjectReference snapshotMor = vmMo.getSnapshotMor(snapshotUuid);
                    if (snapshotMor != null) {
                        vmMo.removeSnapshot(snapshotUuid, false);
                       
                        // Snapshot operation may cause disk consolidation in VMware, when this happens
                        // we need to update CloudStack DB
                        //
                        // TODO: this post operation fixup is not atomic and not safe when management server stops
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

            } finally {
                if (vmMo != null) {
                    ManagedObjectReference snapshotMor = vmMo.getSnapshotMor(snapshotUuid);
                    if (snapshotMor != null) {
                        vmMo.removeSnapshot(snapshotUuid, false);
                    }
                }

                try {
                    if (workerVm != null) {
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

            exportVolumeToSecondaryStroage(vmMo, volumePath, secStorageUrl, "volumes/" + volumeFolder, exportName,
                    hostService.getWorkerName(hyperHost.getContext(), cmd, 1));
            return new Pair<String, String>(volumeFolder, exportName);

        } finally {
            vmMo.removeSnapshot(exportName, false);
            if (workerVm != null) {
                //detach volume and destroy worker vm
                workerVm.detachAllDisks();
                workerVm.destroy();
            }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

            String msg = e.getMessage();
            s_logger.error("failed to create snapshot for vm:" + vmName + " due to " + msg);

            try {
                if (vmMo.getSnapshotMor(vmSnapshotName) != null) {
                    vmMo.removeSnapshot(vmSnapshotName, false);
                }
            } catch (Exception e1) {
            }

            return new CreateVMSnapshotAnswer(cmd, false, e.getMessage());
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.removeSnapshot()

                return new DeleteVMSnapshotAnswer(cmd, false, msg);
            } else {
                if (vmMo.getSnapshotMor(vmSnapshotName) == null) {
                    s_logger.debug("can not find the snapshot " + vmSnapshotName + ", assume it is already removed");
                } else {
                    if (!vmMo.removeSnapshot(vmSnapshotName, false)) {
                        String msg = "delete vm snapshot " + vmSnapshotName + " due to error occured in vmware";
                        s_logger.error(msg);

                        return new DeleteVMSnapshotAnswer(cmd, false, msg);
                    }
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.