A XenServer guest will not shutdown due to a pending task. In this case, it hung while adding an adapter while the guest was running - but has happened to me on other tasks as well.
- Attempt to cancel the task though the console.
- Use xe task-list , which will give you a list of tasks running, along with the UUID.
- Use xe task-cancel uuid=[task uuid] to end the task
- Sometimes the task will not respond, in which case you need to restart the toolstack
- Use xe-toolstack-restart to restart.