Advertisement
Guest User

Untitled

a guest
May 14th, 2015
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.75 KB | None | 0 0
  1. root@debian:~# sh script.sh
  2. + echo ==== SYSTEM INFO & INSTALL ====
  3. ==== SYSTEM INFO & INSTALL ====
  4. + lsb_release -a
  5. No LSB modules are available.
  6. Distributor ID: Debian
  7. Description: Debian GNU/Linux 8.0 (jessie)
  8. Release: 8.0
  9. Codename: jessie
  10. + uname -a
  11. Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-2 (2015-04-13) x86_64 GNU/Linux
  12. + apt-get update
  13. Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
  14. Get:2 http://security.debian.org jessie/updates/main Sources [48.2 kB]
  15. Get:3 http://security.debian.org jessie/updates/main amd64 Packages [63.1 kB]
  16. Get:4 http://security.debian.org jessie/updates/main Translation-en [31.3 kB]
  17. Hit http://http.debian.net jessie InRelease
  18. Get:5 http://http.debian.net jessie/main Sources [7,065 kB]
  19. Get:6 http://http.debian.net jessie/main amd64 Packages [6,765 kB]
  20. Get:7 http://http.debian.net jessie/main Translation-en [4,585 kB]
  21. Fetched 12.8 MB in 1min 9s (183 kB/s)
  22. Reading package lists... Done
  23. + apt-get install -y lxc
  24. Reading package lists... Done
  25. Building dependency tree
  26. Reading state information... Done
  27. The following extra packages will be installed:
  28. debootstrap libapparmor1 libseccomp2
  29. Suggested packages:
  30. lua5.2
  31. The following NEW packages will be installed:
  32. debootstrap libapparmor1 libseccomp2 lxc
  33. 0 upgraded, 4 newly installed, 0 to remove and 13 not upgraded.
  34. Need to get 771 kB of archives.
  35. After this operation, 3,125 kB of additional disk space will be used.
  36. Get:1 http://http.debian.net/debian/ jessie/main libseccomp2 amd64 2.1.1-1 [27.6 kB]
  37. Get:2 http://http.debian.net/debian/ jessie/main libapparmor1 amd64 2.9.0-3 [60.3 kB]
  38. Get:3 http://http.debian.net/debian/ jessie/main lxc amd64 1:1.0.6-6 [621 kB]
  39. Get:4 http://http.debian.net/debian/ jessie/main debootstrap all 1.0.67 [62.7 kB]
  40. Fetched 771 kB in 24s (32.0 kB/s)
  41. Selecting previously unselected package libseccomp2:amd64.
  42. (Reading database ... 101867 files and directories currently installed.)
  43. Preparing to unpack .../libseccomp2_2.1.1-1_amd64.deb ...
  44. Unpacking libseccomp2:amd64 (2.1.1-1) ...
  45. Selecting previously unselected package libapparmor1:amd64.
  46. Preparing to unpack .../libapparmor1_2.9.0-3_amd64.deb ...
  47. Unpacking libapparmor1:amd64 (2.9.0-3) ...
  48. Selecting previously unselected package lxc.
  49. Preparing to unpack .../lxc_1%3a1.0.6-6_amd64.deb ...
  50. Unpacking lxc (1:1.0.6-6) ...
  51. Selecting previously unselected package debootstrap.
  52. Preparing to unpack .../debootstrap_1.0.67_all.deb ...
  53. Unpacking debootstrap (1.0.67) ...
  54. Processing triggers for man-db (2.7.0.2-5) ...
  55. Processing triggers for systemd (215-17) ...
  56. Setting up libseccomp2:amd64 (2.1.1-1) ...
  57. Setting up libapparmor1:amd64 (2.9.0-3) ...
  58. Setting up lxc (1:1.0.6-6) ...
  59. Setting up debootstrap (1.0.67) ...
  60. Processing triggers for libc-bin (2.19-18) ...
  61. Processing triggers for systemd (215-17) ...
  62. + apt-get clean
  63. + lxc-checkconfig
  64. Kernel configuration not found at /proc/config.gz; searching...
  65. Kernel configuration found at /boot/config-3.16.0-4-amd64
  66. --- Namespaces ---
  67. Namespaces: enabled
  68. Utsname namespace: enabled
  69. Ipc namespace: enabled
  70. Pid namespace: enabled
  71. User namespace: enabled
  72. Network namespace: enabled
  73. Multiple /dev/pts instances: enabled
  74.  
  75. --- Control groups ---
  76. Cgroup: enabled
  77. Cgroup clone_children flag: enabled
  78. Cgroup device: enabled
  79. Cgroup sched: enabled
  80. Cgroup cpu account: enabled
  81. Cgroup memory controller: enabled
  82. Cgroup cpuset: enabled
  83.  
  84. --- Misc ---
  85. Veth pair device: enabled
  86. Macvlan: enabled
  87. Vlan: enabled
  88. File capabilities: enabled
  89.  
  90. Note : Before booting a new kernel, you can check its configuration
  91. usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
  92.  
  93. + ifconfig
  94. eth0 Link encap:Ethernet HWaddr 08:00:27:12:9e:09
  95. inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
  96. inet6 addr: fe80::a00:27ff:fe12:9e09/64 Scope:Link
  97. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  98. RX packets:23729 errors:0 dropped:0 overruns:0 frame:0
  99. TX packets:10339 errors:0 dropped:0 overruns:0 carrier:0
  100. collisions:0 txqueuelen:1000
  101. RX bytes:20994604 (20.0 MiB) TX bytes:645447 (630.3 KiB)
  102.  
  103. lo Link encap:Local Loopback
  104. inet addr:127.0.0.1 Mask:255.0.0.0
  105. inet6 addr: ::1/128 Scope:Host
  106. UP LOOPBACK RUNNING MTU:65536 Metric:1
  107. RX packets:46 errors:0 dropped:0 overruns:0 frame:0
  108. TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
  109. collisions:0 txqueuelen:0
  110. RX bytes:4349 (4.2 KiB) TX bytes:4349 (4.2 KiB)
  111.  
  112. + brctl show
  113. script.sh: 20: script.sh: brctl: not found
  114. + adduser testuser
  115. Adding user `testuser' ...
  116. Adding new group `testuser' (1001) ...
  117. Adding new user `testuser' (1001) with group `testuser' ...
  118. Creating home directory `/home/testuser' ...
  119. Copying files from `/etc/skel' ...
  120. Enter new UNIX password:
  121. Retype new UNIX password:
  122. passwd: password updated successfully
  123. Changing the user information for testuser
  124. Enter the new value, or press ENTER for the default
  125. Full Name []:
  126. Room Number []:
  127. Work Phone []:
  128. Home Phone []:
  129. Other []:
  130. Is the information correct? [Y/n]
  131. + cat /etc/subuid /etc/subgid
  132. systemd-timesync:100000:65536
  133. systemd-network:165536:65536
  134. systemd-resolve:231072:65536
  135. systemd-bus-proxy:296608:65536
  136. messagebus:362144:65536
  137. avahi:427680:65536
  138. uuidd:493216:65536
  139. Debian-exim:558752:65536
  140. statd:624288:65536
  141. avahi-autoipd:689824:65536
  142. colord:755360:65536
  143. dnsmasq:820896:65536
  144. speech-dispatcher:886432:65536
  145. sshd:951968:65536
  146. pulse:1017504:65536
  147. rtkit:1083040:65536
  148. saned:1148576:65536
  149. usbmux:1214112:65536
  150. lightdm:1279648:65536
  151. hplip:1345184:65536
  152. user:1410720:65536
  153. testuser:1476256:65536
  154. systemd-timesync:100000:65536
  155. systemd-network:165536:65536
  156. systemd-resolve:231072:65536
  157. systemd-bus-proxy:296608:65536
  158. messagebus:362144:65536
  159. avahi:427680:65536
  160. uuidd:493216:65536
  161. Debian-exim:558752:65536
  162. statd:624288:65536
  163. avahi-autoipd:689824:65536
  164. colord:755360:65536
  165. dnsmasq:820896:65536
  166. speech-dispatcher:886432:65536
  167. sshd:951968:65536
  168. pulse:1017504:65536
  169. rtkit:1083040:65536
  170. saned:1148576:65536
  171. usbmux:1214112:65536
  172. lightdm:1279648:65536
  173. hplip:1345184:65536
  174. user:1410720:65536
  175. testuser:1476256:65536
  176. + cat
  177. + sudo -u testuser -i mkdir -p .config/lxc
  178. + cut -d: -f2
  179. + grep testuser /etc/subuid
  180. + cut -d: -f2
  181. + grep testuser /etc/subgid
  182. + sudo -u testuser -i tee .config/lxc/default.conf
  183. lxc.id_map = u 0 1476256 65536
  184. lxc.id_map = g 0 1476256 65536
  185.  
  186. lxc.network.type = veth
  187. lxc.network.link = lxcbr0
  188. lxc.network.flags = up
  189. lxc.network.hwaddr = 00:16:3e:xx:xx:xx
  190. + cat /home/testuser/.config/lxc/default.conf
  191. lxc.id_map = u 0 1476256 65536
  192. lxc.id_map = g 0 1476256 65536
  193.  
  194. lxc.network.type = veth
  195. lxc.network.link = lxcbr0
  196. lxc.network.flags = up
  197. lxc.network.hwaddr = 00:16:3e:xx:xx:xx
  198. + echo ==== TEST UBUNTU VIVID GUEST ====
  199. ==== TEST UBUNTU VIVID GUEST ====
  200. + sudo -u testuser -i lxc-create -t download -n vivid1 -- -d ubuntu -r utopic -a amd64
  201. WARN: could not reopen tty: Permission denied
  202. unshare: Operation not permitted
  203. read pipe: No such file or directory
  204. lxc_container: Failed to chown container dir
  205. lxc_container: Error creating container vivid1
  206. + [ 1 -eq 0 ]
  207. + echo ==== TEST DEBIAN JESSIE GUEST ====
  208. ==== TEST DEBIAN JESSIE GUEST ====
  209. + sudo -u testuser -i lxc-create -t download -n jessie1 -- -d debian -r jessie -a amd64
  210. WARN: could not reopen tty: Permission denied
  211. unshare: Operation not permitted
  212. read pipe: No such file or directory
  213. lxc_container: Failed to chown container dir
  214. lxc_container: Error creating container jessie1
  215. + [ 1 -eq 0 ]
  216. + echo ==== END OF SCRIPT ====
  217. ==== END OF SCRIPT ====
  218. root@debian:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement