The new virtual machine manager in Centos 5.1 displays some weird behavior here and I assume it's because the UUID of one running VM is the same as of a VM that is shut down. I used the same config file template for creating all my test VMs, so several have the same UUID. Didn't produce any problems with xm. But the new VM manager in Gnome shows active and inactive VMs and identifies them by UUID, which results in it trying to mix the status etc. of the active and of the inactive VM. How can I generate a new UUID? I assume there's some checksum in it, so that I can't just make one up?
Kai
On Dec 18, 2007 3:56 PM, Kai Schaetzl maillists@conactive.com wrote:
The new virtual machine manager in Centos 5.1 displays some weird behavior here and I assume it's because the UUID of one running VM is the same as of a VM that is shut down. I used the same config file template for creating all my test VMs, so several have the same UUID. Didn't produce any problems with xm. But the new VM manager in Gnome shows active and inactive VMs and identifies them by UUID, which results in it trying to mix the status etc. of the active and of the inactive VM. How can I generate a new UUID? I assume there's some checksum in it, so that I can't just make one up?
In my experience, at least with Xen, is that you can generate the UUID yourself. It suppose to be a unique number that identifies a VM.
Regards, Tim
On Tue, 18 Dec 2007, Kai Schaetzl wrote:
How can I generate a new UUID? I assume there's some checksum in it, so that I can't just make one up?
When I use a configuration file as a template, I always remove the uuid line entirely and let Xen generate it. I've been doing this for a little over a year and have never had any problems because of it.
Steve
On Dec 18, 2007 4:25 PM, Steve Thompson smt@vgersoft.com wrote:
On Tue, 18 Dec 2007, Kai Schaetzl wrote:
How can I generate a new UUID? I assume there's some checksum in it, so that I can't just make one up?
When I use a configuration file as a template, I always remove the uuid line entirely and let Xen generate it. I've been doing this for a little over a year and have never had any problems because of it.
I do the same for the MAC addresses too.
Steve
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Steve Thompson wrote on Tue, 18 Dec 2007 10:25:30 -0500 (EST):
When I use a configuration file as a template, I always remove the uuid line entirely and let Xen generate it.
So, I would destroy the machine, remove the UUID from the config file and then restart the VM and it writes a new one to it? Or does it just generate a runtime UUID?
Kai
On Tue, 18 Dec 2007, Kai Schaetzl wrote:
Steve Thompson wrote on Tue, 18 Dec 2007 10:25:30 -0500 (EST):
When I use a configuration file as a template, I always remove the uuid line entirely and let Xen generate it.
So, I would destroy the machine, remove the UUID from the config file and then restart the VM and it writes a new one to it? Or does it just generate a runtime UUID?
Just remove the UUID from the config file and start the VM; no need to destroy it. It just generates a runtime UUID; the config file does not get modified.
Steve
Steve Thompson wrote on Tue, 18 Dec 2007 11:42:53 -0500 (EST):
Just remove the UUID from the config file and start the VM; no need to destroy it.
Well, I had to shut it down before it could use a different UUID. That's what I meant. I removed the UUID from all config files now, thanks for the tip!
Kai
Kai Schaetzl wrote:
Steve Thompson wrote on Tue, 18 Dec 2007 11:42:53 -0500 (EST):
Just remove the UUID from the config file and start the VM; no need to destroy it.
Well, I had to shut it down before it could use a different UUID. That's what I meant. I removed the UUID from all config files now, thanks for the tip!
Kai
I use uuidgen to generate a random uuid, and then use this python script to generate a random mac address.
I think this was on a help page somewhere that I stumbled across.
#! /usr/bin/python # macgen.py script generates a MAC address for Xen guests # import random mac = [ 0x00, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff) ] print ':'.join(map(lambda x: "%02x" % x, mac))