How to add tape device a kvm vms in proxmox?

  • Thread starter Thread starter doknet
  • Start date Start date
D

doknet

Guest
Hola
I try to add the tape a one Proxmox vms


I follow the instructions in "http://pve.proxmox.com/wiki/Tape_Drives"


cat / sys/class/scsi_tape/st0/device/model
Ultrium 4-SCSI


I follow the instructions and add the device in the config vms


cat /etc/qemu-server/125.conf
ostype: L26
memory: 1024
Sockets: 1
name: www20_ubukvm
ide2: local: iso/ubuntu-10.04-server-amd64.iso, media = cdrom
bootdisk: scsi0
scsi0: local: 125/vm-125-disk-1.raw
scsi1: / dev/st0 ########################### add TAPE
vlan0: rtl8139 = 46:86: A4: CD: 16:91

But it gives error while attempting to start the vms:


125 qm start
qemu-img: Could not open '/ dev/st0': Illegal seek
kvm:-drive file = / dev/st0, if = scsi, index = 1, cache = none: could not open disk image / dev/st0: Illegal seek
start failed: command '/usr/bin/kvm-monitor unix: /var/run/qemu-server/125.mon, server, nowait-vnc unix: / var/run/qemu-server/125.vnc,
password - pidfile / var/run/qemu-server/125.pid-daemonize-tablet-name usbdevice www20_ubukvm-smp sockets = 1 core = 1-nodefaults-boot menu = on-vga cirrus-tdf-k is-drive file = / var/lib/vz/template/iso/ubuntu-10.04-server-amd64.iso, if = ide, index = 2, media = cdrom-drive file = / var/lib/vz/images/125/vm-125- disk-1.raw, if = scsi, index = 0, cache = none, boot = on-drive file = / dev/st0, if = scsi, index = 1, cache = none-m 1024-netdev type = tap, id = vlan0d0, ifname = tap125i0d0, script = / var / lib / qemu-server / bridge-vlan-device rtl8139, romfile =, mac = 46:86: A4: CD: 16:91, netdev-id = vlan0d0 125 - cpuunits 1000 'failed with exit code 1


Any idea what is wrong in my setup, as I add the device / dev/st0 to the vms?
 
Hola
I try to add the tape a one Proxmox vms


I follow the instructions in "http://pve.proxmox.com/wiki/Tape_Drives"


cat / sys/class/scsi_tape/st0/device/model
Ultrium 4-SCSI


I follow the instructions and add the device in the config vms
...

no, the wiki page tells you to use sg., but you use st.

here is my config:

Code:
name: ubuntu-tape
ide2: NFS-ISO:iso/ubuntu-10.04.3-desktop-amd64.iso,media=cdrom
vlan0: virtio=A6:DB:F3:67:60:97
bootdisk: virtio0
virtio0: local:137/vm-137-disk-1.raw
ostype: l26
memory: 1024
sockets: 1
onboot: 0
cores: 2
scsi0: /dev/sg7,cache=writethrough

Inside Ubuntu, I got this:

Code:
root@ubuntu-tape:~# cat /sys/class/scsi_generic/sg1/device/model
Ultrium 3-SCSI
root@ubuntu-tape:~#
 
Thank you very much for responding


For the device is recognized by Proxmox deb I had to make the libraries
ltt-4.13.0.0-4.x86_64.rpm and then install them.


Promox tape device is recognized as / dev/st0
ls-a / dev / s *
/ dev / sda / dev/sda2 / dev / snapshot / dev/st0 / dev/st0l / dev / stderr / dev / stdout
/ dev/sda1 / dev / sdb / dev / sndstat / dev/st0 / dev/st0m / dev / stdin

Forgive me if I'm exceeding my question
I have to do something now to be recognized as a device /dev/sg,
What would be the next step in achieving the vms happen to the dipositive tape.


pveversion -v
pve-manager: 1.9-26 (pve-manager/1.9/6567)
running kernel: 2.6.32-6-pve
proxmox-ve-2.6.32: 1.9-50
pve-kernel-2.6.32-6-pve: 2.6.32-50
qemu-server: 1.1-32
pve-firmware: 1.0-14
libpve-storage-perl: 1.0-19
vncterm: 0.9-2
vzctl: 3.0.29-3pve1
vzdump: 1.2-16
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.15.0-1
ksm-control-daemon: 1.0-6


On the other hand fails to install packages iscsi-SCST scstadmin
When trying to install it gave me the following error
Starting iSCSI-SCST target service: FATAL: Module iscsi_scst not found.
These packages are needed?




From already thank you very much



no, the wiki page tells you to use sg., but you use st.

here is my config:

Code:
name: ubuntu-tape
ide2: NFS-ISO:iso/ubuntu-10.04.3-desktop-amd64.iso,media=cdrom
vlan0: virtio=A6:DB:F3:67:60:97
bootdisk: virtio0
virtio0: local:137/vm-137-disk-1.raw
ostype: l26
memory: 1024
sockets: 1
onboot: 0
cores: 2
scsi0: /dev/sg7,cache=writethrough

Inside Ubuntu, I got this:

Code:
root@ubuntu-tape:~# cat /sys/class/scsi_generic/sg1/device/model
Ultrium 3-SCSI
root@ubuntu-tape:~#
 
what do you get here?

Code:
ls -al /dev/sg*
 
Thank you for answering, this is what I get when I run ls
vm231:/# ls -al /dev/sg*
ls: cannot access /dev/sg*: No such file or directory
vm231:/# ls -al /dev/s*
brw-rw---- 1 root disk 8, 0 Nov 6 19:22 /dev/sda
brw-rw---- 1 root disk 8, 1 Nov 6 19:22 /dev/sda1
brw-rw---- 1 root disk 8, 2 Nov 6 19:22 /dev/sda2
brw-rw---- 1 root disk 8, 16 Nov 12 17:14 /dev/sdb
crw-rw---- 1 root root 10, 231 Nov 6 19:22 /dev/snapshot
lrwxrwxrwx 1 root root 24 Nov 6 19:22 /dev/sndstat -> /proc/asound/oss/sndstat
crw-rw---- 1 root tape 9, 0 Nov 6 19:22 /dev/st0
crw-rw---- 1 root tape 9, 96 Nov 6 19:22 /dev/st0a
crw-rw---- 1 root tape 9, 32 Nov 6 19:22 /dev/st0l
crw-rw---- 1 root tape 9, 64 Nov 6 19:22 /dev/st0m
lrwxrwxrwx 1 root root 15 Nov 6 19:22 /dev/stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Nov 6 19:22 /dev/stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Nov 6 19:22 /dev/stdout -> /proc/self/fd/1




what do you get here?

Code:
ls -al /dev/sg*