From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Blake Subject: Re: [libvirt-users] Questions on how to reset ID numbers for virt Guests. Date: Wed, 11 Sep 2013 12:40:12 -0600 Message-ID: <5230B90C.6080303@redhat.com> References: <522F9CD1.2020401@vudu.com> <52301FFB.20401@redhat.com> <20130911075944.GA23194@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SOup1gT9ndtOm946SO9lF0G3RaG6X2SiV" Cc: Paolo Bonzini , libvirt-users , James Sparenberg , "kvm@vger.kernel.org" To: "Daniel P. Berrange" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40443 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753989Ab3IKSkO (ORCPT ); Wed, 11 Sep 2013 14:40:14 -0400 In-Reply-To: <20130911075944.GA23194@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SOup1gT9ndtOm946SO9lF0G3RaG6X2SiV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --SOup1gT9ndtOm946SO9lF0G3RaG6X2SiV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSMLkMAAoJEKeha0olJ0NqF+wH/1SwSUPK7NrgUO3Jvp/Q/HX9 eqWuIiHL3HXa7sS0NLMvPNxF8fx/beb3NBTi+rkzTga5IToJJJ+kDyNTjmzV5/H1 3VcBLZ3szlJnmJX1EFtpqrsTrQ8WOCcBk6CnDS4Ji6OOXzfW0bHcbvcF/fQR8t93 Z4yrLvfsTh/J4NgFofTfAW0sYbC8TQZNN1gAFtkH/4km6drVAEZkL5pjpJutQFex uUbygSE4kgOPlFl8vTMZDqwIM5+mZcKVmaKkfkK4h2V3OR41wyNjqOq2BSe66jFt e1oqIY8o5FpSWlahckruW72boXtWyUDjkKzdlJ2VBjxtUG0GUtcltbTSnYYIvP4= =lr7y -----END PGP SIGNATURE----- --SOup1gT9ndtOm946SO9lF0G3RaG6X2SiV--