Everyday Virtualization

Blog archive

How To Configure a Failed Boot Recovery on vSphere VMs

If you use any test environments with your vSphere environment, you are likely very familiar with sending the Ctrl+Alt+Insert keystroke to a system when viewing the console. In my lab, I have done a few tests using PXE boot services. I like PXE boot options because they are great for stateless VMs and you can easily test it on scale by booting up a number of sessions at once.

In testing these types of configurations I find, of course, something isn't right. In those situations, the default vSphere boot sequence will show that the VM can't boot. Fig. 1 shows a VM booting with no usable image.

This virtual machine didn't find any bootable drive locally or service on the network.

Figure 1. This virtual machine didn't find any bootable drive locally or service on the network. (Click image to view larger version.)

When this happens, we have to jump back into the virtual machine and send the Ctrl+Alt+Insert to reboot the VM to retry its connection. I've found a new trick for a vSphere VM option that can save a step in this situation: failed boot recovery.

The VM has to be powered off to make a change, but the failed boot recovery advanced boot option can configure the VM to reboot after a specified timeout if the normal boot sequence fails. This option has a default value of 10 seconds, which is just enough time if you are looking at the console to interact and stop the sequence or interrupt it. For me, I'll change it to 20 seconds to allow me more time to respond. Besides, this extra 10 seconds is effectively insignificant for most scenarios. Fig. 2 shows the failed boot recovery option configured on the VM.

The failed boot recovery option will make the VM reboot after a specified timeout if no boot device was found on disk or on the network.

Figure 2. The failed boot recovery option will make the VM reboot after a specified timeout if no boot device was found on disk or on the network. (Click image to view larger version.)

Once this is configured, the boot sequence has a new entry that displays the countdown of the reboot due to this option (see Fig. 3).

With the failed boot recovery option, a countdown is displayed to the next time the VM will reboot.

Figure 3. With the failed boot recovery option, a countdown is displayed to the next time the VM will reboot. (Click image to view larger version.)

I see this option valuable where PXE systems are in use or if there are deployment test environments in use. I don't see this necessary for all VMs or part of my standard template build, but handy in one-off situations.

Do you see a use for the failed boot recovery option? If so, share your comments here on how you would use it.

Posted by Rick Vanover on 03/14/2012 at 12:48 PM


Featured

Subscribe on YouTube