From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrOhx-0005Y0-TT for qemu-devel@nongnu.org; Fri, 13 Dec 2013 04:06:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrOhs-0006dd-J5 for qemu-devel@nongnu.org; Fri, 13 Dec 2013 04:06:53 -0500 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:47926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrOhs-0006dG-CC for qemu-devel@nongnu.org; Fri, 13 Dec 2013 04:06:48 -0500 Received: by mail-ee0-f48.google.com with SMTP id e49so726849eek.7 for ; Fri, 13 Dec 2013 01:06:47 -0800 (PST) Date: Fri, 13 Dec 2013 10:06:43 +0100 From: Stefan Hajnoczi Message-ID: <20131213090643.GA2961@stefanha-thinkpad.redhat.com> References: <8DA.1o8hN.6n12v1yhCdr.1IfVRq@seznam.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8DA.1o8hN.6n12v1yhCdr.1IfVRq@seznam.cz> Subject: Re: [Qemu-devel] controlling qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: lukass.vacek@seznam.cz Cc: qemu-devel@nongnu.org On Mon, Dec 09, 2013 at 05:59:32PM +0100, lukass.vacek@seznam.cz wrote: > I want to implement library in c++, that will start and control QEMU. But I > dont know how to handle qemu and how to send signals to QEMU. Could you give > me at least some hint how to do that? Most management stacks and cloud frameworks seem to be using libvirt nowadays. And that's a good thing because a lot of work goes into libvirt to use the latest and greatest QEMU options, set up networking and firewalls, PCI passthrough, device hotplug, etc. So start by looking at http://libvirt.org/ to see if it meets your needs. If you really want to write your own library, learn the QEMU command-line and QMP monitor. See docs/qmp/qmp-spec.txt and scripts/qmp/qmp-shell for QMP examples. Also consider that writing your own library means you'll have to study the man pages and QEMU source code. Here is a very quick overview of QEMU to get you started: http://vmsplice.net/~stefan/qemu-code-overview.pdf Stefan