Repository navigation
In vmware to KVM migrations : virt-v2v can’t find the file the OVF says should exist, the conversion stops and throws “file not found in the OVA archive.” #10284
Description
problem
vcenter connection is live and after starting migration, below error comes with logs -
tail -f /var/log/cloudstack/agent/agent.log
2025-01-27 20:23:40,799 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (agentRequest-Handler-3:null) (logid:f60e79bc) Attempting to convert the OVF c7c4fe2c-4362-4482-a14d-c788e6278371 of the instance vm123 from VMware to KVM
2025-01-27 20:23:40,826 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) virt-v2v: virt-v2v 1.44.2 (x86_64)
2025-01-27 20:23:40,827 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) libvirt version: 8.0.0
2025-01-27 20:23:40,827 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) [ 0.0] Opening the source -i ova /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/
2025-01-27 20:23:40,827 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) ova: orig_ova = /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/, top_dir = /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371, ova_type = Directory
2025-01-27 20:23:40,843 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) cd '/mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371' && find -type f
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) virt-v2v: error: -i ova: OVF references file
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) ‘c7c4fe2c-4362-4482-a14d-c788e6278371-disk0.vmdk’ which was not found
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) in the OVA archive
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress)
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) If reporting bugs, run virt-v2v with debugging enabled and include the
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) complete output:
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress)
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) virt-v2v -v -x [...]
2025-01-27 20:23:40,850 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) rm -rf '/var/tmp/null.G0UmXs'
2025-01-27 20:23:40,854 INFO [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (Script-6:null) (logid:) (virt-v2v ovf source: /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ progress) libguestfs: closing guestfs handle 0x55d5d7f15c10 (state 0)
2025-01-27 20:23:40,857 WARN [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (agentRequest-Handler-3:null) (logid:f60e79bc) Execution of process [73029] for command [virt-v2v --root first -i ova /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ -o local -os /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09 -of qcow2 -on ef1f1603-1c83-4888-8f55-4a17feafb699 -v ] failed.
2025-01-27 20:23:40,857 WARN [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (agentRequest-Handler-3:null) (logid:f60e79bc) Exception [Stream closed] occurred when attempting to run command [virt-v2v --root first -i ova /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ -o local -os /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09 -of qcow2 -on ef1f1603-1c83-4888-8f55-4a17feafb699 -v ].
java.io.IOException: Stream closed
at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:342)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:295)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:337)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:179)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:181)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:161)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:326)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:392)
at com.cloud.utils.script.OutputInterpreter.processError(OutputInterpreter.java:38)
at com.cloud.utils.script.Script.execute(Script.java:313)
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtConvertInstanceCommandWrapper.performInstanceConversion(LibvirtConvertInstanceCommandWrapper.java:414)
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtConvertInstanceCommandWrapper.execute(LibvirtConvertInstanceCommandWrapper.java:134)
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtConvertInstanceCommandWrapper.execute(LibvirtConvertInstanceCommandWrapper.java:62)
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1929)
at com.cloud.agent.Agent.processRequest(Agent.java:683)
at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1106)
at com.cloud.utils.nio.Task.call(Task.java:83)
at com.cloud.utils.nio.Task.call(Task.java:29)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2025-01-27 20:23:40,858 ERROR [resource.wrapper.LibvirtConvertInstanceCommandWrapper] (agentRequest-Handler-3:null) (logid:f60e79bc) The virt-v2v conversion for the OVF c7c4fe2c-4362-4482-a14d-c788e6278371 failed. Please check the agent logs for the virt-v2v output
versions
The versions of ACS - 14.19.1.2
hypervisors - KVM
storage - NFS
The steps to reproduce the bug
- in host where v2v is installed check agent logs
- from cloudstack GUI, follow vmware to kvm migration process
- vcenter create clone and after sometime migration fails with above error
...
What to do about it?
No response
Activity
boring-cyborg commentedon Jan 27, 2025
Thanks for opening your first issue here! Be sure to follow the issue template!
DaanHoogland commentedon Jan 28, 2025
@akshayfromcomhard , are all conversions failing for you or is this with a specific template?
akshayfromcomhard commentedon Jan 28, 2025
DaanHoogland commentedon Jan 28, 2025
can you try with the command line :
virt-v2v --root first -i ova /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09/c7c4fe2c-4362-4482-a14d-c788e6278371/ -o local -os /mnt/c81c5de0-17e2-3259-a95e-f8dc6728ae09 -of qcow2 -on ef1f1603-1c83-4888-8f55-4a17feafb699 -v?you may need to replace some of the parameters.
akshayfromcomhard commentedon Jan 28, 2025
Hi,
This gives error - No such file or directory
This means OVA is not getting copied in KVM host.
DaanHoogland commentedon Jan 29, 2025
@akshayfromcomhard , can you copy the file by hand? (not as a workaround but as an invetigative step)
akshayfromcomhard commentedon Feb 1, 2025
Hi,
Can you please share a command to do this?
DaanHoogland commentedon Feb 1, 2025
use
scpto copy the OVA to the KVM host.akshayfromcomhard commentedon Feb 1, 2025
Are these the steps? -
Steps for Manual OVA Migration Process
Step 1: Export the VM to OVA from vCenter/ESXi
Use the vSphere Client to export the VM as an OVA.
Right-click on the VM → Template → Export OVF Template.
Save the exported .ova file on your local machine or a network location.
Step 2: Copy the OVA to the KVM Host
Use the scp (secure copy) command to transfer the exported OVA to your KVM server.
Example Command:
scp /path/to/your-vm.ova user@kvm-host:/path/to/destination/
Replace /path/to/your-vm.ova with the actual OVA file path on your local system.
Replace user@kvm-host:/path/to/destination/ with your KVM server's username, IP, and destination path.
DaanHoogland commentedon Feb 3, 2025
yes @akshayfromcomhard , this is good for testing if you can convert the OVA.
For trouble shooting the automated process you would wan't to export it to one of the storages.
DaanHoogland commentedon Feb 13, 2025
@akshayfromcomhard please have a look at @thanasiskalos , please have alook at https://docs.cloudstack.apache.org/en/4.20.0.0/adminguide/virtual_machines/importing_vmware_vms_into_kvm.html especially the last few notes. If you cannot convert with virt-v2v on the command line it is not possible with ACS either.