gpt4 book ai didi

linux - libvirt lxc 错误消息

转载 作者:太空宇宙 更新时间:2023-11-04 11:02:39 25 4
gpt4 key购买 nike

我在 CentOS7 上配置我的第一个 lxc 容器。
当我启动容器时,一切正常

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 容器的关键消息?
有人可以告诉我如何修复这些错误吗?

最佳答案

LXC 容器具有与主机相同的内核。因此出于安全原因,禁止 guest 通过 proc/sys 文件系统更改内核参数

尽管有这些错误, guest 应该可以正常启动

关于linux - libvirt lxc 错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26377142/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com