ostree

Snap, lxc on Kali

Apr 16th, 2022 (edited)
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. Snap, lxc on Kali
  2.  
  3. Hi,
  4.  
  5. I had some problems to run lxd installed with snap on Kali. This is what I had to do to make it work:
  6.  
  7. To install snap:
  8.  
  9. Code:
  10.  
  11. sudo apt install snapd ubuntu-core-launcher -y
  12. nano -w ~/.profile
  13.  
  14. and add this:
  15. Code:
  16.  
  17. export PATH="/snap/bin:$PATH"
  18.  
  19. Next:
  20. Code:
  21.  
  22. . ~/.profile
  23.  
  24. Then to install lxd:
  25.  
  26. Code:
  27.  
  28. sudo systemctl enable --now apparmor.service
  29. sudo snap install core lxd
  30. sudo gpasswd -a user lxd
  31. sudo apparmor_parser -r /etc/apparmor.d/*snap-confine*
  32. sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap-confine*
  33.  
  34. After this and reboot I can finally:
  35.  
  36. Code:
  37.  
  38. lxd init
  39. Would you like to use LXD clustering? (yes/no) [default=no]:
  40. Do you want to configure a new storage pool? (yes/no) [default=yes]:
  41. Name of the new storage pool [default=default]:
  42. Name of the storage backend to use (btrfs, dir, lvm, ceph) [default=btrfs]: dir
  43. Would you like to connect to a MAAS server? (yes/no) [default=no]:
  44. Would you like to create a new local network bridge? (yes/no) [default=yes]:
  45. What should the new bridge be called? [default=lxdbr0]:
  46. What IPv4 address should be used? (CIDR subnet notation, ?auto? or ?none?) [default=auto]:
  47. What IPv6 address should be used? (CIDR subnet notation, ?auto? or ?none?) [default=auto]: none
  48. Would you like LXD to be available over the network? (yes/no) [default=no]:
  49. Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
  50. Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
  51.  
  52. lxc list
  53. To start your first instance, try: lxc launch ubuntu:18.04
  54.  
  55. +------+-------+------+------+------+-----------+
  56. | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
  57. +------+-------+------+------+------+-----------+
  58.  
  59. lxc image list images:centos
  60. lxc launch images:centos/6/amd64 centos-6-amd64-000
  61.  
  62. lxc image list images:debian
  63. lxc launch images:debian/10/amd64 debian10-amd64-00
  64. lxc list
  65. +--------------------+---------+--------------------+------+-----------+-----------+
  66. | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
  67. +--------------------+---------+--------------------+------+-----------+-----------+
  68. | centos-6-amd64-000 | STOPPED | | | CONTAINER | 0 |
  69. +--------------------+---------+--------------------+------+-----------+-----------+
  70. | debian10-amd64-000 | RUNNING | 10.94.171.3 (eth0) | | CONTAINER | 0 |
  71. +--------------------+---------+--------------------+------+-----------+-----------+
  72.  
  73.  
  74. lxc exec debian10-amd64-00 /bin/bash
  75.  
  76.  
  77. Kind Regards
  78.  
  79. Last edited by ostree; 2020-11-07 at 18:42.
Advertisement
Add Comment
Please, Sign In to add comment