如何在 15 秒内创建 LXC Ubuntu 容器

运行此命令:

lxc-launch-ubuntu.sh
lxc launch ubuntu:22.04 mycontainer

如果你看到此错误消息

lxc-no-storage-pool-error.txt
Error: Failed container creation: No storage pool found. Please create a new storage pool

请参见如何修复 lxd ‘Failed container creation: No storage pool found. Please create a new storage pool.’

现在你可以使用以下命令连接到你的容器

lxc-exec-shell.sh
lxc exec mycontainer /bin/bash

Check out similar posts by category: Container, Linux, LXC