1 Reply Latest reply on May 22, 2015 12:16 PM by jwswizzle

    How to use VMRC SDK to open VM console

    MClinkVmware Lurker

      Hi,

      I'm looking for some help to setup a custom solution that opens a console of a VM from a corporate intranet site. I'm new to the whole VMWare SDK world, but I've been able to easily use vCloud Suite SDK for .NET to expose some details on my User Interface. So far so good, but when it comes to VMRC plugin honestly it is totally unclear how to use it.


      My need is just to show a button that opens a new web page with the console on it. In our infrastructure we're using vCloud Director 5.5.2.2233543
      According to VMWare developer center, I downloaded VMware Remote Console (VMRC) SDK (version 5.5.0.1280474), linked from the main page, that comes with VMRC plugin installers and a directory where I can found vmrc-embed-example.html and vmrc-embed-example.js files. The first weird thing I've noticed is that the vmrc plugin installer included in SDK is different from the one shipped by our installed vCloud Director application. The first is named "VMware Remote Console Plug-in 5.5.0.33581", the latter "VMware Client Support Plug-in 5.5.0.41167". It looks like the first is an old version, but I cannot be sure about that of course, and I can't find a newer sdk on the other hand.

      I payed attention to test the html page included in vmrc sdk with both plugins anyway (one at a time), just to try to understand. In both cases, running html page on the web browser and providing some data to use, I can connect succesfully to a VM, obtaining the following messages:

      starting VMRC instance: modes: 0, messages: 1
      startup returned "vmrc-np-t-{55D63FD3-925B-47C7-B96B-74659A57498E}"
      connect succeeded
      onConnectionStateChange - connectionState: 2, host: 172.18.x.y, datacenter: , vmId: vm-401, userRequested: true, reason: Connection successful.

      That's all: from the messages it seems that it's working, but the box that should show the console remains white and nothing else happens. Any action on the other form's button results in error messages, among them the most recurrent is "Error calling method on NPObject!", that is the same message that pops up when trying to connect to a VM with no parameter or without pressing the startup button.

      I really need some advice, any hint is appreciated, thanks in advance.

        • 1. Re: How to use VMRC SDK to open VM console
          jwswizzle Novice

          After you've made a connection you should try setting the plugin to full screen mode by calling setFullScreen(true). I was receiving a black box in the middle of the screen until I had started setting to fullscreen. As far as the "Error calling method on NPObject", when I've had this message it was due to the fact the plugin was not ready for some reason, for example connecting to a vm and then immediately calling grapInput would result in this message. I was able to resolve by checking the plugin was ready (and in scope of the callee).