Ask Your Question

Start VMs after reboot compute node

asked 2015-05-14 08:51:23 -0500

eonqee gravatar image

updated 2015-05-15 05:57:34 -0500

SGPJ gravatar image

After reboot compte node VMs don't start and I have to manually start VMs. On the compute node /etc/nova/nova.conf:


What do I need to make the VMs to start automatically?

After rebooting: /var/log/nova/compute.log:

2015-05-15 13:37:33.027 2529 WARNING nova.compute.manager [-] [instance: 1ffd4bdb-0c92-4b6c-8781-a42d311bf0b3] Instance is paused unexpectedly. Ignore.
2015-05-15 13:37:36.216 2529 WARNING nova.compute.manager [-] [instance: 1ffd4bdb-0c92-4b6c-8781-a42d311bf0b3] Instance shutdown by itself. Calling the stop API.


2015-05-15 13:37:35.584+0000: 2071: error : virNWFilterDHCPSnoopEnd:2131 : internal error ifname "vnet0" not in key map
2015-05-15 13:37:36.794+0000: 2066: error : virNetSocketReadWire:1194 : End of file while reading data: Input/output error


2015-05-15 13:37:35.584+0000: shutting down
qemu: terminating on signal 15 from pid 2066
2015-05-15 13:38:24.489+0000: shutting down
edit retag flag offensive close merge delete


I think that it is the correct parameter to set on nova.conf file on compute nodes in order to get that behavior. Do you see any ERROR in your nova log files?

Antonio G. gravatar imageAntonio G. ( 2015-05-15 05:13:32 -0500 )edit

Yes. I added in the first message

eonqee gravatar imageeonqee ( 2015-05-15 05:44:45 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2015-10-30 06:34:34 -0500

Peter Jenkins gravatar image

We had this exact issue and solved it by using the libvirt-guests service to cleanly shutdown the vms, but nova-compute to start them again. Relying on libvirt-guests is no good because when it tries to restart the vm, the network isn't configured correctly (at least in our case, where we use the Neutron ML2 plugin, the network bridges were not configured at this point in the boot process).

Configure libvirt-guests to shutdown vms, but not start them at boot. Edit /etc/sysconfig/libvirt-guests

# action taken on host boot
# - start   all guests which were running on shutdown are started on boot
#           regardless on their autostart settings
# - ignore  libvirt-guests init script won't start any guest on boot, however,
#           guests marked as autostart will still be automatically started by
#           libvirtd


# action taken on host shutdown
# - suspend   all running guests are suspended using virsh managedsave
# - shutdown  all running guests are asked to shutdown. Please be careful with
#             this settings since there is no way to distinguish between a
#             guest which is stuck or ignores shutdown requests and a guest
#             which just needs a long time to shutdown. When setting
#             ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
#             value suitable for your guests.

You can also configure timings and whether to shutdown in parallel. Make sure the libvirt-guests service is enabled and running:

systemctl enable libvirt-guests
systemctl status libvirt-guests

Then make sure you've set nova-compute as described in this question (resume_guests_state_on_host_boot=true). Enable and restart nova-compute and you are ready for testing.

In our testing we found this worked well for all vm states, except 'paused', which resulted in the paused vm's being shutdown. We very rarely see users pausing our VMs so we decided to live with this bug.

edit flag offensive delete link more

answered 2015-05-17 23:03:51 -0500

sunnyarora gravatar image

[That option only resumes guests that were running before the host rebooted. Rest all states are ignored by implementation.] [Answered here]( Also, If you set this flag, whenever you restart the nova-compute service, the running instances on that same node also reboot.

Alternate Option : For autostart you need to use available KVM funtionality. You need Set the 'autostart' flag so the vm/domain is started upon boot. you can the status via 'virsh net-list'. Please also make sure /etc/init.d/libvirtd service is stared on boot:

virsh autostart vmname  
virsh net-list     
chkconfig libvirtd on
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-05-14 08:51:23 -0500

Seen: 10,637 times

Last updated: Oct 30 '15