Skip to content

Commit 6e1b9be

Browse files
committed
Optimize ARM disk performance
In testing, this saved 14 minutes and 100MB on the RPi4 build machine.
1 parent 39474a1 commit 6e1b9be

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packer/ubuntu-kvm.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,16 @@
4343
"iso_checksum": "file:{{user `mirror_url`}}/SHA256SUMS",
4444
"output_directory": "{{user `output_dir`}}",
4545
"shutdown_command": "echo -e \"{{user `ssh_pass`}}\\n\" | sudo -S poweroff",
46+
"disk_cache": "unsafe",
4647
"disk_compression": "true",
47-
"disk_size": "20G",
48-
"disk_discard": "unmap",
4948
"disk_detect_zeroes": "unmap",
49+
"disk_discard": "unmap",
50+
"disk_size": "20G",
5051
"format": "qcow2",
52+
"qemu_img_args": {
53+
"create": ["-o", "preallocation=falloc"],
54+
"convert": ["-o", "compression_type=zstd"]
55+
},
5156
"http_directory": "http",
5257
"ssh_username": "{{user `ssh_user`}}",
5358
"ssh_password": "{{user `ssh_pass`}}",

0 commit comments

Comments
 (0)