fix: add state volume pattern to parse_volname (#234)
PVE allocates a vm-<vmid>-state-<snapname> volume when a snapshot is taken with "Include RAM" selected. parse_volname didn't recognise this pattern, causing a crash during both setup and cleanup of the state volume. Added state volume pattern — treated as raw images, same vmid extraction as disk volumes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a47346161b
commit
80a78896bf
|
|
@ -415,6 +415,12 @@ sub parse_volname {
|
||||||
return ('images', $volname, $vmid, undef, undef, $isBase, 'raw');
|
return ('images', $volname, $vmid, undef, undef, $isBase, 'raw');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# RAM snapshot state volume: vm-<vmid>-state-<snapname>
|
||||||
|
# PVE allocates one of these per snapshot when "Include RAM" is selected.
|
||||||
|
if ($volname =~ /^vm-(\d+)-state-.+$/) {
|
||||||
|
return ('images', $volname, $1, undef, undef, 0, 'raw');
|
||||||
|
}
|
||||||
|
|
||||||
die "unable to parse TrueNAS volume name '$volname'\n";
|
die "unable to parse TrueNAS volume name '$volname'\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue