Skip to content

Set-FT.ps1: typo in foreach loop that builds the VM disk array #136

@pcapriccio

Description

@pcapriccio

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
	        }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions