Runtime plugin fixes
-
fix(#88):
path()fast-fail + deterministic by-path fallback.
PVE'sdestroy_vm→foreach_volume_fullclosure at
QemuServer.pm:1839callspath() → remove_owned_drive → vdisk_free → free_image; whenpath()died, the closure exited
beforefree_imageran and TrueNAS state leaked (zvol, iSCSI
extent, and target-extent mapping stayed behind forever). The old
path()called_device_for_lunwith the default 600-retry
budget (60 s), longer than the destroy hold, so any node that
never activated the disk locally (cross-node destroy of an
orphan, destroy after a leaked config-migrate, or destroy on a
node whose iSCSI session was down) aborteddestroy_vmbefore
free_imageran. Now:retries=5(500 ms) at thepath()call
site, deterministic/dev/disk/by-path/ip-<portal>-iscsi-<iqn>-lun-<N>
string fallback for callers that don't need a live device, and die
only if LUN + portal + IQN are all missing. Verified with a
two-scenario timing test: same-node destroy 11.5 s, cross-node
destroy with iSCSI session logged out on destroying node 15.6 s;
TN state cleaned in both. Pre-fix the cross-node case hung ~60 s
and leaked. Closes #88. -
fix: iSCSI extent
blocksize=4096 pblocksize=trueto satisfy
the QEMU 10.1 alignment check. QEMU 10.1's stricter permission
/ alignment negotiation refuses to attach ascsi-hdwhose
backing image reports the mismatch shape that TrueNAS's default
extent config produces:logical_block_size=512alongside
physical_block_size=16384(inferred from the zvol's 16K
volblocksize).qm starton any iSCSI-backed disk dies with:
kvm: -device scsi-hd,...,write-cache=on: Cannot get 'write' permission without 'resize': Image size is not a multiple of request alignment. Now everyiscsi.extent.createpayload
(_tn_extent_create,_alloc_image_iscsi,_clone_image_iscsi)
sendsblocksize=4096andpblocksize=true, so TN reports
lbs=4096 pbs=4096to the initiator and QEMU's check passes.
Existing extents are unchanged; older VMs that already fail to
start under QEMU 10.1 need their extents updated in place
(midclt call iscsi.extent.update <id> '{"blocksize": 4096, "pblocksize": true}') or refreshed via a clone. Verified: 2G
/ 3G / 4G disks previously refused byqm startnow start on
the same QEMU/PVE combination.
Install.sh fixes (closes #118, #119)
-
install.sh scfg field names. The installer's embedded Perl
tn_api_call/tn_api_call_write/execute_provisioning
helpers now build theirscfghash with the currenttn_*
field names (tn_api_host,tn_api_key,tn_api_insecure,
tn_api_port,tn_dataset,tn_target_iqn,
tn_discovery_portal). Prior installers used the pre-2.1.19
legacy keys and failed every API-key probe even with a valid
key. Closes #118. -
install.sh pre-release version pattern. The release-tag
validator now accepts[-~](alpha|beta|rc)[0-9]as a
pre-release suffix. The oldvX.Y.Z/vX.Y.Z-debN
regex rejected every beta we've shipped. Closes #119.
Docs
-
docs(#117): README.md and
wiki/Installation.mdwalk through
Base Name, Portal, and Target group bindings in order (verify
Base Name under Target Global Configuration; create/verify
Portal with ID; create Target with Portal Group ID + Initiator
Group ID bindings and Authentication Method set explicitly).
Callout: without those group bindings the target exists but is
not exposed on the network, andiscsiadm --mode discovery
from Proxmox returns empty — the exact failure mode from
issue #117. Refs #117. -
docs(#120): The temporary
/alpha/install.shredirect on
main (September 18 workaround for #118 + #119) has been
flipped back to/main/install.shnow that main carries the
fixed installer. Closes #120.
Verification
Live on the 3-node PVE cluster (pve / proxmox2 / pvevm1,
PVE 10.x, TrueNAS SCALE):
- Regression sweep: 16 assertions OK on core lifecycle (create,
resize, native snapshot, delsnapshot with TN cascade, VM
start/stop, full clone, template, linked clone,pvesm list,
pvesm status, destroy with TN cleanup). - Two-scenario #88 destroy-cascade timing test: 4/4 OK, same-node
11.5 s and cross-node-with-iSCSI-down 15.6 s; TN state cleaned
in both. - PBS backup+restore roundtrip on a fresh 1 GiB LUN: marker
survived write →vzdump→qmrestore→ read; backup at
pbs:backup/vm/9970/2026-09-30T22:16:04Zvisible on all three
cluster nodes.