Can convert QCow2 to QCow2
This commit is contained in:
parent
452a395525
commit
9822c5a72a
@ -192,6 +192,18 @@ impl DiskFileInfo {
|
||||
cmd
|
||||
}
|
||||
|
||||
// Clone a QCow file, using qemu-image instead of cp might improve "sparsification" of
|
||||
// file
|
||||
(DiskFileFormat::QCow2 { .. }, DiskFileFormat::QCow2 { .. }) => {
|
||||
let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM);
|
||||
cmd.arg("convert")
|
||||
.arg("-O")
|
||||
.arg("qcow2")
|
||||
.arg(&self.file_path)
|
||||
.arg(&temp_file);
|
||||
cmd
|
||||
}
|
||||
|
||||
// Convert Raw to QCow2 file
|
||||
(DiskFileFormat::Raw { .. }, DiskFileFormat::QCow2 { .. }) => {
|
||||
let mut cmd = Command::new(constants::QEMU_IMAGE_PROGRAM);
|
||||
|
Loading…
x
Reference in New Issue
Block a user