Add support of sparse files for QCow2 to sparse conversion
This commit is contained in:
parent
b9353326f5
commit
80d81c34bb
@ -181,9 +181,14 @@ impl DiskFileInfo {
|
||||
}
|
||||
|
||||
// Convert QCow2 to Raw file
|
||||
(DiskFileFormat::QCow2 { .. }, DiskFileFormat::Raw { .. }) => {
|
||||
(DiskFileFormat::QCow2 { .. }, DiskFileFormat::Raw { is_sparse }) => {
|
||||
let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM);
|
||||
cmd.arg("convert").arg(&self.file_path).arg(&temp_file);
|
||||
|
||||
if !is_sparse {
|
||||
cmd.args(["-S", "0"]);
|
||||
}
|
||||
|
||||
cmd
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user