Hi,
I have been lookin thru the powerCLI reference located here
Online Documentation - Cmdlet Reference - VMware {code}
I see the command Set-NetworkAdapter, but I do not see anyway to control speed.
Here is a screenshot of what settings I am trying to modify
Thanks in advance
Brian
No cmdlet for that, you'll have to use the API.
Something like this for example.
Note that the values need to be in Mbps
$nicName = 'Network adapter 1'
$limitGbps = 8
$reservationGbps = 2
$vm = Get-VM -Name $vmName
$nic = Get-NetworkAdapter -VM $vm -Name $nicName
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$dev = New-Object VMware.Vim.VirtualDeviceConfigSpec
$dev.Operation = [VMware.Vim.VirtualDeviceConfigSpecOperation]::edit
$dev.Device = $nic.ExtensionData
$dev.Device.ResourceAllocation.Limit = $limitGbps * 1KB
$dev.Device.ResourceAllocation.Reservation = $reservationGbps * 1KB
$spec.DeviceChange += $dev
$vm.ExtensionData.ReconfigVM($spec)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No cmdlet for that, you'll have to use the API.
Something like this for example.
Note that the values need to be in Mbps
$nicName = 'Network adapter 1'
$limitGbps = 8
$reservationGbps = 2
$vm = Get-VM -Name $vmName
$nic = Get-NetworkAdapter -VM $vm -Name $nicName
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$dev = New-Object VMware.Vim.VirtualDeviceConfigSpec
$dev.Operation = [VMware.Vim.VirtualDeviceConfigSpecOperation]::edit
$dev.Device = $nic.ExtensionData
$dev.Device.ResourceAllocation.Limit = $limitGbps * 1KB
$dev.Device.ResourceAllocation.Reservation = $reservationGbps * 1KB
$spec.DeviceChange += $dev
$vm.ExtensionData.ReconfigVM($spec)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Again, Thank you LucD