qemu-img: error - how to solve?

ztek

New Member
Aug 20, 2023
9
0
1
Hello,

i want to move a esxi VM to proxmox, created the ovf export but when i try to import i am getting this:

root@proxmox:/mnt/pve/localext4/import# qm importovf 200 ubuntu.ovf local-lvm
Logical volume "vm-200-disk-0" created.
transferred 0.0 B of 200.0 GiB (0.00%)
transferred 2.0 GiB of 200.0 GiB (1.00%)
transferred 4.0 GiB of 200.0 GiB (2.00%)
transferred 6.0 GiB of 200.0 GiB (3.00%)
transferred 8.0 GiB of 200.0 GiB (4.00%)
transferred 10.0 GiB of 200.0 GiB (5.00%)
qemu-img: error while reading at byte 10607198208: Invalid argument
Logical volume "vm-200-disk-0" successfully removed.
error during import, cleaning up created resources...
import failed - copy failed: command '/usr/bin/qemu-img convert -p -n -f vmdk -O raw /mnt/pve/localext4/import/ubuntu-0.vmdk zeroinit:/dev/pve/vm-200-disk-0' failed: exit code 1


I repeated the command and it stops at the same place.
How to fix it and how to import the VM?
 
Hi,
what if you run qemu-img check -f vmdk /mnt/pve/localext4/import/ubuntu-0.vmdk?
 
Last edited:
  • Like
Reactions: ztek
Many thanks and the result is very promising:
qemu-img check -f vmdk /mnt/pve/localext4/import/ubuntu-0.vmdk
No errors were found on the image.


Please help to get it on proxmox!!!
 
Hello,
same problem with many VMs windows or debian with Esxi 7.0.3 to proxmox 8.0.
no errors with the qemu check.
100 Gb to 200Gb for the Vm Storage.
I test with the vmdk flat image but not very useful :( if i do it for all VM.
any idea to resolve this error ?
 
  • Like
Reactions: ztek
proxmox is awesome but we need a working path to migrate from esxi. I even run licensed proxmox server to support the proxmox development. Lets hope they come up with something
 
i'm new to proxmox, and this new world is very amazing than esxi, and i passed my Lab to proxmox but it's not win if i don't fund solution,
i don't wont recreate other VM.

I have used ovftools from vmware, the latest version, same problem on direct transfer
 
Last edited:
after exporting a VM with flat vmdk, the import is succesfull :
for processing :
- In esxi, stop your exporting VM before, go to Datastore, and going to your VM than you like,
select vmdk and download from your browser, you have 2 files .vmdk.
- copy this 2 files in a folder to your proxmox! VMexport.vmdk is the smaller file (1kb), the other are with -flat.vmdk
on your proxmox shell, go to your folder where your have copy your 2 fils and passed this command :
$ qm disk import <VM_ID> VMExport.vmdk <Location_disk>
after that your see your disk is unused to your proxmox VM config, make a sata disk and maker priority and bootable on options,
that's all !!
look this link :
https://knowledgebase.45drives.com/...virtual-machine-disks-from-vmware-to-proxmox/
 
Last edited:
unfortunately i no longer have the esxi, i reinstalled with proxmox. I have the ovf exported 2 files. Something.ovf and something.vmdk. This vmdk is 60GB smaller size as the orginal disk was. Can I use this somehow to recreate the VM?
 
i have test this method but not working for me :(
and i havent test to install a vm with esxi, to import ovf file and re-export to flat format,
maybe a converter tools make a flat format
i'm lucky, i have 2 computer, my production (esxi) and my test( proxmox for next production).
 

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!