Thursday, January 13, 2011

Delete command in xm

Does anyone know what happened to the "delete" subcommand in the xm tool for managing virtual machines on CentOS (5.3)? How do you delete a domain without it?

  • You have two options to remove a virtual machine depending on what you're trying to accomplish.

    If you're looking to really delete the machine for good:

    • If the machine is running then stop the machine with "xm destroy "
    • Delete any disk images, remove any lvm volumes, or iSCSI targets associated with the machine. You can find what the virtual machine was pointing too by looking at the configuration file in /etc/xen/.
    • Finally you can delete the configuration file /etc/xen/

    This process should be easy to automate with a script.

    If you want to hang onto the virtual machine but do not want it to auto start when the Dom0 machine is booted then all you need to do is remove the symbolic link to the virtual machine's config file from the /etc/xen/auto/ directory.

0 comments:

Post a Comment