XEN3 domU Clone Utility
Novell Cool Solutions: Cool Tool
Allows users to easily clone XEN domU's.
|Posted:||6 Sep 2006|
Please read the note from our friends in legal before using this file.
This tool has only been tested with SLES10 domU's on a host SLES10 system.
With the advent of server visualisation; the idea of cloning a base installation is a key component that is current left out of xm command library. Add to that the need to modify the Hostname, MAC Address and IP Address of the network adapters and you are left with a labour intensive and tedious task.
Therefore, I created xmclone.sh to do nearly all of the work. xmclone.sh does most of the error checking and has some basic intelligence, but because of the limitations of BASH scripting and the complexities that could arise in the XEN configurations, I have made some basic assumptions (which to be honest are based on my current configurations):
- The XEN domU configuration files are stored at: /etc/xen/vm
- The XEN domU images are stored at: /xen
- The XEN domUs are configured using a single NIC which uses the Default Bridge.
- And therefore each XEN domU has a single IP address.
- The user is an systems administrator and is not TRYING to break it!
(The XEN domU configuration files and image locations can be change by either command line switches or editing the script itself.)
By using ./xmclone.sh --help, you can see all the available parameters. If any of these parameters are missing or incorrect, the script will ask/look for user interaction to correct the values.A useful switch is the -d switch. It will only copy the configuration and image files without making any modifications to the Hostname, MAC address or IP address. This can be used for complex configurations that a script can not handle.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com