From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Duffy Subject: Re: VM config file Date: Wed, 01 Jul 2009 11:22:37 -0500 Message-ID: <4A4B8D4D.5090300@messageone.com> References: <8b8dd4340907010715q5357421fs12c913a9e1a2f108@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: zhq527725@gmail.com To: kvm@vger.kernel.org Return-path: Received: from main.gmane.org ([80.91.229.2]:51246 "EHLO ciao.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752549AbZGAQWk (ORCPT ); Wed, 1 Jul 2009 12:22:40 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MM2Zz-0005u0-0D for kvm@vger.kernel.org; Wed, 01 Jul 2009 16:22:39 +0000 Received: from 143.166.197.6 ([143.166.197.6]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jul 2009 16:22:38 +0000 Received: from Charles_Duffy by 143.166.197.6 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jul 2009 16:22:38 +0000 In-Reply-To: <8b8dd4340907010715q5357421fs12c913a9e1a2f108@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Zhang Qian wrote: > I'd like to know if there is a configuration file for each KVM virtual > machine? I can define a domain by "virsh define" command, but where > the configuraiton parameters are persisted for the VM? virsh is not a part of kvm, but rather libvirt; you should ask for support for it on the libvirt mailing list. That said -- you can list defined VMs through "virsh list --all", edit them through "virsh edit", and dump their XML via "virsh dumpxml". The config files are kept in /etc/libvirt/qemu, but you SHOULD NOT edit them directly -- just like /etc/sudoers should be edited only through visudo, /etc/libvirt/qemu/* should be edited only through libvirt methods (which can be accessed through the virsh command); this makes sure libvirtd is always aware of any changes, and prevents invalid configuration from ever being written to disk.