大网数据广告活动
服务器运维问答

How to add virtual storage as SSD in KVM

· 52CE 我爱测

Being previously a VirtualBox user, I moved to KVM(QEMU/libvirt or whatever it's called) recently. I know that in VirtualBox, when you add a new storage device to the VM, there is a checkbox labeled Solid-state Drive , if checked…

问题原文

原帖链接 · zypA13510 · CC BY-SA 3.0

Being previously a VirtualBox user, I moved to KVM(QEMU/libvirt or whatever it's called) recently. I know that in VirtualBox, when you add a new storage device to the VM, there is a checkbox labeled Solid-state Drive, if checked, the guest system will see the virtual disk as a solid-state device. This is very useful as it can inform the guest system (i.e. Windows) to disable defragment. I wonder whether this is possible in KVM or not, because I couldn't find anything related on the internet?

社区高分解答

原帖链接 · DanielB · CC BY-SA 3.0

There is no mechanism in QEMU today to mark a SCSI, ATA or VirtioBlk disk as being backed by non-rotational storage. So the guest OS wouldn't do the optimal settings out of the box. As a workaround, for Linux you can override this by unsetting the 'rotational' flag for the block device in sysfs for any disks backed by SSD. I'm talking to people to find out if it is possible to add this feature to QEMU to make it 'just work' in future releases.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。