0

I'm using QEMU on Linux with KVM, I need to make available a USB drive (external HDD) to the guest while I can still have access to the drive from the host OS. Is this possible?

1

No, that's not possible. You cannot have access to a usb-device from two different USB-Hosts.

In your case (external drive), you can mount it on the host and then use 9p virtio to forward the mounted folder to the guest or use network-folder share technologies like nfs or smb.

http://www.linux-kvm.org/page/9p_virtio
https://de.wikipedia.org/wiki/Network_File_System

  • 1
    Also, most (non-cluster) filesystem drivers implicitly assume that nobody else is going to access the disk behind their back, and will aggressively cache the data to maximize performance. When two or more independent OSs access the same disk without any protocol to synchronize their caches and apply proper interlocking, the data on disk will get corrupted rather rapidly. Even having the disk mounted as read-only on all but one OS won't save you from getting stale cached data mixed in with fresh data from the disk in unpredictable ways. – telcoM Jan 20 at 15:16
  • @telcoM Thanks. – Kais Jan 20 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.