Using xen-create-image in a “restore from backup tgz” scenario.

xen-create-image  --dist option

can create your own distro (called option) hooks that might:

  • adjust the new ip address (add extra interfaces as on old machine)
  • restore the database from a proper dump

Don’t run the distro hooks (like lenny) that would destroy your carefully crafted old machine

Note that the --dist option is NOT ignored when you use --install tar option. You will need to make your own dist script set (on Debian, look in /usr/lib/xen-tools).

In addition, you can run extra scripts using the —role option. Roles can be combined: --role udev,pg_restore,etc

Note that the xen-create-image --config option takes a xen-tools config file, not a xen cfg file. Also, the —config option does not replace the “global” config file, it augments it.