Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.98k stars 536 forks source link

IDE-R client / source can only be Windows #148

Closed damonmaria closed 5 years ago

damonmaria commented 5 years ago

As per the follow on discussion in #7.

Currently the only way to access IDE-R is to use the Windows MSI installer of MeshCommander. It would be great to be able to use other OS's or, even better, if an ISO file could be loaded into MeshCentral and IDE-R be used in the MeshCentral UI.

Ylianst commented 5 years ago

Supporting IDE-R on Linux has been a long standing issue. There is a Linux .a file in the Intel AMT SDK, but I have never used it. Need to start looking into it or find an alternative way.

Ylianst commented 5 years ago

After a lot of work, I just created a IDE-R server module in JavaScript. It's now added into MeshCommander v0.7.5 and on MeshCentral v0.3.2-p. I just blogged about it here. This is technically difficult, but really good. This is the first version, I am sure I can improve a lot of things. You can do "npm install meshcommander" and just try it with your LAN computers. Feedback appreciated.

damonmaria commented 5 years ago

@Ylianst You're a legend.

This is on an old machine (AMT v8) so might not be the best test setup. I could not get IDE-R to work with the old Windows MeshCmd to this machine either.

I tried the new meshcommander. The IDE-R session seems to start fine and the in/out numbers in the green bar tick up. I tried all 3 methods Immediate / Graceful / Next boot. I tried reseting and using the F9 boot menu and Reset to IDE-R. The numbers would tick up again but the BIOS always said "No boot disk".

From the F9 boot menu there was no "Virtual CD-DOM" or similar:

Screen Shot 2019-04-19 at 11 28 23

If I try start the IDE-R session with Linux running then I get the following in dmesg:

[  490.617906] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  490.617908] sd 0:0:0:0: [sda] Sense not available.
[  491.116987] sd 0:0:0:0: [sda] Write Protect is on
[  491.116990] sd 0:0:0:0: [sda] Mode Sense: 00 5c 24 80
[  492.295773] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  492.295775] sd 0:0:0:0: [sda] Sense not available.
[  493.972722] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  493.972723] sd 0:0:0:0: [sda] Sense not available.
[  495.416937] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  495.416938] sd 0:0:0:0: [sda] Sense not available.

With the last lines repeated on and on.

I presume you're aware that there's no IDE-R options in the Desktop or Terminal tab of MeshCentral. You have to go into the AMT tab and use the Remote desktop in there.

Ylianst commented 5 years ago

Thanks for the report, I should be able to fix this in the coming days.

Ylianst commented 5 years ago

I did more testing and did some fixes tonight on this. Next time I release the server, it should get better.

Ylianst commented 5 years ago

Published MeshCentral 0.3.2-q and MeshCommander 0.7.5-b on NPM. Both have IDE-R improvements that should make it work reliably. There will still be some messages in "dmesg", but the same messages appear when using the Intel IMRSDK.dll which I am trying to mimic. Feedback appreciated.

damonmaria commented 5 years ago

I've tried the new version but I couldn't even get the remote desktop to show anything (it connects fine, just no display). I can't actually physically get to my test machine at the moment so not sure if it's something with it or MeshCentral. If I perform a normal boot then I can ssh in no problem. But that means I can't test booting to the IDE-R at present.

Testing mounting an ISO through IDE-R in Linux the numbers tick up as before, and the initial lines I posted above from dmesg don't appear, I just get the same

[188485.132158] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[188485.132159] sd 0:0:0:0: [sda] Sense not available.
[188486.220352] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[188486.220353] sd 0:0:0:0: [sda] Sense not available.

repeated over and over again. The /dev/sda device does not appear for me.

Ylianst commented 5 years ago

If Intel AMT shows a blank screen, go in "Settings..." and change to 8 bits per pixel (bpp). Sometimes the screen buffer is too large for Intel AMT. Also, the screen could just be off, etc. I just published MeshCentral v0.3.2-r with two new IDER things. You can also see a "heat map" of the sector reads in real time which is fun to watch. Also, you can now add "?idertrace=1" at the end of the MeshCentral URL and you will see a IDER trace in the browser console. If you ever try again and find the repeating command in the console, cut & paste it and send it over. Picture below is the new heat map and trace feature.

MC-HeatMap3

damonmaria commented 5 years ago

I am on the road today. I'll try this tomorrow.

Thanks again for your responsiveness.

On Mon, Apr 22, 2019, 03:20 Ylian Saint-Hilaire notifications@github.com wrote:

If Intel AMT shows a blank screen, go in "Settings..." and change to 8 bits per pixel (bpp). Sometimes the screen buffer is too large for Intel AMT. Also, the screen could just be off, etc. I just published MeshCentral v0.3.2-r with two new IDER things. You can also see a "heat map" of the sector reads in real time which is fun to watch. Also, you can now add "?idertrace=1" at the end of the MeshCentral URL and you will see a IDER trace in the browser console. If you ever try again and find the repeating command in the console, cut & paste it and send it over. Picture below is the new heat map and trace feature.

[image: MC-HeatMap3] https://user-images.githubusercontent.com/1319013/56474521-da497b00-642f-11e9-85e6-7835275a87ab.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Ylianst/MeshCentral/issues/148#issuecomment-485275885, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMT3L7ADU2KF2LMA5EWOPLPRS5A7ANCNFSM4HBCPJ7Q .

Ylianst commented 5 years ago

FYI. I changed the "Disk Map" colors because Yellow/Red was annoying.

MC-IDER-DiskMap1

damonmaria commented 5 years ago

I tried through MeshCommander this time. I updated and the Disk Map button was there so presume 0.7.5-d contains your latest changes.

This is starting the IDE-R session graceful while Linux (Ubuntu 18.04) is running. First up the Disk Map showed no activity even tho the in/out numbers continuously ticked up:

Screen Shot 2019-04-23 at 17 20 04

I also captured the dmesg and matching Chrome console with ?idertrace=1 in this gist.

For some reason after a reboot the KVM came back (wasn't yesterday). So I tried Reset to IDE-R CD-ROM. Even when choosing Next boot when starting the IDE-R session it always seems to start after a second or two, not waiting for the next boot. So I did the reset and when the KVM showed Boot disk missing, please insert boot disk and press ENTER I started the IDE-R session graceful, waiting for the green bar and then pressed ENTER. I recorded the Chrome what came next. I pressed ENTER 3-4 times which is why it's repeated at the end. Chrome console attached:

default.htm?idertrace=1:2071 IDER-Stop
default.htm?idertrace=1:2071 IDER-StateChange 1
default.htm?idertrace=1:2071 IDER-StateChange 2
default.htm?idertrace=1:2071 IDER-StateChange 3
default.htm?idertrace=1:2071 IDER-Start
default.htm?idertrace=1:2071 null File {name: "bootdisk_foreman.mindhive.cloud (2).iso", lastModified: 1553562955012, lastModifiedDate: Tue Mar 26 2019 09:15:55 GMT+0800 (China Standard Time), webkitRelativePath: "", size: 1048576, …}
default.htm?idertrace=1:2071 IDER-SendData 18 400000000000000030750000204E01000000
default.htm?idertrace=1:2071 IDER-ProcessData 30 41000000000000000100080102010000002000200C000000005701000000
default.htm?idertrace=1:2071 {major: 1, minor: 0, fwmajor: 8, fwminor: 1, readbfr: 8192, …}
default.htm?idertrace=1:2071 IDER-SendData 13 48000000010000000311000000
default.htm?idertrace=1:2071 IDER-ProcessData 13 49000000010000000301000000
default.htm?idertrace=1:2071 STATUS_DATA 3 1
default.htm?idertrace=1:2071 IDER-ProcessData 28 500000000200000000000000000010A0000000000000000000000000
default.htm?idertrace=1:2071 SCSI_CMD 176 000000000000000000000000 0 16
default.htm?idertrace=1:2071 SCSI: TEST_UNIT_READY 176
default.htm?idertrace=1:2071 IDER-SendData 31 5100000202000000000000000000000000000000C50003000000B050000000
default.htm?idertrace=1:2071 IDER-ProcessData 28 500000000300000000000000080010A0250000000000000000000000
default.htm?idertrace=1:2071 SCSI_CMD 176 250000000000000000000000 0 16
default.htm?idertrace=1:2071 SCSI: READ_CAPACITY 176
default.htm?idertrace=1:2071 IDER-SendData 31 5100000203000000000000000000000000000000872003000000B051023A00
default.htm?idertrace=1:2071 IDER-ProcessData 28 500000000400000000000000000010A0000000000000000000000000
default.htm?idertrace=1:2071 SCSI_CMD 176 000000000000000000000000 0 16
default.htm?idertrace=1:2071 SCSI: TEST_UNIT_READY 176
default.htm?idertrace=1:2071 IDER-SendData 31 5100000204000000000000000000000000000000C50003000000B050000000
default.htm?idertrace=1:2071 IDER-ProcessData 8 4B00000005000000
default.htm?idertrace=1:2071 IDER-ProcessData 28 500000000600000000000000000010A0000000000000000000000000
default.htm?idertrace=1:2071 SCSI_CMD 176 000000000000000000000000 0 16
default.htm?idertrace=1:2071 SCSI: TEST_UNIT_READY 176
default.htm?idertrace=1:2071 IDER-SendData 31 5100000205000000000000000000000000000000C50003000000B050000000
default.htm?idertrace=1:2071 IDER-ProcessData 28 500000000700000000000000080010A0250000000000000000000000
default.htm?idertrace=1:2071 SCSI_CMD 176 250000000000000000000000 0 16
default.htm?idertrace=1:2071 SCSI: READ_CAPACITY 176
default.htm?idertrace=1:2071 IDER-SendData 31 5100000206000000000000000000000000000000872003000000B051023A00

And as per connecting with Linux nothing is shown on the Disk Map.

I hope this helps.

Ylianst commented 5 years ago

Wow, thank you so much for the detailed report. This will help a lot. I will take a look at this soon.

billydu1980 commented 5 years ago

@damonmaria How's your test going? the situation on my side is that you can see the interface where the iso is loaded, but after the cursor flashes for a while, it stops. I was just adding a intel AMT device through Username and Password without TLS security, I don't really understand how to add Intel AMT device by setup CIRA ? whether or not need to modify the config.json file? Could you please share related documentation? Thanks so much! 图片

Billy DuDu

damonmaria commented 5 years ago

@billydu1980 I haven't tried again but it sounds like you got further than I did. My test machine is quite old (2012) and so I'm not sure if it's the AMT implementation on that that's the problem.

gomesjj commented 5 years ago

After a lot of work, I just created a IDE-R server module in JavaScript. It's now added into MeshCommander v0.7.5 and on MeshCentral v0.3.2-p. I just blogged about it here. This is technically difficult, but really good. This is the first version, I am sure I can improve a lot of things. You can do "npm install meshcommander" and just try it with your LAN computers. Feedback appreciated.

@Ylianst This is amazing!

I was just today thinking about the IDER functionality, so I was very happy to come across this thread.

Are you planning to include the new IDER javascript module to the NodeWebkit version of MeshCommander? You might not remember, but I have been distributing packaged versions of MeshCommander as standalone macOS applications and having IDER functionality would be extremely useful.

Quite a few users have been asking me for this functionality on the macOS application, but off course, with the IMRSDK libraries being Windows and Linux only (without source) that wasn't going to happen.

I would be more than happy to help with anything, or at least make sure to test the IDER functionality as much as possible.

Ylianst commented 5 years ago

Hi and thanks for noticing. It's been quite an achievement for me to get IDER in JavaScript. You are exactly correct that the only version of MeshCommander that still uses the older IMRSDK.dll is the NodeWebKit (now nw.js) version. However, the next version v0.7.7 switches over to using the JavaScript IDER and I have prototypes in testing now. So yes, this week hopefully I should make it available.

Thanks for making a version for MacOS, I think this is great.

Ylianst commented 5 years ago

FYI. MeshCommander v0.7.7 just got released. It now uses the JavaScript IDER code. Once connected to Intel AMT, you can new drag & drop .iso/.img files on top of MeshCommander to auto-start a IDER session.

gomesjj commented 5 years ago

Hi Ylian,

This is awesome news. I will re-package for macOS and test the functionality.

Thanks a lot for you great work.

Jose

On 18 Jun 2019, at 19:05, Ylian Saint-Hilaire notifications@github.com wrote:

FYI. MeshCommander v0.7.7 just got released https://www.meshcommander.com/meshcommander. It now uses the JavaScript IDER code. Once connected to Intel AMT, you can new drag & drop .iso/.img files on top of MeshCommander to auto-start a IDER session.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ylianst/MeshCentral/issues/148?email_source=notifications&email_token=AEMV5EVP77JG2NTTMDXDXKLP3EPVBA5CNFSM4HBCPJ72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7PFKQ#issuecomment-503247530, or mute the thread https://github.com/notifications/unsubscribe-auth/AEMV5EQHIBREQQVMOWVGIXDP3EPVBANCNFSM4HBCPJ7Q.

gomesjj commented 5 years ago

FYI. MeshCommander v0.7.7 just got released. It now uses the JavaScript IDER code. Once connected to Intel AMT, you can new drag & drop .iso/.img files on top of MeshCommander to auto-start a IDER session.

Hi Ylian,

FYI, I have been able to boot one of my NUCs to the ESXi 6.7 ISO image without a problem, and from there complete a re-install. Just amazing stuff you've done there…

There is a small problem on aborting the install (function keys not working), but every other step is working fine. I will see if I can sort the small issue and let you know, but so far, IDER seems to be working just fine.

Once again, amazing work you have done porting the functionality to JS.

Regards,

Jose

gomesjj commented 5 years ago

Just to be clear, it takes around 5 minutes to load the 350MB ISO image, but once loaded, the speed of installation is pretty much the same as booting from an ordinary CD or USB key. Quite good if I don't have to load a physical USB key (or CD) to boot the server.

Jose

Ylianst commented 5 years ago

Thanks for the feedback. Can you detail exactly what function keys do not work and in what context? Is it the F1 to F12 keys in remote desktop? If so, in what version of what software? and what screen? - Thanks.

Ylianst commented 5 years ago

I am going to close this issue as I wrote a Javascript IDER server that solves the original problem. However, please open a new issue to any other problems relates to this. Thanks.

billydu1980 commented 4 months ago

Dear Ylian: Can you share a help document for a detailed instructions of the parameters in the sample-config-advanced.json file. We tried to enable some options, but the test results were not very smooth.

Best regard. Billy Duu