The VM Storage Identity Crisis: Why Your NVMe SSD Appears as HDD

You’ve invested in a blazing-fast NVMe SSD for your host, you're running XCP-ng/Xen, and your Virtual Machines are humming along. But then you peek into Task Manager in Windows Server 2022, and your drive is labeled "HDD." Meanwhile, your Server 2019 VM shows no label at all.
This isn't a bug, and your performance isn't being throttled. It’s a side effect of how different OS versions interpret the Xen Paravirtual (PV) storage path.
1. The Core Problem: Virtualization vs. Reality
When you create a VM, the hypervisor presents a virtual disk via a virtualized controller. For XCP-ng, this is the Xen PV SCSI Host Adapter. In Windows, this appears as a "XENSRC PVDISK SCSI Disk Device."
Because the connection type is SCSI, modern Windows versions have to make a choice:
Windows Server 2019: Often leaves the "Media Type" field blank. It doesn't want to guess the hardware type if it isn't explicitly told.
Windows Server 2022: Microsoft updated the UI to be more specific. If the OS sees a SCSI bus and hasn't received a "Non-Rotational" flag from the host, it defaults to the HDD label because SCSI has historically been mechanical storage.
2. Windows Verification: Checking the "Truth"
Don't trust the Task Manager icon. Use these commands to see exactly what is happening under the hood.
The Driver Check
First, ensure your Guest Tools are healthy. In Device Manager, you should see XENSRC PVDISK. This confirms you are using the high-performance PV driver rather than a generic emulated one.
The PowerShell Diagnostic
The "Media Type" listed here is what Windows uses to decide whether to Defrag (Bad for SSD) or TRIM (Good for SSD).
PowerShell
# Check how Windows identifies the hardware
Get-PhysicalDisk | Select-Object FriendlyName, MediaType, BusType, OperationalStatus
FriendlyName:
XENSRC PVDISKconfirms your Guest Tools are active.MediaType:
Unspecifiedis the culprit. When Windows sees this, Server 2022/2019 defaults to "HDD."BusType:
SCSIis the paravirtualized path used for high performance.
3. Linux Verification: Rotational vs. SSD
Linux is much more transparent. It uses a binary "Rotational" (ROTA) flag: 1 for spinning, 0 for solid state.
The lsblk Command
Run the following to check your drive status (usually xvda or xvdb in Xen):
Bash
lsblk -d -o NAME,ROTA,TYPE,SIZE
ROTA = 0: The kernel correctly identifies it as an SSD.
ROTA = 1: The kernel thinks it's a spinning disk.
Verify TRIM (Discard) Support
Even if the label is wrong, check if the OS can "TRIM" the drive:
Bash
lsblk --discard
If DISC-GRAN shows a value (like 4K), your VM is successfully communicating with the underlying NVMe.
4. The Real Fix: Host-Level Flagging
Since Windows and Linux can't always change their "hardware" identity from the inside when the media type is "Unspecified," you must tell the XCP-ng host to "advertise" the SSD status.
Run these commands on your XCP-ng Host CLI (Not inside the VM):
Find your VM's UUID:
xe vm-list name-label="Your_VM_Name"Find the VBD (Virtual Block Device) UUID for that VM:
xe vbd-list vm-uuid=<VM_UUID>Set the SSD flag on the VBD:
xe vbd-param-set uuid=<VBD_UUID> device-config:type=ssdRestart the VM.
Final Comparison Summary
| Feature | Windows Server 2019 | Windows Server 2022 | Linux (Ubuntu/Debian) |
| Default UI Label | (Blank/None) | HDD | ROTA: 0 (Usually Correct) |
| Driver Name | XENSRC PVDISK | XENSRC PVDISK | xvda / sda |
| Bus Type | SCSI | SCSI | SCSI/PV |
| Performance | Native NVMe Speed | Native NVMe Speed | Native NVMe Speed |
The Bottom Line: Your "HDD" is actually a high-speed NVMe. The label in Windows 2022 is a visual placeholder for the SCSI bus. As long as your PowerShell shows OperationalStatus: OK, you are running at full speed!



