Can convert QCow2 to QCow2
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user