Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tips:lxd [2018/02/24 09:33] – [container] scipiotips:lxd [2019/11/19 19:12] (current) – [container] scipio
Line 5: Line 5:
  
 <code> <code>
 +apt remove lxd lxd-client
 snap install lxd snap install lxd
  
Line 127: Line 128:
 lxc list lxc list
 </code> </code>
 +
 +create custom image from local container
 +<code>
 +lxc publish local-container --alias mycustomimage
 +</code>
 +
 +create container from previous image
 +<code>
 +lxc launch mycustomimage newcontainer
 +</code>
 +
 +
  
 bash inside bash inside
Line 167: Line 180:
 lxc network show br0 lxc network show br0
 lxc network edit br0 lxc network edit br0
 +</code>
 +
 +static IP container
 +<code>
 +istance=c1
 +
 +lxc stop $instance
 +lxc network attach lxdbr0 $istance eth0 eth0
 +lxc config device set $istance eth0 ipv4.address 10.99.10.42
 +lxc start $istance
 </code> </code>
 ===== servers ===== ===== servers =====
Line 198: Line 221:
 <code bash> <code bash>
 NAME=x11test NAME=x11test
-lxc launch images:ubuntu/xenial/amd64 $NAME+lxc launch images:ubuntu/bionic/amd64 $NAME
 </code> </code>
  
Line 208: Line 231:
 </code> </code>
  
-set DISPLAY env to xorg server on host + 
-<code bash+<code> 
-lxc config set $NAME environment.DISPLAY <ip-of-host-lxdbr0-bridge>:0+NAME=nvidia-sdk-manager 
 +lxc config set $NAME environment.DISPLAY <ip-of-host-lxdbr0-bridge>:0 
 +lxc config set $NAME environment.DISPLAY :0 
 +lxc config device add $NAME X0 disk path=/tmp/.X11-unix/X0 source=/tmp/.X11-unix/X0 
 +lxc config device add $NAME Xauthority disk path=/root/.Xauthority source=${XAUTHORITY}
 </code> </code>
  
  • tips/lxd.1519461235.txt.gz
  • Last modified: 2018/02/24 09:33
  • by scipio