All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Questions on how to reset ID numbers for virt Guests.
@ 2013-09-10 22:27 James Sparenberg
  2013-09-11  7:47 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: James Sparenberg @ 2013-09-10 22:27 UTC (permalink / raw
  To: kvm@vger.kernel.org

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?)

-- 
James Sparenberg
Sys Admin III Linux
Vudu Inc a Walmart Company

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Questions on how to reset ID numbers for virt Guests.
  2013-09-10 22:27 Questions on how to reset ID numbers for virt Guests James Sparenberg
@ 2013-09-11  7:47 ` Paolo Bonzini
  2013-09-11  7:59   ` [libvirt-users] " Daniel P. Berrange
  0 siblings, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2013-09-11  7:47 UTC (permalink / raw
  To: James Sparenberg; +Cc: kvm@vger.kernel.org, libvirt-users

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.

I don't know the answer to your other question, so I'm adding the
libvirt-users mailing list.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [libvirt-users] Questions on how to reset ID numbers for virt Guests.
  2013-09-11  7:47 ` Paolo Bonzini
@ 2013-09-11  7:59   ` Daniel P. Berrange
  2013-09-11 18:32     ` James Sparenberg
  2013-09-11 18:40     ` Eric Blake
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2013-09-11  7:59 UTC (permalink / raw
  To: Paolo Bonzini; +Cc: James Sparenberg, libvirt-users, kvm@vger.kernel.org

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 :-)

> I don't know the answer to your other question, so I'm adding the
> libvirt-users mailing list.

If you restart libvirtd, it reset itself to start allocating IDs
at the max current used ID of any running guest.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [libvirt-users] Questions on how to reset ID numbers for virt Guests.
  2013-09-11  7:59   ` [libvirt-users] " Daniel P. Berrange
@ 2013-09-11 18:32     ` James Sparenberg
  2013-09-11 18:40     ` Eric Blake
  1 sibling, 0 replies; 5+ messages in thread
From: James Sparenberg @ 2013-09-11 18:32 UTC (permalink / raw
  Cc: libvirt-users, kvm@vger.kernel.org

Ok.  and trust me right now it feels like my experiments will hit the wrap number ;).  As for the other part.  Thanks, now when my boss takes a look and panics I've got an answer. ;)  I really appreciate the help.

James Sparenberg
Sys Admin III Linux
Vudu Inc a Walmart Company

On 09/11/2013 12: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 :-)



I don't know the answer to your other question, so I'm adding the
libvirt-users mailing list.



If you restart libvirtd, it reset itself to start allocating IDs
at the max current used ID of any running guest.


Daniel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [libvirt-users] Questions on how to reset ID numbers for virt Guests.
  2013-09-11  7:59   ` [libvirt-users] " Daniel P. Berrange
  2013-09-11 18:32     ` James Sparenberg
@ 2013-09-11 18:40     ` Eric Blake
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Blake @ 2013-09-11 18:40 UTC (permalink / raw
  To: Daniel P. Berrange
  Cc: Paolo Bonzini, libvirt-users, James Sparenberg,
	kvm@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-11 18:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 22:27 Questions on how to reset ID numbers for virt Guests James Sparenberg
2013-09-11  7:47 ` Paolo Bonzini
2013-09-11  7:59   ` [libvirt-users] " Daniel P. Berrange
2013-09-11 18:32     ` James Sparenberg
2013-09-11 18:40     ` Eric Blake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.