public int getWaitInMillSeconds() { return getWait() * 1000; } }
KVMStoragePoolManager storagePoolManager = libvirtComputingResource.getStoragePoolMgr(); VolumeObjectTO srcVolumeObjectTO = (VolumeObjectTO)command.getSrcData(); PrimaryDataStoreTO srcPrimaryDataStore = (PrimaryDataStoreTO)srcVolumeObjectTO.getDataStore(); Map<String, String> srcDetails = command.getSrcDetails(); VolumeObjectTO destVolumeObjectTO = (VolumeObjectTO)command.getDestData(); PrimaryDataStoreTO destPrimaryDataStore = (PrimaryDataStoreTO)destVolumeObjectTO.getDataStore(); Map<String, String> destDetails = command.getDestDetails(); storagePoolManager.copyPhysicalDisk(srcPhysicalDisk, destPath, destPrimaryStorage, command.getWaitInMillSeconds());
@Override public Answer execute(final MigrateVolumeCommand command, final XenServer610Resource xenServer610Resource) { Connection connection = xenServer610Resource.getConnection(); String srcVolumeUuid = command.getVolumePath(); SR destPool = null; Map<String, String> destDetails = command.getDestDetails(); StorageFilerTO destPoolTO = command.getPool(); String destPoolUuid = destPoolTO.getUuid();
MigrateVolumeCommand command = new MigrateVolumeCommand(srcVolumeInfo.getId(), srcVolumeInfo.getPath(), destPool, srcVolumeInfo.getAttachedVmName(), srcVolumeInfo.getVolumeType(), waitInterval); details.put(DiskTO.STORAGE_HOST, destPool.getHostAddress()); command.setDestDetails(details);
Map<String, String> destDetails = getVolumeDetails(destVolumeInfo); MigrateVolumeCommand migrateVolumeCommand = new MigrateVolumeCommand(srcVolumeInfo.getTO(), destVolumeInfo.getTO(), srcDetails, destDetails, StorageManager.KvmStorageOfflineMigrationWait.value());
MigrateVolumeCommand command = new MigrateVolumeCommand(volume.getId(), volume.getPath(), destPool, volume.getAttachedVmName(), volume.getVolumeType(), waitInterval); EndPoint ep = selector.select(srcData, StorageAction.MIGRATEVOLUME); Answer answer = null;