[virt-tools-list] dynamically allocated disks

Pavel Hrdina phrdina at redhat.com
Tue Jan 10 12:34:03 UTC 2017


On Tue, Jan 10, 2017 at 12:53:55PM +0100, LK wrote:
> Hi,
> 
> I thought that qcow2 would be a sparse disk format, but when I create a 
> new disk using virt-manager (Ubuntu 16.10, virt-manager 1.3.2), the size 
> of the new disk is exactly the same size I chose at creation time (as 
> the disk would be completely full).
> 
> Ho can I create a dynamically allocated disk using virt-manager?

Hi,

they are probably allocated as sparse files.  You can try to run:

  qemu-img info /path/to/file.qcow2

and the output should contain those two lines:

  virtual size: 20G (21474836480 bytes)
  disk size: 3.3M

or you can use this command:

  ls -lsh

and the output should be something like this:

  3.4M -rw------- 1 root root  21G Jan 10 13:28 test-size.qcow2

where the first column is the sparse size.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20170110/58658ea4/attachment.sig>


More information about the virt-tools-list mailing list