Searched refs:container (Results 1 - 23 of 23) sorted by relevance

/lxc/src/python-lxc/examples/
H A Dapi_test.py39 ## Instantiate the container instance
41 container = lxc.Container(CONTAINER_NAME) variable
44 assert(container.config_file_name == "%s/%s/config" %
46 assert(not container.defined)
47 assert(container.init_pid == -1)
48 assert(container.name == CONTAINER_NAME)
49 assert(not container.running)
50 assert(container.state == "STOPPED")
67 container.create("download", 0,
72 assert(container
[all...]
/lxc/src/python-lxc/
H A Dlxc.c121 * container. As lxc_attach() calls fork() PyOS_AfterFork should be called
432 struct lxc_container *container; member in struct:__anon21
438 lxc_container_put(self->container);
460 self->container = lxc_container_new(name, config_path);
461 if (!self->container) {
464 PyErr_Format(PyExc_RuntimeError, "%s:%s:%d: error during init for container '%s'.",
489 rv = self->container->config_file_name(self->container);
500 if (self->container->may_control(self->container)) {
[all...]
/lxc/src/lxc/
H A Dattach.h34 struct lxc_container *container; member in struct:lxc_proc_context_info
H A Dattach.c236 if (ctx->container)
237 lxc_container_put(ctx->container);
435 if (putenv("container=lxc")) {
686 i->container = c;
755 ERROR("Failed to get personality of the container.");
766 /* Determine which namespaces the container was created with
774 "namespaces which the container uses.");
858 * don't rely on any information from inside the container.
1173 SYSERROR("Switching to container gid.");
1179 SYSERROR("Switching to container ui
[all...]
/lxc/src/lua-lxc/
H A Dlxc.lua72 -- container class
73 container = {}
75 container_mt.__index = container
77 function container:new(lname, config)
94 function container:attach(what, ...)
98 function container:config_file_name()
102 function container:defined()
106 function container:init_pid()
110 function container:name()
114 function container
[all...]
/lxc/src/lua-lxc/test/
H A Dapitest.lua30 local container
63 log(0, "%-20s %s", "Creating container:", "yes")
82 container = lxc.container:new(optarg["n"])
83 assert(container ~= nil)
84 assert(container:config_file_name() == string.format("%s/%s/config", LXC_PATH, optarg["n"]))
92 log(0, "Test container config path...")
94 -- create a config file in the new location from container's config
96 assert(container:save_config(cfgname))
97 cfgcontainer = lxc.container
[all...]
/lxc/src/python-lxc/lxc/
H A D__init__.py39 def __init__(self, container, index):
40 self.container = container
43 for key in self.container.get_keys("lxc.network.%s" % self.index):
53 if key in ["container", "index", "props"]:
66 if key in ["container", "index", "props"]:
76 if key in ["container", "index", "props"]:
90 if key in ["container", "index", "props"]:
101 return self.container.clear_config_item("lxc.network.%s.%s" % (
104 return self.container
[all...]
/lxc/templates/
H A Dlxc-archlinux.in4 # template script for generating Arch Linux container for LXC
71 # Arch-specific preconfiguration for container
105 # override getty@.service for container ttys
142 "You may want to modify container's /etc/securetty \
147 # write container configuration files
159 echo "Failed to configure container"
165 # install packages within container chroot
183 echo "Failed to install container packages"
201 ${1} -n|--name=<container_name> [-p|--path=<path>] [-a|--arch=<arch of the container>]
207 -n,--name container nam
[all...]
H A Dlxc-slackware.in97 # /etc/rc.d/rc.inet1.conf and /etc/resolv.conf of the container
143 +# minor tweaks for an lxc container
147 +# a check for a container variable is made to jump sections
148 +container="lxc"
156 +# lxc container check
157 +if [ ! $container = "lxc" ]; then
166 +fi # end container check
175 +# lxc container check
176 +if [ ! $container = "lxc" ]; then
185 +fi # end container chec
[all...]
H A Dlxc-openmandriva.in4 # template script for generating openmandriva container for LXC
325 [-A|--arch=<arch of the container>]
328 -n,--name container name, used to as an identifier for that container from now on
330 -p,--path path to where the container rootfs will be created, defaults to @LXCPATH@. The container config will go under @LXCPATH@ in that case
332 -R,--release openmandriva2013.0/cooker/rosa2012.1 release for the new container. if the host is OpenMandriva, then it will default to the host's release.
339 -A,--arch Define what arch the container will be [i586,x86_64,armv7l,armv7hl]
412 echo "can't create x86_64 container on i586"
440 echo "A container wit
[all...]
H A Dlxc-download.in3 # Client script for LXC container images.
192 LXC container image downloader
201 [ -a | --arch <architecture> ]: Architecture of the container
213 [ --name <name> ]: The container name
214 [ --path <path> ]: The path to the container
215 [ --rootfs <rootfs> ]: The path to the container's rootfs
540 ## Add the container-specific config
H A Dlxc-centos.in4 # template script for generating CentOS container for LXC
47 # the root password after the container is created.
183 # the container "Cannot make/remove an entry for the specified session"
194 # we missed or any that get installed after the container is built.
280 env container
283 if [ "x\$container" != "xlxc" -a "x\$container" != "xlibvirt" ]; then
593 # interface in the container. This code will work for multiple
685 [-p|--path=<path>] [-c|--clean] [-R|--release=<CentOS_release>] [-a|--arch=<arch of the container>]
688 -n,--name container nam
[all...]
H A Dlxc-altlinux.in4 # template script for generating altlinux container for LXC
365 [-A|--arch=<arch of the container>]
368 -n,--name container name, used to as an identifier for that container from now on
370 -p,--path path to where the container rootfs will be created, defaults to @LXCPATH@. The container config will go under @LXCPATH@ in that case
372 -R,--release ALTLinux release for the new container. if the host is ALTLinux, then it will defaultto the host's release.
379 -A,--arch NOT USED YET. Define what arch the container will be [i686,x86_64]
471 echo "failed to configure altlinux for a container"
485 echo "container rootf
[all...]
H A Dlxc-alpine.in72 PKG Additional APK package(s) to install into the container.
75 -a ARCH, --arch=ARCH The container architecture (e.g. x86, x86_64); defaults
381 # Specify container architecture.
388 # Dropping sys_admin disables container root from doing a lot of things
505 To start the container, run "lxc-start -n $name".
506 The root password is not set; to enter the container run "lxc-attach -n $name".
H A Dlxc-debian.in119 # remove pointless services in a container
158 echo "Timezone in container is not configured. Adjust it manually."
241 # Since we use static-getty.target; we need to mask container-getty@.service generated by
242 # container-getty-generator, so we don't get multiple instances of agetty running.
245 for i in $(seq 0 "$num_tty"); do ln -sf /dev/null container-getty\@"${i}".service; done )
404 ## Add the container-specific config
438 # If the container isn't running a native architecture, setup multiarch
454 # Install Packages in container
505 -a, --arch=ARCH The container architecture. Can be one of: i686, x86_64,
592 echo "can't create $arch container o
[all...]
H A Dlxc-fedora.in4 # template script for generating fedora container for LXC
47 # the root password after the container is created.
155 # the container "Cannot make/remove an entry for the specified session"
166 # we missed or any that get installed after the container is built.
327 # scripts in the container.
389 # started on the ttys in the container. Lets do it in an override copy of
415 # Ultimate Objective - Build a Fedora container on a host system which does
1090 # interface in the container. This code will work for multiple
1184 [--fqdn=<network name of container>] [-a|--arch=<arch of the container>]
[all...]
H A Dlxc-sparclinux.in74 echo "Patching container rootfs $container_rootfs for Linux for SPARC $container_release_major.$container_release_minor"
76 # copy ourself into the container to be used to --patch the rootfs when
93 # "disable" selinux in the guest. The policy in the container isn't
120 # ensure /dev/ptmx refers to the newinstance devpts of the container, or
133 # relevant in a container
139 # disable readahead in the container
153 # disable udev in the container
202 echo "Configuring container for Linux for SPARC $container_release_major.$container_release_minor"
225 # this file has to exist for libvirt/Virtual machine monitor to boot the container
255 if [ "\$container"
[all...]
H A Dlxc-oracle.in3 # Template script for generating Oracle Enterprise Linux container for LXC
70 echo "Patching container rootfs $container_rootfs for Oracle Linux $container_release_major.$container_release_minor"
72 # copy ourself into the container to be used to --patch the rootfs when
107 # "disable" selinux in the guest. The policy in the container isn't
141 # ensure /dev/ptmx refers to the newinstance devpts of the container, or
148 # with newer systemd (OL7.2), getty service include container-getty.service
150 if [ ! -f $container_rootfs/usr/lib/systemd/system/container-getty@.service ]; then
153 # the ttys in the container. Lets do it in an override copy of the
209 # relevant in a container
215 # disable readahead in the container
[all...]
H A Dlxc-ubuntu.in4 # template script for generating ubuntu container for LXC
124 if [ ! -f $rootfs/etc/init/container-detect.conf ]; then
138 # make sure we have the current locale defined in the container
168 # finish setting up the user in the container by injecting ssh key and
202 # a parent container set the 50squid-deb-proxy-client file.
220 # Are we in a nested container, and the parent already knows of a proxy?
228 # Choose proxies for container
230 # APT_PROXY will be used to set /etc/apt/apt.conf.d/70proxy in the container.
324 echo "Container upgrade failed. The container cache may be out of date,"
528 ## Add the container
[all...]
H A Dlxc-plamo.in4 # template script for generating Plamo Linux container for LXC
258 # bind-mount the user's path into the container's /home
262 # copy /etc/passwd, /etc/shadow, and /etc/group entries into container
293 bindhome: bind <user>'s home into the container
329 echo "Can't create x86_64 container on x86."
360 echo "Failed to configure plamo $release for a container."
H A Dlxc-ubuntu-cloud.in3 # template script for generating ubuntu container for LXC based on released
88 ## Add the container-specific config
113 echo "Timezone in container is not configured. Adjust it manually."
135 [ -r | --release <release> ]: Release name of container, defaults to host
137 [ -a | --arch ]: Architecture of container, defaults to host architecture
238 $arch:$arch) : ;; # the host == container
243 *) echo "cannot create '$arch' container on hostarch '$hostarch'";
331 echo "Extracting container rootfs"
H A Dlxc-gentoo.in214 echo "# clean container shutdown on SIGPWR" >> "$INITTAB"
278 printf "##### container_setup(): starting container setup\n"
293 store_user_message "rootfs of container is : ${rootfs}"
294 store_user_message "config of container is : ${path}/config"
310 printf "###### container_setup(): container should be ready to start!\n"
312 printf "You could now use you container with: lxc-start -n %s\n" "${name}"
313 printf "little things you should know about your container:\n"
356 printf "#### container_consoles(): setting container consoles ...\n"
382 printf "#### container_tz(): setting container timezone ...\n"
391 #same target exists in container
[all...]
/lxc/src/lxc/tools/
H A Dlxc-top.lua139 local ct = lxc.container:new(v)

Completed in 49 milliseconds