Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@debian:~# sh script.sh
- + echo ==== SYSTEM INFO & INSTALL ====
- ==== SYSTEM INFO & INSTALL ====
- + lsb_release -a
- No LSB modules are available.
- Distributor ID: Debian
- Description: Debian GNU/Linux 7.8 (wheezy)
- Release: 7.8
- Codename: wheezy
- + uname -a
- Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1 x86_64 GNU/Linux
- + apt-get update
- Get:1 http://security.debian.org wheezy/updates Release.gpg [1,571 B]
- Get:2 http://http.debian.net wheezy Release.gpg [2,390 B]
- Get:3 http://security.debian.org wheezy/updates Release [102 kB]
- Get:4 http://http.debian.net wheezy Release [168 kB]
- Get:5 http://security.debian.org wheezy/updates/main Sources [182 kB]
- Get:6 http://security.debian.org wheezy/updates/main amd64 Packages [307 kB]
- Get:7 http://http.debian.net wheezy/main Sources [5,971 kB]
- Get:8 http://security.debian.org wheezy/updates/main Translation-en [173 kB]
- Hit http://http.debian.net wheezy/main amd64 Packages
- Hit http://http.debian.net wheezy/main Translation-en
- Fetched 6,908 kB in 49s (139 kB/s)
- Reading package lists... Done
- + apt-get install -y lxc
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following package was automatically installed and is no longer required:
- libkms1
- Use 'apt-get autoremove' to remove it.
- The following extra packages will be installed:
- debootstrap
- Suggested packages:
- lxctl
- The following NEW packages will be installed:
- debootstrap lxc
- 0 upgraded, 2 newly installed, 0 to remove and 130 not upgraded.
- Need to get 231 kB of archives.
- After this operation, 961 kB of additional disk space will be used.
- Get:1 http://http.debian.net/debian/ wheezy/main lxc amd64 0.8.0~rc1-8+deb7u2 [170 kB]
- Get:2 http://http.debian.net/debian/ wheezy/main debootstrap all 1.0.48+deb7u2 [61.4 kB]
- Fetched 231 kB in 1s (167 kB/s)
- Preconfiguring packages ...
- Selecting previously unselected package lxc.
- (Reading database ... 104943 files and directories currently installed.)
- Unpacking lxc (from .../lxc_0.8.0~rc1-8+deb7u2_amd64.deb) ...
- Selecting previously unselected package debootstrap.
- Unpacking debootstrap (from .../debootstrap_1.0.48+deb7u2_all.deb) ...
- Processing triggers for man-db ...
- Setting up lxc (0.8.0~rc1-8+deb7u2) ...
- update-alternatives: using /usr/bin/lxc-stop to provide /usr/bin/lxc-shutdown (lxc-shutdown) in auto mode
- update-alternatives: using /usr/bin/lxc-halt to provide /usr/bin/lxc-shutdown (lxc-shutdown) in auto mode
- [ ok ] Starting Linux Containers: (none).
- Setting up debootstrap (1.0.48+deb7u2) ...
- + apt-get clean
- + lxc-checkconfig
- Kernel config /proc/config.gz not found, looking in other places...
- Found kernel config file /boot/config-3.2.0-4-amd64
- --- Namespaces ---
- Namespaces: enabled
- Utsname namespace: enabled
- Ipc namespace: enabled
- Pid namespace: enabled
- User namespace: enabled
- Network namespace: enabled
- Multiple /dev/pts instances: enabled
- --- Control groups ---
- Cgroup: enabled
- Cgroup namespace: CONFIG_CGROUP_NSmissing
- Cgroup device: enabled
- Cgroup sched: enabled
- Cgroup cpu account: enabled
- Cgroup memory controller: enabled
- Cgroup cpuset: enabled
- --- Misc ---
- Veth pair device: enabled
- Macvlan: enabled
- Vlan: enabled
- File capabilities: enabled
- Note : Before booting a new kernel, you can check its configuration
- usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
- + ifconfig
- eth0 Link encap:Ethernet HWaddr 08:00:27:12:9e:09
- inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
- inet6 addr: fe80::a00:27ff:fe12:9e09/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:8841 errors:0 dropped:0 overruns:0 frame:0
- TX packets:4549 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:7634911 (7.2 MiB) TX bytes:266393 (260.1 KiB)
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:16 errors:0 dropped:0 overruns:0 frame:0
- TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:1056 (1.0 KiB) TX bytes:1056 (1.0 KiB)
- + brctl show
- script.sh: 20: script.sh: brctl: not found
- + adduser testuser
- Adding user `testuser' ...
- Adding new group `testuser' (1001) ...
- Adding new user `testuser' (1001) with group `testuser' ...
- Creating home directory `/home/testuser' ...
- Copying files from `/etc/skel' ...
- Enter new UNIX password:
- Retype new UNIX password:
- passwd: password updated successfully
- Changing the user information for testuser
- Enter the new value, or press ENTER for the default
- Full Name []:
- Room Number []:
- Work Phone []:
- Home Phone []:
- Other []:
- Is the information correct? [Y/n]
- + cat /etc/subuid /etc/subgid
- cat: /etc/subuid: No such file or directory
- cat: /etc/subgid: No such file or directory
- + cat
- + sudo -u testuser -i mkdir -p .config/lxc
- + cut -d: -f2
- + grep testuser /etc/subuid
- grep: /etc/subuid: No such file or directory
- + cut -d: -f2
- + grep testuser /etc/subgid
- grep: /etc/subgid: No such file or directory
- + sudo -u testuser -i tee .config/lxc/default.conf
- lxc.id_map = u 0 65536
- lxc.id_map = g 0 65536
- lxc.network.type = veth
- lxc.network.link = lxcbr0
- lxc.network.flags = up
- lxc.network.hwaddr = 00:16:3e:xx:xx:xx
- + cat /home/testuser/.config/lxc/default.conf
- lxc.id_map = u 0 65536
- lxc.id_map = g 0 65536
- lxc.network.type = veth
- lxc.network.link = lxcbr0
- lxc.network.flags = up
- lxc.network.hwaddr = 00:16:3e:xx:xx:xx
- + echo ==== TEST UBUNTU VIVID GUEST ====
- ==== TEST UBUNTU VIVID GUEST ====
- + sudo -u testuser -i lxc-create -t download -n vivid1 -- -d ubuntu -r utopic -a amd64
- This command has to be run as root
- + [ 1 -eq 0 ]
- + echo ==== TEST DEBIAN JESSIE GUEST ====
- ==== TEST DEBIAN JESSIE GUEST ====
- + sudo -u testuser -i lxc-create -t download -n jessie1 -- -d debian -r jessie -a amd64
- This command has to be run as root
- + [ 1 -eq 0 ]
- + echo ==== END OF SCRIPT ====
- ==== END OF SCRIPT ====
- root@debian:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement