recreating a xen VM that has died

This is the process I use to re-create a VM that has hung or otherwise become unresponsive.

1. Find which xen server the VM (e.g., test) is on:

in the svn checkout for puppet configurations (you have puppetized all of your servers, including xen. right?), go to
the location for the configuration of your xen servers, and search for the VM:

$ cd ~/svn/puppet/trunk/modules/site/base/manifests/xenserver
$ find . -exec grep -H test {} \;
./env/xen101.pp:  xen::xenguests{ 'test':

2. ssh to xen101.

3. Become root:

$ sudo su -
4 Very important, cd to /etc/xen/auto
# cd /etc/xen/auto

5. Optional: to see what Vms are running:

# xm list

6. Optional: to connect to the Vms console to see what went wrong (ctrl-] to get out of the console):

# xm console test

7. Destroy the VM, if it's running:

# xm destroy test

8. Boot up the VM:

# xm create test