Uploaded August 2023 | Updated November 2026, 14 hours ago
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 :
paypal.me/aminenina/10
πΈ Subscribe for more videos :
Youtube: youtube.com/user/aminosninatos
πΈ Follow me On Social Media
Facebook : facebook.com/aminosninatos
***********************************************************************
πΈ How To Check Bad Blocks Or Bad Sectors On a Hard Disk In Linux
https://www.youtube.com/watch?v=jE-I9...
πΈ Linux How To Partition a Hard Drive Using the Parted Command
https://www.youtube.com/watch?v=2IoEW...
πΈ Checking or Repairing a File System using fsck in Linux
https://www.youtube.com/watch?v=CcV_M...
πΈ How To Monitor the Health of Your Hard Drive in Linux using SMART
https://www.youtube.com/watch?v=z1z9R...
πΈ Linux iotop: Monitor your disk Input/Output
https://www.youtube.com/watch?v=pWG4v...
πΈ How To use the βduβ (Disk Usage) Command in Linux
https://www.youtube.com/watch?v=RA4bM...
πΈ How To View Manipulate System Logs In Linux Using Journalctl Command
youtube.com/watch?v=NE-fT-Fwvgw&t=3s
πΈ How To Sync And Backup Files In Linux Using Rsync Command
youtube.com/watch?v=aIMbg7vG6Rg&t=10s
πΈ Linux cURL Command Tips and Tricks
youtube.com/watch?v=hA3BAALWFJI
πΈ Linux tail and multitail commands
youtube.com/watch?v=QnPyWNyCn-U
πΈ Linux How To view Log Files
youtube.com/watch?v=CEYhs_9L01M&t=2s
πΈ How To use the History Command On Linux
youtube.com/watch?v=RkxIWlypB-s
πΈ Tips and Tricks How To manipulate Text Files on Linux
youtube.com/watch?v=Zk9M1w55XO0
πΈ How to Archive, Compress and Extract Files Using the tar Command on Linux
youtube.com/watch?v=8j-ZzOfbclM&t=2s
πΈ Linux - How to split larger files into smaller parts
youtube.com/watch?v=DaC5AWjmQXk
πΈ Linux commands : Top
youtube.com/watch?v=RM7ck63mcHQ
***********************************************************************
#hostfile #virtualization #proxmox
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 :
paypal.me/aminenina/10
πΈ Subscribe for more videos :
Youtube: youtube.com/user/aminosninatos
πΈ Follow me On Social Media
Facebook : facebook.com/aminosninatos
***********************************************************************
πΈ How To Check Bad Blocks Or Bad Sectors On a Hard Disk In Linux
https://www.youtube.com/watch?v=jE-I9...
πΈ Linux How To Partition a Hard Drive Using the Parted Command
https://www.youtube.com/watch?v=2IoEW...
πΈ Checking or Repairing a File System using fsck in Linux
https://www.youtube.com/watch?v=CcV_M...
πΈ How To Monitor the Health of Your Hard Drive in Linux using SMART
https://www.youtube.com/watch?v=z1z9R...
πΈ Linux iotop: Monitor your disk Input/Output
https://www.youtube.com/watch?v=pWG4v...
πΈ How To use the βduβ (Disk Usage) Command in Linux
https://www.youtube.com/watch?v=RA4bM...
πΈ How To View Manipulate System Logs In Linux Using Journalctl Command
youtube.com/watch?v=NE-fT-Fwvgw&t=3s
πΈ How To Sync And Backup Files In Linux Using Rsync Command
youtube.com/watch?v=aIMbg7vG6Rg&t=10s
πΈ Linux cURL Command Tips and Tricks
youtube.com/watch?v=hA3BAALWFJI
πΈ Linux tail and multitail commands
youtube.com/watch?v=QnPyWNyCn-U
πΈ Linux How To view Log Files
youtube.com/watch?v=CEYhs_9L01M&t=2s
πΈ How To use the History Command On Linux
youtube.com/watch?v=RkxIWlypB-s
πΈ Tips and Tricks How To manipulate Text Files on Linux
youtube.com/watch?v=Zk9M1w55XO0
πΈ How to Archive, Compress and Extract Files Using the tar Command on Linux
youtube.com/watch?v=8j-ZzOfbclM&t=2s
πΈ Linux - How to split larger files into smaller parts
youtube.com/watch?v=DaC5AWjmQXk
πΈ Linux commands : Top
youtube.com/watch?v=RM7ck63mcHQ
***********************************************************************
#hostfile #virtualization #proxmox










