TheGrandWazoo / freenas-proxmox

ZFS over iSCSI to FreeNAS API's from Proxmox VE
MIT License
239 stars 43 forks source link

Cannot create VM's #197

Open Hank45 opened 1 month ago

Hank45 commented 1 month ago

Proxmox 8.1, Truenas CORE 2023

When trying to create a VM from the Proxmox GUI, create starts, and then fails:

Warning: volblocksize (4096) is less than the default minimum block size (16384). To reduce wasted space a volblocksize of 16384 is recommended. Use of uninitialized value $target_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 787. Use of uninitialized value $target_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 787. Use of uninitialized value $target_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 787. TASK ERROR: unable to create VM 111 - Unable to find the target id for iqn.2005-229.org.freenas.ctl:pmox5 at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 259.

image

target "pmox5" exists in TrueNAS

ssh keys and API check out fine - I can see files from within the Proxmox GUI on the datastore. And it actually creates the disk before failing with the above errors.

WaxySteelWorm commented 1 month ago

Same issue here

bnordio commented 1 month ago

Same issue

Hank45 commented 6 days ago

Part of the problem is the plugin is not parsing my Truenas version:

TrueNAS-13.1-MASTER-202312190814

None of the regexes match:

syslog("info", (caller(0))[3] . " : successful : Server version: " . $result); if ($result =~ /^(TrueNAS|FreeNAS)-(\d+).(\d+)-U(\d+)(?(?=.).(\d+))$/) { $product_name = $1; $truenas_version = sprintf("%02d%02d%02d%02d", $2, $3 || 0, $4 || 0, $5 || 0); } elsif ($result =~ /^(TrueNAS)-(\d+).(\d+)(?(?=-U\d+)-U(\d+)|-\w+)(?(?=.).(\d+))$/) { $product_name = $1; $truenas_version = sprintf("%02d%02d%02d%02d", $2, $3 || 0, $4 || 0, $6 || 0); $truenas_release_type = $5 || "Production"; } elsif ($result =~ /^(TrueNAS-SCALE)-(\d+).(\d+)(?(?=-)-(\w+)).(\d+)(?(?=.).(\d+))(?(?=-)-(\d+))$/) { $product_name = $1; $truenas_version = sprintf("%02d%02d%02d%02d", $2, $3 || 0, $5 || 0, $7 || 0); $truenas_release_type = $4 || "Production"; } else { $product_name = "Unknown"; $truenas_release_type = "Unknown"; syslog("error", (caller(0))[3] . " : Could not parse the version of TrueNAS."); } syslog("info", (caller(0))[3] . " : ". $product_name . " Unformatted Version: " . $truenas_version); if ($truenas_version >= 11030100) { $freenas_api_version = "v2.0"; $dev_prefix = "/dev/"; } if ($truenas_release_type ne "Production") { syslog("warn", (caller(0))[3] . " : The '" . $product_name . "' release type of '" . $truenas_release_type . "' may not worked due to unsupported changes."); } } else { syslog("info", (caller(0))[3] . " : REST Client already initialized"); }

Hank45 commented 6 days ago

Sigh.. Upgraded to TrueNas 13.3-U6 and all is well. I guess it was hanging up parsing the version string.

TheGrandWazoo commented 5 days ago

What is MASTER? Is that a different branch or testing?

WaxySteelWorm commented 4 days ago

@Hank45 Can you provide screenshots of your proxmox storage config (sanitizing private info)?