It's only illegal where only one copy of XP is owned. If you can ghost the same install to 10 machines, it's perfectly legal provided that you own a license for each machine.
XP doesn't always like being taken from machine to machine, unless the machines are identical. Of course, if they use the same product key, MS might add the key to WGA as pirated, which could be a problem.