warden,create命令的--bind_mounts选项

flyfeiying 2014-10-20 04:18:09
自己在ubuntu10.04的服务器上搭了一个warden的环境,在命令行直接create可以成功创建container。查看create --help
create命令提供--bind_mounts选项,用于完成宿主机和虚拟机的文件路径映射,create --help的内容如下:


command: create
description: Create a container, optionally pass options.
usage: create [options]

[options] can be one of the following:

--bind_mounts[index] # array
.src_path <src_path> (string) # required
.dst_path <dst_path> (string) # required
.mode <mode> (RO, RW) # required
[--grace_time <grace_time> (uint32)] # optional
[--handle <handle> (string)] # optional
[--network <network> (string)] # optional
[--rootfs <rootfs> (string)] # optional

git的指导文档给出的说明是:
bind_mounts

If supplied, this specifies a set of paths to be bind mounted inside the container. The value must be an array. The elements in this array specify the bind mounts to execute, and are executed in order. Every element must be of the form:

[
# Path in the host filesystem
"/host/path",

# Path in the container
"/path/in/container",

# Optional hash with options. The `mode` key specifies whether the bind
# mount should be remounted as `ro` (read-only) or `rw` (read-write).
{
"mode" => "ro|rw"
}
]

我理解的命令行格式是:
create --bind_mounts ["/wardentest","/tmp/warden/rootfs/zyz",{"mode"=>"RW"}]
可是执行时却报错,网上搜索也找不到该命令选项的使用示例,不知道社区有没有大神用过这个命令,指导一下这个--bind_mounts选项到底该怎么写,谢谢!
...全文
1960 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
b779148873 2015-06-09
  • 打赏
  • 举报
回复
这个时候应该找个大神出马啦

547

社区成员

发帖
与我相关
我的任务
社区描述
Cloud Foundry是业界第一个开源PaaS云平台,它支持多种框架、语言、运行时环境、云平台及应用服务,使开发人员能够在几秒钟内进行应用程序的部署和扩展,无需担心任何基础架构的问题。
社区管理员
  • Cloud Foundry社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧