Is it possible to pass-through a SATA port (not a controller and not a drive, but a single port)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

although I fear I am already foreseeing the answer, I'd like to ask if
it is possible to pass through a single SATA port at hardware level to a
Windows guest.

I already have successfully passed through whole SATA controllers (i.e.
with all their ports) as well as single drives as block devices, but
this is not sufficient for the scenario below:

I have a dual XEON server with a mainboard which has only one SATA
controller with 6 ports. This server runs debian stretch and hosts
various virtual machines, one of them being a Windows 2008R2 server
(I'll call the latter just "the guest" in the following sections).

The guest is started from a disk image, but for certain reasons
additionally needs direct access to one single big backup disk. Since
the mainboard has only one SATA controller, the backup disk is connected
to the same SATA controller as the rest of the disks where the host
Linux system resides. The backup disk is hot-swappable.

Currently, I have configured the system so that the backup disk is
recognized by the host Linux system as block device (in my case
/dev/sda) and is passed through to the guest as block device. I am
starting the guest via command line directly (no libvirt or virsh or
something like that involved) using the following option:

-drive file=/dev/sda,format=raw,if=virtio,cache=none,index=1

This setup works reliably, but is a nightmare when the backup disk must
be changed. Currently, to change that disk, I am

- shutting down the guest (because I have found no way to let the guest
(or qemu-kmv?) treat that drive as a removable drive;

- removing the drive from the Linux host (by doing something like sync;
echo 1 > /sys/block/sda/device/delete);

- inserting the next backup disk;

- restarting the guest VM.

Actually, this is not acceptable, notably the need to shut down the
guest to remove the backup disk. So my goal is to let the guest treat
the backup disk like a removable drive.

Of course, I can't pass through the SATA controller to the guest because
then I couldn't connect the disks which contain the host system
anywhere. Passing the disk as a block device to the guest does not help
either because it does not seem to be possible to pass it as a removable
drive.

So I was hoping that I could just pass through one of the SATA ports to
that Windows guest, and that this would make it possible (perhaps by
some registry hack) to make that disk removable from within Windows.

Is this possible, or does anybody have another idea how to solve that
problem? My last resort currently would be to put a PCIe SATA adapter in
the server, connect the backup disk there and pass through the new
adapter's controller chip to the guest.

Regards and thanks for any help,

Binarus



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux