iSCSI: Failed to connect to LUN : iscsi_service failed

mbartho

New Member
Jan 5, 2021
7
0
1
45
We are working on setting up a ZFS to iSCSI share on Freenas. We have the SSH keys setup up, installed the patches, and set up the zfs to iscsi share in proxmox. It appears to be connected is showing as available and reports the correct available storage. However, when we attempt to move the hard drive of a VM from the current location to the new storage, we receive the following error:

Code:
create full clone of drive scsi0 (Jarhead-Virtual:201/vm-201-disk-0.raw)
iscsiadm: No session found.
transferred: 0 bytes remaining: 33554432 bytes total: 33554432 bytes progression: 0.00 %
qemu-img: Could not open 'file.driver=iscsi,file.transport=tcp,file.initiator-name=iqn.1993-08.org.debian:01:cc69eb10e3cb,file.portal=10.0.1.4,file.target=iqn.2005-10.org.freenas.ctl:proxmox-iscsi-lab,file.lun=0,driver=raw': iSCSI: Failed to connect to LUN : iscsi_service failed with : iscsi_service_reconnect_if_loggedin. Can not reconnect right now.

TASK ERROR: storage migration failed: copy failed: command '/usr/bin/qemu-img convert -p -n -f raw --target-image-opts /mnt/pve/Jarhead-Virtual/images/201/vm-201-disk-0.raw 'file.driver=iscsi,file.transport=tcp,file.initiator-name=iqn.1993-08.org.debian:01:cc69eb10e3cb,file.portal=10.0.1.4,file.target=iqn.2005-10.org.freenas.ctl:proxmox-iscsi-lab,file.lun=0,driver=raw'' failed: exit code 1

Can anyone provide insight into the cause of the problem and hopefully a resolution? We have looked all over and have not been able to find a solution.
 
Last edited:

TheGrandWazoo

Member
May 24, 2018
17
6
23
57
Hi,

Just fixed this with commit 0b760eefc3ae8787e4d83235ca20e2ae886cf166.

In TrueNAS-Scale the slashes (/) needed to be converted to dashes (-) which it was doing but only the first slash (/). Adding the 'g' parameters to the regex substitution fixed this.
You may need to 'edit' your extents on the TrueNAS to fix this or some other way to make it look like Jarhead-Virtual:201-vm-201-disk-0.raw.
 

About

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 your own in 60 seconds.

Buy now!