qm importdisk generates a 1000 GiB vmdk file from a 60GiB vmdk

skydogch

New Member
Oct 22, 2022
3
0
1
Good morning everyone!

We are trying to migrate a 60 GiB vmdk Virtual Machine to Proxmox 8.0.3, but "qm import" is generating a 1000 GiB vmdk file

Code:
root@pve:~# qm importdisk 103 /mnt/pve/Synology/vmfile.vmdk DISK_SDK --format vmdk
importing disk '/mnt/pve/Synology/vmfile.vmdk' to VM 103 ...
transferred 0.0 B of 1000.0 GiB (0.00%)
transferred 10.0 GiB of 1000.0 GiB (1.00%)
transferred 20.0 GiB of 1000.0 GiB (2.00%)
transferred 30.0 GiB of 1000.0 GiB (3.00%)
transferred 40.0 GiB of 1000.0 GiB (4.00%)

That target storage DISK_SDK is a ZFS Pool

Code:
root@pve:~# qm rescan --vmid 103
rescan volumes...
root@pve:~#

Code:
root@pve:~# qm disk resize 103 efidisk0 128
shrinking disks is not supported
root@pve:~#


Any idea what's happening and how to import the vmdk file with a reasonable size?

Thanks in advance!
 
don't use vmdk other than as import input format (or export if you want to move a VM to esxi/..). the qemu equivalent would be qcow2. likely in this case, the vmdk image you have is only 60G big because it is sparse, the same would apply to a "1000G" qcow2 file only containing 60G of actual data ;).
 
  • Like
Reactions: skydogch
Hi Fabian,

thanks a lot for your reply. You are right, the import in qcow2 generates also 1TB

Code:
root@pve:~# qm importdisk 103 /mnt/pve/Synology/vmfile.vmdk DISK_SDK --format qcow2
importing disk '/mnt/pve/Synology/vmfile.vmdk' to VM 103 ...
transferred 0.0 B of 1000.0 GiB (0.00%)
transferred 10.0 GiB of 1000.0 GiB (1.00%)
transferred 20.0 GiB of 1000.0 GiB (2.00%)

Why is it requiring 16 times the size of the original vmdk? Is there anywhere a configuration that specifies it? I don't find anything about it.

Which are the options to bring down the size?

Thanks in advance!
 
Hi Fabian,

thanks a lot for your reply. You are right, the import in qcow2 generates also 1TB

Code:
root@pve:~# qm importdisk 103 /mnt/pve/Synology/vmfile.vmdk DISK_SDK --format qcow2
importing disk '/mnt/pve/Synology/vmfile.vmdk' to VM 103 ...
transferred 0.0 B of 1000.0 GiB (0.00%)
transferred 10.0 GiB of 1000.0 GiB (1.00%)
transferred 20.0 GiB of 1000.0 GiB (2.00%)

Why is it requiring 16 times the size of the original vmdk? Is there anywhere a configuration that specifies it? I don't find anything about it.

Which are the options to bring down the size?

Thanks in advance!
The alicated space the the drive for the vm is 1000GiB. So on the import, it is making that 1000Gib disk. The actual size will be 60GiB, as that is the amount of that disk that is used. So the free space on that virtual drive won’t be taking space.
 
  • Like
Reactions: skydogch
exactly (modulo some difference in how partially written blocks/clusters/.. are handled - it might not be exactly the same size on disk, it is using a different file format after all :)

think of it like this:
- the disk image represents 1000GB of data
- only a part of the 1000GB are actually filled with data at the moment
- the new file must represent 1000GB of data as well
- only a part of it will actually be written and take up space on disk, bigger spans of "free" areas are just marked as such instead of being filled with zeroes
 
  • Like
Reactions: skydogch
exactly (modulo some difference in how partially written blocks/clusters/.. are handled - it might not be exactly the same size on disk, it is using a different file format after all :)

think of it like this:
- the disk image represents 1000GB of data
- only a part of the 1000GB are actually filled with data at the moment
- the new file must represent 1000GB of data as well
- only a part of it will actually be written and take up space on disk, bigger spans of "free" areas are just marked as such instead of being filled with zeroes

Thanks a lot for the clarification, now it is clear. Thread solved!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!