【发布时间】:2014-12-13 12:59:09
【问题描述】:
我尝试在克隆时更改 rootfs 目录:
lxc-clone -o foo -n bar --dir /lxc/bar
但我收到了这个错误:
lxc-clone: unrecognized option '--dir'
然后我尝试使用“-B”选项和“lvm”值在 LV 中设置 rootfs:
lxc-clone -o foo -n bar -B lvm --vgname lxc-vg
我得到这个错误:
Error: vgname not supported
Usage: lxc-clone [-s] [-B backingstore] [-L size[unit]] [-K] [-M] [-H]
[-p lxcpath] [-P newlxcpath] orig new
-s: snapshot rather than copy
-B: use specified new backingstore. Default is the same as
the original. Options include aufs, btrfs, lvm, overlayfs,
dir and loop
-L: for blockdev-backed backingstore, use specified size * specified
unit. Default size is the size of the source blockdev, default
unit is MB
-K: Keep name - do not change the container name
-M: Keep macaddr - do not choose a random new mac address
-p: use container orig from custom lxcpath
-P: create container new in custom lxcpath
为什么我不能将“--vgname”或“--dir”与“lxc-clone”一起使用?
我究竟做错了什么?
克隆容器时是否可以更改 rootfs 目录?
PS:我使用的是 Ubuntu 14.04 和 lxc 1.0.5
【问题讨论】: