Configuring Nova settings for virtual machines

To optimize your OpenStack settings for virtual machines, complete some configuration updates in the Nova configuration file.

About this task

The following configuration updates are in the Nova configuration file that is used by the nova-compute service. The Nova configuration file is normally named nova-vcenter-resource.conf, where resource represents the actual resource name that is managed. For example, the managed resource might be cluster01. In this example, the Nova configuration file is /etc/nova/nova-vcenter-cluster01.conf.

Complete the following steps to update your Nova configuration file settings for virtual machines. Because these settings cannot be configured with a cookbook, you must configure them manually after completing your deployment. For more information about OpenStack configuration options, see nova.conf - configuration options.

Procedure

  1. Set the sync_power_state_interval to -1 to prevent OpenStack from changing the power state of virtual machines that do not match the power state that OpenStack has in the OpenStack database. Include the following information in the nova.conf file in the [DEFAULT] section:
    [DEFAULT]
    sync_power_state_interval=-1

    The sync_power_state_interval is the interval that OpenStack checks the actual virtual machine power state and the power state that OpenStack has in its database. If the actual state does not match the state in the database, OpenStack issues commands to change the actual virtual machine power state. If a virtual machine is powered on, without using OpenStack, the sync_power_state function powers off the virtual machine.

    When the sync_power_state_interval is used in a high availability configuration, the glance image synchronization must also be disabled. In a high availability configuration, when sync_power_state_interval = -1 is configured, also include the following information in the nova.conf file in the [DEFAULT] section:
    [DEFAULT]
    image_cache_manager_interval = -1
  2. Set the destroy_after_evacuate value to false.
    This configuration determines whether to destroy instances on startup when it is suspected that they have previously been evacuated. To avoid this situation, include the following information in the nova.conf file in the [workarounds] section:
    [workarounds]
    destroy_after_evacuate=false  
  3. Set the running_deleted_instance_action value to noop.
    This setting determines the action to take if a running deleted instance is detected. The default value is reap, which deletes the instance when an instance is detected as a deleted instance. To avoid this situation, include the following information in the nova.conf file in the [DEFAULT] section:
    [DEFAULT]
    running_deleted_instance_action=noop