Citrix Xen VM Unresponsive, Will not shut down or start


If you have ever worked with Citrix Xenserver for a long time, You have no doubt experienced having a VM turn unmanageable. Below are couple of scenarios and quick fixes that will be handy in similar situations.

# 1st Scenario

VM has continuously attempted to shutdown, however remains in the green/on state. The VM will not display the console and manual shut down in XenCenter do not work.

Quick fix

* First step is to execute ‘xe-toolstack-restart’ on the pool master server. Most of the times this will help fix the issue. While the restart command is in execution connection to Xen server pool will drop momentarily. If this doesn’t help proceed to next step.

* From the XenServer console, run the command ‘xe vm-shutdown –force vm=VMNAME’ to force a shutdown.

* In XenCenter, once the above two items are performed, attempt to “Reboot” the VM and you will see the VM restart and reflecting the correct power state.

# 2nd Scenario

A virtual machine’s power state will go into an “amber” or “orange” state and the VM is toally left unmanageable.

Quick fix

* Find the UUID of the VM that is stuck in transition. Use the command ‘xe vm-list’ or via XenCenter.

* Find the Domain ID of the hung VM. Run ‘list_domains’ on Xen server console and match the UUID with the ID number

id | uuid | state
0 | 3fe455fe-3185-4abc-bff6-a3e9a04680b0 | R
47 | 267227f3-a59e-dafe-b183-82210cf51ec4 | B
59 | 298817fb-8a3e-7501-11e0-045a8aa860ff | B
60 | 46e3d5aa-2f02-dfdc-b053-9a8ac56ec5d1 | B
61 | 16cf3204-eb17-5a12-e8d0-c72087bda690 | B
62 | 1f8053b5-c6ca-40bb-504e-3017c37e7281 | H
63 | ddaec491-097a-e271-362b-f2f985e26e4a | R
65 | 7adef6fd-9171-5426-b333-6fb1b57b8e60 | B H
66 | 6046dc13-f70b-8398-56fb-069c22440a7c | B
67 | f201cd94-a501-00c2-d21e-8c2f03ea167b | B H

* Run the cmd destroy_domain on the Domain ID.

# /opt/xensource/debug/destroy_domain -domid 62

* You will still see the VM show itself as running, Finally, we need to reboot it.

# xe vm-reboot name-label=’name of the VM’ –force

* The above command will reboot the VM and restore its normalcy. You may want to check the logs for some disk inconsistencies.

Related Articles

  • Adding IP’s to Windows Server 2012

    This article will help you add one or more IP’s to windows server 2012.   To start, look on the bottom right of the your display to find a icon...
  • Fixing a corrupt VHD file – Hyper-V

      Error message – Failed to open attachment ‘C:\ vhddir \MyVHD.vhd’. Error: ‘The file or directory is corrupted and unreadable.’” There could be many possible causes why your VHD may...
  • Growing Disk Space After Resizing a Windows Server

    Once a Windows Server is resized in VMWare, you must grow the disk inside of Windows. Below you will find very simple steps to grow the Volume.   First, Open Computer...