Hello All I am using Xen for implementation of a project. So Xen is installed on a 8-processor machine, XenoLinux is the guest OS configured to run on Domain1. A user process P1 is being executed on it. After time t1, I need to make a clone of this domain and make it run on domain 2 (not live migrate, but a clone). The clone running on domain 2, must behave as if it works independently of domain1. In short, I need something similar to fork. I hope i am making sense. Can anyone throw some light on this? Thanks Jaikumar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 10/18/05, jaikumar Ganesh <jaikumarg@gmail.com> wrote:> > Hello All > I am using Xen for implementation of a project. > > So Xen is installed on a 8-processor machine, XenoLinux is the guest OS > configured to run on Domain1. A user process P1 is being executed on it. > After time t1, I need to make a clone of this domain and make it run on > domain 2 (not live migrate, but a clone). The clone running on domain 2, > must behave as if it works independently of domain1. In short, I need > something similar to fork. > > I hope i am making sense. > Can anyone throw some light on this? > > Thanks > Jaikumar > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >Cloning a running guest OS on the fly, on the same server ? Is what you mean? -- benjamin rualthanzauva _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
You might find it usefull to look at the Potemkin Virtual Honeyfarm. They support cloning and they''re using Xen. I''m not totally sure what the status of the project is though. Mike On Oct 17, 2005, at 10:57 PM, jaikumar Ganesh wrote:> Hello All > I am using Xen for implementation of a project. > > So Xen is installed on a 8-processor machine, XenoLinux is the > guest OS configured to run on Domain1. A user process P1 is being > executed on it. After time t1, I need to make a clone of this > domain and make it run on domain 2 (not live migrate, but a clone). > The clone running on domain 2, must behave as if it works > independently of domain1. In short, I need something similar to fork. > > I hope i am making sense. > Can anyone throw some light on this? > > Thanks > Jaikumar > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> I need to make a clone of this domainRoughly : - pause & save - copy memory file & disks partitions/files - restart domain 1 - create a new configuration file for domain 2 (beware of MAC address duplication) - start domain 2 What I don''t know is how you can handle MAC & IP address duplication. Domain 2 will continue where domain 1 left, that is with exactly the same network hard & soft configuration. That will cause unsolvable conflicts. You''ll have either to reboot with a different network configuration or change it on the fly manually... Regards, -- Sylvain COUTANT ADVISEO http://www.adviseo.fr/ http://www.open-sp.fr/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Oct 18, 2005 at 04:30:56PM +0200, Sylvain Coutant wrote:> > I need to make a clone of this domain > > Roughly : > - pause & save > - copy memory file & disks partitions/files > - restart domain 1 > - create a new configuration file for domain 2 (beware of MAC address > duplication) > - start domain 2 > > What I don''t know is how you can handle MAC & IP address duplication. > Domain 2 will continue where domain 1 left, that is with exactly the > same network hard & soft configuration. That will cause unsolvable > conflicts. You''ll have either to reboot with a different network > configuration or change it on the fly manually...We''re doing something similar in our Potemkin honeyfarm work (mentioned earlier in this thread). In our initial implementation, we did basically exactly what you described, taking advantage of save & restore to implement cloning. Now, we''re using a customized version of Xen to do the cloning for us, and to share memory in copy-on-write fashion between the domains. I''m still updating it for the latest xen-unstable, though... Earlier, we discovered that it''s possible to specify a different MAC address when the domain is restored than what it was using when it shut down, and things seem to work without trouble. At the moment, though, we''re using a purely routed setup (each VM on a separate LAN segment), and so MAC address duplication isn''t a problem. For IP address duplication, we''re currently running a small daemon in the pre-cloned image that responds to requests (sent over the network) to switch IP addresses, then exits. We''d like to investigate other methods for switching the IP addresses on the fly. --Michael Vrable _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Michael, Sylvain and others.. Thanks for the replies.. It would be great if you could provide some more details.. a) How exactly do I copy the memory and files? Is there any built in command that will do that for us? b) Can I migrate between domains on the same machine ? Does Xen provide this support? c) It would be great if you could provide some more details about how you went about implementing cloning in Potemkin honeyfarm work ? You mentioned about a customized version of xen, that does it for you.. Is this available for use by others ( i am also using this for a research project in a university). d) It would also be great if you could provide us with some hints (or are there some hooks provided by Xen) to capture all the Xen calls made by domain 1 , so that we can replay them on another configuration on domain 2. Thanks Jaikumar On 10/18/05, Michael Vrable <mvrable@cs.ucsd.edu> wrote:> > On Tue, Oct 18, 2005 at 04:30:56PM +0200, Sylvain Coutant wrote: > > > I need to make a clone of this domain > > > > Roughly : > > - pause & save > > - copy memory file & disks partitions/files > > - restart domain 1 > > - create a new configuration file for domain 2 (beware of MAC address > > duplication) > > - start domain 2 > > > > What I don''t know is how you can handle MAC & IP address duplication. > > Domain 2 will continue where domain 1 left, that is with exactly the > > same network hard & soft configuration. That will cause unsolvable > > conflicts. You''ll have either to reboot with a different network > > configuration or change it on the fly manually... > > We''re doing something similar in our Potemkin honeyfarm work (mentioned > earlier in this thread). In our initial implementation, we did > basically exactly what you described, taking advantage of save & restore > to implement cloning. Now, we''re using a customized version of Xen to > do the cloning for us, and to share memory in copy-on-write fashion > between the domains. I''m still updating it for the latest xen-unstable, > though... > > Earlier, we discovered that it''s possible to specify a different MAC > address when the domain is restored than what it was using when it shut > down, and things seem to work without trouble. At the moment, though, > we''re using a purely routed setup (each VM on a separate LAN segment), > and so MAC address duplication isn''t a problem. > > For IP address duplication, we''re currently running a small daemon in > the pre-cloned image that responds to requests (sent over the network) > to switch IP addresses, then exits. We''d like to investigate other > methods for switching the IP addresses on the fly. > > --Michael Vrable > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sun, Oct 23, 2005 at 11:50:30PM -0500, jaikumar Ganesh wrote:> Hi Michael, Sylvain and others.. > Thanks for the replies.. > It would be great if you could provide some more details.. > > a) How exactly do I copy the memory and files? Is there any built in command > that will do that for us?There''s not a built-in command that will do this. For the Potemkin work, I hacked up an "xm fork" command that did some of the work, but this was only called as part of larger processing by the Potemkin control software, which was handling some of the work itself. Copying of memory was handled by "xm fork". Disk was not--in fact, we didn''t have disk working, and were using ramdisks.> b) Can I migrate between domains on the same machine ? Does Xen provide this > support?I''m not sure I quite understand how this fits in with the question above...do you mean migration in the sense of live migration as described at NSDI? Xen can migrate a domain to the same host, but that''s moving a domain back to the same machine, and not moving anything between domains per se. Can you explain better what it is you''re looking for?> c) It would be great if you could provide some more details about how you > went about implementing cloning in Potemkin honeyfarm work ? You mentioned > about a customized version of xen, that does it for you.. Is this available > for use by others ( i am also using this for a research project in a > university).I presented a paper at SOSP last week describing the work. The paper is linked to from my homepage, http://www.cs.ucsd.edu/~mvrable/. I can provide a snapshot of the code used for the paper, but it is based on an old version of Xen (from early August) and has some stability issues. I''m working on cleaning it up, but don''t have code to show for that yet.> d) It would also be great if you could provide us with some hints (or are > there some hooks provided by Xen) to capture all the Xen calls made by > domain 1 , so that we can replay them on another configuration on domain 2.I can''t help you here. Depending upon what it is you need, some of the work with ReVirt may be applicable (you should be able to search around for the papers describing it--it''s work out of Peter Chen''s group at the University of Michigan, but I don''t have links handy). ReVirt wasn''t written for Xen, but is being ported to Xen. Sorry for the slow reply; I was at SOSP last week (presenting Potemkin), and haven''t yet made it back home. --Michael Vrable _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users