I’m currently trying to migrate some machines from vmware server to KVM and I’m having trouble with a particular machine that uses an USB connected tape drive with AMANDA.
The tape drive is passed through OK and is visible on the guest;
Bus 001 Device 002: ID 03f0:0125 Hewlett-Packard
Here is where it gets interesting though. If I try writing to the device in the KVM guest; I get “The device or resource is busy” and it fails;
~# dd if=/dev/urandom of=/dev/nst0 bs=1024k count=500
dd: writing `/dev/nst0': Device or resource busy
1+0 records in
0+0 records out
0 bytes (0 B) copied, 7.36953 s, 0.0 kB/s
If I run the same test on the KVM host it works fine.
The problem appears to be that even though I have passed the USB device through to the guest, the host machine is still “holding on to” the device.
Do I have to do something on the host to make it “let go” of the device so that the guest can write to it?