Windows host p2v. Image size issue


Windows host to Opennebula (some kind of p2v) convertion.
Disk image of drive C has been created with Disk2vhd tool:


Image has been converted to qcow2 format:

$ qemu-img convert -p -f vhdx -O qcow2 WINHOST.VHDX winhost.qcow2
$ du -sh winhost.qcow2
48G     winhost.qcow2

Converted image has been uploaded to opennebula datastore:

$ oneimage create --name winhost --path winhost.qcow2 --driver qcow2 --datastore default

And Opennebula see it as 930GB:

$ oneimage show 95
IMAGE 95 INFORMATION                                                            
ID             : 95                  
NAME           : winhost             
USER           : oneadmin            
GROUP          : oneadmin            
LOCK           : None                
DATASTORE      : default              
TYPE           : OS                  
REGISTER TIME  : 08/08 14:32:14      
PERSISTENT     : No                  
SOURCE         : /var/lib/one//datastores/...
PATH           : /var/lib/one/datastores/100/...
SIZE           : 930.4G              
STATE          : rdy                 
RUNNING_VMS    : 0    

How could it be?

Versions of the related components and OS (frontend, hypervisors, VMs):

Installed Packages
Name        : opennebula
Arch        : x86_64
Version     : 5.8.1
Release     : 1

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.6.1810 (Core) 
Release:        7.6.1810
Codename:       Core

Use the command qemu-img info <filename> to view the real file size

for example
qemu-img info c9b13b6481c6584a57e909412b110cf6

image: c9b13b6481c6584a57e909412b110cf6
file format: qcow2
virtual size: 4.0G (4294967296 bytes)
disk size: 806M
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

@barte1by thanks for the command.

# qemu-img info WINHOST_C.VHDX
file format: vhdx
virtual size: 930G (998999326720 bytes)
disk size: 48G
cluster_size: 2097152

# qemu-img info winhost_c.qcow2
image: winhost_c.qcow2
file format: qcow2
virtual size: 930G (998999326720 bytes)
disk size: 207K
cluster_size: 65536
backing file: winhost_c.qcow2 (actual path: /var/lib/one/datastores/100/golden-images/winhost_c.qcow2)
Format specific information:
compat: 1.1
lazy refcounts: false

Drive C physical size is 195.31GB (Base, NTFS, Free space – 143GB).
Why virtual size is so huge?
Seems something wrong with disk2vhd tool.

Get-VHD “{disk}.vhdx” there are lines ‘size’ and ‘minumsize’

Get-VHS only works with enabled hyper-v feature on the host.
And AFAIK this PS cmdlet unavailable under WS2K8.