Last active
April 17, 2024 20:21
-
-
Save xbb/4fd651c2493ad9284dbcb827dc8886d6 to your computer and use it in GitHub Desktop.
IDRAC6 Virtual Console Launcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface. | |
You can use the user and password that you use for the web interface. | |
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS. | |
You don't need to install it, just extract it or copy the files in "jre" folder. | |
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor. | |
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture. | |
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs. | |
If you don't see the MacOS libs in the file make sure you download it from MacOS. | |
Edit the bat/sh file according to your needs. | |
The file structure should look like this: | |
start-virtual-console.bat (.sh if Linux/MacOS) | |
avctKVM.jar | |
jre/<jre home here> | |
lib/avctKVMIO.dll (.so if Linux, .jnilib if MacOS) | |
lib/avmWinLib.dll (.so if Linux, .jnilib if MacOS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /P drachost="Host: " | |
set /p dracuser="Username: " | |
set "psCommand=powershell -Command "$pword = read-host 'Enter Password' -AsSecureString ; ^ | |
$BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^ | |
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)"" | |
for /f "usebackq delims=" %%p in (`%psCommand%`) do set dracpwd=%%p | |
.\jre\bin\java -cp avctKVM.jar -Djava.library.path=.\lib com.avocent.idrac.kvm.Main ip=%drachost% kmport=5900 vport=5900 user=%dracuser% passwd=%dracpwd% apcp=1 version=2 vmprivilege=true "helpurl=https://%drachost%:443/help/contents.html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n 'Host: ' | |
read drachost | |
echo -n 'Username: ' | |
read dracuser | |
echo -n 'Password: ' | |
read -s dracpwd | |
echo | |
./jre/bin/java -cp avctKVM.jar -Djava.library.path=./lib com.avocent.idrac.kvm.Main ip=$drachost kmport=5900 vport=5900 user=$dracuser passwd=$dracpwd apcp=1 version=2 vmprivilege=true "helpurl=https://$drachost:443/help/contents.html" |
Hello guys, I'm having issues using the script and I'm having errors trying to connect to an idrac6.
03/22/2024 03:52:18:067: User login response: 3
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at sun.security.ssl.OutputRecord.writeBuffer(Unknown Source)
at sun.security.ssl.OutputRecord.write(Unknown Source)
at sun.security.ssl.SSLSocketImpl.writeRecordInternal(Unknown Source)
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at sun.security.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.DataOutputStream.flush(Unknown Source)
at com.avocent.kvm.c.d.g.b(Unknown Source)
at com.avocent.kvm.c.d.i.run(Unknown Source)
With a popup saying, "Login failed, possibly due to slow connection."
For reference, Here's what i have.
On Windows 11, Folder structure
- jre(1.7.0_80)
- avctKVM
- start-virtual-console.bat
- jre/lib - avctKVMIO.dll & avmWinLib.dll
Here's what my bat file has,.\jre\bin\java -cp avctKVM.jar -Djava.library.path=.\jre\lib com.avocent.idrac.kvm.Main ip=%drachost% kmport=5900 vport=5900 user=%dracuser% passwd=%dracpwd% apcp=1 version=2 vmprivilege=true "helpurl=https://%drachost%:443/help/contents.html"
I have tried the other solutions provided in the comments except for the docker ones and none of them have worked for me.
I'm using the original method in post #1 and it is working with IDRAC 6 on a Power Edge T610
However, the virtual console goes black during resolution changes, and does not adjust itself. This happens when going from the boot screen to bios settings, or between boot screen and windows.
Here's an example of the windows cli when this happens:
focus gained by(com.avocent.kvm.c.pb[windowedVideoPanel,0,0,1024x768,layout=java.awt.FlowLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=1024,height=768]])
NativeKeyboard.focusLost()
focus lost by(com.avocent.kvm.c.pb[windowedVideoPanel,0,0,800x600,layout=java.awt.FlowLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=800,height=600]])
AVSP socket Closed, no connection exists.
04/17/2024 04:09:33:014: IOException on AVSP socket.
null packet received on session socket
04/17/2024 04:09:33:015: cleanup called.
AVSP socket Closed, no connection exists.
04/17/2024 04:09:33:016: Mouse packet thread stopping.
04/17/2024 04:09:33:016: IOException on AVSP socket.
null video packet received
04/17/2024 04:09:33:018: cleanup called.
04/17/2024 04:09:33:019: AVSP: video socket packet processing stopped.
04/17/2024 04:09:33:929: Keep-alive thread shutting down.
NativeKeyboard.focusGained()
focus gained by(com.avocent.kvm.c.pb[windowedVideoPanel,0,0,800x600,layout=java.awt.FlowLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=800,height=600]])
Fullscreen window setVisible false
04/17/2024 04:09:51:296: cleanup called.
AVSPCloseConnection Called
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The jar starts and sets some variables, but then says connection failed for the session state.
Update: Adding a idrac.java.security as described above did the trick, guess just removing TLS1 from disabled isn't enough