Examples of createSnapshot()


Examples of com.amazon.ec2.AmazonEC2SkeletonInterface.createSnapshot()

        return ec2Service.createSecurityGroup(createSecurityGroup);
    }

    public CreateSnapshotResponse createSnapshot(CreateSnapshot createSnapshot) {
        AmazonEC2SkeletonInterface ec2Service = ServiceProvider.getInstance().getServiceImpl(AmazonEC2SkeletonInterface.class);
        return ec2Service.createSnapshot(createSnapshot);
    }

    public CreateSpotDatafeedSubscriptionResponse createSpotDatafeedSubscription(CreateSpotDatafeedSubscription createSpotDatafeedSubscription) {
        AmazonEC2SkeletonInterface ec2Service = ServiceProvider.getInstance().getServiceImpl(AmazonEC2SkeletonInterface.class);
        return ec2Service.createSpotDatafeedSubscription(createSpotDatafeedSubscription);
View Full Code Here

Examples of com.cloud.bridge.service.core.ec2.EC2Engine.createSnapshot()

            throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - VolumeId");
        }

        // -> execute the request
        EC2Engine engine = ServiceProvider.getInstance().getEC2Engine();
        CreateSnapshotResponse EC2response = EC2SoapServiceImpl.toCreateSnapshotResponse( engine.createSnapshot( volumeId ), engine);
        serializeResponse(response, EC2response);
    }

    private void deregisterImage( HttpServletRequest request, HttpServletResponse response )
            throws ADBException, XMLStreamException, IOException {
View Full Code Here

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

                        String datastoreVolumePath = getVolumePathInDatastore(dsMo, volumePath + ".vmdk");
                        vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
                    }
                }

                if (!vmMo.createSnapshot(snapshotUuid, "Snapshot taken for " + cmd.getSnapshotName(), false, false)) {
                    throw new Exception("Failed to take snapshot " + cmd.getSnapshotName() + " on vm: " + cmd.getVmName());
                }

                snapshotBackupUuid = backupSnapshotToSecondaryStorage(vmMo, accountId, volumeId, cmd.getVolumePath(), snapshotUuid, secondaryStorageUrl, prevSnapshotUuid, prevBackupUuid,
                        hostService.getWorkerName(context, cmd, 1));
View Full Code Here

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

                    + ", templateName: " + templateName + ", templateUuid: " + templateUuid;
            s_logger.error(msg);
            throw new Exception(msg);
        }

        if(vmMo.createSnapshot("cloud.template.base", "Base snapshot", false, false)) {
            vmMo.setCustomFieldValue(CustomFieldConstants.CLOUD_UUID, templateUuid);
            vmMo.markAsTemplate();
        } else {
            vmMo.destroy();
            String msg = "Unable to create base snapshot for template, templateName: " + templateName + ", templateUuid: " + templateUuid;
View Full Code Here

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

                String datastoreVolumePath = getVolumePathInDatastore(dsMo, volumePath + ".vmdk");
                workerVm.attachDisk(new String[] { datastoreVolumePath }, morDs);
                vmMo = workerVm;
            }

            vmMo.createSnapshot(exportName, "Temporary snapshot for copy-volume command", false, false);

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

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

                s_logger.debug(msg);
                return new CreateVMSnapshotAnswer(cmd, false, msg);
            } else {
                if (vmMo.getSnapshotMor(vmSnapshotName) != null){
                    s_logger.debug("VM snapshot " + vmSnapshotName + " already exists");
                }else if (!vmMo.createSnapshot(vmSnapshotName, vmSnapshotDesc, snapshotMemory, true)) {
                    return new CreateVMSnapshotAnswer(cmd, false,
                            "Unable to create snapshot due to esxi internal failed");
                }
                // find VM disk file path after creating snapshot
                VirtualDisk[] vdisks = vmMo.getAllDiskDevice();
View Full Code Here

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

                    + ", templateName: " + templateName + ", templateUuid: " + templateUuid;
            s_logger.error(msg);
            throw new Exception(msg);
        }

        if(vmMo.createSnapshot("cloud.template.base", "Base snapshot", false, false)) {
            vmMo.setCustomFieldValue(CustomFieldConstants.CLOUD_UUID, templateUuid);
            vmMo.markAsTemplate();
        } else {
            vmMo.destroy();
            String msg = "Unable to create base snapshot for template, templateName: " + templateName + ", templateUuid: " + templateUuid;
View Full Code Here

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

                String datastoreVolumePath = getVolumePathInDatastore(dsMo, volumePath + ".vmdk");
                workerVm.attachDisk(new String[] { datastoreVolumePath }, morDs);
                vmMo = workerVm;
            }

            vmMo.createSnapshot(exportName, "Temporary snapshot for copy-volume command", false, false);

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

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

                } else {
                  s_logger.info("Using owner VM " + vmName + " for snapshot operation");
                  hasOwnerVm = true;
                }

                if (!vmMo.createSnapshot(snapshotUuid, "Snapshot taken for " + srcSnapshot.getName(), false, false)) {
                    throw new Exception("Failed to take snapshot " + srcSnapshot.getName() + " on vm: " + vmName);
                }

                backupResult = backupSnapshotToSecondaryStorage(vmMo, destSnapshot.getPath(), srcSnapshot.getVolume().getPath(), snapshotUuid, secondaryStorageUrl, prevSnapshotUuid, prevBackupUuid,
                        hostService.getWorkerName(context, cmd, 1));
View Full Code Here

Examples of com.cybozu.vmbkp.soap.VirtualMachineManager.createSnapshot()

    {
        String snapName = "snapshot-test";
       
        VirtualMachineManager vmm = gm_.searchVmWithName(vmName_);
        assert vmm != null;
        vmm.createSnapshot(snapName);

        SnapshotManager spm = vmm.searchSnapshotWithName(snapName);
        System.out.printf("-----disk list of %s of %s-----\n",
                          spm.getName(), spm.getVirtualMachine().getName());
        Utility.printList(spm.getConfig().getAllDiskNameList());
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.