Examples of removeAllSnapshots()


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

                    if (getVmState(vmMo) != State.Stopped) {
                       
                        // before we stop VM, remove all possible snapshots on the VM to let
                        // disk chain be collapsed
                        s_logger.info("Remove all snapshot before stopping VM " + cmd.getVmName());
                        vmMo.removeAllSnapshots();
                        if (vmMo.safePowerOff(_shutdown_waitMs)) {
                            state = State.Stopped;
                            return new StopAnswer(cmd, "Stop VM " + cmd.getVmName() + " Succeed", 0, true);
                        } else {
                          String msg = "Have problem in powering off VM " + cmd.getVmName() + ", let the process continue";
View Full Code Here

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

            AttachVolumeAnswer answer = new AttachVolumeAnswer(cmd, cmd.getDeviceId());
            if (cmd.getAttach()) {
                vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
            } else {
              vmMo.removeAllSnapshots();
                vmMo.detachDisk(datastoreVolumePath, false);
            }

            return answer;
        } catch (Throwable e) {
View Full Code Here

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

            AttachVolumeAnswer answer = new AttachVolumeAnswer(cmd, cmd.getDeviceId(), datastoreVolumePath);
            if (cmd.getAttach()) {
                vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
            } else {
                vmMo.removeAllSnapshots();
                vmMo.detachDisk(datastoreVolumePath, false);

                if (cmd.isManaged()) {
                    handleDatastoreAndVmdkDetach(cmd.get_iScsiName(), cmd.getStorageHost(), cmd.getStoragePort());
                } else {
View Full Code Here

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

            AttachAnswer answer = new AttachAnswer(disk);
            if (isAttach) {
                vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
            } else {
                vmMo.removeAllSnapshots();
                vmMo.detachDisk(datastoreVolumePath, false);

                if (isManaged) {
                    this.hostService.handleDatastoreAndVmdkDetach(iScsiName, storageHost, storagePort);
                } else {
View Full Code Here

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

                        if (s_logger.isInfoEnabled()) {
                            s_logger.info("Destroy root volume and VM itself. vmName " + vmName);
                        }

                        // Remove all snapshots to consolidate disks for removal
                        vmMo.removeAllSnapshots();
                       
                        VirtualMachineDiskInfo diskInfo = null;
                        if(vol.getChainInfo() != null)
                          diskInfo = _gson.fromJson(vol.getChainInfo(), VirtualMachineDiskInfo.class);
                       
View Full Code Here

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

            AttachVolumeAnswer answer = new AttachVolumeAnswer(cmd, cmd.getDeviceId(), datastoreVolumePath);
            if (cmd.getAttach()) {
                vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
            } else {
                vmMo.removeAllSnapshots();
                vmMo.detachDisk(datastoreVolumePath, false);

                if (cmd.isManaged()) {
                    handleDatastoreAndVmdkDetach(cmd.get_iScsiName(), cmd.getStorageHost(), cmd.getStoragePort());
                } else {
View Full Code Here

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

            AttachAnswer answer = new AttachAnswer(disk);
            if (isAttach) {
                vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
            } else {
                vmMo.removeAllSnapshots();
                vmMo.detachDisk(datastoreVolumePath, false);

                if (isManaged) {
                    this.hostService.handleDatastoreAndVmdkDetach(iScsiName, storageHost, storagePort);
                } else {
View Full Code Here

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

                        if (s_logger.isInfoEnabled()) {
                            s_logger.info("Destroy root volume and VM itself. vmName " + vmName);
                        }

                        // Remove all snapshots to consolidate disks for removal
                        vmMo.removeAllSnapshots();
                       
                        VirtualMachineDiskInfo diskInfo = null;
                        if(vol.getChainInfo() != null)
                          diskInfo = _gson.fromJson(vol.getChainInfo(), VirtualMachineDiskInfo.class);
                       
View Full Code Here

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

            AttachVolumeAnswer answer = new AttachVolumeAnswer(cmd, cmd.getDeviceId(), datastoreVolumePath);
            if (cmd.getAttach()) {
                vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
            } else {
                vmMo.removeAllSnapshots();
                vmMo.detachDisk(datastoreVolumePath, false);

                if (cmd.isManaged()) {
                    handleDatastoreAndVmdkDetach(cmd.get_iScsiName(), cmd.getStorageHost(), cmd.getStoragePort());
                } else {
View Full Code Here

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

                    if (getVmState(vmMo) != State.Stopped) {
                       
                        // before we stop VM, remove all possible snapshots on the VM to let
                        // disk chain be collapsed
                        s_logger.info("Remove all snapshot before stopping VM " + cmd.getVmName());
                        vmMo.removeAllSnapshots();
                        if (vmMo.safePowerOff(_shutdown_waitMs)) {
                            state = State.Stopped;
                            return new StopAnswer(cmd, "Stop VM " + cmd.getVmName() + " Succeed", 0, true);
                        } else {
                          String msg = "Have problem in powering off VM " + cmd.getVmName() + ", let the process continue";
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.