How to configure Xen DomU's to shutdown when Dom0 is stopped

  • 3029956
  • 04-Jan-2008
  • 27-Apr-2012

Environment

Novell SUSE Linux Enterprise Server 10
Novell SUSE Linux Enterprise Desktop 10
Novell openSUSE 10.X
Novell Open Enterprise Server 2 (Linux based)

Situation

  • DomU's need to be configured to shutdown when the Xend daemon is stopped or restarted
  • DomU's need to be configured to shutdown when Dom0 is stopped

Resolution


The result of following this TID is that the Xen virtual machines will be shutdown when the "xend" process on Dom0 is shutdown, or the system is halted, shutdown or rebooted.

For the purposes of this support TID, replace SLES10 with the name of your virtual machine

method 1: use xend configuration information
This method is the preferred method and is recommended by Novell.
  1. Shutdown the DomU
  2. Export the configuration of the Xen Domu
    xm list -l sles10>sles10.py
  3. Backup the file in step 1. You may need it if something goes wrong.
  4. Open the file for editing
  5. Locate the below line:
    (on_xend_stop ignore)
  6. Change it to:
    (on_xend_stop shutdown)
  7. Save the file
  8. Re-import the new configuration file:
    xm new -F sles10.py

method 2: use configuration file found in /etc/xen/vm
The files found in /etc/xen/vm are used primarily for the installation of the DomU. If you have used "YaST", "virt-manager" or "xm" commands to make hardware or configuration changes to the DomU, you must use method 1.
  1. Shutdown the DomU
  2. Go to /etc/xen/vm
    cd /etc/xen/vm
  3. Locate the configuration file for the DomU, it should be named the same as the DomU
  4. Back up the file
  5. Open the file for editing
  6. Add the following line
    on_xend_stop="shutdown"
  7. Save and close the file
  8. Re-import the new configuration file
    xm new -f sles10

Additional Information