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 8.0 (jessie)
- Release: 8.0
- Codename: jessie
- + uname -a
- Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-2 (2015-04-13) x86_64 GNU/Linux
- + apt-get update
- Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
- Get:2 http://security.debian.org jessie/updates/main Sources [48.2 kB]
- Get:3 http://security.debian.org jessie/updates/main amd64 Packages [63.1 kB]
- Get:4 http://security.debian.org jessie/updates/main Translation-en [31.3 kB]
- Hit http://http.debian.net jessie InRelease
- Get:5 http://http.debian.net jessie/main Sources [7,065 kB]
- Get:6 http://http.debian.net jessie/main amd64 Packages [6,765 kB]
- Get:7 http://http.debian.net jessie/main Translation-en [4,585 kB]
- Fetched 12.8 MB in 1min 9s (183 kB/s)
- Reading package lists... Done
- + apt-get install -y lxc
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following extra packages will be installed:
- debootstrap libapparmor1 libseccomp2
- Suggested packages:
- lua5.2
- The following NEW packages will be installed:
- debootstrap libapparmor1 libseccomp2 lxc
- 0 upgraded, 4 newly installed, 0 to remove and 13 not upgraded.
- Need to get 771 kB of archives.
- After this operation, 3,125 kB of additional disk space will be used.
- Get:1 http://http.debian.net/debian/ jessie/main libseccomp2 amd64 2.1.1-1 [27.6 kB]
- Get:2 http://http.debian.net/debian/ jessie/main libapparmor1 amd64 2.9.0-3 [60.3 kB]
- Get:3 http://http.debian.net/debian/ jessie/main lxc amd64 1:1.0.6-6 [621 kB]
- Get:4 http://http.debian.net/debian/ jessie/main debootstrap all 1.0.67 [62.7 kB]
- Fetched 771 kB in 24s (32.0 kB/s)
- Selecting previously unselected package libseccomp2:amd64.
- (Reading database ... 101867 files and directories currently installed.)
- Preparing to unpack .../libseccomp2_2.1.1-1_amd64.deb ...
- Unpacking libseccomp2:amd64 (2.1.1-1) ...
- Selecting previously unselected package libapparmor1:amd64.
- Preparing to unpack .../libapparmor1_2.9.0-3_amd64.deb ...
- Unpacking libapparmor1:amd64 (2.9.0-3) ...
- Selecting previously unselected package lxc.
- Preparing to unpack .../lxc_1%3a1.0.6-6_amd64.deb ...
- Unpacking lxc (1:1.0.6-6) ...
- Selecting previously unselected package debootstrap.
- Preparing to unpack .../debootstrap_1.0.67_all.deb ...
- Unpacking debootstrap (1.0.67) ...
- Processing triggers for man-db (2.7.0.2-5) ...
- Processing triggers for systemd (215-17) ...
- Setting up libseccomp2:amd64 (2.1.1-1) ...
- Setting up libapparmor1:amd64 (2.9.0-3) ...
- Setting up lxc (1:1.0.6-6) ...
- Setting up debootstrap (1.0.67) ...
- Processing triggers for libc-bin (2.19-18) ...
- Processing triggers for systemd (215-17) ...
- + apt-get clean
- + lxc-checkconfig
- Kernel configuration not found at /proc/config.gz; searching...
- Kernel configuration found at /boot/config-3.16.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 clone_children flag: enabled
- 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:23729 errors:0 dropped:0 overruns:0 frame:0
- TX packets:10339 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:20994604 (20.0 MiB) TX bytes:645447 (630.3 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:65536 Metric:1
- RX packets:46 errors:0 dropped:0 overruns:0 frame:0
- TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:4349 (4.2 KiB) TX bytes:4349 (4.2 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
- systemd-timesync:100000:65536
- systemd-network:165536:65536
- systemd-resolve:231072:65536
- systemd-bus-proxy:296608:65536
- messagebus:362144:65536
- avahi:427680:65536
- uuidd:493216:65536
- Debian-exim:558752:65536
- statd:624288:65536
- avahi-autoipd:689824:65536
- colord:755360:65536
- dnsmasq:820896:65536
- speech-dispatcher:886432:65536
- sshd:951968:65536
- pulse:1017504:65536
- rtkit:1083040:65536
- saned:1148576:65536
- usbmux:1214112:65536
- lightdm:1279648:65536
- hplip:1345184:65536
- user:1410720:65536
- testuser:1476256:65536
- systemd-timesync:100000:65536
- systemd-network:165536:65536
- systemd-resolve:231072:65536
- systemd-bus-proxy:296608:65536
- messagebus:362144:65536
- avahi:427680:65536
- uuidd:493216:65536
- Debian-exim:558752:65536
- statd:624288:65536
- avahi-autoipd:689824:65536
- colord:755360:65536
- dnsmasq:820896:65536
- speech-dispatcher:886432:65536
- sshd:951968:65536
- pulse:1017504:65536
- rtkit:1083040:65536
- saned:1148576:65536
- usbmux:1214112:65536
- lightdm:1279648:65536
- hplip:1345184:65536
- user:1410720:65536
- testuser:1476256:65536
- + cat
- + sudo -u testuser -i mkdir -p .config/lxc
- + cut -d: -f2
- + grep testuser /etc/subuid
- + cut -d: -f2
- + grep testuser /etc/subgid
- + sudo -u testuser -i tee .config/lxc/default.conf
- lxc.id_map = u 0 1476256 65536
- lxc.id_map = g 0 1476256 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 1476256 65536
- lxc.id_map = g 0 1476256 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
- WARN: could not reopen tty: Permission denied
- unshare: Operation not permitted
- read pipe: No such file or directory
- lxc_container: Failed to chown container dir
- lxc_container: Error creating container vivid1
- + [ 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
- WARN: could not reopen tty: Permission denied
- unshare: Operation not permitted
- read pipe: No such file or directory
- lxc_container: Failed to chown container dir
- lxc_container: Error creating container jessie1
- + [ 1 -eq 0 ]
- + echo ==== END OF SCRIPT ====
- ==== END OF SCRIPT ====
- root@debian:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement