嗯,答案似乎是https://help.ubuntu.com/13.04/serverguide/lxc.html#lxc-hostsetup页面下使用单独的文件系统来存储容器标题但它对我来说不起作用。
我已经为 lxc 文件夹创建了一个符号链接,指向另一个分区中的另一个文件夹(如文章中所建议的),例如
sudo ln -s /some/other/folder /var/lib/lxc
此后,当我尝试创建容器时出现以下错误:
destan@xxx:~$ sudo lxc-create -t ubuntu -n testing
[sudo] password for destan:
lxc-create: No config file specified, using the default config /etc/lxc/default.conf
Checking cache download in /var/cache/lxc/raring/rootfs-amd64 ...
Copy /var/cache/lxc/raring/rootfs-amd64 to /var/lib/lxc/para/rootfs ...
Copying rootfs to /var/lib/lxc/para/rootfs ...
/usr/sbin/locale-gen: line 207: /dev/null: Permission denied
/usr/sbin/locale-gen: line 208: /dev/null: Permission denied
/usr/sbin/locale-gen: line 210: /dev/null: Permission denied
/usr/sbin/locale-gen: line 217: /dev/null: Permission denied
Generating locales...
en_US.UTF-8... done
/usr/sbin/locale-gen: line 242: /dev/null: Permission denied
lxc-create: failed to execute template 'ubuntu'
lxc-create: aborted
有人有主意吗?