[ English | русский | Deutsch | Indonesia | English (United Kingdom) ]

Shutting down the Compute host

If a Compute host needs to be shut down:

  1. Disable the nova-compute binary:

    # nova service-disable --reason "Hardware replacement" HOSTNAME nova-compute
    
  2. List all running instances on the Compute host:

    # nova list --all-t --host <compute_name> | awk '/ACTIVE/ {print $2}' > \
    /home/user/running_instances && for i in `cat /home/user/running_instances`; do nova stop $i ; done
    
  3. Use SSH to connect to the Compute host.

  4. Confirm all instances are down:

    # virsh list --all
    
  5. Shut down the Compute host:

    # shutdown -h now
    
  6. Once the Compute host comes back online, confirm everything is in working order and start the instances on the host. For example:

    # cat /home/user/running_instances
    # do nova start $instance
      done
    
  7. Enable the nova-compute service in the environment:

    # nova service-enable HOSTNAME nova-compute