| | 215 | Make sure you edit the network interfaces as per your installation details. Don't remove any interface. |
| | 216 | |
| | 217 | {{{ |
| | 218 | network: |
| | 219 | version: 2 |
| | 220 | ethernets: |
| | 221 | enp0s3: |
| | 222 | dhcp4: yes |
| | 223 | bridges: |
| | 224 | lxdbr0: |
| | 225 | dhcp4: yes |
| | 226 | interfaces: |
| | 227 | - enp0s3 |
| | 228 | }}} |
| | 229 | |
| | 230 | {{{ |
| | 231 | netplan apply |
| | 232 | }}} |
| | 233 | |
| | 234 | Modify the default container profile to add bridged network. |
| | 235 | |
| | 236 | {{{ |
| | 237 | lxc profile edit default |
| | 238 | }}} |
| | 239 | |
| | 240 | |
| | 241 | {{{ |
| | 242 | config: {} |
| | 243 | description: Default LXD profile |
| | 244 | devices: |
| | 245 | eth0: |
| | 246 | nictype: bridged |
| | 247 | parent: lxdbr0 |
| | 248 | type: nic |
| | 249 | root: |
| | 250 | path: / |
| | 251 | pool: default |
| | 252 | type: disk |
| | 253 | name: default |
| | 254 | used_by: [] |
| | 255 | }}} |
| | 256 | |
| | 257 | Check remote repositories |
| | 258 | |
| | 259 | {{{ |
| | 260 | lxc remote list |
| | 261 | }}} |
| | 262 | |
| | 263 | Local repositories |
| | 264 | |
| | 265 | {{{ |
| | 266 | lxc image list |
| | 267 | }}} |
| | 268 | |
| | 269 | Check remote images. |
| | 270 | |
| | 271 | {{{ |
| | 272 | lxc image list images: |
| | 273 | lxc image list images:ubuntu |
| | 274 | }}} |
| | 275 | |
| | 276 | Create a Ubuntu Container. |
| | 277 | |
| | 278 | {{{ |
| | 279 | lxc launch ubuntu:22.04 test-ct |
| | 280 | lxc list |
| | 281 | }}} |
| | 282 | |
| | 283 | Delete a container |
| | 284 | |
| | 285 | {{{ |
| | 286 | lxc stop test-ct |
| | 287 | lxc delete --force test-ct |
| | 288 | }}} |