VirtualBox

Opened 6 years ago

Last modified 5 years ago

#18420 new defect

'Solid State Disk' setting after snapshot not detected by Linux 4.15.0 guest

Reported by: Jim Avera Owned by:
Component: other Version: VirtualBox 5.2.26
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

Same symptom as with https://www.virtualbox.org/ticket/12025 : "Solid State Disk" is checked in VBoxManage but the guest does not recognize that, and cat /sys/block/sda/queue/rotational in the guest gives "0"

Host: Ubuntu 18.04; Guest: Ubuntu 18.04 (kernel 4.15.0)

NOTE: "Solid State Disk" was checked only after taking a snapshot. There is only one snapshot.

Possibly relevant: VBox.log (attached) mentions both the snapshot and original vdi, and "NonRotatingMedium" is set for the snapshot. Here's an extract:

Devices/ahci/0/LUN (level 5)

Mountable <integer> = 0 NonRotationalMedium <integer> = 1 Path <string> = ".../Snapshots/{d5ad9312-a011-4939-b281-a71f223ae696}.vdi" (cb=93)

Devices/ahci/0/LUN (level 6)

Path <string> = ".../disk1.vdi" (cb=64)

Attachments (1)

VBox.log (93.5 KB ) - added by Jim Avera 6 years ago.

Download all attachments as: .zip

Change History (3)

by Jim Avera, 6 years ago

Attachment: VBox.log added

comment:1 by Jim Avera, 6 years ago

Wait... the guest *does* know the disk is solid state (/sys/block/sda/queue/rotational is "0"), BUT the device does not support "trim".

sudo fstrim /
fstrim: /: the discard operation is not supported

So the problem is not with detecting ssd-ness but that the emulated disk doesn't let the guest make use of that fact to remove deallocated blocks from the vdi.

Last edited 6 years ago by Jim Avera (previous) (diff)

comment:2 by Wing, 5 years ago

I have the same problem.

So, what should I do if I want to shrink the vdi filesize?

Note: See TracTickets for help on using tickets.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette