0

I have a SATA disk, and I installed Windows 10 on it. After I enabled Hyper-V, I created some virtual machines. However the VM all see an SCSI disk, and I can't find out how to change it. Even the parent partition (see https://en.wikipedia.org/wiki/Hyper-V#Architecture) only see SCSI disk; I checked it from Device Manager, in the Details tab, property Hardware Ids. It says

SCSI\DiskSamsung_SSD_850_PRO_256G

While my hard drive should be only available in SATA. Is it possible to ask Hyper-V to emulate SATA interface?

more background

I’m running Arch Linux as one of the guests. It’s showing that I need driver for device wd719x; I assume that it’s emulated by Hyper-V. It turns out to be a very old HDD by Western Digital, and installing official driver can fix this. However, I’m worrying because the WD719x series is no longer supported by Wester Digital (even the driver has been removed from the website). This seems very legacy, which I don’t need because I’m creating a new VM, not running some VM created 10 years ago.

  • Does it matter? The SCSI protocol has all the same features (and probably more) than ATA. – user1686 Jul 6 '18 at 19:14
  • The VMs don't see your physical disk, they see what Hyper-V emulates, IDE and SCSI interfaces. Unless you're trying to do some specific testing, it really doesn't matter if its SATA or SCSI. The parent partition is your host OS, so it's going to see the actual hardware. If you can post a screenshot of your misidentified hardware, I'd like to see it because it really can't happen, otherwise your system wouldn't boot (unless your BIOS does something like make a RAID array out of your disks). – essjae Jul 6 '18 at 22:29
  • @grawity Explained my concern in updated question. – Franklin Yu Jul 7 '18 at 3:27
  • @essjae The SCSI is emulated by the hypervisor. I think Hyper-V sees the SATA disks just fine, but I don’t know how to confirm, since Hyper-V (as a Type-1 hypervisor) can control what to expose. If you still would like screenshot, what specific information is interesting? The machine belongs to my employer, so… – Franklin Yu Jul 7 '18 at 3:53
  • Are you using a gen1 or gen2 VM? Are you attaching a whole physical disk to the VM, or just a .vhd? Note that wd719x is a SCSI host adapter, not a disk. – user1686 Jul 7 '18 at 12:09
0

I’m attaching a VHD to the VM

Then you're not attaching your physical disk in any way, and its transport is completely irrelevant. The hypervisor itself acts as the VMs' disk controller and doesn't interact with physical storage beyond reading/writing files. (It's not uncommon to store VHDs on an external SMBv3 fileserver...)

I’m running Arch Linux as one of the guests. It’s showing that I need driver for device wd719x; I assume that it’s emulated by Hyper-V.

I'm going to guess that this has nothing to do with your VM's hardware, emulated or not. You're probably seeing a bunch of "missing firmware" warnings when mkinitcpio builds its "fallback" initramfs image.

The regular initramfs is adapted to the exact system it's being built on; the "fallback" variant skips any device autodetection and throws in as many block-device drivers as it could find (so that the same initramfs would be bootable on many different machines), even though the current system has none of them attached.

In reality, if you selected an IDE/ATA controller in Hyper-V, you'll get a fairly standard ata_piix (as can be seen in lspci -v).

If you use a "Generation 2" VM, and/or if you add an SCSI controller, then you will get a native VMBus-based SCSI controller via the hv_storvsc driver (Microsoft's mechanism similar to virtio).

Even the parent partition only see SCSI disk; I checked it from Device Manager, in the Details tab, property Hardware Ids. It says

SCSI\DiskSamsung_SSD_850_PRO_256G

That seems to be normal when in AHCI mode – although I couldn't find any official explanation, at least as far as first-party drivers go.

(From what I could figure out: The only alternative would have been IDE\, but that is not really a good choice – e.g. it assumes the presence of primary/secondary IDE channels and master/slave ports, neither of which exist in SATA/AHCI. Perhaps the Windows developers found that mapping SATA to SCSI is easier than mapping it to IDE/PATA?

Either way, Windows wouldn't be the first OS to do so – Linux has been presenting IDE/ATA devices as if they were SCSI ever since the 2.6 kernel release sometime around 2004.)

As long as the parent device shows up as a SATA AHCI controller (using storahci, msahci, or Intel's IRST driver) you're good.

  • So the hard-drive controller provided by Hyper-V can only be IDE (ATA) or SCSI? Why there is no SATA controller? Is it too complicated for a hypervisor? – Franklin Yu Jul 10 '18 at 14:14
  • If you mean an AHCI SATA controller, probably because there's no real advantage for VMs if they already have SCSI etc? In VirtualBox you have a wide range of choices for OS compatibility and such, but I'd say HyperV has the opposite goals – to the point of Gen2 VMs not even having any PCI devices, just the proprietary VMBus. – user1686 Jul 10 '18 at 16:58

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.