How to collect logs in NSX for vSphere 6.x Guest Introspection
book
Article ID: 342489
calendar_today
Updated On:
Products
VMware NSX
Issue/Introduction
This article provides information on how to collect GI-SVM logs through an API call. There is no User Interface (UI) component exposed to collect the VMware NSX for vSphere 6.x Guest Introspection Service Virtual Machine logs.
Environment
VMware NSX for vSphere 6.3.x VMware NSX for vSphere 6.1.x VMware NSX for vSphere 6.2.x VMware NSX for vSphere 6.0.x
Resolution
To collect GI-SVM logs through an API call:
Determine the Host MOID:
Open a web browser and browse to https://<vcenter>/mob/.
Log in to vCenter Server with admin credentials.
Click group-d1.
Click datacenter-## in childEntity for the datacenter where the ESXi host resides.
Click group-h## in hostFolder.
Click domain-c## in childEntity for the cluster where the ESXi host resides.
All host MOIDs are listed in the Host section.
Alternatively, you can run these commands in the NSX Manager to find the Host MOID:
For example:
> show cluster all
No. Cluster Name Cluster Id Datacenter Name Firewall Status 1 RegionA01-COMP01 domain-c26 RegionA01 Enabled 2 RegionA01-MGMT01 domain-c71 RegionA01 Enabled
> show cluster domain-c26
Datacenter: RegionA01 Cluster: RegionA01-COMP01 No. Host Name Host Id Installation Status 1 xxxx.xxxx host-29 Ready 2 xxxx.xxxx host-31 Ready
Note that, Host ID = MOID.
To determine the current logging state, run API call:
GET https://<nsx mgr>/api/1.0/usvmlogging/host-##/com.vmware.vshield.usvm GET https://<nsx mgr>/api/1.0/usvmlogging/host-##/root
To change the current logging state, run API call:
POST https://<nsx mgr>/api/1.0/usvmlogging/host-##/changelevel