On Fri, 2007-03-09 at 03:32 +0000, Daniel P. Berrange wrote:
The UUID for the default network is not included in the example
default
config. So every time you restart the libvirt_qemud we get a randomly
generated UUID. This isn't really in keeping with the idea of having a
permanent UID :-) So I think we need to do two things:
- In the 'make install' routine - if-and-only-if the
$prefix/etc/libvirt/networks/default.xml
file was newly installed, then stuff a random UUID into it, eg
UUID=`uuidgen`
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>,"
\
$prefix/etc/libvirt/networks/default.xml
If the system doesn't have uuidgen, we can just ignore this step
- In the RPM %post section we need to stuff in a UUID at install time
if-and-only-if this is a new install - ie leave it alone during upgrades
UUID=`uuidgen`
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>,"
\
%(sysconfdir)/libvirt/networks/default.xml
I'd have no problem with something like this. A little tricky to
implement, but it should be fine.
Cheers,
Mark.