* [Qemu-devel] Where is the VM live migration code?
@ 2014-11-18 0:10 Jidong Xiao
2014-11-18 1:29 ` Zhang Haoyu
0 siblings, 1 reply; 9+ messages in thread
From: Jidong Xiao @ 2014-11-18 0:10 UTC (permalink / raw)
To: KVM, qemu-devel
Hi,
I saw this page:
http://www.linux-kvm.org/page/Migration.
It looks like Migration is a feature provided by KVM? But when I look
at the Linux kernel source code, i.e., virt/kvm, and arch/x86/kvm, I
don't see the code for this migration feature.
So I wonder where is the source code for the live migration? Is it
purely implemented in user space? Because I see there are the
following files in the qemu source code:
migration.c migration-exec.c migration-fd.c migration-rdma.c
migration-tcp.c migration-unix.c
If I wish to understand the implementation of migration in Qemu/KVM,
are these above files the ones I should read? Thanks.
-Jidong
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Where is the VM live migration code?
2014-11-18 0:10 Jidong Xiao
@ 2014-11-18 1:29 ` Zhang Haoyu
2014-11-18 1:40 ` Jidong Xiao
0 siblings, 1 reply; 9+ messages in thread
From: Zhang Haoyu @ 2014-11-18 1:29 UTC (permalink / raw)
To: Jidong Xiao, KVM, qemu-devel
> Hi,
>
> I saw this page:
>
> http://www.linux-kvm.org/page/Migration.
>
> It looks like Migration is a feature provided by KVM? But when I look
> at the Linux kernel source code, i.e., virt/kvm, and arch/x86/kvm, I
> don't see the code for this migration feature.
>
Most of live migration code is in qemu migration.c, savevm.c, arch_init.c,
block-migration.c, and the other devices's save/load handler, .etc,
only log/sync dirty page implemented in kernel.
You can read the most important function migration_thread(),
process_incoming_migration_co().
> So I wonder where is the source code for the live migration? Is it
>purely implemented in user space? Because I see there are the
> following files in the qemu source code:
>
> migration.c migration-exec.c migration-fd.c migration-rdma.c
> migration-tcp.c migration-unix.c
>
> If I wish to understand the implementation of migration in Qemu/KVM,
> are these above files the ones I should read? Thanks.
>
> -Jidong
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Where is the VM live migration code?
2014-11-18 1:29 ` Zhang Haoyu
@ 2014-11-18 1:40 ` Jidong Xiao
0 siblings, 0 replies; 9+ messages in thread
From: Jidong Xiao @ 2014-11-18 1:40 UTC (permalink / raw)
To: Zhang Haoyu; +Cc: qemu-devel, KVM
On Mon, Nov 17, 2014 at 5:29 PM, Zhang Haoyu <zhanghy@sangfor.com> wrote:
>> Hi,
>>
>> I saw this page:
>>
>> http://www.linux-kvm.org/page/Migration.
>>
>> It looks like Migration is a feature provided by KVM? But when I look
>> at the Linux kernel source code, i.e., virt/kvm, and arch/x86/kvm, I
>> don't see the code for this migration feature.
>>
> Most of live migration code is in qemu migration.c, savevm.c, arch_init.c,
> block-migration.c, and the other devices's save/load handler, .etc,
> only log/sync dirty page implemented in kernel.
> You can read the most important function migration_thread(),
> process_incoming_migration_co().
>
Great, thanks Haoyu! I will try to understand these parts of code first.
-Jidong
>> So I wonder where is the source code for the live migration? Is it
>>purely implemented in user space? Because I see there are the
>> following files in the qemu source code:
>>
>> migration.c migration-exec.c migration-fd.c migration-rdma.c
>> migration-tcp.c migration-unix.c
>>
>> If I wish to understand the implementation of migration in Qemu/KVM,
>> are these above files the ones I should read? Thanks.
>>
>> -Jidong
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] Where is the VM live migration code?
@ 2017-08-02 10:54 Aditya Bhardwaj
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Bhardwaj @ 2017-08-02 10:54 UTC (permalink / raw)
To: qemu-devel
My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2:
installed with Virtualization using KVM on Redhat 6.5 System. On top of
this I am using libvirtd for managing virtual machines. NFS server is
installed on Server 3 for shared disk image. VM migration is working
correctly. Now i need to do some changes in "migration.c" but did not find
any source code of KVM-QEMU migration.
Where I can find the migration source code for KVM-QEMU. All are requested
to help me for this issue.
*Thank youWith Regards:Aditya Bhardwaj*
*Dept. of CSE *
*NITTTR (Ministry of MHRD, Govt. of India)*
*Sector-26, **Chandigarh - 160019 INDIA*
https://scholar.google.co.in/citations?user=rEHhEnEAAAAJ&hl=en
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] Where is the VM live migration code?
@ 2017-08-02 10:55 Aditya Bhardwaj
2017-08-02 12:18 ` Daniel P. Berrange
2017-08-02 12:49 ` Dr. David Alan Gilbert
0 siblings, 2 replies; 9+ messages in thread
From: Aditya Bhardwaj @ 2017-08-02 10:55 UTC (permalink / raw)
To: qemu-devel
My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2:
installed with Virtualization using KVM on Redhat 6.5 System. On top of
this I am using libvirtd for managing virtual machines. NFS server is
installed on Server 3 for shared disk image. VM migration is working
correctly. Now i need to do some changes in "migration.c" but did not find
any source code of KVM-QEMU migration.
Where I can find the migration source code for KVM-QEMU. All are requested
to help me for this issue.
*Thank youWith Regards:Aditya Bhardwaj*
*Dept. of CSE *
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Where is the VM live migration code?
2017-08-02 10:55 [Qemu-devel] Where is the VM live migration code? Aditya Bhardwaj
@ 2017-08-02 12:18 ` Daniel P. Berrange
2017-08-02 12:33 ` Eric Blake
2017-08-02 12:49 ` Dr. David Alan Gilbert
1 sibling, 1 reply; 9+ messages in thread
From: Daniel P. Berrange @ 2017-08-02 12:18 UTC (permalink / raw)
To: Aditya Bhardwaj; +Cc: qemu-devel
On Wed, Aug 02, 2017 at 04:25:08PM +0530, Aditya Bhardwaj wrote:
> My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2:
> installed with Virtualization using KVM on Redhat 6.5 System. On top of
> this I am using libvirtd for managing virtual machines. NFS server is
> installed on Server 3 for shared disk image. VM migration is working
> correctly. Now i need to do some changes in "migration.c" but did not find
> any source code of KVM-QEMU migration.
>
> Where I can find the migration source code for KVM-QEMU. All are requested
> to help me for this issue.
QEMU source code is in GIT
https://git.qemu.org/gitweb.cgi?p=qemu.git;a=summary
in the 'migration' directory.
If you're new writing code for QEMU then see this page too
https://wiki.qemu.org/index.php/Documentation/GettingStartedDevelopers
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Where is the VM live migration code?
2017-08-02 12:18 ` Daniel P. Berrange
@ 2017-08-02 12:33 ` Eric Blake
0 siblings, 0 replies; 9+ messages in thread
From: Eric Blake @ 2017-08-02 12:33 UTC (permalink / raw)
To: Daniel P. Berrange, Aditya Bhardwaj; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]
On 08/02/2017 07:18 AM, Daniel P. Berrange wrote:
> On Wed, Aug 02, 2017 at 04:25:08PM +0530, Aditya Bhardwaj wrote:
>> My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2:
>> installed with Virtualization using KVM on Redhat 6.5 System. On top of
>> this I am using libvirtd for managing virtual machines. NFS server is
>> installed on Server 3 for shared disk image. VM migration is working
>> correctly. Now i need to do some changes in "migration.c" but did not find
>> any source code of KVM-QEMU migration.
>>
>> Where I can find the migration source code for KVM-QEMU. All are requested
>> to help me for this issue.
>
> QEMU source code is in GIT
>
> https://git.qemu.org/gitweb.cgi?p=qemu.git;a=summary
>
> in the 'migration' directory.
>
> If you're new writing code for QEMU then see this page too
>
> https://wiki.qemu.org/index.php/Documentation/GettingStartedDevelopers
I've also got a patch pending to make the various qemu executables
provide a link to qemu.org as part of their --help output (which will in
turn make it easier to find links to the source code):
https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg09049.html
It needs some review if it's going to be part of 2.10.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Where is the VM live migration code?
2017-08-02 10:55 [Qemu-devel] Where is the VM live migration code? Aditya Bhardwaj
2017-08-02 12:18 ` Daniel P. Berrange
@ 2017-08-02 12:49 ` Dr. David Alan Gilbert
2017-08-02 12:53 ` Daniel P. Berrange
1 sibling, 1 reply; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2017-08-02 12:49 UTC (permalink / raw)
To: Aditya Bhardwaj; +Cc: qemu-devel
* Aditya Bhardwaj (adityaform@gmail.com) wrote:
> My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2:
> installed with Virtualization using KVM on Redhat 6.5 System. On top of
> this I am using libvirtd for managing virtual machines. NFS server is
> installed on Server 3 for shared disk image. VM migration is working
> correctly. Now i need to do some changes in "migration.c" but did not find
> any source code of KVM-QEMU migration.
>
> Where I can find the migration source code for KVM-QEMU. All are requested
> to help me for this issue.
Migration is quite big - so take a step back first and understand how
a migration works before diving into the code too far.
First I'd suggest going for something newer than 6.5 - it has a very
very old QEMU on it; If you can upgrade to a 7.x it'll make your life a
lot easier for building and working with current code.
The current QEMU has a whole migration/ subdirectory with quite a bit of
code, and there's also some kernel code that helps, and code in
individual devices.
Then there's also the code in libvirt that drives it.
A lot of code - so the trick is to figure out what you want to change
and then find the right place.
Dave
>
>
>
>
>
> *Thank youWith Regards:Aditya Bhardwaj*
> *Dept. of CSE *
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] Where is the VM live migration code?
2017-08-02 12:49 ` Dr. David Alan Gilbert
@ 2017-08-02 12:53 ` Daniel P. Berrange
0 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrange @ 2017-08-02 12:53 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: Aditya Bhardwaj, qemu-devel
On Wed, Aug 02, 2017 at 01:49:44PM +0100, Dr. David Alan Gilbert wrote:
> * Aditya Bhardwaj (adityaform@gmail.com) wrote:
> > My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2:
> > installed with Virtualization using KVM on Redhat 6.5 System. On top of
> > this I am using libvirtd for managing virtual machines. NFS server is
> > installed on Server 3 for shared disk image. VM migration is working
> > correctly. Now i need to do some changes in "migration.c" but did not find
> > any source code of KVM-QEMU migration.
> >
> > Where I can find the migration source code for KVM-QEMU. All are requested
> > to help me for this issue.
>
> Migration is quite big - so take a step back first and understand how
> a migration works before diving into the code too far.
> First I'd suggest going for something newer than 6.5 - it has a very
> very old QEMU on it; If you can upgrade to a 7.x it'll make your life a
> lot easier for building and working with current code.
>
> The current QEMU has a whole migration/ subdirectory with quite a bit of
> code, and there's also some kernel code that helps, and code in
> individual devices.
>
> Then there's also the code in libvirt that drives it.
>
> A lot of code - so the trick is to figure out what you want to change
> and then find the right place.
Might also be worth while to explain what problem with live migration
you are looking to solve, as it may well be that it has already been
examined / worked on by someone else, or people might have design
suggestions to avoid you wasting time down dead-ends.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-08-02 12:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 10:55 [Qemu-devel] Where is the VM live migration code? Aditya Bhardwaj
2017-08-02 12:18 ` Daniel P. Berrange
2017-08-02 12:33 ` Eric Blake
2017-08-02 12:49 ` Dr. David Alan Gilbert
2017-08-02 12:53 ` Daniel P. Berrange
-- strict thread matches above, loose matches on Subject: below --
2017-08-02 10:54 Aditya Bhardwaj
2014-11-18 0:10 Jidong Xiao
2014-11-18 1:29 ` Zhang Haoyu
2014-11-18 1:40 ` Jidong Xiao
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).