From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: Re: VM id in KVM? Date: Mon, 23 Jul 2007 14:32:34 +0100 Message-ID: <20070723133234.GA31631@redhat.com> References: <46A48B63.2030202@qumranet.com> <46A48D0E.1040803@de.ibm.com> <46A48E65.6090105@qumranet.com> <46A48ECD.7020809@qumranet.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, kvm-devel To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <46A48ECD.7020809-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Mon, Jul 23, 2007 at 02:19:41PM +0300, Avi Kivity wrote: > Avi Kivity wrote: > > Carsten Otte wrote: > >> Avi Kivity wrote: > >>> From a Linux point of view, the pid identifies the VM. A > >>> management application can, however, use its own VM identifiers as > >>> it sees fit, and map the (possibly persistent, gloablly unique, and > >>> ridiculously long) VMID to the pid. > >> It might be preferable to have something that is persistent over > >> guest migration. Makes life easier for the management application as > >> far as I see. > > > > It may make sense to add a vmid to qemu (or to keep it in the > > management application entirely). Certainly the kernel doesn't need > > to know about it. > > > > I take it back. The only entity that can enforce uniqueness is the > management application, therefore that should be the entity that knows > about them. When managing QEMU & KVM guests, libvirt provides 3 identifiers with varying levels of uniqueness - ID - a integer unique amongst all active guests on a host - Name - a string uninque amongst all active & inactive guests on a host - UUID - 32 byte hex string unique globally We don't expose the PID directly of the QEMU binary directly. Name and UUID are both stable across migration - the ID changes upon migration. As Avi says I dont't see how a individual QEMU process could provide any meaningful identifier itself aside from its PID whose uniqueness is guarenteed by the OS on its behalf. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/