Can convert QCow2 to raw

This commit is contained in:
2025-05-29 15:00:14 +02:00
parent 80d81c34bb
commit 452a395525
2 changed files with 13 additions and 1 deletions

View File

@ -192,6 +192,14 @@ impl DiskFileInfo {
cmd
}
// Convert Raw to QCow2 file
(DiskFileFormat::Raw { .. }, DiskFileFormat::QCow2 { .. }) => {
let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM);
cmd.arg("convert").arg(&self.file_path).arg(&temp_file);
cmd
}
// Dumb copy of file
(a, b) if a == b => {
let mut cmd = Command::new(constants::COPY_PROGRAM);