I need to update the Boot Delay for my VMs so that whenever the virtual machine is powered on or reset, delay the boot order for 5000 milliseconds. The default setting is 0 milliseconds.
Can anyone tell me what command(s) I need to use to script this. I only meed the correct syntax and I will be able to write the script to change the default settings on all my currents VMs (I have already updated my template so that new VMs have the 5000 millisecond setting).
Any help would be greatly appreciated.
Cheers
IMMIAnt
To set the boot delay for all your vm's to 5.000 miliseconds with PowerCLI you can use:
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.bootOptions = New-Object VMware.Vim.VirtualMachineBootOptions
$spec.bootOptions.bootDelay = 5000
Get-VM | ForEach-Object {
$_.ExtensionData.ReconfigVM_Task($spec)
}
Add the line
bios.bootDelay = "boot delay in milliseconds"
to the VMX file.
See Changing VMX files just got a whole lot easier on how to do this.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD, but I'm really trying to find a PowerCLI command that I can use to make the change. I'm not sure if/how to update the vmx file using PowerCLI if that's the only way it can be done.
I guess I should of checked the link that you put up before making my previous comment. I'll give it a try and see how I go. Thanks LucD
To set the boot delay for all your vm's to 5.000 miliseconds with PowerCLI you can use:
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.bootOptions = New-Object VMware.Vim.VirtualMachineBootOptions
$spec.bootOptions.bootDelay = 5000
Get-VM | ForEach-Object {
$_.ExtensionData.ReconfigVM_Task($spec)
}
Thanks RvdNieuwendijk, you're syntax was correct for getting the change done
I really appreciate your help and for LucD with his suggestion.
Cheers guys