VMware Cloud Community
IMMIAnt
Enthusiast
Enthusiast
Jump to solution

How do you change the Boot Delay in a VM

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

Reply
0 Kudos
1 Solution

Accepted Solutions
RvdNieuwendijk
Leadership
Leadership
Jump to solution

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)

}

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition

View solution in original post

Reply
0 Kudos
5 Replies
LucD
Leadership
Leadership
Jump to solution

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

IMMIAnt
Enthusiast
Enthusiast
Jump to solution

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.

Reply
0 Kudos
IMMIAnt
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
RvdNieuwendijk
Leadership
Leadership
Jump to solution

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)

}

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos
IMMIAnt
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos