TrueNAS SCALE 25.04 introduced two breaking changes in its iSCSI API:
1. Unique alias constraint: POST /iscsi/target with alias collides on retry.
Remove alias field entirely — names are already unique per-VM.
2. Pydantic v2 strict integer validation: rejects JSON strings ("7") where
integers are expected. Perl scalars become dual-vars (string+int flags)
after log interpolation or hash-key lookups, causing encode_json to emit
quoted values. Fix: int() at all integer-ID pass sites (portal, target,
extent, lun) and omit null initiator/auth instead of sending explicit null.
Confirmed: alloc_image works on SCALE 25.04, SCALE 24.10, and CORE 13.0-U6.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>