Chris Tyler wrote:
On Wed, 2007-07-18 at 11:28 -0400, Asrai khn wrote:
Hi I am wondering is there an easy way to configure domU (vm) quickly, atm we are using eg LV (Logical Volumes) to storge root, var and swap for VM and then using disk = [ 'phy:vg/myvmdisk1,sda1,w', ... ,... ] to launch it.
We takes the tar gunzip of file system of root, var of currently running vm and when need arrives we just have to created LVs and untar the achieves and launch the new vm with very little changes.
Only one problem in this approach is that we get little outdated vm which need to update using 'yum'. So is there a way to start new vm fast and using currently updated running vm file system?
Thanks. Askar.
You could use LVM snapshots. They're copy-on-write, so they can be created quickly. Of course, if you start a new VM on a snapshot of a running VM, then the filesystem will not be clean (it will look as though it was from a system that was turned off without being shutdown).
-- Chris Tyler http://dailypackage.fedorabook.com/
I've found an easy way is just to use dd.
dd if=/dev/VolGroup00/virtual-1 of=/dev/VolGroup00/virtual-2 bs=1M
I've tried LVM snapshots, but found that sometimes they seemed to run slowly, and if you made a copy of a copy, they ran even more slowly. Perhaps they work fine under some conditions, but they didn't for me. dd, however, has never failed me. Just remember to start it up in console mode first, and change the ip address. Also, (you probably know this, but), don't forget to change the mac address and uuid when you copy the xen config file (and rename the machine, too.)
Bill Jenkins CAIT, Western Illinois University