0

I'm using a real drive as my windows 11 VM drive in libvirt using QEMU. This is working fine, however, when I open task manager, the drive shows as "QEMU HARDDISK", and shows up as an HDD (the drive is a sata SSD). My goal is to make sure the drive shows up as it is. This means showing the real vendor, name, using the real UUID (not quite sure how to test that one), and showing the correct type (SSD instead of HDD). How can I accomplish this?

4
  • There's the scsi-block device in qemu (while what you are using is probably scsi-hd or ide-hd, depending on the type of the emulated host controller). No idea how to make libvirt use it though, and first you'll need to replace the host controller with virtio-scsi if that's not what you have been using. The host controller requires a driver that Windows doesn't ship, and as always, changing boot drive host controller could render the system unbootable. (Besides, since the virtio windows drivers are pretty "fragile", using scsi-block could lead to performance or other issues.)
    – Tom Yan
    Commented Jun 16 at 10:07
  • @TomYan I'm not sure if this is what you're referring to, but when I check the XML tab in virtual machine manager for my disk, the type="block". To me that sounds like I'm already using scsi-block, since the others you mentioned do not have the word block. Provided below is the disk xml <disk type="block" device="disk"> <driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/> <source dev="/dev/sda1"/> <backingStore/> <target dev="sda" bus="sata"/> <address type="drive" controller="0" bus="0" target="0" unit="0"/> </disk>
    – Twiston
    Commented Jun 16 at 17:56
  • Nope, bus="sata" indicates that you are emulating a SATA controller and therefore, AFAIK ide-hd is used behind the scene. It seems that if you add a virtio-scsi controller to the VM, and change bus to scsi, you would be able to use virtio-scsi + scsi-hd, but there doesn't seems to be a "native" libvirt way to make use of scsi-block...
    – Tom Yan
    Commented Jun 16 at 18:49
  • For the record though, it depends on how many "information" needed to be available on the VM, you may not need to use scsi-block (and hence not virtio-scsi either). You can set some attributes of the emulated disk by manually copying the values of the physical disk into the XML. See this for details. (Search for e.g. wwn on the page and take a look at items nearby.)
    – Tom Yan
    Commented Jun 16 at 18:54

0

You must log in to answer this question.

Browse other questions tagged .