When attempting to build a qcow2 ubuntu 22.04 image packer ignores the disk_size directive and only sizes the disk to 2GB
Build VM image
source “qemu” “ubuntu” {
cpus = 2
memory = 2048
accelerator = “kvm”
iso_url = lookup(lookup(var.ubuntu, var.version, {}), “iso_url”, “”)
iso_checksum = lookup(lookup(var.ubuntu, var.version, {}), “iso_checksum”, “”)
headless = var.headless
disk_image = true
disk_cache = “unsafe”
disk_interface = “virtio”
net_device = “virtio-net”
format = “qcow2”
disk_compression = false
skip_resize_disk = true
disk_size = “16G”
output_directory = var.output_dir
qemuargs = [
[“-cpu”, “host”],
[“-cdrom”, “{var.input_dir}/{var.appliance_name}-cloud-init.iso”],
[“-serial”, “stdio”],
]