LXC - Lokal virtualisieren
Manchmal will man schnell etwas installieren, ohne das komplette System zu zerlegen. Ein sehr guter Blog Artikel zum Thema.
Snap/LXC installieren
- Neuere Version (3.x) gibt es über snap
# apt install snapd - Alte Version deinstallieren, neue installieren
# apt purge lxd; snap install lxd # adduser [benutzer] lxd- LXC einrichten
# lxc init - Pool als dir definieren. Kein IPv6, wenn nicht absolut notwendig.
- Rechte setzen
$ echo "root:$UID:1" | sudo tee -a /etc/subuid /etc/subgid wget https://LupusE.github.io/misc/lxdguiprofile.txt- Profil anlegen
$ cat lxdguiprofile.txt | lxc profile edit gui - VM erstellen
$ lxc launch --profile default --profile gui ubuntu:trusty oldbuntu - In VM einloggen
$ lxc exec oldbuntu -- sudo --user ubuntu --login
Aufräumen
- VM verlassen
$ exit - VM beenden
$ lxc stop oldbuntu - VM löschen
$ lxc delete oldbuntu