[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] How to auto start DomU after reboot of Dom0?


  • To: xen-users@xxxxxxxxxxxxx
  • From: Carlos Ribas <carlos@xxxxxxx>
  • Date: Wed, 6 Feb 2013 11:18:55 -0200
  • Delivery-date: Wed, 06 Feb 2013 13:19:47 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hello all,

    I followed some tutorials to install Xen in a Debian Squeeze server. One of them [1] says to set up XENDOMAINS_RESTORE to false, because I can have problems with that. So, if my server shuts down or reboots how can I configure my VM to automatically start?

    Yesterday I did a quick script [2] that worked well, but I am not sure if it is the best way to do it. I would like to know what you do solve this issue.

[1] - http://wiki.debian.org/Xen#Other_configuration_tweaks

[2] - Script:

#!/bin/bash

# Start all the VMs from here
VMS="/etc/xen/*.cfg"

for vm in $VMS
do

  if [ -e "$vm" ]                      # Check if file exist
  then
    data="" '+%d/%m/%Y - %H:%M:%S'` # Current date/time (log purposes)
    echo "starting at: $data"
    /usr/sbin/xm create $vm            # Create VM
    sleep 15                           # Wait 15 sec to start the next
    echo
    continue                           # Next VM
  fi

  echo "Nothing to be done..."

done

exit 0


Regards,

-------------------------------
Carlos Eduardo Ribas

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.