From: Jacob Gorm Hansen Subject: Re: Cloning(making copies) of VMs Date: Tue, 8 Nov 2005 08:34:08 +0100 Message-ID: References: <83c5685b0511072225u40ba05c9t121ea92c942286a1@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <83c5685b0511072225u40ba05c9t121ea92c942286a1@mail.gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: sowmya dayanand Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 11/8/05, sowmya dayanand wrote: > (VM1 is a virtual machine, with ip addr 10.10.10.1, and we want to clone = it > as VM2, with ip addr 10.10.10.2) both running on the same physical machin= e. > > 1) Save VM1 as VM1_save (using xm save) > 2) copy VM1_save to VM2_save > 3) Change the vmid and the IP address info in the saved file to that of V= M2 > (Any other information to be changed ?) > 4) Restore VM1_save and VM2_save (using xm restore) The problem is that while you are probably sucessful in telling the host environment (xen + linux in domain0) that your cloned VM has IP 10.10.10.2, the Linux inside VM2 does not know that it is supposed to answer the new IP rather than 10.10.10.1, and will just silently drop all traffic on 10.10.10.2. It would probably be quite simple (and useful, see the Potemkin paper for instance) to have your domain answer any incoming IP, or to rewrite all ingoing and outgoing packets with a generic address, but you will need to hack either your guest Linux or the networking scripts in dom0 to make that happen. Best, Jacob