Skip to content

Commit

Permalink
Provide encryption key for DATA volume type (in addition to ROOT) to …
Browse files Browse the repository at this point in the history
…copy volume.
  • Loading branch information
mprokopchuk committed Sep 10, 2024
1 parent 501d8c1 commit e7aea45
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,9 @@ public Answer copyVolumeFromPrimaryToPrimary(CopyCommand cmd) {

destPool = storagePoolMgr.getStoragePool(destPrimaryStore.getPoolType(), destPrimaryStore.getUuid());
try {
if (srcVol.getPassphrase() != null && srcVol.getVolumeType().equals(Volume.Type.ROOT)) {
Volume.Type volumeType = srcVol.getVolumeType();

if (srcVol.getPassphrase() != null && (Volume.Type.ROOT.equals(volumeType) || Volume.Type.DATADISK.equals(volumeType))) {
volume.setQemuEncryptFormat(QemuObject.EncryptFormat.LUKS);
storagePoolMgr.copyPhysicalDisk(volume, destVolumeName, destPool, cmd.getWaitInMillSeconds(), srcVol.getPassphrase(), destVol.getPassphrase(), srcVol.getProvisioningType());
} else {
Expand Down

0 comments on commit e7aea45

Please sign in to comment.