Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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