Configure Auto-Start for Instances After Host Reboot

Problem

When a compute host is rebooted, regardless of the reason, Nova is configured by default to leave all instances on that hypervisor in a shutoff state. If this behavior is considered undesirable, an optional Nova configuration option can be set on a per-host basis to automatically start guests that were running before the host rebooted.

Environment

  • Platform9 Managed OpenStack - All Versions
  • Nova (Compute Service)

Procedure

  1. Set the following on each host where this behavior is desired in the /opt/pf9/etc/nova/conf.d/nova_override.conf file.

    [DEFAULT]
    resume_guests_state_on_host_boot = True
    
  2. Restart the Compute service.

    #systemctl restart pf9-ostackhost

On the next reboot of the hypervisor, nova will resume all the Virtual Machines once the pf9ostackhost service is up and running.

Warning: Use this configuration option with care, it is likely that all the VMs attempting to start will cause a boot storm anf it will cause problems if the underlying hypervisor does not have sufficient resources.