This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tips:lxd [2018/01/11 12:36] – [container] scipio | tips:lxd [2019/11/19 19:12] (current) – [container] scipio | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| < | < | ||
| - | sudo add-apt-repository --yes ppa: | + | apt remove lxd lxd-client |
| - | sudo apt update | + | snap install lxd |
| - | sudo apt install lxd | + | |
| # create zfs dataset on pool rpool | # create zfs dataset on pool rpool | ||
| Line 129: | 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 162: | 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 192: | Line 221: | ||
| <code bash> | <code bash> | ||
| NAME=x11test | NAME=x11test | ||
| - | lxc launch images: | + | lxc launch images: |
| </ | </ | ||
| Line 202: | 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=/ | ||
| </ | </ | ||