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=`date ''+%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@lists.xen.org http://lists.xen.org/xen-users
Alexandre Kouznetsov
2013-Feb-06 15:23 UTC
Re: How to auto start DomU after reboot of Dom0?
Hello. El 06/02/13 07:18, Carlos Ribas escribió:> 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?That option has to do with Xen''s feature to save/restore the domains, instead of shutdown/startup. A close equivalent in baremetal computing would be suspend/resume.> 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.Squeeze''s Xend provides a very simple way to autostart the domains, regardless they was saved or shot down. Check /etc/defaults/xendomains file, it''s heavily commented, particularly XENDOMAINS_AUTO section. Note that you will have to create the directory /etc/xen/auto manually. I usually put there symbolic links to config files (that are stored directly under /etc/xen), instead of the configuration files themselves. Greetings. -- Alexandre Kouznetsov
Muzaffer Tolga Ozses
2013-Feb-06 16:06 UTC
Re: How to auto start DomU after reboot of Dom0?
You could also start them using cron like below: @reboot xm create vm.cfg Regards M myPhone''dan gönderdim 6 Şub 2013 tarihinde 17:28 saatinde, Alexandre Kouznetsov <alk@ondore.com> şunları yazdı:> Hello. > > El 06/02/13 07:18, Carlos Ribas escribió: >> 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? > That option has to do with Xen''s feature to save/restore the domains, instead of shutdown/startup. A close equivalent in baremetal computing would be suspend/resume. > >> 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. > Squeeze''s Xend provides a very simple way to autostart the domains, regardless they was saved or shot down. Check /etc/defaults/xendomains file, it''s heavily commented, particularly XENDOMAINS_AUTO section. Note that you will have to create the directory /etc/xen/auto manually. > I usually put there symbolic links to config files (that are stored directly under /etc/xen), instead of the configuration files themselves. > > Greetings. > > -- > Alexandre Kouznetsov > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users
Hello, As I thought, there is a simple way to do it. Thanks Alexandre! Muzaffer, we have only to check if xend starts first, if not this will not work. Probably a "sleep" helps. Thank you. Regards, ------------------------------- Carlos Eduardo Ribas 2013/2/6 Muzaffer Tolga Ozses <tolga@ozses.net>> You could also start them using cron like below: > > @reboot xm create vm.cfg > > Regards > M > > myPhone''dan gönderdim > > 6 Şub 2013 tarihinde 17:28 saatinde, Alexandre Kouznetsov > <alk@ondore.com> şunları yazdı: > > > Hello. > > > > El 06/02/13 07:18, Carlos Ribas escribió: > >> 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? > > That option has to do with Xen''s feature to save/restore the domains, > instead of shutdown/startup. A close equivalent in baremetal computing > would be suspend/resume. > > > >> 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. > > Squeeze''s Xend provides a very simple way to autostart the domains, > regardless they was saved or shot down. Check /etc/defaults/xendomains > file, it''s heavily commented, particularly XENDOMAINS_AUTO section. Note > that you will have to create the directory /etc/xen/auto manually. > > I usually put there symbolic links to config files (that are stored > directly under /etc/xen), instead of the configuration files themselves. > > > > Greetings. > > > > -- > > Alexandre Kouznetsov > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xen.org > > http://lists.xen.org/xen-users > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users