
On 09/11/2013 01:59 AM, Daniel P. Berrange wrote:
On Wed, Sep 11, 2013 at 09:47:07AM +0200, Paolo Bonzini wrote:
Il 11/09/2013 00:27, James Sparenberg ha scritto:
I'm doing some experimenting in our Development lab and as a result I'm kickstarting over and over Virtual guests. This is of course causing the guest Id to increment by one with each test. I've googled around and tried searching the list but have not found out how (if at all) it would be possible to reset the ID number back to 1 more than is in use. Also is there a limit where I run out of ID's? (for example does it only go up to 99?)
No, there is no limit.
Well, 'int' will wrap eventually, but you'd need to have created a hell of alot of guests for that to be a problem :-)
2**31 (~2 billion), to be exact, since we store it as a signed int, and I'm not sure if all the code paths handle a negative number gracefully (see src/datatypes.h:_virDomain). (Maybe we should have picked a 64-bit type, so that wraparound would not be possible within our lifetimes even with a process spawning guests as fast as possible on current computers - but even with a 32-bit number, it's going to take a lot of hammering to hit wraparound) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org