Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPHJq-0003kr-Pp for qemu-devel@nongnu.org; Tue, 20 Jan 2009 09:11:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPHJq-0003k4-72 for qemu-devel@nongnu.org; Tue, 20 Jan 2009 09:11:06 -0500 Received: from [199.232.76.173] (port=46572 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPHJp-0003jk-WD for qemu-devel@nongnu.org; Tue, 20 Jan 2009 09:11:06 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:59885) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPHJp-0004it-LN for qemu-devel@nongnu.org; Tue, 20 Jan 2009 09:11:05 -0500 Received: from mariner.uk.xensource.com ([10.80.2.22]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id n0KEB2Ul015035 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 20 Jan 2009 06:11:04 -0800 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.63) (envelope-from ) id 1LPHJm-0004yV-Ax for qemu-devel@nongnu.org; Tue, 20 Jan 2009 14:11:02 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18805.56182.331702.847162@mariner.uk.xensource.com> Date: Tue, 20 Jan 2009 14:11:02 +0000 Subject: Re: [Qemu-devel] [MIGRATION_TO_FILE_ALTERNATIVE] savevm/loadvm to/from a file In-Reply-To: <1232451317-16532-1-git-send-email-uril@redhat.com> References: <1232451317-16532-1-git-send-email-uril@redhat.com> From: Ian Jackson Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Uri Lublin writes ("[Qemu-devel] [MIGRATION_TO_FILE_ALTERNATIVE] savevm/loadvm to/from a file"): > Sometimes we do not want to save VM state internally (within the image). > For example raw images (and any other non qcow images) are not capable > of savevm'ing. This code is almost identical to the same code in our qemu-dm Xen tree. The only real difference is the umask call, and that our code takes its snapshot of vm_running after calling qemu_aio_flush. Ie, in our version the assignment I mark here as A is at location B: A > + int saved_vm_running = vm_running; ... > + f = qemu_fopen(filename, "wb"); ... > + qemu_aio_flush(); B > + vm_stop(0); I'm not sure exactly how relevant that is but it seems possible that qemu_aio_flush could stop the VM (eg due to the forthcoming stop-on-enospc patch). Modulo this one tiny change, I'm keen to see this go into qemu upstream. Ian.