# qcow2_build_ubuntu_24_04_base

Build an Ubuntu 24.04 base image from cloud image.

```rhai
qcow2_build_ubuntu_24_04_base(dest_dir, size_gb) -> Map
```

## Parameters

- `dest_dir` (string): Destination directory for the base image
- `size_gb` (int): Desired size in GB (0 or negative to use original size)

## Returns

Returns a map with build results containing:
- `base_image_path`: Path to the created base image
- `snapshot`: Name of the initial snapshot
- `url`: URL of the source cloud image
- `resized_to_gb`: New size if resized (or unit if not resized)

## Examples

```rhai
// Download and prepare Ubuntu 24.04 base image
let result = qcow2_build_ubuntu_24_04_base("/vms/base", 0);

print("Base image: " + result.base_image_path);
print("From: " + result.url);
print("Initial snapshot: " + result.snapshot);

// Download and resize to 20GB
let result2 = qcow2_build_ubuntu_24_04_base("/vms/base", 20);

if result2.resized_to_gb != () {
    print("Resized to: " + result2.resized_to_gb + "GB");
}
```

## Notes

- Downloads the official Ubuntu 24.04 cloud image
- Creates an initial snapshot named "initial"
- Optionally resizes the image if size_gb > 0
- Useful for creating base images for VMs
- Image is ready to be used with cloud-init
