0

CentOS7 で最初の lxc コンテナーを構成します。
コンテナを起動すると、すべてがOKステータスです

1) コンテナ内で init 6 を送信すると、次のエラーが発生します。

Could not unmount /dev/ptmx: Device or resource busy
Could not unmount /dev/ptmx: Device or resource busy
Cannot finalize remaining file systems and devices, giving up.

2) メッセージログ:

Oct 15 07:37:56  systemd-sysctl: Failed to write '4294967295' to '/proc/sys/kernel/shmmax': Read-only file system
Oct 15 07:37:56  systemd-sysctl: Failed to write '268435456' to '/proc/sys/kernel/shmall': Read-only file system
Oct 15 07:37:56  systemd-sysctl: Failed to write '16' to '/proc/sys/kernel/sysrq': Read-only file system
Oct 15 07:37:56  systemd-sysctl: Failed to write '1' to '/proc/sys/kernel/core_uses_pid': Read-only file system
Oct 15 07:37:56  systemd-sysctl: Failed to write '1' to '/proc/sys/net/ipv4/conf/default/rp_filter': Read-only file system
Oct 15 07:37:56  systemd-sysctl: Failed to write '0' to '/proc/sys/net/ipv4/conf/default/accept_source_route': Read-only file system
Oct 15 07:37:56  systemd-sysctl: Failed to write '1' to '/proc/sys/fs/protected_hardlinks': Read-only file system
Oct 15 07:37:56  systemd-sysctl: Failed to write '1' to '/proc/sys/fs/protected_symlinks': Read-only file system
Oct 15 07:37:56  systemd: Started Dynamic System Tuning Daemon.
Oct 15 07:37:56  tuned: Exception in thread Thread-2:
Oct 15 07:37:56  tuned: Traceback (most recent call last):
Oct 15 07:37:56  tuned: File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
Oct 15 07:37:56  tuned: self.run()
Oct 15 07:37:56  tuned: File "/usr/lib64/python2.7/threading.py", line 764, in run
Oct 15 07:37:56  tuned: self.__target(*self.__args, **self.__kwargs)
Oct 15 07:37:56  tuned: File "/usr/lib/python2.7/site-packages/tuned/daemon/daemon.py", line 82, in _thread_code
Oct 15 07:37:56  tuned: self._unit_manager.create(self._profile.units)
Oct 15 07:37:56  tuned: File "/usr/lib/python2.7/site-packages/tuned/units/manager.py", line 62, in create
Oct 15 07:37:56  tuned: plugin.initialize_instances()
Oct 15 07:37:56  tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/base.py", line 101, in initialize_instances
Oct 15 07:37:56  tuned: self._instance_init(instance)
Oct 15 07:37:56  tuned: File "/usr/lib/python2.7/site-packages/tuned/plugins/plugin_cpu.py", line 81, in _instance_init
Oct 15 07:37:56  tuned: self._cpu_latency_fd = os.open("/dev/cpu_dma_latency", os.O_WRONLY)
Oct 15 07:37:56  tuned: OSError: [Errno 2] No such file or directory: '/dev/cpu_dma_latency'
Oct 15 07:37:56  network: Bringing up loopback interface:  [  OK  ]
Oct 15 07:37:58  network: Bringing up interface eth0:  [  OK  ]
Oct 15 07:37:58  systemd-sysctl: Failed to write '4294967295' to '/proc/sys/kernel/shmmax': Read-only file system
Oct 15 07:37:58  systemd-sysctl: Failed to write '268435456' to '/proc/sys/kernel/shmall': Read-only file system
Oct 15 07:37:58  systemd-sysctl: Failed to write '16' to '/proc/sys/kernel/sysrq': Read-only file system
Oct 15 07:37:58  systemd-sysctl: Failed to write '1' to '/proc/sys/kernel/core_uses_pid': Read-only file system
Oct 15 07:37:58  systemd-sysctl: Failed to write '1' to '/proc/sys/net/ipv4/conf/default/rp_filter': Read-only file system
Oct 15 07:37:58  systemd-sysctl: Failed to write '0' to '/proc/sys/net/ipv4/conf/default/accept_source_route': Read-only file system
Oct 15 07:37:58  systemd-sysctl: Failed to write '1' to '/proc/sys/fs/protected_hardlinks': Read-only file system
Oct 15 07:37:58  systemd-sysctl: Failed to write '1' to '/proc/sys/fs/protected_symlinks': Read-only file system
kdumpctl: Error: /boot/vmlinuz-3.10.0-123.8.1.el7.x86_64 not found.
kdumpctl: Starting kdump: [FAILED]

lxc コンテナの重要なメッセージがわかりませんか?
これらのエラーを修正する方法を教えてください。

4

1 に答える 1

1

LXC コンテナには、カーネル ホストと同じカーネルがあります。したがって、セキュリティ上の理由から、ゲストが proc/sys ファイルシステムを介してカーネル パラメータを変更することは禁止されています。

このエラーにもかかわらず、ゲストは正常に起動するはずです

于 2014-12-04T13:32:23.993 に答える