Dynamic disk size a VM using libvirt
Heyy i could not figure out if dynamic disk size(hard disk size according to contents which expands and contracts dynamically) is sup开发者_C百科ported in libvirt or not. If yes what are the appropriate parameters to be passed on in virt-install.
Thanks in advance, Jatin kumar
try command virsh domblkinfo <domain> <path-to-block-device>
For example, you have a windows guest that uses a 10GB file /data/winxp.img as disk device:
# virsh domblkinfo windows-guest /data/winxp.img
Capacity: 10737418240
Allocation: 3041759232
Physical: 3041759232
You can try command qemu-img
if you want to do this job to your disk file without libvirt running:
# qemu-img info /data/winxp.img
Refer to this API doc for detail info
精彩评论