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

Is my KVM VM thin provisioned?

· 52CE 我爱测

I was reading another post here Use Thin LVM Volume for KVM VM trying to understand whether or not KVM is capable of creating thin provisioned VMs. The post from about 8 months ago has both the OP and responder mentioning not sup…

问题原文

原帖链接 · Gary · CC BY-SA 4.0

I was reading another post here Use Thin LVM Volume for KVM VM trying to understand whether or not KVM is capable of creating thin provisioned VMs. The post from about 8 months ago has both the OP and responder mentioning not supported to thin provision with KVM. Doing more research on the internet there are a lot of older posts from 5-6 years ago(2015 or so) indicating the same. However, looking at one of my own images I would say it is thin provisioned. Is it? Do I misunderstand the terminology here? Basically, before I start down the path of using KVM/libvirt I want to make sure I'll have enough disk space and thin provisioning is the key.

[root@xeon33 images]# ls -lh  vm1.qcow2 
-rw-------. 1 qemu qemu 241G Nov  2 14:53 vm1.qcow2

[root@xeon33 images]# du -h vm1.qcow2 
1.4G    vm1.qcow2

Thank-you.

已采纳解答

原帖链接 · Spooler · CC BY-SA 4.0

Yes, that image is thin provisioned. It's qcow2, which only supports thin provisioning.

You can tell, because the file claims to be 241G, yet only has 1.4G allocated. This file has a maximum capacity of 241G.

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

资料来源与适用范围

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

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

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