From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: How to do an automated backup? Date: Thu, 06 Nov 2008 17:48:30 +0200 Message-ID: <491311CE.7060904@redhat.com> References: <490F51CD.8050505@kmbc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Steve Lorimer Return-path: Received: from mx2.redhat.com ([66.187.237.31]:38346 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743AbYKFPsh (ORCPT ); Thu, 6 Nov 2008 10:48:37 -0500 In-Reply-To: <490F51CD.8050505@kmbc.edu> Sender: kvm-owner@vger.kernel.org List-ID: Steve Lorimer wrote: > Ok, should be a simple question here: How to backup a KVM host image. > > My first plan - failure: > 1) Suspend / hibernate (using virsh ... save) image to disk > 2) Backup vm disk image & suspend file > 3) Backup .xml > 4) Restore suspended image > This would accomplish a backup that could be reactivated very quickly > as bootup would not even be required. > However, in testing it failed. Of two VM's tried, one worked, but the > other one never came back up. The network interface never reenabled > and this system itself sat maxing out it's cpu core until manually > terminated. > That's a bug. If you can reproduce this on the latest kvm, and provide instructions for us on how to reproduce this, we will try to fix it. > My second plan: > 1) Use virsh to shutdown the VM > 2) Backup vm file & xml > 3) Start vm (regular bootup) > This takes longer, but can be tolerated in order to get a backup. > However, this fails also: > virsh -c qemu:///system shutdown kvmtest > The command fails to send any kind of shutdown request to the VM > guest. As a result, the only thing that works is to kill it (the > virsh command for that does work). However, this is not acceptable > for a backup. > > Nothing out of the ordinary in my system setup: > VM Server: Ubuntu Server > Guest OS's: Also Ubuntu > > Any thoughts, advice? If your backing store supports snapshots (btrfs, lvm) you could create a snapshot while the guest is running, and backup the snapshot. The integrity of the backup depends on whether the guest is able to recover from restarts. -- error compiling committee.c: too many arguments to function