How to know you are inside a LXD container?
You have access to a virtual machine, you need to find out what virtualization technology it uses, you can install virt-what
1 |
apt instal virt-what |
Then run virt-what command, it will show what virtualization technology you are using.
1 2 3 |
root@mysql-1:~# virt-what lxc root@mysql-1:~# |
Another way to find is using the command. If you use LXD container, you will see the following files/directories.
1 2 3 4 5 |
root@mysql-1:~# ls -la /dev | grep lx -r--r--r-- 1 root root 37 Jun 30 21:15 .lxc-boot-id drwx--x--x 2 nobody nogroup 40 Jun 30 21:15 .lxd-mounts drwxr-xr-x 2 nobody nogroup 60 Jul 12 17:13 lxd root@mysql-1:~# |
Also mount command will show many lxcfs mounts.
See LXD