mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Set encrypted PowerFlex disk format correctly (#7735)
Co-authored-by: Marcus Sorensen <mls@apple.com>
This commit is contained in:
parent
90baae3dcd
commit
63216425d5
@ -1609,6 +1609,9 @@ public class KVMStorageProcessor implements StorageProcessor {
|
||||
if (vol.getQemuEncryptFormat() != null) {
|
||||
newVol.setEncryptFormat(vol.getQemuEncryptFormat().toString());
|
||||
}
|
||||
if (vol.getFormat() != null) {
|
||||
format = vol.getFormat();
|
||||
}
|
||||
}
|
||||
newVol.setSize(volume.getSize());
|
||||
newVol.setFormat(ImageFormat.valueOf(format.toString().toUpperCase()));
|
||||
|
||||
@ -504,11 +504,7 @@ public class ScaleIOPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
|
||||
volume.setFolder(scaleIOVolume.getVtreeId());
|
||||
volume.setSize(scaleIOVolume.getSizeInKb() * 1024);
|
||||
volume.setPoolType(Storage.StoragePoolType.PowerFlex);
|
||||
if (volumeInfo.getVolumeType().equals(Volume.Type.ROOT)) {
|
||||
volume.setFormat(volumeInfo.getFormat());
|
||||
} else {
|
||||
volume.setFormat(Storage.ImageFormat.RAW);
|
||||
}
|
||||
volume.setFormat(volumeInfo.getFormat());
|
||||
volume.setPoolId(storagePoolId);
|
||||
VolumeObject createdObject = VolumeObject.getVolumeObject(volumeInfo.getDataStore(), volume);
|
||||
createdObject.update();
|
||||
@ -1202,7 +1198,7 @@ public class ScaleIOPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
|
||||
|
||||
if (payload.instanceName != null) {
|
||||
VMInstanceVO instance = vmInstanceDao.findVMByInstanceName(payload.instanceName);
|
||||
if (instance.getState().equals(VirtualMachine.State.Running)) {
|
||||
if (instance != null && instance.getState().equals(VirtualMachine.State.Running)) {
|
||||
hostId = instance.getHostId();
|
||||
attachedRunning = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user