Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO images by default are uploaded as Raw/Thin Provision. And if you … #963

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.ovirt.engine.core.common.businessentities.storage.TransferClientType;
import org.ovirt.engine.core.common.businessentities.storage.TransferType;
import org.ovirt.engine.core.common.businessentities.storage.VolumeFormat;
import org.ovirt.engine.core.common.businessentities.storage.VolumeType;
import org.ovirt.engine.core.common.queries.IdQueryParameters;
import org.ovirt.engine.core.common.queries.QueryReturnValue;
import org.ovirt.engine.core.common.queries.QueryType;
Expand Down Expand Up @@ -377,6 +378,14 @@ public boolean flush() {
diskImage.getVolumeFormat(),
getDiskModel().getStorageDomain().getSelectedItem().getStorageType(), null, null));
diskImage.setContentType(getImageInfoModel().getContentType());
if (diskImage.getVolumeFormat() != VolumeFormat.COW && getImageInfoModel().getContentType() == DiskContentType.ISO) {
// RAW+ThinProvision is not supported by a block storage. So, if you later try to move such ISO disk to
// a block storage the system will convert it automatically into COW+ThinProvision. But this corrupts
// bootable ISO disks.
// Since there is no much sense to upload ISO images as ThinProvision we can upload them as Preallocated
// and this would address the issue explained above.
diskImage.setVolumeType(VolumeType.Preallocated);
}
return true;
} else {
setIsValid(false);
Expand Down