home

workaround: iDRAC virtual console window closes immediately

2024-09-17

With iDRAC, in some of the older versions (the pre-“eHTML5” versions), there is an annoying bug where the virtual console window opens in a popup window and closes almost immediately.

you can “workaround” this by opening the viewer in a new tab. you can get the URL with the following javascript (invoke this IIFE in a browser console).

this hits the /sysmgmt/2015/server/vconsole?type=HTML5 endpoint to get the viewerURL (containing the immediate viewer credentials), which is what the dashboard also seems to be doing.

'use strict';

(() => {
  const xsrf = [...new URLSearchParams(window.location.search)].find(x => x[0].length == 32);
  if (!xsrf) throw new Error("xsrf token not found");
  fetch('/sysmgmt/2015/server/vconsole?type=HTML5', {
    headers: {'xsrf-token': xsrf[0]}
  }).then(res => {
    if (!res.ok) throw new Error(`invalid status code: ${res.status}`);
    return res.json();
  }).then((response) => {
    const nextLoc = response['Location'];
    if (!nextLoc) throw new Error("unable to infer viewer 'Location' from response");
    console.log("\"Copy link address\" the following URL and open in a new tab", nextLoc);
  });
})();

With the link, “Copy link address” and open in a newer tab.

IDK what shenanigans they do within the viewer (some websocket between two “tab” sessions or something), so a basic “right click > open in new tab” does NOT work.


home