Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lxd/storage/backend_lxd: Prevent import of OVA format for conversion
An OVA (Open Virtualization Appliance) file is not a virtual disk format like VMDK and QCOW2. Instead, it is an archive format used for distributing virtual appliances. Since qemu-img info detects it as raw image format, we cannot use that to detect OVA files. Instead we need to check whether the uploaded file is a tar archive (contains a tar header). Note that we need to reset the file's read pointer after the file is uploaded and also open file with read permission (in addition to already requested write permission). Signed-off-by: Din Music <[email protected]>
- Loading branch information