mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: Detect and open flat VMDK images
Adds support to detect and open flat vmdk images. In particular, it updates the `detect_image_type` method to account for unaligned & small sized descriptor file (which describes the VMDK disk) reads using AlignedFile::read_at instead of read_file_at to loop over for small reads. Signed-off-by: Sumedh Alok Sharma <sumsharma@microsoft.com>
This commit is contained in:
committed by
Wei Liu
parent
e6fd5fefc4
commit
82b65c3352
@@ -1597,6 +1597,7 @@ mod common_parallel {
|
||||
ImageType::Qcow2 => ("qcow2", &[]),
|
||||
ImageType::FixedVhd => ("vpc", &["-o", "subformat=fixed"]),
|
||||
ImageType::Vhdx => ("vhdx", &[]),
|
||||
ImageType::FlatVmdk => panic!("unsupported image_type {image_type}"),
|
||||
ImageType::Unknown => panic!("unsupported image_type {image_type}"),
|
||||
};
|
||||
let image_type_str = image_type.to_string();
|
||||
|
||||
Reference in New Issue
Block a user