Skip to content

Instantly share code, notes, and snippets.

@peo3
peo3 / gist:3464550
Created August 25, 2012 12:02
cgroup-utils: git diff v0.3..v0.4 --stat
$ git diff v0.3..v0.4
.gitignore | 4 +
Changelog | 14 ++++
Changelog.md | 10 +++
README | 195 ++++++++++++++++++++++++++++++++++++++++++++++++-
README.md | 30 +++++---
README.rst | 180 ---------------------------------------------
cgutils/cgroup.py | 449 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------
cgutils/command.py | 11 +--
cgutils/commands/__init__.py | 2 +
@peo3
peo3 / config-3.7.4-204.vbox.fc18.x86_64
Created February 6, 2013 17:19
A configuration for a small custom kernel of Fedora 18 on VirtualBox.
# x86_64
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.7.4-204.vbox.fc18.x86_64 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@peo3
peo3 / try_virt-sandbox.sh
Last active December 12, 2015 08:39
How to try virt-sandbox on Ubuntu 12.10.
sudo aptitude install autoconf
sudo aptitude install libtool
sudo aptitude install libcap-ng-dev
sudo aptitude install libvirt-glib-1.0-dev
sudo aptitude install libglib2.0-dev
sudo aptitude install libglib2.0
sudo aptitude install libxml2-dev
sudo aptitude install libselinux-dev
sudo aptitude install gtk-doc-tools
sudo aptitude install libvirt-bin
@peo3
peo3 / config-3.8.2-206.vbox.fc18.x86_64
Created March 12, 2013 16:12
A sample configuration of a minimal x86_64 kernel with user namespace for VirtualBox.
# x86_64
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.8.2 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@peo3
peo3 / config-3.8.3-201.vbox.fc18.x86_64
Last active December 15, 2015 01:29
A sample configuration of a minimal x86_64 kernel with user namespace for VirtualBox.
# x86_64
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.8.3-201.vbox.fc18.x86_64 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@peo3
peo3 / gist:5181258
Last active December 15, 2015 01:39
How to build a custom kernel of Fedora 18 with enabling user namespace

How to enable user namespace in 3.8 kernels

The user namespace, which is a important piece of Linux containers, has been merged into the mainline of the kernel since 3.8. However, it implementation is still incomplete for some components of the kernel. Hence, to enable the feature we need to disable some features: network filesystems and XFS.

@peo3
peo3 / vboxsf_utils.patch
Created March 18, 2013 16:45
A patch to compile vboxsf.ko for 3.8.x kernel with user namespace enabled.
--- vboxsf/utils.c.orig 2013-03-19 01:32:18.189109241 +0900
+++ vboxsf/utils.c 2013-03-19 01:38:19.403778661 +0900
@@ -144,8 +144,13 @@
#endif
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) && defined(CONFIG_UIDGID_CONVERTED)
+ inode->i_uid = make_kuid(&init_user_ns, sf_g->uid);
+ inode->i_gid = make_kgid(&init_user_ns, sf_g->gid);
+#else
@peo3
peo3 / vmware.repo
Last active December 16, 2015 07:58
vmware-tools repository for CentOS 6.x
[vmware-tools]
name=VMware Tools for Red Hat Enterprise Linux $releasever – $basearch
baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/$basearch
enabled=1
gpgcheck=1
gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
@peo3
peo3 / config-3.10.0-0.rc5.git0.1.nohzfull.vbox.fc20.x86_64
Last active December 18, 2015 05:08
A sample configuration of a minimal x86_64 kernel with NOHZ_FULL enabled for VirtualBox.
# x86_64
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.10.0-0.rc5.git0.1.nohzfull.fc20.x86_64 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@peo3
peo3 / systemd-changelogs.txt
Last active December 24, 2015 17:49
Recent systemd changes for cgroups and namespaces.
systemd 208 released [LWN.net] http://lwn.net/Articles/569235/
* This release removes high-level support for the
MemorySoftLimit= cgroup setting. The underlying kernel
cgroup attribute memory.soft_limit= is currently badly
designed and likely to be removed from the kernel API in its
current form, hence we shouldn't expose it for now.
* The memory.use_hierarchy cgroup attribute is now enabled for
all cgroups systemd creates in the memory cgroup