Proxmox 2.1 and tape passthrough

hishamismail

New Member
May 3, 2011
1
0
1
Im trying to use tape library pass-through using proxmox to a kvm64 guest running centos 5.5. I've tried the two methods described in http://pve.proxmox.com/wiki/Tape_Drives. The first method is by using the scsi passthrough

Here is my tape library output
root@vhost1:/var/log/pve/tasks# cat /sys/class/scsi_generic/sg2/device/model
Ultrium 4-SCSI
root@vhost1:/var/log/pve/tasks# cat /sys/class/scsi_generic/sg3/device/model
FlexStor II

Here is my lsscsi output
root@vhost1:/var/log/pve/tasks# lsscsi -g
[0:2:0:0] disk LSI RAID 5/6 SAS 6G 2.90 /dev/sda /dev/sg0
[0:2:1:0] disk LSI RAID 5/6 SAS 6G 2.90 /dev/sdb /dev/sg1
[5:0:0:0] tape HP Ultrium 4-SCSI U64B /dev/st0 /dev/sg2
[5:0:0:1] mediumx BDT FlexStor II 4.70 /dev/sch0 /dev/sg3


here is my vm config file

bootdisk: ide0
cores: 6
cpu: qemu64
ide0: vdata0:vm-101-disk-1,cache=directsync
ide2: local:iso/CentOS-5.5-x86_64-bin-DVD-1of2.iso,media=cdrom
memory: 8192
name: sgsbckp0
net0: e1000=5A:68:2C:B9:F8:4A,bridge=vmbr0
ostype: l26
sockets: 1
vga: cirrus
#hostpci0: 02:00.0
scsi0: /dev/sg2
scsi1: /dev/sg3

When I run qm start 101

qm start 101
kvm: -drive file=/dev/sg3,if=none,id=drive-scsi1,aio=native,cache=none: could not open disk image /dev/sg3: Invalid argument
start failed: command '/usr/bin/kvm -id 101 -chardev 'socket,id=monitor,path=/var/run/qemu-server/101.mon,server,nowait' -mon 'chardev=monitor,mode=readline' -vnc unix:/var/run/qemu-server/101.vnc,x509,password -pidfile /var/run/qemu-server/101.pid -daemonize -usbdevice tablet -name sgsbckp0 -smp 'sockets=1,cores=6' -cpu qemu64 -nodefaults -boot 'menu=on' -vga cirrus -k en-us -device 'lsi,id=lsi0,bus=pci.0,addr=0x5' -drive 'file=/dev/sg3,if=none,id=drive-scsi1,aio=native,cache=none' -device 'scsi-block,bus=lsi0.0,scsi-id=1,drive=drive-scsi1,id=scsi1' -drive 'file=/var/lib/vz/template/iso/CentOS-5.5-x86_64-bin-DVD-1of2.iso,if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/dev/sg2,if=none,id=drive-scsi0,aio=native,cache=none' -device 'scsi-block,bus=lsi0.0,scsi-id=0,drive=drive-scsi0,id=scsi0' -drive 'file=/dev/vgdata/vm-101-disk-1,if=none,id=drive-ide0,cache=directsync,aio=native' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=102' -m 8192 -netdev 'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge' -device 'e1000,mac=5A:68:2C:B9:F8:4A,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -cpuunits 1000' failed: exit code 1

Changing the following doesnt help

scsi0: /dev/sg2,cache=writethrough
scsi1: /dev/sg3,cache=writethrough


My pveversion -v

pve-manager: 2.1-1 (pve-manager/2.1/f9b0f63a)
running kernel: 2.6.32-11-pve
proxmox-ve-2.6.32: 2.0-66
pve-kernel-2.6.32-11-pve: 2.6.32-66
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-39
pve-firmware: 1.0-15
libpve-common-perl: 1.0-27
libpve-access-control: 1.0-21
libpve-storage-perl: 2.0-18
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1



I also try exporting the tape library via iscsi using tgtadm
When i issue
root@vhost1:~# tgtadm -d --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 --backing-store=/dev/sg2 --bstype=sg --device-type=pt
ipc_mgmt_req 297: sent to tgtd 143
tgtadm: invalid request



Any help is highly appreciated
 

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 yours easily in our online shop.

Buy now!