Import problem which Mikrotik Cloud Hosted Router
-
I'm trying to import Mikrotik CHR OVA template (chr-6.48.3.ova) but the process freezes. Previously, there were no problems with import now, one CHR is running on the server.
XCP-NG - 8.2.0. (All Updates)
Xen Orchestra - 5.61.0
XCP-ng Center 20.04.01.33Log XCP-ng Center:
2021-08-10 14:35:21,987 INFO XenOvf.OVF [Main program thread] - Started validation of package MikroTik_CHR_release_6.48.3 2021-08-10 14:35:21,987 INFO XenOvf.OVF [Main program thread] - Validating OVF version 2021-08-10 14:35:21,987 WARN XenOvf.OVF [Main program thread] - OVF version not set, assuming 1.0.0 2021-08-10 14:35:21,987 INFO XenOvf.OVF [Main program thread] - Validating OVF XML schema 2021-08-10 14:35:22,033 WARN XenOvf.OVF [Main program thread] - Found unexpected virtual hardware type vmx-10. 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating disks 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating CPU 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Memory 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Networks 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Validating Capabilities 2021-08-10 14:35:22,049 INFO XenOvf.OVF [Main program thread] - Finished validation of package MikroTik_CHR_release_6.48.3 2021-08-10 14:37:02,096 INFO Audit [Main program thread] - Operation started: TransferXenCenterMetadataAction: Connection unknown: Transfer Health Check settings 2021-08-10 14:37:02,112 INFO Audit [21] - Operation success: TransferXenCenterMetadataAction: Connection unknown: Transfer Health Check settings 2021-08-10 14:37:02,330 INFO XenOvf.OVF [Main program thread] - Import.Process: Found a VMWare Virtual Hardware Section (Rating: 4) [vmx-10] 2021-08-10 14:37:27,893 INFO XenOvf.OVF [Main program thread] - Import.Process: Found a VMWare Virtual Hardware Section (Rating: 4) [vmx-10] 2021-08-10 14:38:02,112 INFO Audit [Main program thread] - Operation started: ImportApplianceAction: xcp-ng1: Pool 6aec25c1-f60e-e36d-a7d3-492ecead850b (xcp-ng1): 2021-08-10 14:38:02,127 INFO XenOvf.OVF [23] - Import.Process: Found a VMWare Virtual Hardware Section (Rating: 4) [vmx-10] 2021-08-10 14:38:02,393 INFO XenOvf.OVF [23] - Import.Process: Found a VMWare Virtual Hardware Section (Rating: 4) [vmx-10] 2021-08-10 14:38:02,674 INFO XenOvfTransport.Import [23] - Import.isURI: File MikroTik_CHR_release_6.48.3-disk1.vmdk is not in URI format. 2021-08-10 14:38:02,783 INFO XenOvfTransport.Import [23] - Import.isURI: File MikroTik_CHR_release_6.48.3-disk1.vmdk is not in URI format. 2021-08-10 14:40:26,862 ERROR XenOvfTransport.iSCSI [23] - Failed to start Transfer VM. There was a failure communicating with the plug-in. 2021-08-10 14:40:26,862 ERROR XenOvfTransport.Import [23] - Failed to import a virtual disk over iSCSI. System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in. at XenAPI.JsonRpcClient.Rpc[T](String callName, JToken parameters, JsonSerializer serializer) at XenAPI.Host.call_plugin(Session session, String _host, String _plugin, String _fn, Dictionary`2 _args) at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) --- End of inner exception stack trace --- at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.iSCSI.Connect(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.Import.UploadiSCSI(Session xenSession, String sruuid, String label, Stream filestream, Int64 capacity, String description, String vdiuuid) 2021-08-10 14:40:26,893 ERROR XenOvfTransport.Import [23] - Failed to add resource Hard Disk Image. System.Exception: Failed to import virtual disk file. ---> System.Exception: Failed to import a virtual disk over iSCSI. ---> System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in. at XenAPI.JsonRpcClient.Rpc[T](String callName, JToken parameters, JsonSerializer serializer) at XenAPI.Host.call_plugin(Session session, String _host, String _plugin, String _fn, Dictionary`2 _args) at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) --- End of inner exception stack trace --- at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.iSCSI.Connect(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.Import.UploadiSCSI(Session xenSession, String sruuid, String label, Stream filestream, Int64 capacity, String description, String vdiuuid) --- End of inner exception stack trace --- at XenOvfTransport.Import.UploadiSCSI(Session xenSession, String sruuid, String label, Stream filestream, Int64 capacity, String description, String vdiuuid) at XenOvfTransport.Import.ImportFile(Session xenSession, String vmname, String pathToOvf, String filename, String compression, String version, String passcode, String sruuid, String description, String vdiuuid) --- End of inner exception stack trace --- at XenOvfTransport.Import.ImportFile(Session xenSession, String vmname, String pathToOvf, String filename, String compression, String version, String passcode, String sruuid, String description, String vdiuuid) at XenOvfTransport.Import.AddResourceSettingData(Session xenSession, XenRef`1 vmRef, RASD_Type rasd, String pathToOvf, String filename, String compression, String version, String passcode) 2021-08-10 14:40:26,908 ERROR XenOvfTransport.Import [23] - Failed to import virtual disk from file MikroTik_CHR_release_6.48.3-disk1.vmdk to storage repository fd6b64fa-f045-d355-225f-2078d1842560. 2021-08-10 14:40:26,955 ERROR XenOvfTransport.Import [23] - Import failed System.IO.InvalidDataException: Failed to add resource Hard Disk Image. ---> System.Exception: Failed to import virtual disk file. ---> System.Exception: Failed to import a virtual disk over iSCSI. ---> System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in. at XenAPI.JsonRpcClient.Rpc[T](String callName, JToken parameters, JsonSerializer serializer) at XenAPI.Host.call_plugin(Session session, String _host, String _plugin, String _fn, Dictionary`2 _args) at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) --- End of inner exception stack trace --- at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.iSCSI.Connect(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.Import.UploadiSCSI(Session xenSession, String sruuid, String label, Stream filestream, Int64 capacity, String description, String vdiuuid) --- End of inner exception stack trace --- at XenOvfTransport.Import.UploadiSCSI(Session xenSession, String sruuid, String label, Stream filestream, Int64 capacity, String description, String vdiuuid) at XenOvfTransport.Import.ImportFile(Session xenSession, String vmname, String pathToOvf, String filename, String compression, String version, String passcode, String sruuid, String description, String vdiuuid) --- End of inner exception stack trace --- at XenOvfTransport.Import.ImportFile(Session xenSession, String vmname, String pathToOvf, String filename, String compression, String version, String passcode, String sruuid, String description, String vdiuuid) at XenOvfTransport.Import.AddResourceSettingData(Session xenSession, XenRef`1 vmRef, RASD_Type rasd, String pathToOvf, String filename, String compression, String version, String passcode) --- End of inner exception stack trace --- at XenOvfTransport.Import.AddResourceSettingData(Session xenSession, XenRef`1 vmRef, RASD_Type rasd, String pathToOvf, String filename, String compression, String version, String passcode) at XenOvfTransport.Import.Process(EnvelopeType ovfObj, String pathToOvf, String passcode) 2021-08-10 14:40:26,971 ERROR XenAdmin.Actions.AsyncAction [23] - System.Exception: Failed to import. ---> System.IO.InvalidDataException: Failed to add resource Hard Disk Image. ---> System.Exception: Failed to import virtual disk file. ---> System.Exception: Failed to import a virtual disk over iSCSI. ---> System.Exception: Failed to start the Transfer VM. ---> XenAPI.Failure: There was a failure communicating with the plug-in. at XenAPI.JsonRpcClient.Rpc[T](String callName, JToken parameters, JsonSerializer serializer) at XenAPI.Host.call_plugin(Session session, String _host, String _plugin, String _fn, Dictionary`2 _args) at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) --- End of inner exception stack trace --- at XenOvfTransport.iSCSI.StartiScsiTarget(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.iSCSI.Connect(Session xenSession, String vdiuuid, Boolean read_only) at XenOvfTransport.Import.UploadiSCSI(Session xenSession, String sruuid, String label, Stream filestream, Int64 capacity, String description, String vdiuuid) --- End of inner exception stack trace --- at XenOvfTransport.Import.UploadiSCSI(Session xenSession, String sruuid, String label, Stream filestream, Int64 capacity, String description, String vdiuuid) at XenOvfTransport.Import.ImportFile(Session xenSession, String vmname, String pathToOvf, String filename, String compression, String version, String passcode, String sruuid, String description, String vdiuuid) --- End of inner exception stack trace --- at XenOvfTransport.Import.ImportFile(Session xenSession, String vmname, String pathToOvf, String filename, String compression, String version, String passcode, String sruuid, String description, String vdiuuid) at XenOvfTransport.Import.AddResourceSettingData(Session xenSession, XenRef`1 vmRef, RASD_Type rasd, String pathToOvf, String filename, String compression, String version, String passcode) --- End of inner exception stack trace --- at XenOvfTransport.Import.AddResourceSettingData(Session xenSession, XenRef`1 vmRef, RASD_Type rasd, String pathToOvf, String filename, String compression, String version, String passcode) at XenOvfTransport.Import.Process(EnvelopeType ovfObj, String pathToOvf, String passcode) --- End of inner exception stack trace --- at XenOvfTransport.Import.Process(EnvelopeType ovfObj, String pathToOvf, String passcode) at XenAdmin.Actions.OVFActions.ImportApplianceAction.Run() at XenAdmin.Actions.AsyncAction.RunWorkerThread(Object o) 2021-08-10 14:40:26,971 WARN Audit [23] - Operation failure: ImportApplianceAction: xcp-ng1: Pool 6aec25c1-f60e-e36d-a7d3-492ecead850b (xcp-ng1): Disconnecting virtual disk MikroTik_CHR_release_6.48.3-disk1.vmdk ... 2021-08-10 14:55:27,221 INFO Audit [Main program thread] - Operation started: TransferXenCenterMetadataAction: Connection unknown: Transfer Health Check settings 2021-08-10 14:55:27,237 INFO Audit [27] - Operation success: TransferXenCenterMetadataAction: Connection unknown: Transfer Health Check settings 2021-08-10 15:01:58,393 INFO Audit [Main program thread] - Operation started: RetrieveWlbConfigurationAction: xcp-ng1: Pool 6aec25c1-f60e-e36d-a7d3-492ecead850b (xcp-ng1): Retrieving the WLB configuration. 2021-08-10 15:01:58,393 INFO XenAPI.Session [31] - Invoking JSON-RPC method 'pool.retrieve_wlb_configuration' 2021-08-10 15:01:58,440 ERROR XenAdmin.Actions.AsyncAction [31] - No WLB connection is configured. 2021-08-10 15:01:58,440 WARN Audit [31] - Operation failure: RetrieveWlbConfigurationAction: xcp-ng1: Pool 6aec25c1-f60e-e36d-a7d3-492ecead850b (xcp-ng1): Retrieving the WLB configuration. 2021-08-10 15:03:13,752 INFO XenAdmin.ConsoleView.VNCGraphicsClient [Main program thread] - VNCGraphicsClient.SetSendScanCodes newSendScanCodes=False
Log Xen Orchestra:
Aug 10 16:15:30 xoa xo-server[1861]: error: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 508. Received 231515204 Aug 10 16:15:30 xoa xo-server[1861]: at boundsError (internal/buffer.js:83:9) Aug 10 16:15:30 xoa xo-server[1861]: at Buffer.readUInt32BE (internal/buffer.js:306:5) Aug 10 16:15:30 xoa xo-server[1861]: at /usr/local/lib/node_modules/xo-server/node_modules/vhd-lib/src/createReadableSparseStream.js:38:13 Aug 10 16:15:30 xoa xo-server[1861]: at arrayEachRight (/usr/local/lib/node_modules/xo-server/node_modules/lodash/_arrayEachRight.js:14:9) Aug 10 16:15:30 xoa xo-server[1861]: at forEachRight (/usr/local/lib/node_modules/xo-server/node_modules/lodash/forEachRight.js:28:10) Aug 10 16:15:30 xoa xo-server[1861]: at createBAT (/usr/local/lib/node_modules/xo-server/node_modules/vhd-lib/src/createReadableSparseStream.js:37:3) Aug 10 16:15:30 xoa xo-server[1861]: at createReadableStream (/usr/local/lib/node_modules/xo-server/node_modules/vhd-lib/src/createReadableSparseStream.js:80:45) Aug 10 16:15:30 xoa xo-server[1861]: at /usr/local/lib/node_modules/xo-server/node_modules/xo-vmdk-to-vhd/src/index.js:19:10 Aug 10 16:15:30 xoa xo-server[1861]: at Generator.next (<anonymous>) Aug 10 16:15:30 xoa xo-server[1861]: at asyncGeneratorStep (/usr/local/lib/node_modules/xo-server/node_modules/xo-vmdk-to-vhd/dist/index.js:46:103) Aug 10 16:15:30 xoa xo-server[1861]: at _next (/usr/local/lib/node_modules/xo-server/node_modules/xo-vmdk-to-vhd/dist/index.js:48:194) Aug 10 16:15:30 xoa xo-server[1861]: at AsyncResource.runInAsyncScope (async_hooks.js:197:9) Aug 10 16:15:30 xoa xo-server[1861]: at cb (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/util.js:355:42) Aug 10 16:15:30 xoa xo-server[1861]: at tryCatcher (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/util.js:16:23) Aug 10 16:15:30 xoa xo-server[1861]: at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:547:31) Aug 10 16:15:30 xoa xo-server[1861]: at Promise._settlePromise (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:604:18) Aug 10 16:15:30 xoa xo-server[1861]: at Promise._settlePromise0 (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:649:10) Aug 10 16:15:30 xoa xo-server[1861]: at Promise._settlePromises (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:729:18) Aug 10 16:15:30 xoa xo-server[1861]: at _drainQueueStep (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/async.js:93:12) Aug 10 16:15:30 xoa xo-server[1861]: at _drainQueue (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/async.js:86:9) Aug 10 16:15:30 xoa xo-server[1861]: at Async._drainQueues (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/async.js:102:5) Aug 10 16:15:30 xoa xo-server[1861]: at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/async.js:15:14) { Aug 10 16:15:30 xoa xo-server[1861]: code: 'ERR_OUT_OF_RANGE' Aug 10 16:15:30 xoa xo-server[1861]: } Aug 10 16:15:30 xoa xo-server[1861]: }
-
Have you verified that the download isn't corrupt?
Here are the correct value s--
MD5 chr-6.48.3.ova: aa38e5d567090a8bc9382296e281b2f6 SHA256 chr-6.48.3.ova: 496229916aa6aa2ad4caba0a213ae25b4125417b73e52724a344a030072ecc94
-
Problem solved. The default transfer protocol is iSCSI, it was necessary to set an IP configuration to transfer the machine. But in Xen Orchestra I did not find such a setting:
After importing through XCP-ng Center, all functions worked and XCP-NG detected the OS:
-
Never heard of this "feature" before. The OVA is pulling a disk through the network???
-
Isn't that just XenCenter/XCP-ng Center feature, nothing to do with OVA pulling image from internet. Not sure how Xen Orchestra goes around it. In that sense, Xen Orchestra section in this forum isn't probably the correct place for this thread if XCP-ng Center was used
Feature documented here for example: https://docs.citrix.com/en-us/xencenter/7-1/vms-exportimport-about.html
"If the VMs you are importing were built on a hypervisor other than XenServer, you will need to configure the Operating System Fixup feature to enable the imported VM to boot correctly on XenServer. You will also need to configure networking for the Transfer VM, a temporary VM used when importing/exporting VMs from disk images and OVF/OVA packages."
-
Xen Orchestra doesn't rely on a transfer VM at all. It's your browser that will parse the OVA (XML with VM metadata), then convert the VMDK in VHD to finally stream it to your host.
So I'm not sure that's your issue here. Your problem is likely related to:
error: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 508. Received 231515204
Pinging @nraynaud about this.
If you can put the OVA available to download for us, it might be helpful to fix the bug faster
-
@olivierlambert The cloud hosted routers OVA file can be found on the MikroTik download page. Not related to the OPs topic - I just happen to know this since I was messing around with a CRS306-1G-4G+IN to test 10G in my playlab. A quick try to import either the long-term or stable release did not work by the way.
-
Hi, sorry for the delay, I reproduce the error with chr-6.48.4.ova, I'm now starting to diagnose it.
-
I found a weird thing, I'm trying to find the cause.
-
I think the issue is solved, you can follow the fix here: https://github.com/vatesfr/xen-orchestra/pull/5903