Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232869

VM says it is using storage but it isn't

$
0
0

I have an irritating problem..

 

I have a VM and in its summary it says it is using storage on my iSCSI device.  But it isn't.  I am trying to retire the iSCSI device but I can't unmount it as it says there are VMs on it.  I have done

 

I have run the excellent script

 

 

Connect-VIServer bvcserver.emtex.com
ForEach ($Datacenter in (Get-Datacenter | Sort-Object -Property Name)) {
  ForEach ($Cluster in ($Datacenter | Get-Cluster | Sort-Object -Property Name)) {
    ForEach ($VM in ($Cluster | Get-VM | Sort-Object -Property Name)) {
      ForEach ($HardDisk in ($VM | Get-HardDisk | Sort-Object -Property Name)) {
        "" | Select-Object -Property @{N="VM";E={$VM.Name}},
          @{N="Datacenter";E={$Datacenter.name}},
          @{N="Cluster";E={$Cluster.Name}},
          @{N="Hard Disk";E={$HardDisk.Name}},
          @{N="Datastore";E={$HardDisk.FileName.Split("]")[0].TrimStart("[")}},
          @{N="VMDKpath";E={$HardDisk.FileName}}
      }
    }
  }
}

 

 

and this reports that no VMs are using the iSCSI device... yet vcenter client still shows it being used and won't unmount.

 

Everything is latest 5.1 release.

 

Any ideas on what to do next? 

 

Thank you


Bill


Viewing all articles
Browse latest Browse all 232869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>