VMware Cloud Community
vmk2014
Expert
Expert

Finding the VMs having network introspection driver (vnetflt.sys) from Linux and windows VM enabled

Hi Team,

Can we pull from Power Cli script  the list of VM's having network introspection driver (vnetflt.sys) from Linux and windows VM enabled or installed ? Based on that we need to remove using command fltmc unload vnetflt.sys.  We are facing packet drops due to network introspection issue.

https://kb.vmware.com/s/article/79185

http://www.vstellar.com/2019/05/16/nsx-guest-introspection-components-configuration/

 

Thanks

vmk

Labels (1)
Reply
0 Kudos
7 Replies
LucD
Leadership
Leadership

On a Windows box you can use Get-WmiObject Win32_Product, on a Linux box you could use something like lspci (but that depends on the Linux flavour).


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
vmk2014
Expert
Expert

Thank you LucD. I'll try and get back to you. Based on this command output. Can we remove or disable the NSX introspection service on the VM using power Cli or PowerShell command ? Thanks again.

 

vmk

Reply
0 Kudos
LucD
Leadership
Leadership

On a Windows box you could do something like in Using PowerCLI to remove NSX Network Introspection... - VMware Technology Network VMTN

On a Linux box it depends on the Linux flavour which command to use.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
vmk2014
Expert
Expert

Thank you. it will work for me. For Bulk VM's. Just i want to confirm if the below code is ok to run using for loop. My apologies for asking. 

 

Get-Module -ListAvailable PowerCLI* | Import-Module


Connect-VIServer -Server serverone -User administrator@vsphere.local -Password mypasword

$GetVm=(Get-VM).where{$_.ExtensionData.Config.GuestFullname -match 'Windows'} | select -expand Name | Out-File -FilePath C:\vms.txt

$source = "C:\vms.txt"

$vms = Get-Content -Path $source

foreach ($vmName in $vms) {
$tools = Get-WmiObject Win32_Product | Where{$_.Name -eq 'NetworkIntrospection'}
msiexec.exe /qn /L*V 'C:\Temp\install.log' /i $tools.LocalPackage REBOOT=ReallySuppress REMOVE=NetworkIntrospection

}

 

Thanks

vmk

 

Reply
0 Kudos
LucD
Leadership
Leadership

You would have to look for the specific driver you are targeting in the Get-WmiObject cmdlet.
That is not 'VMware Tools' I suspect.

You would also have to run the Get-WmiObject cmdlet and the msiexec command inside each VM's Guest OS.
That could be via Invoke-VMScript.



Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
vmk2014
Expert
Expert

Yes, you are right. It was my mistake. I did refer one of command from your previous post and for got to edit. I corrected it.

However, for invoke script. you mean to say like below ? 

$result = Invoke-VMScript -VM $vm -ScriptType Bat -ScriptText $tools | Select -ExpandProperty ScriptOutPut 

 

Thanks

vmk

 

Reply
0 Kudos
LucD
Leadership
Leadership

The ScriptType should be PowerShell if you want to use the Get-WmiObject cmdlet.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos