LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 06-14-2011, 09:37 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
How to end a Linux Container (LXC) from within?


Linux Containers has a tool "lxc-stop" to stop a container. Is there a way to use that within the container itself? Or is it not necessary if all the processes within exit on their own?

I have some scripts that currently run just in a legacy chroot. But there are issues I believe Linux Containers will solve, such as setting up distinctive network access. I don't really want to run these like a full system, but just as a quick work task in a whole different context. There will be enough file tree to run what I need (already basically works using chroot). But these things run quick (under a minute in many cases), and I don't want to set up something on the outside to monitor when the task is done just to run "lxc-stop". I want to be able to have it start, and have a process exit back when it is done, just like chroot does. But I want to do this with the more advanced isolation of LXC.

So far all the documentation on this is more like treating it as a virtual machine. If there is any documentation that tells how to use LXC WITHOUT those tools (e.g. what setup do the tools themselves need to do), that might work if it's not too complicated (e.g. /proc or /sys settings would probably not be too complicated). Otherwise, how to do these things with the tools would be what I am looking for. They would not be running an init/rc scheme, but just the script for the task (pre-inserted into the tree, of course).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux-Vserver or lxc or anything else vishesh Linux - Server 2 11-19-2010 03:25 PM
LXer: Linux Distributor Interactive Ideas To Deliver Xandros' End-to-End Windows Alternatives To UK LXer Syndicated Linux News 0 09-16-2006 12:33 PM
LXer: Lenovo embeds Linux in high-end and low-end notebooks LXer Syndicated Linux News 0 08-10-2006 11:21 AM
LXer: Review: Buffalo LinkTheater High-Definition: A Linux Multimedia Center from End to End LXer Syndicated Linux News 0 04-13-2006 03:54 PM


All times are GMT -5. The time now is 01:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration