FreeNAS ZFS-over-iSCSI Issue


Nov 19, 2019
I am trying to use a FreeNAS server for shared storage in a 3-node Proxmox cluster to enable HA and live migration. The iSCSI target is set up on a ZFS pool of 4 identical enterprise-grade SSD's and is reporting "healthy" in FreeNAS. I followed the helpful instructions here:

Proxmox is successfully connecting to the ZFS over iSCSI object when I add in Datacenter > Storage. It shows as "enabled" and "active" on each individual node in the cluster.

However, whenever I try to create a VM using it as storage, I am receiving the following error:

TASK ERROR: unable to create VM 8437 - error with cfs lock 'storage-custom-name-iSCSI': Unable to find the target id for at /usr/share/perl5/PVE/Storage/LunCmd/ line 149.

When I log into FreeNAS, I can see that a VM (zvol) has created on the pool with the name and VM ID I supplied, but it does not get past that. That zvol is only a few KiB in size. Given that the error is saying it cannot find a target id, I checked to make sure I have targets set up and (at least according to my understanding from the FreeNAS online guide) I think I have one set up properly.

Any suggestions out there for what I am doing wrong? Proxmox and FreeNAS details are below:


40 x Intel(R) Xeon(R) CPU E5-2470 v2 @ 2.40GHz (2 Sockets)

Kernel Version

Linux 5.0.15-1-pve #1 SMP PVE 5.0.15-1 (Wed, 03 Jul 2019 10:51:57 +0200)

PVE Manager Version


OS Version:

(Build Date: Sep 17, 2019 0:16)
Intel(R) Xeon(R) CPU E5-2470 v2 @ 2.40GHz (40 cores)
96 GiB

Any suggestions are greatly appreciated!
Well, I already solved one problem. I added the target name using the following syntax in the Edit:ZFS over iSCSI dialog box and it created the VM with no errors:

However, I now have these problems when I attempt to start the VM:

iscsiadm: No session found.
kvm: -drive file=iscsi://,if=none,id=drive-ide0,format=raw,cache=none,aio=native,detect-zeroes=on: iSCSI: Failed to connect to LUN : Failed to log in to target. Status: Authorization failure(514)
TASK ERROR: start failed: command '/usr/bin/kvm -id 8655 -name Test -chardev 'socket,id=qmp,path=/var/run/qemu-server/8655.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/ -daemonize -smbios 'type=1,uuid=7b27d477-ec8c-418d-a3ae-af5dfa36e5cf' -smp '1,sockets=1,cores=1,maxcpus=1' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc unix:/var/run/qemu-server/8655.vnc,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 512 -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'vmgenid,guid=9c6f238e-f6f7-4f67-9957-317e12e3e2d6' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'cirrus-vga,id=vga,bus=pci.0,addr=0x2' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi '' -drive 'file=iscsi://,if=none,id=drive-ide0,format=raw,cache=none,aio=native,detect-zeroes=on' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -drive 'file=/share/template/iso/Windows_xp.iso,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -netdev 'type=tap,id=net0,ifname=tap8655i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'rtl8139,mac=0A:EC:FC:76:7B:CD,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -rtc 'driftfix=slew,base=localtime' -machine 'type=pc'' failed: exit code 1

I just tested that my SSH key works from all three nodes to log in. Any advice at this point?


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!