Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tips:lxd [2018/01/26 13:18] – [install] scipio | tips:lxd [2019/11/19 19:12] (current) – [container] scipio | ||
---|---|---|---|
Line 5: | Line 5: | ||
< | < | ||
+ | apt remove lxd lxd-client | ||
snap install lxd | snap install lxd | ||
Line 127: | Line 128: | ||
lxc list | lxc list | ||
</ | </ | ||
+ | |||
+ | create custom image from local container | ||
+ | < | ||
+ | lxc publish local-container --alias mycustomimage | ||
+ | </ | ||
+ | |||
+ | create container from previous image | ||
+ | < | ||
+ | lxc launch mycustomimage newcontainer | ||
+ | </ | ||
+ | |||
+ | |||
bash inside | bash inside | ||
Line 160: | Line 173: | ||
</ | </ | ||
+ | |||
+ | ===== network ===== | ||
+ | |||
+ | < | ||
+ | lxc network create br0 | ||
+ | lxc network show br0 | ||
+ | lxc network edit br0 | ||
+ | </ | ||
+ | |||
+ | static IP container | ||
+ | < | ||
+ | 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 | ||
+ | </ | ||
===== servers ===== | ===== servers ===== | ||
Line 190: | Line 221: | ||
<code bash> | <code bash> | ||
NAME=x11test | NAME=x11test | ||
- | lxc launch images: | + | lxc launch images: |
</ | </ | ||
Line 200: | Line 231: | ||
</ | </ | ||
- | set DISPLAY env to xorg server on host | + | |
- | < | + | < |
- | lxc config set x11test | + | NAME=nvidia-sdk-manager |
+ | # lxc config set $NAME environment.DISPLAY < | ||
+ | lxc config set $NAME environment.DISPLAY :0 | ||
+ | lxc config device add $NAME X0 disk path=/ | ||
+ | lxc config device add $NAME Xauthority disk path=/ | ||
</ | </ | ||