vSphere

 View Only

How to get the MOR when directly connectet to the host?

  • 1.  How to get the MOR when directly connectet to the host?

    Posted Dec 12, 2013 08:11 AM

    Hi,


    I am trying to reboot a host with the rebootHost_Task (MOR _this, boolean force). Therefor I need a MOR of he host.

    But how do I get this, if I am directly connectet and not via vCenter?

    I tried:

    ManagedObjectReference mor = si.getServerConnection().getServiceInstance().getMOR();

    si.getServerConnection().getVimService().rebootHost_Task(mor, true);

    But this throws an error:

    The request refers to an unexpected or unknown type.

    Any help would be appreciated.

    Chris