storagePoolMgr.copyPhysicalDisk(srcDisk, destName, secondaryStorage, cmd.getWaitInMillSeconds());
final int wait = cmd.getWaitInMillSeconds(); final TemplateObjectTO template = (TemplateObjectTO)destData; final DataStoreTO imageStore = template.getDataStore(); destFile.setFormat(PhysicalDiskFormat.QCOW2); final QemuImg q = new QemuImg(cmd.getWaitInMillSeconds()); try { q.convert(srcFile, destFile);
final QemuImg q = new QemuImg(cmd.getWaitInMillSeconds()); q.convert(srcFile, destFile); final Script command = new Script(_manageSnapshotPath, cmd.getWaitInMillSeconds(), s_logger); command.add("-b", snapshotDisk.getPath()); command.add("-n", snapshotName);
KVMPhysicalDisk disk = storagePoolMgr.copyPhysicalDisk(snapshotDisk, path != null ? path : volUuid, primaryPool, cmd.getWaitInMillSeconds());
final KVMPhysicalDisk newDisk = storagePoolMgr.copyPhysicalDisk(volume, path != null ? path : volumeName, primaryPool, cmd.getWaitInMillSeconds());
s_logger.debug("Using template's size of " + tmplVol.getVirtualSize()); primaryVol = storagePoolMgr.copyPhysicalDisk(tmplVol, volume.getUuid(), primaryPool, cmd.getWaitInMillSeconds()); } else if (destData instanceof TemplateObjectTO) { TemplateObjectTO destTempl = (TemplateObjectTO)destData; primaryVol = storagePoolMgr.copyPhysicalDisk(tmplVol, path != null ? path : destTempl.getUuid(), primaryPool, cmd.getWaitInMillSeconds()); primaryVol = storagePoolMgr.copyPhysicalDisk(tmplVol, UUID.randomUUID().toString(), primaryPool, cmd.getWaitInMillSeconds());
vol = templateToPrimaryDownload(templatePath, primaryPool, volume.getUuid(), volume.getSize(), cmd.getWaitInMillSeconds()); } else { if (templatePath.contains("/mnt")) { BaseVol.getPool(), volume.getSize(), cmd.getWaitInMillSeconds());
protected Answer backupSnapshotForObjectStore(final CopyCommand cmd) { final DataTO destData = cmd.getDestTO(); final DataStoreTO imageStore = destData.getDataStore(); final DataTO cacheData = cmd.getCacheTO(); if (cacheData == null) { return new CopyCmdAnswer("Failed to copy to object store without cache store"); } final DataStoreTO cacheStore = cacheData.getDataStore(); ((SnapshotObjectTO)destData).setDataStore(cacheStore); final CopyCmdAnswer answer = (CopyCmdAnswer)backupSnapshot(cmd); if (!answer.getResult()) { return answer; } final SnapshotObjectTO snapshotOnCacheStore = (SnapshotObjectTO)answer.getNewData(); snapshotOnCacheStore.setDataStore(cacheStore); ((SnapshotObjectTO)destData).setDataStore(imageStore); final CopyCommand newCpyCmd = new CopyCommand(snapshotOnCacheStore, destData, cmd.getWaitInMillSeconds(), cmd.executeInSequence()); return copyToObjectStore(newCpyCmd); }
storagePoolMgr.deleteStoragePool(secondaryStoragePool.getType(), secondaryStoragePool.getUuid()); secondaryStoragePool = storagePoolMgr.getStoragePoolByURI(secondaryStorageUrl + File.separator + destVolumePath); storagePoolMgr.copyPhysicalDisk(volume, destVolumeName, secondaryStoragePool, cmd.getWaitInMillSeconds()); final VolumeObjectTO newVol = new VolumeObjectTO(); newVol.setPath(destVolumePath + File.separator + destVolumeName);