prevent automatic modification of system files in LXC containers (1 Viewer)

Currently reading:
 prevent automatic modification of system files in LXC containers (1 Viewer)

Recently searched:

littlestar2568

Member
LV
0
Joined
Jun 20, 2023
Threads
1
Likes
0
Credits
221©
Cash
0$
ECash
0.00$
在PVE环境中,启动LXC容器时,PVE会自动检测容器内运行的操作系统并修改某些系统配置文件。以Alpine Linux为例,以下配置文件会自动修改:

/etc / hostname /etc / hosts /etc/resolv.conf /etc / network / interfaces

为防止在每次重新启动后PVE自动修改这些文件,可以使用文件名[ .pve-ignore创建空文件。+文件名]与相应的配置文件位于同一目录中。这样,PVE不会自动修改这些文件的内容。

例如:

  1. 为防止PVE自动修改网络接口设置: $触摸/etc/network/.pve-ignore.interfaces
  2. 为防止PVE自动修改DNS设置: $ touch / etc / .pve-ignore.resolv.conf
  3. 为防止PVE自动修改主机名设置: $触摸/etc/.pve-ignore.hosts $ touch / etc / .pve-ignore.hostname
您可以在此处找到官方文件: https://pve.proxmox.com/wiki/Linux_Container#_guest_operating_system_configuration
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Recently searched:

Similar threads

Users who are viewing this thread

Top Bottom