# Error: cannot parse 'disk_size' as uint: strconv.ParseUint: parsing "5G": invalid syntax (Packer)

## TL;DR
`disk_size` takes a bare number in MiB, not a human-readable size. Change `"5G"` to `"5120"`.

## The error

```
Build 'ubuntu-aarch64' prepare failure: 1 error(s) decoding:

* cannot parse 'disk_size' as uint: strconv.ParseUint: parsing "5G": invalid syntax
```

## Fix it

1. Find the `disk_size` (or your `build_disk_size` variable) in the template.
   - Success check: you see the quoted `"5G"` or similar suffix.
2. Replace with mebibytes as a bare number: 5 GiB becomes `5120`, 20 GiB becomes `20480`.
   - Success check: the value is digits only (quotes are fine; the suffix is the problem).
3. Run `packer validate`.
   - Success check: the decoding error is gone.
4. Re-run `packer build`.
   - Success check: the build prepares and proceeds.

## When to use this
You hit this at prepare/validate time with a `disk_size` carrying a unit suffix.

## When NOT to use this
Do not use this for disk *space* errors during provisioning (guest ran out of room; increase the size) or for cloud block-device size limits.

## Compatibility
Packer 1.x, qemu and other builders with numeric `disk_size`.

## Variants
- `cannot parse '[other-field]' as uint` for any numeric field given a suffixed string
- `"5GB"`, `"5120M"`, `"20g"` all fail the same way

## Root cause
The field decodes as an unsigned int in MiB. Go's `ParseUint` rejects anything but digits, so unit suffixes fail at config decode time, before the build starts.

## Edge cases
- Some builders document the unit as MiB explicitly; others just say "size". When in doubt, assume MiB.
- Template variables pass the string through; fix the variable default or the `-var` value, not just the template.
