python icon indicating copy to clipboard operation
python copied to clipboard

libvmi.libvmi.LibvmiError: NO_CONFIG_ENTRY

Open darshantank opened this issue 5 years ago • 1 comments

I am trying to run process-list.py on my Win 7 VM.

virsh list

Id Name State

2 win7_Guest running

python process-list.py win7_Guest

VMI_ERROR: No entry in config file for win7_Guest. Traceback (most recent call last): File "process-list.py", line 72, in ret = main(sys.argv) File "process-list.py", line 18, in main with Libvmi(vm_name) as vmi: File "/usr/local/lib/python2.7/dist-packages/libvmi-3.4-py2.7-linux-x86_64.egg/libvmi/libvmi.py", line 288, in init check(status, error_msg) File "/usr/local/lib/python2.7/dist-packages/libvmi-3.4-py2.7-linux-x86_64.egg/libvmi/libvmi.py", line 211, in check raise LibvmiError(error) libvmi.libvmi.LibvmiError: NO_CONFIG_ENTRY

I'm new to python programming. What are possible causes of such error? I look forward to hear your views. Thanks

darshantank avatar Feb 15 '20 04:02 darshantank

hi @darshantank ,

you are simply running into one of the possibiles initialization errors returned by LibVMI. https://github.com/libvmi/libvmi/blob/master/libvmi/libvmi.h#L93

typedef enum vmi_init_error {

    VMI_INIT_ERROR_NONE, /**< No error */

    VMI_INIT_ERROR_DRIVER_NOT_DETECTED, /**< Failed to auto-detect hypervisor */

    VMI_INIT_ERROR_DRIVER, /**< Failed to initialize hypervisor-driver */

    VMI_INIT_ERROR_VM_NOT_FOUND, /**< Failed to find the specified VM */

    VMI_INIT_ERROR_PAGING, /**< Failed to determine or initialize paging functions */

    VMI_INIT_ERROR_OS, /**< Failed to determine or initialize OS functions */

    VMI_INIT_ERROR_EVENTS, /**< Failed to initialize events */

    VMI_INIT_ERROR_NO_CONFIG, /**< No configuration was found for OS initialization */

    VMI_INIT_ERROR_NO_CONFIG_ENTRY, /**< Configuration contained no valid entry for VM */
} vmi_init_error_t;

So NO_CONFIG_ENTRY is VMI_INIT_ERROR_NO_CONFIG_ENTRY

Nothing to do with Python.

Also you are using Python2, I urge you to move to Python3 as we are going to deprecate it one day.

Wenzel avatar Feb 15 '20 13:02 Wenzel