How to Keep LXC Containers HostFile After a Reboot
How to Keep LXC Containers HostFile After a Reboot
Proxmox VE tries to detect the Linux distribution in the container, and modifies some files. Here is a short list of things done at container startup:
set /etc/hostname
to set the container name
modify /etc/hosts
to allow lookup of the local hostname
Changes made by Proxmox VE are enclosed by comment markers:
# — BEGIN PVE —
data
# — END PVE —
Those markers will be inserted at a reasonable location in the file. If such a section already exists, it will be updated in place and will not be moved.
Modification of a file can be prevented by adding a .pve-ignore. file for it. For instance, if the file /etc/.pve-ignore.hosts exists then the /etc/hosts file will not be touched. This can be a simple empty file created via:
# touch /etc/.pve-ignore.hosts
? Support channel & make donation :
? Subscribe for more videos :
Youtube:
? Follow me On Social Media
Facebook :
***********************************************************************
? How To Check Bad Blocks Or Bad Sectors On a Hard Disk In Linux
? Linux How To Partition a Hard Drive Using the Parted Command
? Checking or Repairing a File System using fsck in Linux
? How To Monitor the Health of Your Hard Drive in Linux using SMART
? Linux iotop: Monitor your disk Input/Output
? How To use the “du” (Disk Usage) Command in Linux
? How To View Manipulate System Logs In Linux Using Journalctl Command
? How To Sync And Backup Files In Linux Using Rsync Command
? Linux cURL Command Tips and Tricks
? Linux tail and multitail commands
? Linux How To view Log Files
? How To use the History Command On Linux
? Tips and Tricks How To manipulate Text Files on Linux
? How to Archive, Compress and Extract Files Using the tar Command on Linux
? Linux – How to split larger files into smaller parts
? Linux commands : Top
***********************************************************************
#hostfile #virtualization #proxmox
[ad_2]
source