VMware Cloud Community
Bunty11
Hot Shot
Hot Shot
Jump to solution

SCSI Bus Sharing


How can i know which virtual machine out of 100 virtual machine in my enviorment have SCSI Bus Sharing enabled ?

DO i need to go and check each and every virtual machine or is there any quick way to know that ? Using power cli or some thing.

Please suggest.

0 Kudos
1 Solution

Accepted Solutions
dhanarajramesh
Jump to solution

after you connect to the vcenter server in power cli ucan use below scripts:
Get-Cluster | Get-VMHost | Get-VM | Get-ScsiController | Where-Object {$_.BusSharingMode -eq ‘Physical’} | Select {$_.Parent.Name}, {$_.Parent.Host}, BusSharingMode | Sort {$_.Parent.Host} ### This returns any VM’s set to BusSharingMode of Physical
Get-Cluster | Get-VMHost | Get-VM | Get-ScsiController | Where-Object {$_.BusSharingMode -eq ‘Virtual’} | Select {$_.Parent.Name}, {$_.Parent.Host}, BusSharingMode | Sort {$_.Parent.Host} ### This returns any VM’s set to BusSharingMode of Virtual

View solution in original post

0 Kudos
2 Replies
dhanarajramesh
Jump to solution

after you connect to the vcenter server in power cli ucan use below scripts:
Get-Cluster | Get-VMHost | Get-VM | Get-ScsiController | Where-Object {$_.BusSharingMode -eq ‘Physical’} | Select {$_.Parent.Name}, {$_.Parent.Host}, BusSharingMode | Sort {$_.Parent.Host} ### This returns any VM’s set to BusSharingMode of Physical
Get-Cluster | Get-VMHost | Get-VM | Get-ScsiController | Where-Object {$_.BusSharingMode -eq ‘Virtual’} | Select {$_.Parent.Name}, {$_.Parent.Host}, BusSharingMode | Sort {$_.Parent.Host} ### This returns any VM’s set to BusSharingMode of Virtual

0 Kudos
gregpennings
Contributor
Contributor
Jump to solution

Great answer!

Looks like $_.Parent.Host is now $_.Parent.VMHost and, since you select BusSharingMode in the output, I condensed the search for physical and virtual bus sharing modes into one where statement with the -or operator. Here's the updated command:

Get-VM | Get-ScsiController | Where-Object {$_.BusSharingMode -eq ‘Physical’ -or $_.BusSharingMode -eq ‘Virtual’} | Select {$_.Parent.Name}, {$_.Parent.VMHost}, BusSharingMode | Sort {$_.Parent.VMHost}

0 Kudos