OK, so I created the disk for SCSI 1:0 which created SCSI controller 1, and I set it to physical mode.
Now I'm trying this:
$scsi1 = get-scsicontroller -VM $vm | ?{$_.Name -eq "SCSI controller 1"}
The output of $scs1 is:
Type BusSharingMode UnitNumber
---- -------------- ----------
VirtualLsiLogicSAS Physical 4
VirtualLsiLogicSAS Physical 4
I don't know why there's 2 listed, the VM only has one.
Now when I run this:
new-harddisk -VM $vm -devicename $devicename -disktype rawvirtual -controller $scsi1
I immediately get:
New-HardDisk : Cannot convert 'System.Object[]' to the type 'VMware.VimAutomati
on.ViCore.Types.V1.VirtualDevice.ScsiController' required by parameter 'Control
ler'. Specified method is not supported.
At line:1 char:78
+ new-harddisk -VM $vm -devicename $devicename -disktype rawvirtual -controller
<<<< $scsi1
+ CategoryInfo : InvalidArgument: (:) [New-HardDisk], ParameterBi
ndingException
+ FullyQualifiedErrorId : CannotConvertArgument,VMware.VimAutomation.ViCor
e.Cmdlets.Commands.VirtualDevice.NewHardDisk
From what I'm seeing this *should* work, but something isn't working right. Any ideas?