[Lxc-users] lxc configuration bug (was: Re: lxc-destroy erase rootfs)

Serge Hallyn serge.hallyn at ubuntu.com
Tue Feb 19 22:53:43 UTC 2013


Quoting Papp Tamas (tompos at martos.bme.hu):
> On 02/11/2013 04:11 AM, Serge Hallyn wrote:
> >
> > Agreed, please do get us precise reproduction steps so we can look into
> > it and fix it.
> 
> I'm sorry about the delay.
> I tested is again and I'm quite surprised, that you're right. If it's at the originial location, 
> then it just works fine.
> 
> >> If you can create it from scratch then you should be able to do whatever
> >> modifications you need and have it picked up the next time the container is
> >> stopped-started.
> 
> This was totally new to me.
> 
> Reproduce:
> 
> lxc version: 0.9.0.alpha2 (also true for older versions)
> Linux virt102 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 x86_64 x86_64 x86_64 
> GNU/Linux
> 
> 
> $ lxc-create -n ltest -t ubuntu
> $ mv /var/lib/lxc/ltest /data/lxc/ltest
> $ cd /data/lxc/ltest
> $ lxc-destroy -n ltest
> $ lxc-create -n ltest -f config

At this point, there will be a /var/lib/lxc/ltest/config which will
list lxc.rootfs = /var/lib/lxc/ltest/rootfs.  So these steps are not
quite what you want.

Perhaps you just want to

	sudo lxc-create -n ltest -t ubuntu
	sudo mkdir -p /data/lxc/ltest
	sudo mv /var/lib/lxc/ltest/rootfs /data/lxc/ltest/
	sudo sed -i 's/@/var/lib/lxc@/data/lxc@' /var/lib/lxc/ltest/config
	sudo lxc-start -n ltest
	[ check mac address ]
	sudo lxc-stop -n ltest
	[ change mac address in config ]
	sudo lxc-start -n ltest
	[ check mac address ]


> $ lxc-start -n ltest
> [ check mac address ]
> $ lxc-stop -n ltest
> [ change mac address in config ]
> $ lxc-start -n ltest
> [ check mac address ]
> 
> 
> Should I put it to launchpad?
> 
> tamas
> 
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
> is your hub for all things parallel software development, from weekly thought 
> leadership blogs to news, videos, case studies, tutorials, tech docs, 
> whitepapers, evaluation guides, and opinion stories. Check out the most 
> recent posts - join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users




More information about the lxc-users mailing list