Set-FT.ps1: typo in foreach loop that builds the VM disk array
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 951
- Forks
- 504
- PR merge metrics
- No merged PRs in 30d
Description
On line 52, the "foreach" loop is referencing the variable "$d", but I believe it should reference the variable "$devices":
# VM Devices
$devices = $vmView.Config.Hardware.Device
$diskArray = @()
# Build VM Disk Array to map to datastore
foreach ($device in $d) {
if($device -is [VMware.Vim.VirtualDisk]) {
$temp = New-Object Vmware.Vim.FaultToleranceDiskSpec
$temp.Datastore = $datastoreView.Moref
$temp.Disk = $device
$diskArray += $temp
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open powershell/Set-FT.ps1 at line 52 and inspect how the VM device list is assigned before the disk array loop. Correct the loop's variable reference so it uses the assigned device collection, then verify that the disk array is built from the VM devices shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100