Forum Discussion
Robert Bollinger
Jun 04, 2018Brass Contributor
VM, VHD Questions.
Hey Team, Doing some studying here creating a new vm using powershell https://docs.microsoft.com/en-us/powershell/module/hyper-v/new-vm?view=win10-ps as well as setting a vm's IOPS settings https:/...
Steve Norton
Jun 07, 2018Brass Contributor
Hi Robert,
I took a look at this and the best I could do for a 1 liner is;
New-VM -Name TEST -NoVHD -Generation "2" | Add-VMHardDiskDrive -Path (New-VHD -Path "E:\Hyper-V\Virtual Hard Disks\Test.vhdx" -SizeBytes 25GB -Dynamic).Path -MinimumIOPS "2500"
As for alerts do you have the Microsoft-Windows-Hyper-V-VMMS/Admin log? On 2016 I get event ID 32930, if not set the IOPS value to something unachievable and check the event viewer 'Administrative Events'
HTH
Steve
Robert Bollinger
Jun 08, 2018Brass Contributor
Thanks Steve. I will check for those events as well. Also on the PowerShell command I think after much toiling I came up with something similar to your command.
Robert