Hello,
i'm trying to configure a host SCSI
device (tape drive) so that it is available in a KVM guest VM, but am receiving
an error when attempting to attach the device. My guest xml has the
following scsi controller defined:
<controller type='scsi' index='0'
model='virtio-scsi'>
<alias name='scsi0'/>
<address type='pci'
domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
I created tapedrive.xml with following
contents:
<disk type='block' device='lun' sgio='unfiltered'>
<driver name='qemu'
type='raw' cache='none'/>
<source dev='/dev/st0'/>
<target dev='st0' bus='scsi'/>
<address type='drive'
controller='0' bus='0' target='0' unit='0'/>
</disk>
I then attempt to attach using following
command, and receive this error:
# virsh attach-device instance-0000002d
tapedrive.xml --config
error: Failed to attach device from
tapedrive.xml
error: internal error: Invalid harddisk
device name: st0
Does anyone know cause of the error?
In <address> section of tape drive definition I am using type='drive',
I tried type='tape' also but same error. is there a different property
value I should use here, or general advice for attaching tape drive to
KVM guest? Thanks, Jake