Skip to content

Commit

Permalink
Merge pull request #1102 from chrisx8/master
Browse files Browse the repository at this point in the history
Enable trimming QEMU disks
  • Loading branch information
jandubois authored Oct 14, 2022
2 parents 67c9e41 + 26c0491 commit 020d7ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/qemu/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ func Cmdline(cfg Config) (string, []string, error) {
args = appendArgsIfNoConflict(args, "-boot", "order=c,splash-time=0,menu=on")
}
if diskSize, _ := units.RAMInBytes(*cfg.LimaYAML.Disk); diskSize > 0 {
args = append(args, "-drive", fmt.Sprintf("file=%s,if=virtio", diffDisk))
args = append(args, "-drive", fmt.Sprintf("file=%s,if=virtio,discard=on", diffDisk))
} else if !isBaseDiskCDROM {
args = append(args, "-drive", fmt.Sprintf("file=%s,if=virtio", baseDisk))
args = append(args, "-drive", fmt.Sprintf("file=%s,if=virtio,discard=on", baseDisk))
}
// cloud-init
switch *y.Arch {
Expand Down

0 comments on commit 020d7ee

Please sign in to comment.