This question is "kinda" about Proxmox VM’s but probably more to do with LVM’s
I’ll explain.
I created a VM on a Promox server with a partition of 20Gb on the local-lvm
When I do a lvdisplay I do indeed see that local-lvm on path /dev/pve/vm-101-disk-1 and here’s the key fact the Mapped Size is showing 15%.
I expected that because that roughly matches the amount of actual used space on that VM.
For various reasons I needed to move that VM from Proxmox to VMWare which I did by moving the partition using the command :-
qemu-img convert -p -O vmdk /dev/pve/vm-101-disk-1 /mnt/vmwks/vm-000-disk-1.vmdk
Happy days…. I then worked on my VM and then put it back on Proxmox server using :-
qemu-img convert -p -O raw /mnt/vmwks/vm-000-disk-1.vmdk /dev/pve/vm-101-disk-1
However…..
Now when I do a lvdisplay the mapped size is now showing as 100% and not around the 15-16% I was expecting.
I made sure the VMDK file was a flat single file (I.e. the full 20Gb in size) but clearly the qemu-img isn’t showing the sparse space as free and therefore showing the lv as 100%. Of course inside the VM its reporting the free space as right and showing 84% free. But the lvdisplay figures changed from the original 15% to 100%
What have I done wrong when using QEMU-IMG?
I tried using DD (dd if=/mnt/vmwks/vm-000-disk-1-flat.vmdk of=/dev/pve/vm-101-disk-1) and that made no difference, still 100%
Any ideas??