1. snap install lxd
2. lxd init
3. lxc launch {chosen image name} {prefered instance name}
4. echo "root:$UID:1" | sudo tee -a /etc/subuid /etc/subgid
5. lxc profile create {prefered profile name}
6. lxc profile edit {prefered profile name}
7.
config:
environment.DISPLAY: :0 raw.idmap: both 1000 1001 description: GUI LXD profile devices: X0: path: /tmp/.X11-unix/X0 source: /tmp/.X11-unix/X0 type: disk mygpu: type: gpu name: gui used_by:
8. lxc profile add {instancename} {profilename}
9. xhost +local:
原文:https://www.cnblogs.com/zohar-fzh/p/14725644.html