I can able to create Disk by using powershell but cant make it Multiwritter disk.
Below is the script i have created to add new disk in VM, but i want to make it Multiwriter to share it with another VM.
$vcenterServer = "vesa-01a.corp.local"
$user = “administrator@corp.local"
$password = "VMware1!"
$vm = “acct-app-01"
$Persistence = "IndependentPersistent"
$DiskType = "Flat"
$controller "SCSI controller 1"
$CapacityGB = "5"
$storageFormat = “EagerZeroedThick"
$Datastore = "RegionAQ1-LOCAL-ESX01A"
#Connect Vcenter Server
Connect-VIServer -Server $vcenterServer -User $user -Password $password
#Create New HDD on WM
New-HardDisk -VM $VM -CapacityGB $CapacityGB -StorageFormat $storageFormat -Persistence $Persistence -DiskType $DiskType -Controller $controller
need your help to make this script complete for making multi-writer disk. once I complete successful testing then i can implement the same in my organization.
Thanks,
Nilesh Pawar.
Have you looked at Solved: Add and set Hard Disk MultiWriter flag on Powered ... - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LUC D for looking into this,
When i rub given script get an error : The property device change can not be found on this object verify that thr property exist and can be set.
Note : this is not RDM, disk which i am trying is Virtual disk.
Thanks,
Nilesh Pawar
The $spec variable holds a VirtualMachineConfigSpec object, which has a DeviceChange property.
There might be something wrong with your copy/paste or whatever you changed in the snippet
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference