a simple way to passthrough an internal SATA DVD burner [solved]

maxprox

Well-Known Member
Aug 23, 2011
398
30
48
Germany - Nordhessen
www.fair-comp.de
Hi,
I'm looking for an easy and simple way to passthrough an internal SATA DVD burner.
For a medical longtime Archiv, called CGM Praxisarchiv, based on StarBurn 15.1,
Every six weeks, we have to burn two M-DISC under a Win-Server VM.
Is the easiest way to go with an external USB 2.0 DVD burner like the LG GP57EB40 Super Multi?
(and the USB passthrough?)
Or is similar with an internel SATA burner?
If yes, how can I do it?

EDIT:
does this howto http://c-nergy.be/blog/?p=1437 still worked with Proxmox 5.2?
and does he means a SATA DVD burner?


regards,
maxprox
 
Last edited:

wolfgang

Proxmox Staff Member
Staff member
Oct 1, 2014
6,496
480
103
Hi,

generall this approach should work because it has nothing do do with PVE ;-)
But you have to use lio instead of scst, because there are no packages anymore in Debian.
 

maxprox

Well-Known Member
Aug 23, 2011
398
30
48
Germany - Nordhessen
www.fair-comp.de
our howto passthrough a sata dvd burner under Proxmox 5.2:
first, the info:
" you have to use lio instead of scst, because there are no packages anymore in Debian."
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
 
Last edited:

wandored

New Member
May 22, 2020
4
1
3
55
I followed this process (one note, my targets.conf had "initiator-name" and not "initiator-address" which took me about 2 hours to notice. iSCSI could not find the target until i changed it to "address")
So the target is discovered but when i try to connect i get an error:

"The target name is not found or is marked as hidden from login"

any suggestions

UPDATE:

Nevermind! my server name was not exact in the iqn target.
 
Last edited:
  • Like
Reactions: fragpic

fragpic

New Member
Feb 7, 2021
12
0
1
31
For anyone who's looking for a working solution, this tutorial is still working perfectly.
Do remember to change the initiator-name to initiator-address
 
Last edited:

interloper.__init__

New Member
Dec 30, 2021
1
0
1
22
Hi all, I'm a bit of a novice (still in school). I'm a bit confused on this step:
# 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

a couple of questions:
- how do i select a valid TID and LUN number?
- do i replace "192.168.2.0/24" with proxmox VE's local IP, or the IP of the destination VM?
- is there a way to do it without involving an IP? The machine's local IP changes sometimes (due to moving my machine)
- if i cant avoid using the IP, how can i edit the IP to the correct one in the future?

Thank you for your help!
 

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!