LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Blogs > hardwyrd
User Name
Password

Notices

Rate this Entry

Quick way to start Xen virtual machines on bootup

Posted 08-01-2008 at 11:25 PM by hardwyrd

Just a quick tip.

Youíre using SuSE Linux Enterprise Server 10 and you are using virtualization with Xen with a couple of virtual machines (DomU) and you are quite happy with how everything turned out. SLES10 is running ok, Xen works fine, DomUís are healthy and serving as they should. Then again, you need to do a maintenance task and will need to reboot your machine. Then suddenly you found out that you need to manually start all your virtual machines manually! ACK!

Here are some quick steps to follow to make sure that your VMs go up and running as soon as your host OS gets up and running too.


1. On SLES10 terminal, go to /etc/xen/vm
mybox:~ # cd /etc/xen/vm
2. All the definition files for your virtual machines are located there. You can then just copy all the files to /etc/xen/auto
mybox:/etc/xen/vm # cp * /etc/xen/auto/
This is the old way of making your virtual machines start up automatically. Novell experts recommend using the xm command to make your virtual machine automatically start up. Though itís a bit tedious but it works on the latest SLES10 builds. And you have to repeat the steps for every virtual machine that you want to automatically start up.

Using xm, we will first export our existing (and running) config for one of our DomU (virtual machine) to a text config.
mybox:~ # xm list -l yourVM > yourVM_config
Make sure that you have a backup of the exported config before editing.
mybox:~ # cp yourVM_config yourVM_config.backup
Edit your VM config using vi and look for the following parameters:

(on_xend_start ignore)
(on_xend_stop ignore)
and change them to

(on_xend_start start)
(on_xend_stop shutdown)
Save your file, then letís export it back to our Xen server using the following command:
mybox:~ # xm new -F yourVM_config
Thatís all there is to it. However, if you have 5 other virtual machines running, you will need to repeat these steps for each.

What I did is I combined the former step (using /etc/xen/auto) with the latter steps. So far, my VMs are all up and about when the host SLES10 finishes loading.

Regards and safe journey. Enjoy!


Originally posted at http://baudizm.blogsome.com .
Posted in Uncategorized
Views 847 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 10:59 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration