This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tips:lxd [2017/11/24 12:12] – nicola | 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 198: | Line 227: | ||
| <code bash> | <code bash> | ||
| lxc exec $NAME -- apt install xterm | lxc exec $NAME -- apt install xterm | ||
| + | lxc exec $NAME bash | ||
| + | apt install mesa-utils x11-apps | ||
| </ | </ | ||
| - | 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=/ | ||
| </ | </ | ||
| Line 294: | Line 329: | ||
| {{tag> | {{tag> | ||
| - | ===== LXD HOST BUILDING ===== | ||
| - | Create VM with your Hypervisor | ||
| - | |||
| - | Requirements: | ||
| - | * 50 GB in LVM | ||
| - | * 2 GB RAM | ||
| - | * 2 core processor | ||
| - | |||
| - | |||
| - | < | ||
| - | apt update && | ||
| - | |||
| - | **Repair error maybe** | ||
| - | <code >nano / | ||
| - | add this line | ||
| - | < | ||
| - | ARRAY < | ||
| - | </ | ||
| ===== Vlan attach ===== | ===== Vlan attach ===== | ||
| < | < | ||
| Line 330: | Line 347: | ||
| netmask 255.255.255.0 | netmask 255.255.255.0 | ||
| vlan-raw-device eth1 </ | vlan-raw-device eth1 </ | ||
| - | ===== LXD configuration ===== | ||
| - | |||
| - | Install ppa and latest version | ||
| - | < | ||
| - | < | ||
| - | |||
| - | all default option but no autoupdate image | ||
| - | |||
| - | < | ||
| - | |||
| - | reboot | ||
| ===== Send file to your new host ===== | ===== Send file to your new host ===== | ||