BenLiebowitz's Posts

If there are no VMs on them, they're not being used for Host Isolation, etc.  You can just remove the LUN, resize it, and present it again. 
Are you able to login with cached credentials via the web client?  Have you made your AD the default domain in the PSC?  I had a similar issue where I couldn't logged in with cached crede... See more...
Are you able to login with cached credentials via the web client?  Have you made your AD the default domain in the PSC?  I had a similar issue where I couldn't logged in with cached credentials via the web client, thick client (vSphere 6.0), nor PowerCLI.  When we contacted support, they had us reboot our external PSC and then the VCSA.  After everything was back online, I was able to login with cached credentials. 
adamjg​ - I'm in a similar boat.  We're on the same version and just deployed a new Win2016 system and installed Chrome... Running into this out of the gate.  Yet, on my 2012 R2 server, it's fine... See more...
adamjg​ - I'm in a similar boat.  We're on the same version and just deployed a new Win2016 system and installed Chrome... Running into this out of the gate.  Yet, on my 2012 R2 server, it's fine.  Strange!
Sounds good, good luck!
Sounds good, good luck!
There is no way to patch a host with running VMs on it, so if those VMs can't vMotion then you'll need to power them off and migrate them.  As for automatically updating, you could modify the... See more...
There is no way to patch a host with running VMs on it, so if those VMs can't vMotion then you'll need to power them off and migrate them.  As for automatically updating, you could modify the script i posted on my blog here and schedule the patching... and once the hosts that do not have VMs that can't migrate are done, you can manually migrate them off, and then patch the remaining hosts.  That's what I do when I need to patch my environment as we have VMs with RDMs that cannot vMotion. http://www.thelowercasew.com/patching-vmware-esxi-hosts-via-powercli Hope this helps.
Are you saying the Client Integration Plugin isn't working when you go to the vCenter Login page?  I had a problem with this and had to go to the folder C:\Users\USERNAME\appdata\local\VMware and... See more...
Are you saying the Client Integration Plugin isn't working when you go to the vCenter Login page?  I had a problem with this and had to go to the folder C:\Users\USERNAME\appdata\local\VMware and set permissions for EVERYONE MODIFY for the CIP folder.  Now the CIP loads for me for vCenter.
I've never done this myself, but I did find this KB article. vSphere Documentation Center Also, a device like AnywhereUSB may work for you as well.
Consolidation or Deleting a snapshot will merge any changes with the original.  The Snapshot VMDK won't grow larger than the original.  If you're original provisioned for 40gb, the snapshot VMDK ... See more...
Consolidation or Deleting a snapshot will merge any changes with the original.  The Snapshot VMDK won't grow larger than the original.  If you're original provisioned for 40gb, the snapshot VMDK will grow to a maximum of 40gb.  I hope this helps.
That got me a single line, thanks! 
Yes.  When I run the command in the script above, it lists the canonical name mulitple times, so when I pipe it into a variable, I'm not sure it's being read properly. $LUN = Get-Datastore Dat... See more...
Yes.  When I run the command in the script above, it lists the canonical name mulitple times, so when I pipe it into a variable, I'm not sure it's being read properly. $LUN = Get-Datastore Datastore1 | get-scsilun | Select CanonicalName When I do $LUN alone, I get this: There are multiple hosts attached, as you can see. I believe I need it to be just 1 line...
Hey Luc, I decided to find another way to run the partedUtil command...  I'm not getting the same results as I do if I run it via SSH though.  Is there a better way to get the Canonical Name o... See more...
Hey Luc, I decided to find another way to run the partedUtil command...  I'm not getting the same results as I do if I run it via SSH though.  Is there a better way to get the Canonical Name of a LUN? Thanks! # connect to selected vCenter connect-viserver $vcenter # List Clusters write-host "" Write-host "Choose which Cluster where the LUN you want to remove presented:" write-host "(it may take a few seconds to build the list)" write-host "" $ICLUSTER = get-cluster | Select Name | Sort-object Name $i = 1 $ICLUSTER | %{Write-Host $i":" $_.Name; $i++} $HCLUSTER = Read-host "Enter the number for the host to Patch." $SCLUSTER = $ICLUSTER[$HCLUSTER -1].Name write-host "You have selected $($SCLUSTER)." start-sleep -s 3 # List hosts to select write-host "" Write-host "Choose which vSphere host that has the LUN presented." write-host "(it may take a few seconds to build the list)" write-host "" $IHOST = get-cluster $SCLUSTER | Get-VMhost | Select Name | Sort-object Name $i = 1 $IHOST | %{Write-Host $i":" $_.Name; $i++} $DSHost = Read-host "Enter the number for the host to Patch." $SHOST = $IHOST[$DSHost -1].Name write-host "you have selected" $SHOST"." # List all scsi devices write-host "" Write-host "Choose which LUN to remove.  *** VERIFY VIA THE vSPHERE CLIENT ***" write-host "(it may take a minute to build the list)" write-host "" $ILUN = get-scsilun -vmhost $SHOST | Select LunDatastoreName, CanonicalName, RuntimeName, CapacityGB | Sort lundatastorename $i = 1 $ILUN | %{Write-Host $i":" $_.lunDatastoreName, $_.RuntimeName, $_.CapacityGB; $i++} $DSLUN = Read-host "Enter the number for the LUN to remove." $SLUN = $ILUN[$DSLUN -1].LunDatastoreName write-host "you have selected" $SLUN"." # List the files on the LUN you selected get-childitem (get-datastore $SLUN).datastorebrowserpath # Check to see if the datastore is in use Get-DatastoreUnmountStatus -datastore $SLUN # Pipe datastore to get-scsilun to get canonicalname $LUN = Get-Datastore $SLUN | get-scsilun | Select CanonicalName # Start SSH $ssh = Get-VMHostService -vmhost $SHOST | Where {$_.Key -eq "TSM-SSH"} Start-VMHostService -HostService ($ssh) -Confirm:$false # Remove the 99bnx2fc.sh file. $User = "root" $Pswd = "Password1!" $plink = "c:\plink.exe" $plinkoptions = " -v -batch -pw $Pswd" $cmd1 = 'partedUtil getptbl /vmfs/devices/disks/$LUN' $remoteCommand = '"' + $cmd1 + '"' $command = $plink + " " + $plinkoptions + " " + $User + "@" + $SHOST + " " + $remoteCommand $msg = Invoke-Expression -command $command $msg # Stop SSH Stop-VMHostService -HostService ($ssh) -Confirm:$false
in vSphere 6, they introduced an "erase partition" in the web client.  In the Hosts and Clusters view, go to a host, then Manage -> Storage - Storage Devices.  Find the LUN you want to erase and ... See more...
in vSphere 6, they introduced an "erase partition" in the web client.  In the Hosts and Clusters view, go to a host, then Manage -> Storage - Storage Devices.  Find the LUN you want to erase and there's a button.  However, I'm getting the same in use error.  Oh well. Thanks for your help!
invoke-command won't work here, would it?  Or are there any cmdlets you know of to delete / format the partition, similar to what partedutil is doing? I hate the human error aspect having... See more...
invoke-command won't work here, would it?  Or are there any cmdlets you know of to delete / format the partition, similar to what partedutil is doing? I hate the human error aspect having to do this at the canonical name level via SSH...  If I can automate it, that'd be much better!
Is there a way to run the partedutil commands via PowerCLI though?  I'm still getting "resource is in use" errors on two datastores.  I can browse and find nothing on them...  I may need to forci... See more...
Is there a way to run the partedutil commands via PowerCLI though?  I'm still getting "resource is in use" errors on two datastores.  I can browse and find nothing on them...  I may need to forcibly remove them.
Luc, Thanks, this function is very helpful! It turns out, these datastores were configured to store local syslog data instead of using the scratch partition.  Once I changed them to scratch... See more...
Luc, Thanks, this function is very helpful! It turns out, these datastores were configured to store local syslog data instead of using the scratch partition.  Once I changed them to scratch, I was able to delete the datastores.
So, we have some datastores we're looking to retire, however removing them from the web client gives us a "datastore is in use" error.  We worked with VMware support, and they gave us a bunch of ... See more...
So, we have some datastores we're looking to retire, however removing them from the web client gives us a "datastore is in use" error.  We worked with VMware support, and they gave us a bunch of partedutil commands, but I'd like to try and automate this to reduce the human error factor.  The commands to run are: partedUtil getptbl /vmfs/devices/disks/naa.1234567890 partedUtil delete /vmfs/devices/disks/naa.1234567890 Everything else I can do with get-scsilun This is what I have so far... 1. connect to vcenter 2. list the clusters 3. list the hosts in the selected cluster 4. list the datastores/luns on the host 5. browse the foor of the datastore selected (to verify nothing is on it and it's the one to be removed) 6. This would be where the partedutil commands go.  Thanks in advance! ---------------------- # Define the LunDatastoreName function New-VIProperty -Name lunDatastoreName -ObjectType ScsiLun -Value {     param($lun)     $ds = $lun.VMHost.ExtensionData.Datastore | %{Get-View $_} | `         where {$_.Summary.Type -eq "VMFS" -and             ($_.Info.Vmfs.Extent | where {$_.DiskName -eq $lun.CanonicalName})}     if($ds){         $ds.Name     } } -Force | Out-Null # connect to selected vCenter connect-viserver $vcenter # List Clusters write-host "" Write-host "Choose which Cluster where the LUN you want to remove presented:" write-host "(it may take a few seconds to build the list)" write-host "" $ICLUSTER = get-cluster | Select Name | Sort-object Name $i = 1 $ICLUSTER | %{Write-Host $i":" $_.Name; $i++} $HCLUSTER = Read-host "Enter the number for the host to Patch." $SCLUSTER = $ICLUSTER[$HCLUSTER -1].Name write-host "You have selected $($SCLUSTER)." start-sleep -s 3 # List hosts to select write-host "" Write-host "Choose which vSphere host that has the LUN presented." write-host "(it may take a few seconds to build the list)" write-host "" $IHOST = get-cluster $SCLUSTER | Get-VMhost | Select Name | Sort-object Name $i = 1 $IHOST | %{Write-Host $i":" $_.Name; $i++} $DSHost = Read-host "Enter the number for the host to Patch." $SHOST = $IHOST[$DSHost -1].Name write-host "you have selected" $SHOST"." # List all scsi devices write-host "" Write-host "Choose which LUN to remove.  *** VERIFY VIA THE vSPHERE CLIENT ***" write-host "(it may take a minute to build the list)" write-host "" $ILUN = get-scsilun -vmhost $SHOST | Select LunDatastoreName, CanonicalName, RuntimeName, CapacityGB | Sort lundatastorename $i = 1 $ILUN | %{Write-Host $i":" $_.lunDatastoreName, $_.RuntimeName, $_.CapacityGB; $i++} $DSLUN = Read-host "Enter the number for the LUN to remove." $SLUN = $ILUN[$DSLUN -1].LunDatastoreName write-host "you have selected" $SLUN"." # List the files on the LUN you selected get-childitem (get-datastore $SLUN).datastorebrowserpath
It worked!  I modified one line as we're attempting to run this against only 1 host, and set the get-vm to a specific cluster.  I changed the $esxcli= line to use a $vmhost variable which... See more...
It worked!  I modified one line as we're attempting to run this against only 1 host, and set the get-vm to a specific cluster.  I changed the $esxcli= line to use a $vmhost variable which is set to a specific hostname. $rdmHD = get-cluster "CLUSTER1" | Get-VM | Get-HardDisk -DiskType RawPhysical,RawVirtual $vmhost = get-vmhost "VMHOST" foreach($rdm in $rdmHD){     $esxcli = Get-EsxCli -VMHost $vmhost     $esxcli.storage.core.device.list($rdm.ScsiCanonicalName) |     Select @{N="Time";E={"{0:g}" -f (Get-Date).TimeOfDay}},Device,IsPerenniallyReserved     $esxcli.storage.core.device.setconfig($false,$rdm.ScsiCanonicalName,$true)     $esxcli.storage.core.device.list($rdm.ScsiCanonicalName) |     Select @{N="Time";E={"{0:g}" -f (Get-Date).TimeOfDay}},Device,IsPerenniallyReserved }  Thanks Luc!
So I found this script to set the RDMs to Perennially Reserved, however, we have probably 15-20 VMs with RDMs so doing this manually can be tough.  I'd like to be able to have PowerCLI build a li... See more...
So I found this script to set the RDMs to Perennially Reserved, however, we have probably 15-20 VMs with RDMs so doing this manually can be tough.  I'd like to be able to have PowerCLI build a list of all the RDMs.  I tried to build a foreach loop around the existing one one to detect all the RDMs from the multiple VMs using:  Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent but was unsuccessful.  $vmName = "VMwithRDM" $vm = Get-VM -Name $vmName $rdm = Get-HardDisk -DiskType rawPhysical -Vm $vm $vmhosts = Get-Cluster -VM $vm | Get-VMHost foreach($esx in $vmhosts){   $esxcli = Get-EsxCli -VMHost $esx   Get-HardDisk -DiskType rawPhysical -Vm $vm | %{     $esxcli.storage.core.device.list($rdm.ScsiCanonicalName) |     Select @{N="Time";E={"{0:g}" -f (Get-Date).TimeOfDay}},Device,IsPerenniallyReserved#     $esxcli.storage.core.device.setconfig($false,$rdm.ScsiCanonicalName,$true)     $esxcli.storage.core.device.list($rdm.ScsiCanonicalName) |     Select @{N="Time";E={"{0:g}" -f (Get-Date).TimeOfDay}},Device,IsPerenniallyReserved   } } Any help would be appreciated!  Thanks,