How to configure automatic startup of instance after a hypervisor reboot?

In the process of working with OpenStack, it was revealed that after restarting the hypervisor without overclocking the instance on it, after a successful launch of the hypervisor, instances on it do not automatically start. This problem can be solved in one of the following ways:

  1. On compute nodes, where the function of automatically starting the instance is required, add the following line to the file /etc/nova/nova.conf:

    [Default]
    …
    resume_guests_state_on_host_boot=true
    
  2. Also in the file /etc/init.d/libvirt-guests check for the following value:

    ON_SHUTDOWN=shutdown
    

Important

Services must be restarted to apply changes:

service libvirtd restart
service openstack-nova-compute restart