ESXi Import Wizard Error

May 3, 2024
3
0
1
I am working on moving from a single free instance of ESXi to a single PVE server, using the same hardware.
As an interim step, I have installed PVE as a VM on the ESXi instance, and I am using a NFS share to import the VMs. The plan is to:
  • Import all VMs from ESXi to the NFS volume, using the import utility in the PVE instance (VMDK converted to qcow2)
  • Blow away ESXi from the physical hardware, and install PVE on the same hardware
  • Import the qcow2 VMs into the new PVE instance on the physical hardware
I have successfully imported a number of Linux and Windows VMs to the NFS without instance, but have run into a problem with a Windows file server with a 1TB data drive. The 100GB system drive imports successfully, but the 1TB data drive fails at 53% every time. It is a thin provisioned VMDK with 1 TB GPT NTFS volume, with approximately 300GB free.


The import utility fails with the following error:

Code:
qemu-img: error while reading at byte 591161842176: Input/output error
TASK ERROR: unable to create VM 107 - cannot import from 'esxi:ha-datacenter/HDD Datastore 1/smeg-files.smeghead.ca/smeg-files.smeghead.ca_1.vmdk' - copy failed: command '/usr/bin/qemu-img convert -p -n -f vmdk -O qcow2 '/run/pve/import/esxi/esxi/mnt/ha-datacenter/HDD Datastore 1/smeg-files.smeghead.ca/smeg-files.smeghead.ca_1.vmdk' zeroinit:/mnt/pve/nas/images/107/vm-107-disk-1.qcow2' failed: exit code 1

The Linux journal shows the following error:



Code:
pve esxi-folder-fuse[1083]: error handling request: cached read failed: error reading a body from connection: end of file before message length reached
                                           
                                           Caused by:
                                               end of file before message length reached
pvedaemon[566872]: VM 107 creating disks failed
pvedaemon[566872]: unable to create VM 107 - cannot import from 'esxi:ha-datacenter/HDD Datastore 1/smeg-files.smeghead.ca/smeg-files.smeghead.ca_1.vmdk' - copy failed: command '/usr/bin/qemu-img convert -p -n -f vmdk -O qcow2 '/run/pve/import/esxi/esxi/mnt/ha-datacenter/HDD Datastore 1/smeg-files.smeghead.ca/smeg-files.smeghead.ca_1.vmdk' zeroinit:/mnt/pve/nas/images/107/vm-107-disk-1.qcow2' failed: exit code 1

I have repeated the import several times, and it always fails at exactly the same point. I have tried verifying the VMDK, and checking the NTFS filesystem, and both look good.

ESXi host is version 6.7 Update 3, PVE version is 8.2.



Note, I have purchased a community subscription, but have not applied it to the temporary PVE VM. I will apply the key to the final hardware PVE instance.



Any help would be most appreciated.
 
Oh, just noticed, the fix is already located within PVE storage (not within pve-esxi-import-tools):
https://git.proxmox.com/?p=pve-storage.git;a=log
https://git.proxmox.com/?p=pve-storage.git;a=commit;h=22cb4b0b7812658ecc2444ca3ee51a04c50e4f57

You'll have to wait for it to receive the next version bump and then update your Proxmox nodes accordingly
Thanks for the reply, Zerstoiber. I tried renaming the datastore to "HDD_Datastore_1", but unfortunately it still failed in the same spot. Do you think the patch would work?
 

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!