our howto passthrough a sata dvd burner under Proxmox 5.2:
first, the info:
does not help us a lot, only we know, that we does not have to install the scst packages...
But we found here a helpfull Thread:
proxmox-5-1-wiki-passthrough-tape-iscsi-solved.38321
according to these instructions, we have:
# installed this packages:
Code:
apt install tgt open-iscsi lsscsi
# do not forget to enable the services:
Code:
systemctl start tgt.service
systemctl enable tgt.service
systemctl start open-iscsi.service
systemctl enable open-iscsi.service
# to display the new /dev/sgN devices, request devices:
Code:
root@testprox:~# lsscsi -g
[0:0:0:0] disk ATA WDC WD2003FYYS-0 1D01 /dev/sda /dev/sg0
[1:0:0:0] disk ATA WDC WD2003FYYS-0 1D01 /dev/sdb /dev/sg1
[2:0:0:0] disk ATA WDC WD2003FYYS-0 1D01 /dev/sdc /dev/sg2
[4:0:0:0] cd/dvd HL-DT-ST DVD-RAM GH24NSD1 LG01 /dev/sr0 /dev/sg3
[5:0:0:0] disk ATA WDC WD2003FYYS-0 1D01 /dev/sdd /dev/sg4
#the 4:0:0:0 - /dev/sg3 is our built-in Burner:
Code:
root@testprox:~# dmesg | grep CD
[ 1.579176] scsi 4:0:0:0: CD-ROM HL-DT-ST DVDRAM GH24NSD1 LG00 PQ: 0 ANSI: 5
[ 1.654210] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 1.654321] sr 4:0:0:0: Attached scsi CD-ROM sr0
[ 2.468476] sr 4:0:0:0: [sr0] tag#12 CDB: Read(10) 28 00 00 00 00 00 00 00 01 00
root@testprox:~# dmesg | grep DVD
[ 1.518149] ata5.00: ATAPI: HL-DT-ST DVDRAM GH24NSD1, LG00, max UDMA/133
[ 1.579176] scsi 4:0:0:0: CD-ROM HL-DT-ST DVDRAM GH24NSD1 LG00 PQ: 0 ANSI: 5
# just as Mario Hosse describes, we have implemented the next 1:1:
Code:
cat /etc/iscsi/initiatorname.iscsi
## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1993-08.org.debian:01:f2f87463ad4
# create target, luns, bind on ip/subnet and save:
Code:
tgtadm --lld iscsi --op new --mode target --tid 1 --targetname iqn.1993-08.org.debian:burner
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 --bstype=sg --device-type=pt -b /dev/sg3
tgtadm --lld iscsi --mode target --op bind --tid 1 -I 192.168.2.0/24
tgt-admin --dump > /etc/tgt/targets.conf
# important edit /etc/tgt/targets.conf:
Code:
vim /etc/tgt/targets.conf
# add the following two lines:
device-type pt
bs-type sg
## EDIT, 2021-04-02: and change: "initiator-name" to "initiator-address" see the example
# example targets.conf:
Code:
root@testprox:~# cat /etc/tgt/targets.conf
default-driver iscsi
<target iqn.1993-08.org.debian:brenner>
device-type pt
bs-type sg
backing-store /dev/sg3
initiator-address 192.168.2.0/24
</target>
# and restart the tgt.service:
Code:
systemctl restart tgt.service
the procedures to initiate the new iSCSI Device for a Windows 2012 R2 Server VM is as described here, there is no difference between a SATA burner or a tape drive:
Using_iSCSI_target_with_Windows_2012_R2
After this initialization I was able to test successfully with two burning programs, starburn (important for my solution) and with cdburnerxp...
many thanks to Mario Hosse,
regards,
maxprox