linux - lxc create 说选项无效

标签 linux lxc

我正在尝试使用 lxc-create (v2.0.5) 创建一个容器。我没有安装 gpg,也不想安装它(嵌入式系统,没有 GPLv3)。我试过 --no-validate 选项,但 lxc-create 说它不存在,但它在帮助打印输出中显示为一个选项。有什么想法吗?

# lxc-create -t download -n main  --no-validate
lxc-create: unrecognized option '--no-validate'
Usage: lxc-create --name=NAME --template=TEMPLATE [OPTION...]

lxc-create creates a container

Options :
 -n, --name=NAME               NAME of the container
 -f, --config=CONFIG           Initial configuration file
 -t, --template=TEMPLATE       Template to use to setup container
 -B, --bdev=BDEV               Backing store type to use
     --dir=DIR                 Place rootfs directory under DIR


Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

See the lxc-create man page for further information.

LXC container image downloader

Optional arguments:
[ --variant <variant> ]: Variant of the image (default: "default")
[ --server <server> ]: Image server (default: "images.linuxcontainers.org")
[ --keyid <keyid> ]: GPG keyid (default: 0x...)
[ --keyserver <keyserver> ]: GPG keyserver to use
[ --no-validate ]: Disable GPG validation (not recommended)
[ --flush-cache ]: Flush the local copy (if present)
[ --force-cache ]: Force the use of the local copy even if expired

最佳答案

“--no-validate”不是“lxc-create”的选项,而是“download”模板的选项。

“下载”模板选项必须在“--”之后指定:

lxc-create -t download -n main -- --no-validate

关于linux - lxc create 说选项无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40752586/

相关文章:

c++ - 这个套接字绑定(bind)失败了吗?如果是,为什么?

linux - 带有拖放自定义小部件的pyqt linux QListWidget消失了

python - 如何在linux中执行python文件

c - gcc 和 arm-linux-gcc 之间的关系是什么

android - Android 上的 Linux 容器

ubuntu - 如何从lxc挂载文件夹

linux - ls -a 命令未找到

从 test-kitchen 运行时 vagrant-lxc 无法启动

c++ - 开发环境沙盒

docker - 基于主机的容器与基于图像的容器