[Lxc-users] Moving an lxc container from one host to another . . .
Nuno Seita[EmergeIT]
nuno.seita at emerge.pt
Thu Feb 28 08:32:12 UTC 2013
Hi Masood,
dont cp files around, just use tar with -C /final/destination/directory,
that way your telling tar where to unpack.
Hope it helps,
Regards
On 27-02-2013 19:12, Masood Mortazavi wrote:
> Hi Miroslav,
>
> Thank you very much. This worked.
>
> However, on the way, I discovered one other relevant point worth noting:
>
> When unpacking the tar of the lxc, it should be unpacked with
>
> tar --numeric-owner -xzvf lxc.tgz
>
> into its *final* destination (i.e. to the final resting place of all
> lxc's on the machine).
>
> Use of Linux "cp" to move the unpacked lxc to the final destination
> fails.
>
> Obviously "cp" doesn't have a "--numeric owner" option.
>
> Also, I observed that on my system I carried out all these steps as a
> sudo-er.
>
> Best regards,
> Masood
>
> On Tue, Feb 26, 2013 at 11:34 PM, Miroslav Lednicky
> <miroslav.lednicky at fnusa.cz <mailto:miroslav.lednicky at fnusa.cz>> wrote:
>
> Hello,
>
> You must use tar with option --numeric-owner
>
> for example:
>
> tar --numeric-owner -czvf lxc.tgz /lxc/my_lxc
>
> Best regards,
>
> Miroslav.
>
> Dne 27.2.2013 00:38, Masood Mortazavi napsal(a):
> > What is the best way to move an lxc container form one host to
> another?
> > On ubuntu, a simple tar of the container files, move and copy,
> doesn't
> > seem to work properly or reconstitute a container on the target host
> > with proper settings.
> > Man pages give very little information on this. (I can
> speculate that
> > one way is to create a specific template. However, it would be
> nice to
> > have an easier way / trick.)
> > - m.
> >
> >
> >
> ------------------------------------------------------------------------------
> > Everyone hates slow websites. So do we.
> > Make your web apps faster with AppDynamics
> > Download AppDynamics Lite for free today:
> > http://p.sf.net/sfu/appdyn_d2d_feb
> >
> >
> >
> > _______________________________________________
> > Lxc-users mailing list
> > Lxc-users at lists.sourceforge.net
> <mailto:Lxc-users at lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/lxc-users
> >
>
> --
> Miroslav Lednický,
> Fakultní nemocnice u sv. Anny v Brne(
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> <mailto:Lxc-users at lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
>
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130228/d01474b6/attachment.html>
More information about the lxc-users
mailing list