Proxmox

Container qui ne démarre pas

Dernière mise à jour : 04/07/2021 à 00h10
Probablement dû à la mise à jour du système proxmox, je me suis retrouvé avec un container sous debian 10 qui ne démarrait plus.
Voici les logs obtenus via la commande :
Code BASH :
 
lxc-start -n 103 -F -l DEBUG -o /tmp/lxc-103.log
 



103 est l'ID du container



Code BASH :
 
lxc-start 103 20210703213926.962 INFO     lsm - lsm/lsm.c:lsm_init:40 - Initialized LSM security driver AppArmor
lxc-start 103 20210703213926.962 INFO     conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "103", config section "lxc"
lxc-start 103 20210703213927.419 DEBUG    conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 103 lxc pre-start produced output: close (rename) atomic file '/etc/resolv.conf' failed: Operation not permitted
lxc-start 103 20210703213927.420 DEBUG    conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 103 lxc pre-start produced output: error in setup task PVE::LXC::Setup::pre_start_hook
lxc-start 103 20210703213927.428 ERROR    conf - conf.c:run_buffer:314 - Script exited with status 1
lxc-start 103 20210703213927.428 ERROR    start - start.c:lxc_init:798 - Failed to run lxc.hook.pre-start for container "103"
lxc-start 103 20210703213927.428 ERROR    start - start.c:__lxc_start:1945 - Failed to initialize container "103"
lxc-start 103 20210703213927.428 INFO     conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "103", config section "lxc"
lxc-start 103 20210703213927.849 INFO     conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "103", config section "lxc"
lxc-start 103 20210703213928.350 ERROR    lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 103 20210703213928.350 ERROR    lxc_start - tools/lxc_start.c:main:314 - Additional information can be obtained by setting the --logfile and --logpriority options
 


Après quelques recherches, l’enchaînement de commandes suivant m'a permis de résoudre le problème

Code BASH :
 
pct mount 103
 


Code BASH :
 
touch /var/lib/lxc/103/rootfs/etc/.pve-ignore.resolv.conf
 


Code BASH :
 
pct unmount 103
 


Code BASH :
 
pct start 103
 
Cette page a été vue 205 fois