alfwro13's Posts

I have used this script for some time to deploy VMs from template. However after upgrading our environment  from esxi 6.7 to 7.0 and upgrading powercli on my workstation to the latest version this sc... See more...
I have used this script for some time to deploy VMs from template. However after upgrading our environment  from esxi 6.7 to 7.0 and upgrading powercli on my workstation to the latest version this script started trowing error messages. My VMs still get created as expected but they need to be started  manually and the progress bar is not working any more. Here is a simplified version of the script (I have removed all unnecessary lines of code): param ( [Parameter(Mandatory=$true)] [string[]]$newVMList ) $template = "test" $osCust = Get-OSCustomizationSpec -name "Template" $Folder = Get-Folder -Id Folder-group-v148095 $resPool = Get-ResourcePool -ID ResourcePool-resgroup-186282 $taskTab = @{} foreach($Name in $newVmList){ $taskTab[(New-VM -name $Name -ResourcePool $resPool -Location $folder -Datastore DatastoreName -Template $templaten -OSCustomizationSpec $osCust -RunAsync).Id] = $Name } # Start each VM that is completed $runningTasks = $taskTab.Count while($runningTasks -gt 0){ Get-Task | % { if($taskTab.ContainsKey($_.Id) -and $_.State -eq "Success"){ Get-VM $taskTab[$_.Id] | Start-VM $taskTab.Remove($_.Id) $runningTasks-- } elseif($taskTab.ContainsKey($_.Id) -and $_.State -eq "Error"){ $taskTab.Remove($_.Id) $runningTasks-- } } Start-Sleep -Seconds 15 }   and the error message is: New-VM : 20/09/2022 09:18:18 New-VM One or more errors occurred. At Y:\Work\deploy-vms.ps1:13 char:11 + $taskTab[(New-VM -name $Name -ResourcePool $resPool -Location $folder ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [New-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM Index operation failed; the array index evaluated to null. At Y:\Work\deploy-vms.ps1:13 char:1 + $taskTab[(New-VM -name $Name -ResourcePool $resPool -Location $folder ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArrayIndex   I am not sure how to fix it. Can someone point me in the right direction please. Thanks
On my Intel NUC NUC10i7FNH running esxi 6.7 I am trying to enable passthrough for one of my USB controllers (JHL7540 Thunderbolt 3 USB Controller) - I have toggled the passthrough and it is stuck as ... See more...
On my Intel NUC NUC10i7FNH running esxi 6.7 I am trying to enable passthrough for one of my USB controllers (JHL7540 Thunderbolt 3 USB Controller) - I have toggled the passthrough and it is stuck as "Enabled / Needs reboot"  no matter the number of time the ESXi is rebooted. Any suggestions? Thanks
Problem description: When Google Coral USB Accelerator is connected to esxi host it is shown as 1a6e:089a Global Unichip Corp. This is not correct and I need that changed to: 18d1:9302 Google Inc... See more...
Problem description: When Google Coral USB Accelerator is connected to esxi host it is shown as 1a6e:089a Global Unichip Corp. This is not correct and I need that changed to: 18d1:9302 Google Inc. Is there any way of doing that in Esxi 6.7? Thanks