[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-discuss
Subject:    Re: [Qemu-discuss] qemu-img info actual size member
From:       Han Han <hhan () redhat ! com>
Date:       2018-05-30 10:35:13
Message-ID: CAHjf+S9hcKghWvE+XU9jFp_tJ8APPLe=OXbtmfeEpVWUC7j7cw () mail ! gmail ! com
[Download RAW message or body]

Well, it will return "the size reserved on disk" refer to its man page. You
can use --output json to get the actual-size:
# qemu-img info  /var/lib/libvirt/images/raw --output=json
{
    "virtual-size": 10737418240,
    "filename": "/var/lib/libvirt/images/raw",
    "format": "raw",
    "actual-size": 1421459456,
    "dirty-flag": false
}

Remember to add -U option if the images is used by other qemu related
process since qemu-2.10 due to the qemu image locking.

On Thu, May 10, 2018 at 8:10 PM, Eyal Shenitzky <eshenitz@redhat.com> wrote:

> Hey All,
>
> Is qemu-img info will always return actual-size as part of the return
> result?
>
> I couldn't find a documentation on that.
>
> Thanks,
>
> --
> Regards,
> Eyal Shenitzky
>



-- 
Best regards,
-----------------------------------
Han Han
Quality Engineer
Redhat.

Email: hhan@redhat.com
Phone: +861065339333

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic