Mounting SAS LTO Tape Drive on VM in ESXi

We attached an LTO-4 standalone tape drive via an HP P212 SAS controller to our virtual machines hosted on ESXi 5.0. Our topology has multiple Windows domains belonging to several customers. Each customer needs a way to restore data from tape and uses different backup software. A single tape drive is shared between customers. The drive needs to float among different VMs residing on the same server.


Steps:

ENABLE SSH on the ESXi 5.0 host

~# esxcli storage nmp device list

naa.50060b0000bb7a26
Device Display Name: HP Serial Attached SCSI Tape (naa.50060b0000bb7a26)
Storage Array Type: VMW_SATP_ALUA
Storage Array Type Device Config: {implicit_support=on;explicit_support=off; explicit_allow=on;alua_followover=on;{TPG_id=0,TPG_state=AO}}
Path Selection Policy: VMW_PSP_MRU
Path Selection Policy Device Config: Current Path=vmhba2:C2:T0:L0
Path Selection Policy Device Custom Config:
Working Paths: vmhba2:C2:T0:L0



~# esxcli storage nmp satp rule add --satp=VMW_SATP_LOCAL --vendor="HP" --model="Ultrium 4-SCSI"
~# esxcli storage core claiming unclaim -t location -A vmhba2 -C 0 -T 0 -L 0
~# esxcfg-rescan vmhba2

Reboot the ESXi host and check that the change is in place.

~# esxcli storage nmp device list

naa.50060b0000bb7a26
Device Display Name: HP Serial Attached SCSI Tape (naa.50060b0000bb7a26)
Storage Array Type: VMW_SATP_LOCAL
Storage Array Type Device Config: SATP VMW_SATP_LOCAL does not support device configuration.
Path Selection Policy: VMW_PSP_FIXED
Path Selection Policy Device Config: {preferred=vmhba2:C2:T0:L0;current=vmhba2:C2:T0:L0}
Path Selection Policy Device Custom Config:
Working Paths: vmhba2:C2:T0:L0

Once done, you should be able to add the tape device to a VM as a normal SCSI device. If your disks are on 1:x, choose 2:x for the tape drive. Attaching a tape library is a different story. An HP LTO-4 tape library MSL-2024 on the same P212 did not show the robotics. Might have to try another card.