How to configure a virtual disk in RHV to appear as SSD (non-rotational)?

Solution Unverified - Updated

Environment

  • Red Hat Virtualization (RHV) 4.4 SP1

Issue

  • A VM running in RHV sees its virtual disks as rotational: /sys/block/<device-name>/queue/rotational = 1
  • As the VM runs ODF, we want to present the disks as SSD.
  • ODF shows the following message: "You do not have any SSD/NVMe disks available. Data Foundation supports only SSD/NVMe disk type in internal mode".

Resolution

RHV does not support configuring if a virtual disks is rotational.

As an alternative, it is possible to configure the guest OS to override the rotational value using a udev rule: /etc/udev/rules.d/99-rotational.rules:

ACTION=="add|change", KERNEL=="sd*", SUBSYSTEM=="block", ATTR{queue/rotational}="0"

Note: configuring a rotational (HDD) disk as non-rotational (SSD) could cause issues.

In order to load the udev rule(s) without rebooting the system, execute

# /sbin/udevadm control --reload-rules
# /sbin/udevadm trigger --type=devices --action=change

Root Cause

The Linux kernel defaults to rotational for any disk that does not provide rotational info. Refer to how does the kernel determine if a SCSI disk is HDD (rotational) or SSD (non-rotational) for additional information.

Diagnostic Steps

To check if a disk is rotational (device-name could be sda/vda/nvme0n1/..., it can be checked with lsblk or fdisk -l):

# cat /sys/block/<device-name>/queue/rotational 
1
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.