以下のURLを参考にMaaSのインストールとテストを試みました。
https://docs.maas.io/2.1/en/installconfig-lxd-install
上記ドキュメントのプロファイル編集部分より
lxc profile edit maas
configの後ろの{}を以下の内容(config:は除く)に置き換えます:
1 2 3 4 5 6
config: raw.lxc: |- lxc.cgroup.devices.allow = c 10:237 rwm lxc.aa_profile = unconfined lxc.cgroup.devices.allow = b 7:* rwm security.privileged: "true"
launch手順で以下のエラーが発生しました:
1 2 3
$ lxc launch -p maas ubuntu:16.04 xenial-maas Creating xenial-maas Error: Failed container creation: Failed to load raw.lxc
これは自分がLXD 3.0を使っているためで、上記の設定キーが古いことが原因です。
このコメントによると、lxd 2.1以降はlxc.aa_profile
がlxc.apparmor.profile
に変更されています。
したがって、回避策は以下の通りです。
再度
lxc profile edit maas
lxc.aa_profile
をlxc.apparmor.profile
に置き換えます。1 2 3 4 5 6
config: raw.lxc: |- lxc.cgroup.devices.allow = c 10:237 rwm lxc.apparmor.profile = unconfined lxc.cgroup.devices.allow = b 7:* rwm security.privileged: "true"
launchコマンドを再実行します。
1 2 3
$ lxc launch -p maas ubuntu:16.04 xenial-maas Creating xenial-maas Starting xenial-maas