Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Snap, lxc on Kali
- Hi,
- I had some problems to run lxd installed with snap on Kali. This is what I had to do to make it work:
- To install snap:
- Code:
- sudo apt install snapd ubuntu-core-launcher -y
- nano -w ~/.profile
- and add this:
- Code:
- export PATH="/snap/bin:$PATH"
- Next:
- Code:
- . ~/.profile
- Then to install lxd:
- Code:
- sudo systemctl enable --now apparmor.service
- sudo snap install core lxd
- sudo gpasswd -a user lxd
- sudo apparmor_parser -r /etc/apparmor.d/*snap-confine*
- sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap-confine*
- After this and reboot I can finally:
- Code:
- lxd init
- Would you like to use LXD clustering? (yes/no) [default=no]:
- Do you want to configure a new storage pool? (yes/no) [default=yes]:
- Name of the new storage pool [default=default]:
- Name of the storage backend to use (btrfs, dir, lvm, ceph) [default=btrfs]: dir
- Would you like to connect to a MAAS server? (yes/no) [default=no]:
- Would you like to create a new local network bridge? (yes/no) [default=yes]:
- What should the new bridge be called? [default=lxdbr0]:
- What IPv4 address should be used? (CIDR subnet notation, ?auto? or ?none?) [default=auto]:
- What IPv6 address should be used? (CIDR subnet notation, ?auto? or ?none?) [default=auto]: none
- Would you like LXD to be available over the network? (yes/no) [default=no]:
- Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
- Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
- lxc list
- To start your first instance, try: lxc launch ubuntu:18.04
- +------+-------+------+------+------+-----------+
- | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
- +------+-------+------+------+------+-----------+
- lxc image list images:centos
- lxc launch images:centos/6/amd64 centos-6-amd64-000
- lxc image list images:debian
- lxc launch images:debian/10/amd64 debian10-amd64-00
- lxc list
- +--------------------+---------+--------------------+------+-----------+-----------+
- | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
- +--------------------+---------+--------------------+------+-----------+-----------+
- | centos-6-amd64-000 | STOPPED | | | CONTAINER | 0 |
- +--------------------+---------+--------------------+------+-----------+-----------+
- | debian10-amd64-000 | RUNNING | 10.94.171.3 (eth0) | | CONTAINER | 0 |
- +--------------------+---------+--------------------+------+-----------+-----------+
- lxc exec debian10-amd64-00 /bin/bash
- Kind Regards
- Last edited by ostree; 2020-11-07 at 18:42.
Advertisement
Add Comment
Please, Sign In to add comment