David J Craigon
2009-Oct-13 00:57 UTC
[Xen-users] moving virtual machines from one computer to another
Hello, I suspect this is going to be a really easy question, but either I can''t find it or I suck at Google. Anyhow, I''ve got a virtual machine sat on machine A. I want to make a copy of it on machine B. I haven''t got any shared storage. I don''t want to do anything fancy like migration whilst keeping the virtual machines up. I just want a copy on B so I don''t have to reinstall it. I''m using files as the drive storage, not partitions. How? Thanks, David _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Brian Krusic
2009-Oct-13 01:27 UTC
Re: [Xen-users] moving virtual machines from one computer to another
If the img file for that domU is a sparse file, copy with the cp -- sparse option, rsync is rsync --sparse, scp doesn''t have a sparse option. I do it all the time. - Brian On Oct 12, 2009, at 5:57 PM, David J Craigon wrote:> Hello, > > I suspect this is going to be a really easy question, but either I > can''t find it or I suck at Google. > > Anyhow, I''ve got a virtual machine sat on machine A. I want to make a > copy of it on machine B. I haven''t got any shared storage. > > I don''t want to do anything fancy like migration whilst keeping the > virtual machines up. I just want a copy on B so I don''t have to > reinstall it. > > I''m using files as the drive storage, not partitions. > > How? > > Thanks, > > David > > _______________________________________________ > 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
David J Craigon
2009-Oct-13 08:18 UTC
Re: [Xen-users] moving virtual machines from one computer to another
Fair enough, I know how to copy files from one computer to the other. Which files do I need to copy though? If I copy the config file from /etc/xen, and the disk image file, is that enough? Do I need /var/lib/xen/boot_kernel.XXXXX and /var/lib/xen/boot_ramdisk.XXXXX. If I copy these three into place, is that it? David 2009/10/13 Brian Krusic <brian@krusic.com>:> If the img file for that domU is a sparse file, copy with the cp --sparse > option, rsync is rsync --sparse, scp doesn''t have a sparse option. > > I do it all the time. > > - Brian > > On Oct 12, 2009, at 5:57 PM, David J Craigon wrote: > >> Hello, >> >> I suspect this is going to be a really easy question, but either I >> can''t find it or I suck at Google. >> >> Anyhow, I''ve got a virtual machine sat on machine A. I want to make a >> copy of it on machine B. I haven''t got any shared storage. >> >> I don''t want to do anything fancy like migration whilst keeping the >> virtual machines up. I just want a copy on B so I don''t have to >> reinstall it. >> >> I''m using files as the drive storage, not partitions. >> >> How? >> >> Thanks, >> >> David >> >> _______________________________________________ >> 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
Fajar A. Nugraha
2009-Oct-13 12:10 UTC
Re: [Xen-users] moving virtual machines from one computer to another
On Tue, Oct 13, 2009 at 3:18 PM, David J Craigon <david@craigon.co.uk> wrote:> Fair enough, I know how to copy files from one computer to the other. > Which files do I need to copy though? If I copy the config file from > /etc/xen, and the disk image file, is that enough?Yes, assuming you copy the disk image file while domU is shut down.> Do I need > /var/lib/xen/boot_kernel.XXXXX and /var/lib/xen/boot_ramdisk.XXXXX.In general, no. Those temporary files are created by pygrub and will be re-created next time you start domU.> > If I copy these three into place, is that it?If you use the default setup, yes. If you have customized setup (e.g. use custom bridge, vlans, etc.) then you have to make sure those customization also exists on the new box. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users