Advertisement
Guest User

Untitled

a guest
May 14th, 2015
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.21 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 7.8 (wheezy)
  8. Release: 7.8
  9. Codename: wheezy
  10. + uname -a
  11. Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1 x86_64 GNU/Linux
  12. + apt-get update
  13. Get:1 http://security.debian.org wheezy/updates Release.gpg [1,571 B]
  14. Get:2 http://http.debian.net wheezy Release.gpg [2,390 B]
  15. Get:3 http://security.debian.org wheezy/updates Release [102 kB]
  16. Get:4 http://http.debian.net wheezy Release [168 kB]
  17. Get:5 http://security.debian.org wheezy/updates/main Sources [182 kB]
  18. Get:6 http://security.debian.org wheezy/updates/main amd64 Packages [307 kB]
  19. Get:7 http://http.debian.net wheezy/main Sources [5,971 kB]
  20. Get:8 http://security.debian.org wheezy/updates/main Translation-en [173 kB]
  21. Hit http://http.debian.net wheezy/main amd64 Packages
  22. Hit http://http.debian.net wheezy/main Translation-en
  23. Fetched 6,908 kB in 49s (139 kB/s)
  24. Reading package lists... Done
  25. + apt-get install -y lxc
  26. Reading package lists... Done
  27. Building dependency tree
  28. Reading state information... Done
  29. The following package was automatically installed and is no longer required:
  30. libkms1
  31. Use 'apt-get autoremove' to remove it.
  32. The following extra packages will be installed:
  33. debootstrap
  34. Suggested packages:
  35. lxctl
  36. The following NEW packages will be installed:
  37. debootstrap lxc
  38. 0 upgraded, 2 newly installed, 0 to remove and 130 not upgraded.
  39. Need to get 231 kB of archives.
  40. After this operation, 961 kB of additional disk space will be used.
  41. Get:1 http://http.debian.net/debian/ wheezy/main lxc amd64 0.8.0~rc1-8+deb7u2 [170 kB]
  42. Get:2 http://http.debian.net/debian/ wheezy/main debootstrap all 1.0.48+deb7u2 [61.4 kB]
  43. Fetched 231 kB in 1s (167 kB/s)
  44. Preconfiguring packages ...
  45. Selecting previously unselected package lxc.
  46. (Reading database ... 104943 files and directories currently installed.)
  47. Unpacking lxc (from .../lxc_0.8.0~rc1-8+deb7u2_amd64.deb) ...
  48. Selecting previously unselected package debootstrap.
  49. Unpacking debootstrap (from .../debootstrap_1.0.48+deb7u2_all.deb) ...
  50. Processing triggers for man-db ...
  51. Setting up lxc (0.8.0~rc1-8+deb7u2) ...
  52. update-alternatives: using /usr/bin/lxc-stop to provide /usr/bin/lxc-shutdown (lxc-shutdown) in auto mode
  53. update-alternatives: using /usr/bin/lxc-halt to provide /usr/bin/lxc-shutdown (lxc-shutdown) in auto mode
  54. [ ok ] Starting Linux Containers: (none).
  55. Setting up debootstrap (1.0.48+deb7u2) ...
  56. + apt-get clean
  57. + lxc-checkconfig
  58. Kernel config /proc/config.gz not found, looking in other places...
  59. Found kernel config file /boot/config-3.2.0-4-amd64
  60. --- Namespaces ---
  61. Namespaces: enabled
  62. Utsname namespace: enabled
  63. Ipc namespace: enabled
  64. Pid namespace: enabled
  65. User namespace: enabled
  66. Network namespace: enabled
  67. Multiple /dev/pts instances: enabled
  68.  
  69. --- Control groups ---
  70. Cgroup: enabled
  71. Cgroup namespace: CONFIG_CGROUP_NSmissing
  72. Cgroup device: enabled
  73. Cgroup sched: enabled
  74. Cgroup cpu account: enabled
  75. Cgroup memory controller: enabled
  76. Cgroup cpuset: enabled
  77.  
  78. --- Misc ---
  79. Veth pair device: enabled
  80. Macvlan: enabled
  81. Vlan: enabled
  82. File capabilities: enabled
  83.  
  84. Note : Before booting a new kernel, you can check its configuration
  85. usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
  86.  
  87. + ifconfig
  88. eth0 Link encap:Ethernet HWaddr 08:00:27:12:9e:09
  89. inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
  90. inet6 addr: fe80::a00:27ff:fe12:9e09/64 Scope:Link
  91. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  92. RX packets:8841 errors:0 dropped:0 overruns:0 frame:0
  93. TX packets:4549 errors:0 dropped:0 overruns:0 carrier:0
  94. collisions:0 txqueuelen:1000
  95. RX bytes:7634911 (7.2 MiB) TX bytes:266393 (260.1 KiB)
  96.  
  97. lo Link encap:Local Loopback
  98. inet addr:127.0.0.1 Mask:255.0.0.0
  99. inet6 addr: ::1/128 Scope:Host
  100. UP LOOPBACK RUNNING MTU:16436 Metric:1
  101. RX packets:16 errors:0 dropped:0 overruns:0 frame:0
  102. TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
  103. collisions:0 txqueuelen:0
  104. RX bytes:1056 (1.0 KiB) TX bytes:1056 (1.0 KiB)
  105.  
  106. + brctl show
  107. script.sh: 20: script.sh: brctl: not found
  108. + adduser testuser
  109. Adding user `testuser' ...
  110. Adding new group `testuser' (1001) ...
  111. Adding new user `testuser' (1001) with group `testuser' ...
  112. Creating home directory `/home/testuser' ...
  113. Copying files from `/etc/skel' ...
  114. Enter new UNIX password:
  115. Retype new UNIX password:
  116. passwd: password updated successfully
  117. Changing the user information for testuser
  118. Enter the new value, or press ENTER for the default
  119. Full Name []:
  120. Room Number []:
  121. Work Phone []:
  122. Home Phone []:
  123. Other []:
  124. Is the information correct? [Y/n]
  125. + cat /etc/subuid /etc/subgid
  126. cat: /etc/subuid: No such file or directory
  127. cat: /etc/subgid: No such file or directory
  128. + cat
  129. + sudo -u testuser -i mkdir -p .config/lxc
  130. + cut -d: -f2
  131. + grep testuser /etc/subuid
  132. grep: /etc/subuid: No such file or directory
  133. + cut -d: -f2
  134. + grep testuser /etc/subgid
  135. grep: /etc/subgid: No such file or directory
  136. + sudo -u testuser -i tee .config/lxc/default.conf
  137. lxc.id_map = u 0 65536
  138. lxc.id_map = g 0 65536
  139.  
  140. lxc.network.type = veth
  141. lxc.network.link = lxcbr0
  142. lxc.network.flags = up
  143. lxc.network.hwaddr = 00:16:3e:xx:xx:xx
  144. + cat /home/testuser/.config/lxc/default.conf
  145. lxc.id_map = u 0 65536
  146. lxc.id_map = g 0 65536
  147.  
  148. lxc.network.type = veth
  149. lxc.network.link = lxcbr0
  150. lxc.network.flags = up
  151. lxc.network.hwaddr = 00:16:3e:xx:xx:xx
  152. + echo ==== TEST UBUNTU VIVID GUEST ====
  153. ==== TEST UBUNTU VIVID GUEST ====
  154. + sudo -u testuser -i lxc-create -t download -n vivid1 -- -d ubuntu -r utopic -a amd64
  155. This command has to be run as root
  156. + [ 1 -eq 0 ]
  157. + echo ==== TEST DEBIAN JESSIE GUEST ====
  158. ==== TEST DEBIAN JESSIE GUEST ====
  159. + sudo -u testuser -i lxc-create -t download -n jessie1 -- -d debian -r jessie -a amd64
  160. This command has to be run as root
  161. + [ 1 -eq 0 ]
  162. + echo ==== END OF SCRIPT ====
  163. ==== END OF SCRIPT ====
  164. root@debian:~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement