[libvirt] vCenter behaviour

Glenn Bailey gbailey at terremark.com
Mon Nov 16 16:11:53 UTC 2009


I was taking a look at libvirt for controlling a couple of vCenter clusters and noticed it will only let you login directly to an ESX host and not the vCenter server itself. You can pass the "vcenter=" command but this seems to just tell what vcenter server to use and doesn't directly access it. If you do a "list" it still just lists the devices on the given ESX host. For a quick test I modified the esx_driver.c and added the following (I am no c programmer BTW):

    if (STRCASEEQ(conn->uri->scheme, "esx")) {
        if (priv->host->productVersion != esxVI_ProductVersion_VPX25 &&
            priv->host->productVersion != esxVI_ProductVersion_VPX40 &&
            priv->host->productVersion != esxVI_ProductVersion_ESX35 &&
            priv->host->productVersion != esxVI_ProductVersion_ESX40) {

Which would then let me connect directly to the vCenter server and list all the vm's on it. Am I missing something? I'm new to libvirt, but all management of a ESX cluster is always done through vCenter, and not the host. Sorry if this message is redundant as I didn't see anything blaring in the archives ;-)


More information about the libvir-list mailing list