Deleting/Removing fully virtualised Xen Guest

  1. Halt/shutdown the Xen Guest/Virtual Machine to be decommissioned. This should 'power' it down. On a Linux Guest console (not the host) use shutdown -h now for a Linux system or, for a Windows system, RDP and shutdown the machine.

  2. SSH into the Dom0 (the host machine).
  3. xm list | grep <DomU> 

    where <DomU> is the short hostname of the virtual machine, e.g. yoyodyne. The DomU to be decommissioned should not be listed. If it is, execute

    xm destroy <DomU> 
    This command force shutdowns the VM
  4. Remove the auto-boot symlink:

    rm /etc/xen/auto/<DomU>.cfg 
  5. Remove the Xen domain configuration:

    rm /etc/xen/<DomU>.cfg 
  6. Remove all logical volumes associated with the domU. In most cases this will consist of a single LV:

    lvremove /dev/<Dom0>/<DomU>-<device> 

    For example:

    lvremove /dev/dom0server/ 

Other pages in similar categories