VMware {code}

 View Only
  • 1.  Remote Console ActiveX HowTo?

    Posted May 04, 2012 02:18 PM

    I'm sorry if I'm in the wrong forum and I'm sorry if this may be a stupid question. I'm more of a Hyper-V guy and I'm just beginning to look into VMware.

    I've installed ESXi for testing and the vSphere client application. I managed to create a VM and I'm able to connect to the console of the VM from the client application.

    I'm wondering how I can host the remote console ActiveX control and connect to a VM instance (just like I would using the vSphere client). I've found the AxVMwareEmbeddedRemoteConsole component but I have no idea what I need to just simply connect to a console. Is there a documentation or sample App?

    I appreciate any help on this?

    cheers,
    Stefan



  • 2.  Re: Remote Console ActiveX HowTo?

    Posted Dec 16, 2015 03:08 PM

    Did you manage to create a connection using AxVMwareEmbeddedRemoteConsole? I'am also trying to use this ActiveX component. It seams that a cloneTicket is required for the connection to work, but I couldn't get one so far. Every time when I call the AcquireCloneTicket method on the sdk webservice I get an "RestrictedVersionFault" from the server. I've managed to capture the https packets from Vmware Infrastructure-Client and the client is successfully calling this method to get a ticket, but I don't know why this isn't working for me. Here is my code: (.Net)

            private void connect()

            {

                System.Net.ServicePointManager.CertificatePolicy = new AppUtil.CertPolicy();

                Vim25Api.VimService service = new Vim25Api.VimService();

                service.Url = "https://172.16.2.13/sdk";

                service.Timeout = 600000;

                service.CookieContainer = new System.Net.CookieContainer();

                Vim25Api.ManagedObjectReference _svcRef = new Vim25Api.ManagedObjectReference();

                _svcRef.type = "ServiceInstance";

                _svcRef.Value = "ServiceInstance";

                Vim25Api.ServiceContent _sic = service.RetrieveServiceContent(_svcRef);

                Vim25Api.UserSession _session = service.Login(_sic.sessionManager, "root", "pw", "de-DE");

                Vim25Api.ManagedObjectReference _virRef = service.FindByIp(_sic.searchIndex, null, "172.16.128.10", true);

                if (_virRef == null)

                    throw new Exception("Not found");

                String cloneTicket = service.AcquireCloneTicket(_sic.sessionManager);

              

                vmware.connect("172.16.2.13:443", "", true, cloneTicket, "", "", "264", "", "");

            }

    Edit: I just found out that the http header User-Agent has to be "VMware VI Client/4.0.0" to get a cloneTicket, but the ActiveX still doesn't work I get an E_FAIL error every time I call the connect method.