VMware Cloud Community
DennieTidwell
Enthusiast
Enthusiast
Jump to solution

Can you modify vmx files on multiple vms in a cluster to allow boot delay setting changes via RCLI or VI Toolkit?

Can you modify vmx files on multiple vms in a cluster to allow boot delay setting changes via RCLI or VI Toolkit? How?

SAs desire a boot delay of 10 seconds across virtual enterprise comprising of multiple VCs with multiple datacenters and clusters.

Known: we can modify .vmx file and add: bios.bootDelay = "10000" this adds a 10000 ms (10 seconds) delay at boot time

Known: we may have to re-register or some other mechanism to apply the change to boot settings on vms

Has anyone attempted to do an enterprise wide change to bootDelay on vms? Any help?

0 Kudos
1 Solution

Accepted Solutions
klich
Enthusiast
Enthusiast
Jump to solution

The script below will do what you want. Have fun.

-


#this script sets the bios boot delay for VMs

connect-viserver "your vc server name"

#define cluster, if you want to limit the scope to a single cluster, otherwise comment this line out

$cluster = Get-Cluster -Name "My Cluster"

#boot delay to configure, in milliseconds

$bootdelay = 10000

#get all of the VMs in the cluster

#just omit $cluster if you want to do all VMs in your virtualcenter at once

$vm = Get-VM -Location $cluster

$vmView = $vm | foreach-object { get-view $_.id }

$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec

$vmConfigSpec.bootoptions = New-Object VMware.Vim.virtualmachinebootoptions

$vmConfigSpec.bootoptions.bootdelay = "$bootdelay"

$vmView | foreach-object { $_.ReconfigVM($vmConfigSpec) }

View solution in original post

0 Kudos
3 Replies
klich
Enthusiast
Enthusiast
Jump to solution

The script below will do what you want. Have fun.

-


#this script sets the bios boot delay for VMs

connect-viserver "your vc server name"

#define cluster, if you want to limit the scope to a single cluster, otherwise comment this line out

$cluster = Get-Cluster -Name "My Cluster"

#boot delay to configure, in milliseconds

$bootdelay = 10000

#get all of the VMs in the cluster

#just omit $cluster if you want to do all VMs in your virtualcenter at once

$vm = Get-VM -Location $cluster

$vmView = $vm | foreach-object { get-view $_.id }

$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec

$vmConfigSpec.bootoptions = New-Object VMware.Vim.virtualmachinebootoptions

$vmConfigSpec.bootoptions.bootdelay = "$bootdelay"

$vmView | foreach-object { $_.ReconfigVM($vmConfigSpec) }

0 Kudos
sharksuit
Contributor
Contributor
Jump to solution

Ho can I modify the boot delay for a single VM?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Just replace the line where the script populates the $vm variable

$vm = Get-VM -Name MyVM


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos