Skip to content

Instantly share code, notes, and snippets.

@xbb xbb/README
Last active Jul 16, 2019

Embed
What would you like to do?
IDRAC6 Virtual Console Launcher
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)
@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"
#!/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"
@TiloGit

This comment has been minimized.

Copy link

commented May 8, 2017

tested also with following JRE on Win2012 R2 system

Java(TM) SE Runtime Environment (build pwa6460sr16fp41-20170215_04(SR16 FP41))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows Server 2012 amd64-64 jvmwa6460sr16fp40-20161215_329869 (JIT enabled, AOT enabled)

Java(TM) SE Runtime Environment (build pwa6470_27sr3fp60ifix-20161110_01(SR3 FP60+IV90630+IV90578))
IBM J9 VM (build 2.7, JRE 1.7.0 Windows Server 2012 R2 amd64-64 Compressed References 20161005_321280 (JIT enabled, AOT enabled)

@muffetman

This comment has been minimized.

Copy link

commented Jul 25, 2017

Handy script, thanks! I modified the bat version slightly to automatically download avctKVM.jar:

@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

ECHO Grabbing avctKVM.jar from host...
powershell -Command "[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; $WebClient = New-Object System.Net.WebClient ; $WebClient.DownloadFile('https://%drachost%/software/avctKVM.jar','.\avctKVM.jar')"

.\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"

@alsobrsp

This comment has been minimized.

Copy link

commented Aug 10, 2017

Awesome, thank you

@FalastinyMusings

This comment has been minimized.

Copy link

commented Aug 16, 2017

Thank you so much for this!

I'm running into some issues running the script on Mac, however. When running the .sh file, everything goes fine until I receive the error: "Could not find or load main class com.avocent.idrac.kvm.Main".

Any idea as to how I would remedy this?

@ptmorris1

This comment has been minimized.

Copy link

commented Aug 28, 2017

Great stuff! Thanks!

What about getting this working for iDRAC 7 and 8? I tried using the script with Java 8 but always get error: "Login failed with an access denied error." It almost works...

@joedel94

This comment has been minimized.

Copy link

commented Nov 11, 2017

Hey I keep getting a connection failed error message, any advice?

11/11/2017 01:43:32:025: Connection failed with exception: Connection refused:
connect
==== propertyChange: (SESSION_STATE):CONNECTION_FAILED====

@nhubbard

This comment has been minimized.

@stamster

This comment has been minimized.

Copy link

commented Feb 9, 2018

Fist off - thanks for the snippet and work-around. It was very useful to get an idea how it works behind the scenes - and that we don't actually need a web browser to kick-start console (our iDRAC6 does not even have a link for console, I had to hack it through viewer.jnlp!

I have managed to make it work - well, sort of "work". The thing is damn iDRAC6 in it's express` version simply does not support KVM.

Oh how I hate you Dell. Even more than I hate HP(E) and Intel together!

I'll stick with SuperMicro for good - they have HTML5 KVM which works from any device/browser! As a normal feature!

@NoLooseEnds

This comment has been minimized.

Copy link

commented Mar 2, 2018

@stamster Did you actually get the console to work with iDRAC6 express? If yes, how?

@nizrael

This comment has been minimized.

Copy link

commented Mar 4, 2018

Great thanks! It was very useful. But i have one big question with it - how can i include a virtual media library into this snippet?

@Acalanum

This comment has been minimized.

Copy link

commented Mar 26, 2018

Hi, trying to figure this out, new to messing with servers/java... Where would I get the libs for my operating system? I was able to download the avctKVM.jar from my server iDrac.

Also, where does the .bat file come from?

Sorry for the noob questions

@colomb001

This comment has been minimized.

Copy link

commented Apr 12, 2018

@nizrael I spent some time getting the virtual media console to work. On windows, you need to open up avctKVMIOWin64.jar and avctVMWin64.jar, extract the .dlls contained therein and throw them in a lib folder in the folder you have the start-virtual-console.bat. I've confirmed this works with both the 64bit and 32bit dlls extracted from the jars.

@lemassykoi

This comment has been minimized.

Copy link

commented Apr 18, 2018

@colomb001 thank you so much for the keyboard tip

@codigobinario

This comment has been minimized.

Copy link

commented Apr 26, 2018

Hi, How can I get avctKVMIO.dll and a vmWinLib.dll?? I downloaded from google avctKVMIO.dll and get vmWinLib.dll from my java ultimate version installed in appdata\LocalLow\Sun\Java\Deployment... but I get a error message: "The native library for keyboard and mouse support failed to load. Pass all keys to server and single cursor support will not be available", and not run, I´m under win10 x64, thanks

@NoLooseEnds

This comment has been minimized.

Copy link

commented May 4, 2018

I got this to work (on enterprise), but I'm having problems getting keyboard input to work. It does not register any keypress.
It does register if I use the menu to ie. trigger or something.

I'm on latest macOS, if that helps any.

@duckdave1

This comment has been minimized.

Copy link

commented May 6, 2018

I get the error message
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Thanks for advice, regards

@champsxs

This comment has been minimized.

Copy link

commented May 16, 2018

Great script. Nice
if you add reconnect=2( got from the jnlp downloaded from iDrac web ) as a parameter when running the jar, then iDrac 7 also work (dnt know why, maybe due to ssl check).
But no luck with iDrack 8 :(

@champsxs

This comment has been minimized.

Copy link

commented May 18, 2018

Again Thankz for the script it was a great start and gave a goog understanding of how stuff works under the hood. I have made few updates and now it works for iDrac 6/7/8, think it'll help someone

As .Net < 4 throws errors when creating Tls12 connections and sometimes it's so hard to change registry to enable those if you are in a common environment. As a work around I used this https://eternallybored.org/misc/wget/ to download avctKVM.jar from the server.
" wget.exe --no-check-certificate "https://%ipaddress%/software/avctKVM.jar"
"
and updated the JRE version >= 1.8 as 1.7 was complaining about SSL handshake with iDrac 8.

finally, add " del avctKVM.jar " at the end of the bat. As wget.exe won't replace (maybe im missing a switch ), then you are good to go :)

Also working on a shell script to use x11 forwarding to pop out as most of the time jump hosts are Linux.

@SgtKilgore406

This comment has been minimized.

Copy link

commented May 18, 2018

Thank you for the script, so much easier to get the console to connect. Couple of questions though, is there any way to get the Virtual Media Feature working with this script? Also, is this script compatible with the DRAC 5 card?

Thanks

@anarchydude

This comment has been minimized.

Copy link

commented May 22, 2018

I'm with @duckdave1, having the same issue with iDRAC6, NoClassDefFound when running both 1.7 and 1.6.

Edit: I can get the jnlp to run with Java baked in to Windows on 7u80 once video encryption is turned off. Still would rather hope for a universal solution like this one though ;-)

@avengerx

This comment has been minimized.

Copy link

commented Jun 8, 2018

With JDK (Server JRE package) 7u80 I found here I could run the console even with encryption enabled using the .sh script (using cygwin here).

But I can't get the virtual media to work at all. From iDRAC 6 interfce, I see it is Enterprise, so it /should/ work. I've downloaded all .jar files pointed by viewer.jnlp, so it probably is a limitation by the way it is run. I see @nizrael also had the same issue than me.

Other than that, all seems to work, I can walk thru bios, type, reboot, and so on.

EDIT: to have virtual media working, just follow the steps into extracting the DLL (.so or .jnilib depending on OS). The avctKVMIO.dll and avmWinlib.dll files are within the avctKVMIO*.jar and avctVM*.jar, respectively. You have to choose between Linux32, Linux64, Win32 or Win64, depending on your OS.

In my case, windows 10 64-bit, it was Win64.

@sirtcp

This comment has been minimized.

Copy link

commented Jun 26, 2018

Hi,

I follow every step as mentioned even i extracted / un compressed the components of the jar file in "lib" folder however i am still getting this error
"Could not find or load main class com.avocent.idrac.kvm.Main". any help will be highly appreciated.

Thanks,
yousuf

@ruze00

This comment has been minimized.

Copy link

commented Jul 6, 2018

@sirtcp Do you have the avctKVM.jar file in the same folder as the script?

@rahim888

This comment has been minimized.

Copy link

commented Jul 13, 2018

I tried this out and it worked great on my mac.

  • downloaded the JRE 1.7.0.79 tar file (not the installer) and extracted it.

  • Downloaded the avctKVM.jar

  • Run the java cmd and hard referenced the locations of the files
    Works like a charm! Thank you

`

MBP:Progs$ ls
avctKVM.jar		avctVMMac64.jar
avctKVMIOMac64.jar	jre1.7.0.79

export drachost=
export dracuser=
export dracpwd=
/Users/Progs/jre1.7.0.79/Contents/Home/bin/java -cp /Users//Progs/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"
@jaredcrean

This comment has been minimized.

Copy link

commented Jul 14, 2018

Brilliant!!! This saves so much time. Thank you,

@jbone80

This comment has been minimized.

Copy link

commented Jul 23, 2018

Was finally able to get this script running. A couple of things that I had to go through a few times, 1. Don't hard code the IP of the idrac. I had put into my script Host: https://A.B.C.D and then put my username and it wasn't working. Maybe if I had just put the IP and not the https: it would have worked. 2. I had to create a folder on my computer to hold the jre folder I downloaded and extracted as well as a .lib folder I created to house the .dll's that you have to extract and download from the links in the "viewer.jnlp". In the viewer.jnlp there are multiple lines, I am running 64 bit so I used the nativelib lines. I also extracted the avctKVM.jar and copied the com directory out into the lib folder. So my folder structure looks like:

Console (main folder)

  1. Start-virtual-console.bat
  2. jre folder (extracted from the server-jre that I downloaded form the internet)
  3. lib folder
    a. com folder (extracted from avctKVM.jar)
    b. avctKVMIO.dll (extracted from viewer.jnlp Win64 section)
    c. avctWinLib.dll (extracted from viewer.jnlp Win64 section)

Once this was all set, I just ran the script using Powershell and it worked.

@kaiiorg

This comment has been minimized.

Copy link

commented Jul 23, 2018

@joedel94 I know its been a while since you posted, but I got the same error. I found out that it was because I missunderstood what the

set /P drachost="Host: "
set /p dracuser="Username: "

lines did: I thought that the text in the quotes were just a place holder and you would need to modify the script to change the variables. They actually set the given variable name to the user input after prompting with the text in the string. So, when the script ran with your string set to, say, 192.168.0.0 and you hit enter after being prompted with that string, you're passing it an empty string. The console fails to connect with an empty string.

Try running the original script as is, then do the following in the console:

  1. Enter hostname/ip address of the DRAC
  2. Press enter key
  3. Enter username for DRAC
  4. Press enter key
  5. Enter password for that username
  6. Press enter key

Assuming there aren't any other problems (see below), you have your jre in the jre folder, and correct lib files in the lib folder alongside the script, that should run and connect the console.

Worst case, ignore the set lines and try to manually set your parameters in the long java line (though, I'd only do this for testing, as leaving a password in a script wouldn't be a very good idea):

.\jre\bin\java -cp avctKVM.jar -Djava.library.path=.\lib com.avocent.idrac.kvm.Main ip=192.168.0.0 kmport=5900 vport=5900 user="myUserName" passwd="SuperSecurePassword1" apcp=1 version=2 vmprivilege=true "helpurl=https://192.168.0.0:443/help/contents.html"

If that fails, you might be trying to access the wrong port (check the port number the console runs on in the web gui) or there might be a firewall between you and the DRAC blocking that port (5900 by default).

@DrDroop

This comment has been minimized.

Copy link

commented Jul 24, 2018

hard coding the password into the .bat file got it to work. I was having all sorts of authentication issues.

set drachost="192.168.1.10"
set dracuser="MyUserName"
set dracpwd="MyPassword"
.\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"
@Gerk

This comment has been minimized.

Copy link

commented Jul 25, 2018

Thanks, this works a treat. Running great on MacOS High Sierra using jre1.7.0_80

For the Mac users make sure to get both of the Mac jars from the .jnlp file and extract the libs from both of them (and put them into ./lib or whatever path you are going to use for that). Both viewer and Virtual media bits working as expected.

@tijldeneut

This comment has been minimized.

Copy link

commented Aug 7, 2018

My two cents, it works flawlessly but sometimes my Keyboard doesn't work at all.
It turns out that it depends on the version of the avctKVM.jar:

  • Virtual Console 1.0 (1.07.0.17647) completely works
  • Virtual Console 1.5 (1.0.0.78) has keyboard issues (doesn't work)

If any is interested in the first version (that should work on any iDRAC6 device), I'll try to attach it... (rename it to 7z)
avctkvm 7z

@bglopez

This comment has been minimized.

Copy link

commented Aug 9, 2018

Here is a version that makes assumptions about your paths (so fix them if they don't match) and also uses 7-Zip to extract the required DLL file. It gives you an option to use a port other than 5900 since some of our hosts use different ports.

@echo off

set /P drachost="Host: "
set /p dracuser="Username: "
set /p kvmport="KVM Port: "
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

md iDRAC6-%drachost%
cd iDRAC6-%drachost%
ECHO Grabbing avctKVM.jar from %drachost%
powershell -Command "[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; $WebClient = New-Object System.Net.WebClient ; $WebClient.DownloadFile('https://%drachost%/software/avctKVM.jar','.\avctKVM.jar')"
ECHO Grabbing avctKVMIOWin32.jar from %drachost%
powershell -Command "[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; $WebClient = New-Object System.Net.WebClient ; $WebClient.DownloadFile('http://%drachost%/software/avctKVMIOWin32.jar','.\avctKVMIOWin32.jar')"
ECHO Extracting .dll files to ./lib
"C:\Program Files\7-Zip\7z.exe" e avctKVMIOWin32.jar -oc:lib *.dll -r
ECHO Running KVM client
"C:\Program Files (x86)\Java\jre6\bin\java" -cp avctKVM.jar -Djava.library.path=.\lib com.avocent.kvm.client.Main ip=%drachost% kmport=%kvmport% vport=%kvmport% user=%dracuser% passwd=%dracpwd% apcp=1 version=2 vmprivilege=true "helpurl=https://%drachost%:443/help/contents.html"
@CharlesB2

This comment has been minimized.

Copy link

commented Sep 4, 2018

This works great, finally a workaround for the broken iDRAC!

A few notes on Ubuntu:

  • It works with current version of Oracle's java
  • The window appears hidden, you have to blindly activate it with alt-space, and then select "maximize"
  • You need to extract the .so from both *Linux64.jar files, and put them in lib
@krubottom

This comment has been minimized.

Copy link

commented Sep 7, 2018

I had to enable SSLv3 in java, I always got the error "connection failed"

Comment out "jdk.tls.disabledAlgorithms=SSLv3 in /lib/security/java.security

@wdz111

This comment has been minimized.

Copy link

commented Sep 14, 2018

Thanks for that great script!
I have IDRAC8, and original script didn't work. So I played a little bit, tried this and that, and finally it works! My configuration and what did I do:

I used Java 1.8 (64-bit in my case). Changed "java.security", as @krubottom advised (and BIG THANKS for that!) - withou it I got an Error.

In Idrac 8 Dell have changed DLLs, and now the DLLs in \lib folder is:
avctKVMIO.dll - from avctKVMIOWin32.jar (or avctKVMIOWin64.jar - for 64)
VMAPI_DLL.dll - from avctVMAPI_DLLWin32.jar (or avctVMAPI_DLLWin64.jar - for 64)
VMAPI_DLL.lib (idk if the jar need that, but I decided to paste it inside \lib folder also) - from avctVMAPI_DLLWin32.jar (or avctVMAPI_DLLWin64.jar - for 64)

With original script Console launched just fine, but I got "access denied" message.
So - I dig inside my "viewer.jnlp" a little bit, and changed some parameters - and - it works! So - my command for running avctKVM.jar looks like:

.\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 reconnect=2 version=2 vm=1 "helpurl=https://%drachost%:443/help/contents.html"

@Be5qP4Y3Fzaj

This comment has been minimized.

Copy link

commented Sep 17, 2018

Hi,

I follow every step as mentioned even i extracted / un compressed the components of the jar file in "lib" folder however i am still getting this error
"Could not find or load main class com.avocent.idrac.kvm.Main". any help will be highly appreciated.

Thanks,
yousuf

I'm experiencing the same issue as well.

@area1509

This comment has been minimized.

Copy link

commented Oct 1, 2018

Hello everyone, I have the remote console working on a dell R710 with the enterprise idrac.
Thanks to MathieuW here: https://www.dell.com/community/Systems-Management-General/iDRAC6-Virtual-Console-Connection-Failed/td-p/5144021/page/2

I am running the latest java version as of 10/01/2018.
Version 8 Update 181 (build 1.8.0_181-b13)

Go to here or wherever you installed java.
C:\Program Files\Java\jre1.8.0_181\lib\security\java.security

Comment out this line in java.security with a #
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024,
and add the IP address (https://IPhere) and (https://IPhere:443) to the security tab of the java control pannel.

I don't know what security implications this has but it works.

@PVi1

This comment has been minimized.

Copy link

commented Oct 3, 2018

I have fixed it on ubuntu 16.04 with openjdk-8-jre:amd64 8u181-b13-0ubuntu0.16.04.1 the following way.

This is an original statement in java.security:

jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
    EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC

You have to delete SSLv3 and 3DES_EDE_CBC for iDrac console to be functional again.

So it will look like this:

jdk.tls.disabledAlgorithms=RC4, MD5withRSA, DH keySize < 1024, \
    EC keySize < 224, DES40_CBC, RC4_40

Enjoy!

@flippedcracker

This comment has been minimized.

Copy link

commented Oct 10, 2018

@Be5qP4Y3Fzaj

Hi,
I follow every step as mentioned even i extracted / un compressed the components of the jar file in "lib" folder however i am still getting this error
"Could not find or load main class com.avocent.idrac.kvm.Main". any help will be highly appreciated.
Thanks,
yousuf

I'm experiencing the same issue as well.

In case you, or anyone hasn't figured this issue out yet, I had to download the avctKVM.jar file separately, the same way as the files listed in the .jnlp file (ipaddress/software/avctKVM.jar) and put it in the same directory as the .bat/.sh file.

@flakrat

This comment has been minimized.

Copy link

commented Dec 7, 2018

I have it working on Linux with iDRAC7. Issue for me was that the keyboard wouldn't work with the 64bit libraries and the virtual media wouldn't work with the 32bit libraries.

Mixing the two worked. I downloaded both sets to lib32 and lib64 directories and then copied the 64bit and 32bit file:

mkdir lib
cp -a lib32/libavctKVMIO.so ./lib
cp -a lib64/libavmlinux.so ./lib
@flakrat

This comment has been minimized.

Copy link

commented Dec 7, 2018

I updated the Linux script to take arguments on the command line:

#!/bin/bash
# https://gist.github.com/xbb/4fd651c2493ad9284dbcb827dc8886d6

show_help () {
  echo "Usage: `basename $0` <options>";
  echo;
  echo "Options:";
  echo " -h | --help   = Help, show this message.";
  echo " -r | --host=<NAME>   = iDRAC IP Address (Mandatory).";
  echo " -u | --user=<USER>   = iDRAC user name (Mandatory";
  echo " -p | --pass=<PASS>   = iDRAC password (Mandatory)";
}

OPTS=`getopt -o hr:u:p: --long help,host:,user:,pass: -n 'help' -- "$@"`

#if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; show_help; exit 1 ; fi

# echo "$OPTS"
eval set -- "$OPTS"

while true; do
  case "$1" in
    -h | --help )    show_help; exit 0; shift ;;
    -r | --host )    host="$2"; shift 2 ;;
    -u | --user )    user="$2"; shift 2 ;;
    -p | --pass )    pass="$2"; shift 2 ;;
    -- ) shift; break ;;
    * ) echo "Invalid arguments!"; show_help; exit 1 ;;
  esac
done

if [ ! "$host" ] || [ ! "$user" ] || [ ! "$pass" ]; then
    show_help
    exit 1
fi

./jre/bin/java -cp avctKVM.jar -Djava.library.path=./lib com.avocent.idrac.kvm.Main ip=$host kmport=5900 vport=5900 user=$user passwd=$pass apcp=1 version=2 vmprivilege=true "helpurl=https://$host:443/help/contents.html"
@Kordolio

This comment has been minimized.

Copy link

commented Dec 7, 2018

Hi!
Will it work with DRAC5? Would be great. I have made some tests with various jre and settings, but no luck.

@Kordolio

This comment has been minimized.

Copy link

commented Dec 7, 2018

For DRAC5 I have only 1 dll - avctKVMIO.dll.
Also avctKVM.jar file seems to be missing, I can only download avctKVMWin32.jar and avctDRAC5Viewer.jar
Anyway it seems to be working after adjusting the script, but with some Java versions I get bad_record_mac error, and with some even logon failures. Which I find strange since the normal connection over the browser works with this version of java.
Any clues what might be the problem?

@Kordolio

This comment has been minimized.

Copy link

commented Dec 7, 2018

This is my connection error:
Packet log written to: c:\javaViewer.log
==== propertyChange: (SESSION_STATE):CONNECTING====
==== propertyChange: (VIDEO_PANEL_SIZE_CHANGED):java.awt.Dimension[width=1600,he
ight=1600]====
==== propertyChange: (VIDEO_PANEL_SIZE_CHANGED):java.awt.Dimension[width=1600,he
ight=1600]====
12/07/2018 12:22:07:754: SSL: context protocol = SSLv3
12/07/2018 12:22:08:365: SSLv2Hello
12/07/2018 12:22:08:365: SSLv3
12/07/2018 12:22:08:366: TLSv1
12/07/2018 12:22:08:366: TLSv1.1
12/07/2018 12:22:08:366: TLSv1.2
12/07/2018 12:22:08:366: ======connectToPort======
12/07/2018 12:22:08:368: User Login Request: 0x100
12/07/2018 12:22:08:369: ======connectToPort - sendRequest======
12/07/2018 12:22:08:369: packet type( 0x100)
Sending packet: com.avocent.kvm.e.a.bf@442552 (8, 208).
setPassthroughEnabled(true)
setPassthroughEnabled(false)
12/07/2018 12:22:08:430: SSL: checkServerTrusted() called.
12/07/2018 12:22:08:432: SSL: getAcceptedIssuers() called.
12/07/2018 12:22:08:639: ===PacketReceiver==TYPE:(0x8305) - User Login Response
12/07/2018 12:22:08:641: Receive 0x8305 User Login Response (V2)
12/07/2018 12:22:08:642: User login response: 3
==== propertyChange: (SESSION_STATE):CONNECTION_LOGIN_FAILED====
12/07/2018 12:22:08:649: ======connectToPort - sendRequest======
12/07/2018 12:22:08:655: packet type( 0x400)
12/07/2018 12:22:08:656: ****************KEEP_ALIVE_INTERVAL:10000,getProperty(
KvmSession.SESSION_STATE)=CONNECTION_LOGIN_FAILED
Sending packet: com.avocent.kvm.e.a.q@83c96a (8, 8).

@Kordolio

This comment has been minimized.

Copy link

commented Dec 7, 2018

With java jre1.8.0_51 32 bit for windows, of course.

@tsluyter

This comment has been minimized.

Copy link

commented Jan 10, 2019

Dude, you're a hero 👍

Would you believe it even works with the proper Java 8 on MacOS High Sierra?

@david-hill

This comment has been minimized.

Copy link

commented Feb 10, 2019

FYI, in a modern Linux operating system, you'll have to also edit this file by removing all SSLv3 / RC4 / RC4_* :

[root@knox back-ends]# pwd
/etc/crypto-policies/back-ends
[root@knox back-ends]# cat java.config
jdk.tls.ephemeralDHKeySize=1023
jdk.certpath.disabledAlgorithms=MD2, MD5, DSA, RSA keySize < 2048
#jdk.tls.disabledAlgorithms=DH keySize < 1023, SSLv2, DHE_DSS, RSA_EXPORT, DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_DSS_EXPORT, DH_RSA_EXPORT, DH_anon, ECDH_anon, DH_RSA, DH_DSS, ECDH, 3DES_EDE_CBC, DES_CBC, RC4_40, RC4_128, DES40_CBC, RC2, HmacMD5
jdk.tls.disabledAlgorithms=DH keySize < 1023, SSLv2, DHE_DSS, RSA_EXPORT, DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_DSS_EXPORT, DH_RSA_EXPORT, DH_anon, ECDH_anon, DH_RSA, DH_DSS, ECDH, 3DES_EDE_CBC, DES_CBC, DES40_CBC, RC2, HmacMD5
jdk.tls.legacyAlgorithms=

as well as :
[root@knox security]# pwd
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.192.b12-0.fc30.x86_64/jre/lib/security
[root@knox security]# grep "disabled." java.security | grep -v "^#"
jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer,
RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224
jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, DSA keySize < 1024
jdk.tls.disabledAlgorithms=DES, MD5withRSA, DH keySize < 1024,
EC keySize < 224, 3DES_EDE_CBC

@cbluth

This comment has been minimized.

Copy link

commented Feb 12, 2019

Hello everyone, I have the remote console working on a dell R710 with the enterprise idrac.
Thanks to MathieuW here: https://www.dell.com/community/Systems-Management-General/iDRAC6-Virtual-Console-Connection-Failed/td-p/5144021/page/2

I am running the latest java version as of 10/01/2018.
Version 8 Update 181 (build 1.8.0_181-b13)

Go to here or wherever you installed java.
C:\Program Files\Java\jre1.8.0_181\lib\security\java.security

Comment out this line in java.security with a #
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024,
and add the IP address (https://IPhere) and (https://IPhere:443) to the security tab of the java control pannel.

I don't know what security implications this has but it works.

commenting out jdk.tls.disabledAlgorithms works for me with jdk1.8

@mikecentola

This comment has been minimized.

Copy link

commented Feb 28, 2019

I had to enable SSLv3 in java, I always got the error "connection failed"
Comment out "jdk.tls.disabledAlgorithms=SSLv3 in /lib/security/java.security

This fixed it for me. too with latest java. Nice to have it in its own folder as a "portable"

@panpansh

This comment has been minimized.

Copy link

commented Mar 1, 2019

same for allowing unsecure algos.
It work

@mxplusb

This comment has been minimized.

Copy link

commented Mar 21, 2019

The original post worked for me, thanks for this!

@tabs-not-spaces

This comment has been minimized.

Copy link

commented Mar 21, 2019

Another option - All in Powershell this time, which can be used on any system that has PSCore installed :)

function Connect-iDrac {
    [CmdletBinding()]
    param (
        [IPAddress]$dracHost,
        $dracUser
    )
    try {
        $cred = Get-Credential -UserName $dracUser -Message "Please enter iDrac credentials.." -Title "Connect-iDrac"
        $jrePath = "C:\bin\jre1.7.0_80" #set to your jre binaries root folder.
        $kvmJar = "$jrePath\avctKVM.jar"
        if (!(Test-Path $kvmJar)) {
            [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
            $WebClient = New-Object System.Net.WebClient
            $WebClient.DownloadFile("http://$dracHost/software/avctKVM.jar", "$kvmJar")
        }
        $proc = Start-Process -FilePath cmd -ArgumentList "/c `"$jrePath\bin\java.exe -cp avctKVM.jar -Djava.library.path=.\lib com.avocent.idrac.kvm.Main ip=$dracHost kmport=5900 vport=5900 user=$dracUser passwd=$($cred.GetNetworkCredential().Password) apcp=1 version=2 vmprivilege=true 'helpurl=https://%drachost%:443/help/contents.html'`"" -WorkingDirectory $jrePath -PassThru
        return $proc
    }
    catch {
        Write-Warning $_.Exception.Message
    }
}
@DanHaed

This comment has been minimized.

Copy link

commented Mar 26, 2019

I stumbled over this posting while searching for a solution to connect to my Lenovo RD530 via KVM, so i gave it a shot - and it worked flawless. So thank you for that.

Difference to the original posting is, i just got the avctKVMIO.dll out of the jar and i had to change 'com.avocent.idrac.kvm.Main' to 'com.avocent.kvm.client.Main'.

@femiosinowo

This comment has been minimized.

Copy link

commented Mar 30, 2019

Thank you very much - this works great!

@cvernooy23

This comment has been minimized.

Copy link

commented Apr 6, 2019

wow thank you! this is the only way I got the iDrac 6 console to open.

@click0

This comment has been minimized.

Copy link

commented Apr 19, 2019

Thanks, great solution.
There remains a small problem, I want a video resolution of 1024x768 and higher ...

@lbong

This comment has been minimized.

Copy link

commented Apr 19, 2019

Thank you for the great script. I have it running on iDRAC6 and iDRAC7. I using JRE 1.7 for iDRAC6 and JRE 1.8 for IDRAC7. It works out well. The only issue I have is Virtual Media is not showing (working) for iDRAC7. If anyone have a solution for Virtual Media on iDRAC 7, please share. Virtual Media works fine in iDRAC6 with "avmWinLib.dll" in the .\lib directory.

@click0

This comment has been minimized.

Copy link

commented Apr 19, 2019

@lbong Read this

@LouisOuellet

This comment has been minimized.

Copy link

commented Apr 22, 2019

@NoLooseEnds iDRAC6 Express simply does not support KVM. You will need to buy the iDRAC6 Enterprise add-on. There is no work around since iDRAC6 Express simply does not contains the Hardware required to support this. The add-on can easily be purchase from many providers for less then 20$USD. So very cheap. If you want the feature simply by the required hardware.

@NoLooseEnds

This comment has been minimized.

Copy link

commented Apr 22, 2019

@LouisOuellet Yes, and I did. :)

@LouisOuellet

This comment has been minimized.

Copy link

commented Apr 22, 2019

Thanks for the great script. I did added some functionalities to it such as Arguments support for HOST, USER and PASSWORD to make it a little faster to used. But nice find.

@vishalmalli

This comment has been minimized.

Copy link

commented Jul 5, 2019

This works great, thank you!

@jakchagu

This comment has been minimized.

Copy link

commented Jul 7, 2019

I keep getting
"Error: Could not find or load main class com.avocent.kvm.client.Main"

*** Edit ***
looking at the folder structure of the extracted lib, there was no client directory. Removed that from the string and added back the 'idrac'

com.avocent.idrac.kvm.Main
...voila! It works!

@whoamikyo

This comment has been minimized.

Copy link

commented Jul 8, 2019

thanks, works here!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.