qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Live VM backup


From: Fam Zheng
Subject: Re: [Qemu-discuss] Live VM backup
Date: Wed, 30 Aug 2017 17:58:57 +0800
User-agent: Mutt/1.8.3 (2017-05-23)

On Wed, 08/30 11:45, Vincenzo Romano wrote:
> 2017-08-30 11:40 GMT+02:00 Fam Zheng <address@hidden>:
> > On Wed, 08/30 11:16, Vincenzo Romano wrote:
> >> 2017-08-30 10:53 GMT+02:00 Fam Zheng <address@hidden>:
> >> > On Wed, 08/30 08:17, Vincenzo Romano wrote:
> >> >> Il 30 ago 2017 05:19, "Fam Zheng" <address@hidden> ha scritto:
> >> >>
> >> >> On Tue, 08/29 18:32, Vincenzo Romano wrote:
> >> >> > I'd like to move away from "another virtualization solution" to QEmu.
> >> >> > I've more or less all the needed bits in my hands in order to define,
> >> >> > run and manage QEmu VMs.
> >> >> > What I am missing is the knowledge of how to backup a live VM.
> >> >> > Of course, if I shutdown the VM, I can simply copy its files and the
> >> >> > startup script on another QEmu host.
> >> >> > But my main objective is to do the backup while the VM is running.
> >> >> > I think I could use the snapshot feature, but have no idea on how to
> >> >> proceed.
> >> >> > Any hint?
> >> >>
> >> >> In short, just do what libvirt would do: use QMP and send 'drive-backup'
> >> >> command.
> >> >>
> >> >> This is a very good howto:
> >> >>
> >> >> https://github.com/qemu/qemu/blob/master/docs/interop/live-b
> >> >> lock-operations.rst
> >> >>
> >> >> Fam
> >> >>
> >> >>
> >> >> Thanks.
> >> >> I presume there's a 'drive-restore', though I need to look better in the
> >> >> docs.
> >> >>
> >> >> Is there any side effect in case the CPU where the VM will be restored 
> >> >> is
> >> >> not exactly the same as the one where the VM got backed up?
> >> >
> >> > No, there isn't a 'drive-restore'. 'drive-backup' only takes care of the 
> >> > disks,
> >> > so the CPU, ram and device states aren't saved.
> >> >
> >> > If you boot from the backup image, CPU and ram are restarted from 
> >> > powered off
> >> > state, so what happens is effectively like a power loss at the point of
> >> > 'drive-backup': anything not saved to disk are lost.
> >> >
> >> > Fam
> >>
> >> I understand.
> >>
> >> So, if I haven't miunderstood, at the moment QEmu-KVM doesn't
> >> implement  "VM snapshots".
> >
> > It does. There are "savevm" and "migrate" (or "migrate -b") that can save 
> > the
> > CPU/ram etc:
> >
> > https://www.linux-kvm.org/page/Migration#savevm.2Floadvm_to_an_external_state_file_.28using_pseudo-migration.29
> >
> > Fam
> 
> Thanks again, Fam.
> 
> So I should issue both QMP commands, in theory, with the VM in a
> frozen state. Right?

I think with "savevm", your VM is automatically paused when the command is being
handled. The "migrate -b 'exec: ...'" way is an alternative and doesn't need the
VM to stop, which should be better.

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]