Error importing vhd or VM
-
I have successfully exported a VM and separated the associated VHD.
But I can't import them anymore.
The error is IMPORT_ERROR_PREMATURE_EOF, it appears 10-15 seconds after the start.XOCE version is 675405f7ace55411b1ca0bbed8b9e31504fcc387
HTTP handler of vm.import undefined { "code": "IMPORT_ERROR_PREMATURE_EOF", "params": [], "url": "https://10.1.60.41/import/?sr_id=OpaqueRef%3A7a280641-2032-4846-a66c-d79312c077da&session_id=OpaqueRef%3A32f57103-c5f5-44c5-802b-172de55b3f9e&task_id=OpaqueRef%3A838d92ed-c356-4026-a29e-b3a294edc040", "task": { "uuid": "9c8bd701-8dc4-72ca-0964-74c738e2b5d5", "name_label": "[XO] VM import", "name_description": "", "allowed_operations": [], "current_operations": {}, "created": "20230201T14:41:35Z", "finished": "20230201T14:42:03Z", "status": "failure", "resident_on": "OpaqueRef:a9cf8be5-d05a-4b0f-9eba-a47762cca4f2", "progress": 1, "type": "<none/>", "result": "", "error_info": [ "IMPORT_ERROR_PREMATURE_EOF" ], "other_config": { "object_creation": "complete" }, "subtask_of": "OpaqueRef:NULL", "subtasks": [], "backtrace": "(((process xapi)(filename lib/backtrace.ml)(line 210))((process xapi)(filename ocaml/xapi/import.ml)(line 2021))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 101)))" }, "pool_master": { "uuid": "73d33ef9-d7d9-45ca-b6d6-108c8d889b3e", "name_label": "vrs2", "name_description": "Default install", "memory_overhead": 2050330624, "allowed_operations": [ "vm_migrate", "provision", "vm_resume", "evacuate", "vm_start" ], "current_operations": {}, "API_version_major": 2, "API_version_minor": 16, "API_version_vendor": "XenSource", "API_version_vendor_implementation": {}, "enabled": true, "software_version": { "product_version": "8.2.1", "product_version_text": "8.2", "product_version_text_short": "8.2", "platform_name": "XCP", "platform_version": "3.2.1", "product_brand": "XCP-ng", "build_number": "release/yangtze/master/58", "hostname": "localhost", "date": "2022-10-12", "dbv": "0.0.1", "xapi": "1.20", "xen": "4.13.4-9.28.1", "linux": "4.19.0+1", "xencenter_min": "2.16", "xencenter_max": "2.16", "network_backend": "openvswitch", "db_schema": "5.602" }, "other_config": { "agent_start_time": "1675236704.", "boot_time": "1675236557.", "rpm_patch_installation_time": "1675236277.874", "iscsi_iqn": "iqn.2020-05.ro.tmb:vrs2" }, "capabilities": [ "xen-3.0-x86_64", "hvm-3.0-x86_32", "hvm-3.0-x86_32p", "hvm-3.0-x86_64", "" ], "cpu_configuration": {}, "sched_policy": "credit", "supported_bootloaders": [ "pygrub", "eliloader" ], "resident_VMs": [ "OpaqueRef:52c72842-78cb-41cc-9976-bc0262eb0eec", "OpaqueRef:871c8b00-cfe9-45cb-8d51-95d103f09f72" ], "logging": {}, "PIFs": [ "OpaqueRef:ee4b1a84-b570-4f71-8e46-71a97bc6c45e", "OpaqueRef:cba363e4-9f7a-4cc8-8326-24bc7d6bcb4d", "OpaqueRef:952e88bc-14f7-4375-9a33-095aff6cfd1b", "OpaqueRef:2c0832d0-e75f-4311-83f1-242e97b95fbc", "OpaqueRef:0da685ca-71af-42fa-9d64-96966d2bef22" ], "suspend_image_sr": "OpaqueRef:12fe7072-33c3-4cc9-aa6c-038b75f87f11", "crash_dump_sr": "OpaqueRef:12fe7072-33c3-4cc9-aa6c-038b75f87f11", "crashdumps": [], "patches": [], "updates": [], "PBDs": [ "OpaqueRef:f87a5346-3113-4d3d-9640-b34e022adeea", "OpaqueRef:ce9ce764-ee53-4a06-9aa4-3986bfa53a10", "OpaqueRef:b4b07fa5-befb-4552-8ec9-e2a5a5412bdb", "OpaqueRef:99961564-1aa1-45f4-9244-4261fbc8f34d", "OpaqueRef:2e811d3c-4dfa-449a-acbc-8b098465c0be", "OpaqueRef:058ceb92-feb1-497c-9ebd-c85414efbad2" ], "host_CPUs": [ "OpaqueRef:6d58c667-4bce-43fc-8c94-ba5bbf21309f", "OpaqueRef:6086ce07-ae2a-4016-97f2-eefd94c7e65f", "OpaqueRef:fc3469fe-626b-4a28-9629-979d08ba6b34", "OpaqueRef:1179ba5d-64b5-48ca-9043-d5b9093066ec", "OpaqueRef:02bb805e-d8f3-4336-ac4e-813679990d69", "OpaqueRef:21c838d1-5626-4b95-9e92-e66a3e8eb4ba", "OpaqueRef:2dc1f635-499f-40fb-9615-248678c2ef69", "OpaqueRef:721010cd-d62a-49fa-94fd-a35b357cdd15", "OpaqueRef:fddb71eb-15ea-4e5a-a829-c20008bd521c", "OpaqueRef:f9b8ee71-0bdf-4214-9335-9406f38d4a9b", "OpaqueRef:2884aedc-b990-40e0-85f5-e9519ad493fc", "OpaqueRef:0adb9cf7-3fa1-416c-848d-46fc8016b5a1", "OpaqueRef:2f173924-2e28-4cac-8951-174dcfef836b", "OpaqueRef:c9fd87aa-46a4-487e-9d57-bc67f9d613e1", "OpaqueRef:f826209b-15d4-4672-b06a-8529e9c69730", "OpaqueRef:c5e34e39-6a19-44cc-9c24-da1e37e228f4", "OpaqueRef:832312de-1550-44bb-af41-af9c2bab0f38", "OpaqueRef:7a9970ae-5214-453d-a516-9f833cc294d5", "OpaqueRef:a425fbbd-6901-4cea-a987-0a41904cc638", "OpaqueRef:788fcdff-2b32-438b-bdd0-9fc40204b584", "OpaqueRef:a9046277-e0f6-4b87-babc-92f9b9786e21", "OpaqueRef:5464d8e0-76a4-431f-b68c-b31001ac604b", "OpaqueRef:90edae69-26d1-4090-b1fb-0ec6fe1f9be5", "OpaqueRef:90c84cf4-1b12-48e5-87a2-df70ef3c3f85" ], "cpu_info": { "cpu_count": "24", "socket_count": "2", "vendor": "GenuineIntel", "speed": "2399.913", "modelname": "Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz", "family": "6", "model": "63", "stepping": "2", "flags": "fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid pni pclmulqdq monitor est ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault intel_ppin ssbd ibrs ibpb stibp fsgsbase bmi1 avx2 bmi2 erms xsaveopt", "features_pv": "1fc9cbf5-f6f83203-2991cbf5-00000023-00000001-00000329-00000000-00000000-00001000-8c000400-00000000-00000000-00000000-00000000-00000000-00000000-00000000-00000000", "features_hvm": "1fcbfbff-f7fa3223-2d93fbff-00000423-00000001-000007ab-00000000-00000000-00001000-9c000400-00000000-00000000-00000000-00000000-00000000-00000000-00000000-00000000", "features_hvm_host": "1fcbfbff-f7fa3223-2c100800-00000021-00000001-000007ab-00000000-00000000-00001000-9c000400-00000000-00000000-00000000-00000000-00000000-00000000-00000000-00000000", "features_pv_host": "1fc9cbf5-f6f83203-28100800-00000021-00000001-00000329-00000000-00000000-00001000-8c000400-00000000-00000000-00000000-00000000-00000000-00000000-00000000-00000000" }, "hostname": "vrs2", "address": "10.1.60.41", "metrics": "OpaqueRef:4134e2bd-4fb8-4464-aa7d-2ba48a9ff519", "license_params": { "restrict_vswitch_controller": "false", "restrict_lab": "false", "restrict_stage": "false", "restrict_storagelink": "false", "restrict_storagelink_site_recovery": "false", "restrict_web_selfservice": "false", "restrict_web_selfservice_manager": "false", "restrict_hotfix_apply": "false", "restrict_export_resource_data": "false", "restrict_read_caching": "false", "restrict_cifs": "false", "restrict_health_check": "false", "restrict_xcm": "false", "restrict_vm_memory_introspection": "false", "restrict_batch_hotfix_apply": "false", "restrict_management_on_vlan": "false", "restrict_ws_proxy": "false", "restrict_vlan": "false", "restrict_qos": "false", "restrict_pool_attached_storage": "false", "restrict_netapp": "false", "restrict_equalogic": "false", "restrict_pooling": "false", "enable_xha": "true", "restrict_marathon": "false", "restrict_email_alerting": "false", "restrict_historical_performance": "false", "restrict_wlb": "false", "restrict_rbac": "false", "restrict_dmc": "false", "restrict_checkpoint": "false", "restrict_cpu_masking": "false", "restrict_connection": "false", "platform_filter": "false", "regular_nag_dialog": "false", "restrict_vmpr": "false", "restrict_vmss": "false", "restrict_intellicache": "false", "restrict_gpu": "false", "restrict_dr": "false", "restrict_vif_locking": "false", "restrict_storage_xen_motion": "false", "restrict_vgpu": "false", "restrict_integrated_gpu_passthrough": "false", "restrict_vss": "false", "restrict_guest_agent_auto_update": "false", "restrict_pci_device_for_auto_update": "false", "restrict_xen_motion": "false", "restrict_guest_ip_setting": "false", "restrict_ad": "false", "restrict_nested_virt": "false", "restrict_live_patching": "false", "restrict_set_vcpus_number_live": "false", "restrict_pvs_proxy": "false", "restrict_igmp_snooping": "false", "restrict_rpu": "false", "restrict_pool_size": "false", "restrict_cbt": "false", "restrict_usb_passthrough": "false", "restrict_network_sriov": "false", "restrict_corosync": "true", "restrict_zstd_export": "false", "restrict_pool_secret_rotation": "false" }, "ha_statefiles": [], "ha_network_peers": [], "blobs": {}, "tags": [], "external_auth_type": "", "external_auth_service_name": "", "external_auth_configuration": {}, "edition": "xcp-ng", "license_server": { "address": "localhost", "port": "27000" }, "bios_strings": { "bios-vendor": "LENOVO", "bios-version": "-[TCE156A-3.70]-", "system-manufacturer": "LENOVO", "system-product-name": "System x3650 M5: -[5462AC1]-", "system-version": "11", "system-serial-number": "", "baseboard-manufacturer": "LENOVO", "baseboard-product-name": "", "baseboard-version": "NULL", "baseboard-serial-number": "", "oem-1": "Xen", "oem-2": "MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d", "oem-3": "LENOVO SystemX", "hp-rombios": "" }, "power_on_mode": "", "power_on_config": {}, "local_cache_sr": "OpaqueRef:12fe7072-33c3-4cc9-aa6c-038b75f87f11", "chipset_info": { "iommu": "true" }, "PCIs": [ "OpaqueRef:d1f944a6-b004-4a10-b7d9-277f418bdac2", "OpaqueRef:a6810788-6ef4-42e5-8e00-59c49c072477", "OpaqueRef:9b7ad8ae-175b-4f72-890f-d77d50b82bcd", "OpaqueRef:961676fa-b667-4ea3-aa4b-d140c7856645", "OpaqueRef:6c389084-3505-4dd4-8a69-f9bba59049a0", "OpaqueRef:509c2c51-52f4-43b8-8725-c44f86f6dca5", "OpaqueRef:3030359a-27b4-49e4-b9b4-21e39b7decd4" ], "PGPUs": [ "OpaqueRef:d0e28319-695b-4c70-9d4b-026a2a971816" ], "PUSBs": [], "ssl_legacy": false, "guest_VCPUs_params": {}, "display": "enabled", "virtual_hardware_platform_versions": [ 0, 1, 2 ], "control_domain": "OpaqueRef:871c8b00-cfe9-45cb-8d51-95d103f09f72", "updates_requiring_reboot": [], "features": [], "iscsi_iqn": "iqn.2020-05.ro.tmb:vrs2", "multipathing": false, "uefi_certificates": "", "certificates": [], "editions": [ "xcp-ng" ] }, "SR": { "uuid": "07305f5d-46ee-ab66-b89a-2e19d3c68e40", "name_label": "vrs2-RAID", "name_description": "vrs2-RAID", "allowed_operations": [ "vdi_enable_cbt", "vdi_list_changed_blocks", "unplug", "plug", "pbd_create", "vdi_disable_cbt", "update", "pbd_destroy", "vdi_resize", "vdi_clone", "vdi_data_destroy", "scan", "vdi_snapshot", "vdi_mirror", "vdi_create", "vdi_destroy", "vdi_set_on_boot" ], "current_operations": {}, "VDIs": [ "OpaqueRef:fba701fc-63f9-4836-a0b4-e234b2ed0596", "OpaqueRef:d53b5139-19f2-45c9-9267-b6d3f33888c0", "OpaqueRef:d3f91283-8844-42b2-97d6-3f9cbb663556", "OpaqueRef:d1cdad56-93cc-4f72-bca9-f74ba8ab9570", "OpaqueRef:c9282f4a-3a4f-4e77-b23b-b25a2c379e0e", "OpaqueRef:c8603952-2d15-4601-a33d-89e5079c0bbd", "OpaqueRef:b00536ee-96d9-4cf5-93ed-dbc4322a78b8", "OpaqueRef:88156965-fe79-45bb-a7d4-dc331f7b140c", "OpaqueRef:7c0ac26a-1369-49ea-a42e-7a36d5c4d6a1", "OpaqueRef:7be9ec89-4db3-46c5-8335-6728d8aeb8fd", "OpaqueRef:565074af-f43c-4ed7-92d4-eaaed9a7c883", "OpaqueRef:4755d020-42b7-4bb4-8f81-83ec602a579e", "OpaqueRef:3bb55d85-c712-4ed5-9be1-19b02d542ca2", "OpaqueRef:3a4a1d53-eb38-4ab5-ae6b-e34f601d9272", "OpaqueRef:3424146c-c681-4ce5-ae04-a9d032a05d4e", "OpaqueRef:2c5673ab-3377-44a7-8c67-6e05451f9e6d", "OpaqueRef:2c55bb25-d326-4584-882a-4d531f2a04a6", "OpaqueRef:2432ee16-a090-4ce6-a45d-20aad5aa22b7", "OpaqueRef:1a43c4bd-be0c-4abb-8dde-bb5ed08da9ce" ], "PBDs": [ "OpaqueRef:99961564-1aa1-45f4-9244-4261fbc8f34d" ], "virtual_allocation": 3541200535552, "physical_utilisation": 440006451200, "physical_size": 7131170955264, "type": "ext", "content_type": "user", "shared": false, "other_config": { "auto-scan": "true" }, "tags": [], "sm_config": { "devserial": "scsi-3600605b00b85aac02a7ea5a07339ca26" }, "blobs": {}, "local_cache_enabled": false, "introduced_by": "OpaqueRef:NULL", "clustered": false, "is_tools_sr": false }, "message": "IMPORT_ERROR_PREMATURE_EOF()", "name": "XapiError", "stack": "XapiError: IMPORT_ERROR_PREMATURE_EOF() at Function.wrap (/opt/xen-orchestra/packages/xen-api/src/_XapiError.js:16:12) at _default (/opt/xen-orchestra/packages/xen-api/src/_getTaskResult.js:11:29) at Xapi._addRecordToCache (/opt/xen-orchestra/packages/xen-api/src/index.js:954:37) at forEach (/opt/xen-orchestra/packages/xen-api/src/index.js:988:14) at Array.forEach (<anonymous>) at Xapi._processEvents (/opt/xen-orchestra/packages/xen-api/src/index.js:978:12) at Xapi._watchEvents (/opt/xen-orchestra/packages/xen-api/src/index.js:1144:14) at runNextTicks (node:internal/process/task_queues:60:5) at processImmediate (node:internal/timers:442:9) at process.callbackTrampoline (node:internal/async_hooks:130:17)" } -
Hi!
- Have you exported the disk with XO or something else?
- You might want to check the VHD with
vhdutilor something else.
-
Hi
- yes, with the same version of XOCE
- I'll do that
I made a copy of that VM, from one server to another and it started ok.
I exported the new VM (copy one), but also without success on import. Same error on import -
After testing each commit, this behavior starts with f6fd1db1ef12633cc5bb8ec8ab5bc84682dd3fe7
This commit is ok, a1050882aeb5b9692282caafa810af587614243a, on both imports VM or VHD. Export was made with commit 7a5649510d1f796950d2d46ea0102ff683fbb539 -
FWIW, I had a similar issue with this same commit, but then the issue mysteriously went away.

-
I tested all day, on several VMs with XOCE, I installed one from scratch. if I put the mentioned commit the problem disappears.
-
Adding @julien-f in the loop, since it's like there's a specific commit causing problems, but I'm not sure we managed to reproduce last time

Maybe a rebuild wasn't truly done? Can you try after wiping the previous install?
-
@olivierlambert
I reinstalled XOCE from scratch. Starting with SO. Same result.
I also tested on a mini lab that is on another network where there are only the server and a computerSO = Ubuntu server 22.04.01
XOCE is reinstalled by hand following steps from the documentation, I don't use auto-scripts -
-
@Gheppy If by any chance you have time tot test with the REST API (https://xen-orchestra.com/docs/restapi.html#vdi-import), let me know the result

-
Good idea, indeed

-
I get this
IP in the photo is from XOCE commit 675405f7ace55411b1ca0bbed8b9e31504fcc387
-
Can you check the VHD with
vhdiinfo my.vhd -
-
Could you import this VHD with
xedirectly from the host? (this would tell if it's a VHD issue or XO issue).xe vdi-import -
@olivierlambert
steps are?- copy vhd to Xen local disk
- run command
xe vdi-imporrt "name".vhd
-
xe vdi-import uuid=uuid_of_vdi filename=filename_to_import_from --progress -
import is ok

-
Good, then it's maybe your XO build. Could you try on a fresh XOA fully up to date on
latest? -
@olivierlambert
XOA or XO form source ?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login