* [Qemu-devel] Asynchronously Mirroring a Virtual Machine
@ 2010-12-22 12:43 Tomer Margalit
2010-12-23 2:34 ` Stefan Hajnoczi
0 siblings, 1 reply; 4+ messages in thread
From: Tomer Margalit @ 2010-12-22 12:43 UTC (permalink / raw)
To: qemu-devel; +Cc: scipioenterprises, Zaidenberg, Nezer, Nezer Zaidenberg
[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]
Hi,
I am a grad. student in Tel-Aviv university, and my theses is focused on
asynchronous mirroring.
I have already built asynchronous mirror software (which is composed of a
driver and a daemon), which works by setting up a virtual block device over
an existing one, and thus mirroring the existing one (asynchronously) to the
network using a window.
What I would like to add to it is the ability to asynchronously mirror a
(QEMU) VM as well, so that if the primary site crashes, the VM can be
restored (to the last stable point) immediately.
Since I want it to be as general as possible, I will not rely on my mirror,
but only on there being a virtual block device that is mirroring me (and
that has consistent writes (that is, if write A succeeded, and afterwards
write B succeeded, then if B is on the secondary site, then A must be there
too)), and that there is some kind of marking mechanism (so that I can mark
the last consistent state).
The reason I want to do this using QEMU is that it has live migration -
which is almost what I need.
Right now my plan is to treat the memory as a file, and put it and all the
vm images on the same mirroring block device.
Then, every minute or so, I will (stop the vm) sync the memory and disks,
and put a mark (where during the minute I will continue to write what I
can).
This sounds to me like doing a continuous "live migration", but never
actually moving the machine, and after finishing the migration on the side
that initiated it, not throwing away the dirty/clean pages (so that the
memory does not have to be moved completely again).
I would appreciate any direction and/or suggestions in this matter.
Also, I wondered where can I find some documentation about the whole
migration process - should I just read the code, or is there any document
about it?
Thanks,
Tomer
[-- Attachment #2: Type: text/html, Size: 2126 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Asynchronously Mirroring a Virtual Machine
2010-12-22 12:43 [Qemu-devel] Asynchronously Mirroring a Virtual Machine Tomer Margalit
@ 2010-12-23 2:34 ` Stefan Hajnoczi
2010-12-23 17:34 ` Tomer Margalit
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2010-12-23 2:34 UTC (permalink / raw)
To: Tomer Margalit
Cc: scipioenterprises, Zaidenberg, Nezer, qemu-devel,
Nezer Zaidenberg, Yoshiaki Tamura
On Wed, Dec 22, 2010 at 12:43 PM, Tomer Margalit
<tomermargalit@gmail.com> wrote:
> What I would like to add to it is the ability to asynchronously mirror a
> (QEMU) VM as well, so that if the primary site crashes, the VM can be
> restored (to the last stable point) immediately.
> Since I want it to be as general as possible, I will not rely on my mirror,
> but only on there being a virtual block device that is mirroring me (and
> that has consistent writes (that is, if write A succeeded, and afterwards
> write B succeeded, then if B is on the secondary site, then A must be there
> too)), and that there is some kind of marking mechanism (so that I can mark
> the last consistent state).
> The reason I want to do this using QEMU is that it has live migration -
> which is almost what I need.
> Right now my plan is to treat the memory as a file, and put it and all the
> vm images on the same mirroring block device.
Have you looked at Kemari for KVM (try searching qemu-devel)? It
builds a fault tolerance mechanism on top of live migration. Memory,
disk, and network changes are sent to a secondary machine which
passively tracks the state of the VM. You can fail over to the last
completed transaction state. Sounds similar to what you want to do.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Asynchronously Mirroring a Virtual Machine
2010-12-23 2:34 ` Stefan Hajnoczi
@ 2010-12-23 17:34 ` Tomer Margalit
2010-12-23 23:44 ` Stefan Hajnoczi
0 siblings, 1 reply; 4+ messages in thread
From: Tomer Margalit @ 2010-12-23 17:34 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: scipioenterprises, Zaidenberg, Nezer, qemu-devel,
Nezer Zaidenberg
[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]
Thanks, I will check it out.
Do you know of any documentation for the migration? (In case I need to look
at it).
Thanks,
Tomer
On Thu, Dec 23, 2010 at 4:34 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Wed, Dec 22, 2010 at 12:43 PM, Tomer Margalit
> <tomermargalit@gmail.com> wrote:
> > What I would like to add to it is the ability to asynchronously mirror a
> > (QEMU) VM as well, so that if the primary site crashes, the VM can be
> > restored (to the last stable point) immediately.
> > Since I want it to be as general as possible, I will not rely on my
> mirror,
> > but only on there being a virtual block device that is mirroring me (and
> > that has consistent writes (that is, if write A succeeded, and afterwards
> > write B succeeded, then if B is on the secondary site, then A must be
> there
> > too)), and that there is some kind of marking mechanism (so that I can
> mark
> > the last consistent state).
> > The reason I want to do this using QEMU is that it has live migration -
> > which is almost what I need.
> > Right now my plan is to treat the memory as a file, and put it and all
> the
> > vm images on the same mirroring block device.
>
> Have you looked at Kemari for KVM (try searching qemu-devel)? It
> builds a fault tolerance mechanism on top of live migration. Memory,
> disk, and network changes are sent to a secondary machine which
> passively tracks the state of the VM. You can fail over to the last
> completed transaction state. Sounds similar to what you want to do.
>
> Stefan
>
[-- Attachment #2: Type: text/html, Size: 2035 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] Asynchronously Mirroring a Virtual Machine
2010-12-23 17:34 ` Tomer Margalit
@ 2010-12-23 23:44 ` Stefan Hajnoczi
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2010-12-23 23:44 UTC (permalink / raw)
To: Tomer Margalit
Cc: scipioenterprises, Zaidenberg, Nezer, qemu-devel,
Nezer Zaidenberg
On Thu, Dec 23, 2010 at 5:34 PM, Tomer Margalit <tomermargalit@gmail.com> wrote:
> Thanks, I will check it out.
> Do you know of any documentation for the migration? (In case I need to look
> at it).
I'm not sure what you mean - commands for live migration or internals
of how migration works?
Migration:
1. Start QEMU on the destination host with exactly the same
command-line parameters as on the source host plus "-incoming
tcp::1234".
2. Switch to the QEMU monitor on the source host and use the "migrate
tcp:<destination-host>:<destination-port>" command.
To understand how migration works, see migration*.c in the source.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-23 23:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-22 12:43 [Qemu-devel] Asynchronously Mirroring a Virtual Machine Tomer Margalit
2010-12-23 2:34 ` Stefan Hajnoczi
2010-12-23 17:34 ` Tomer Margalit
2010-12-23 23:44 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).