Slow boot times with lxc

An old thread but wanted to say that I have the same issues with slow starting Containers (LXC) . Searched for about two days for a solution, read logs etc and then finally stumbled over this thread.

Changed the IPv6 Settings for the container from DHCP to SLAAC and now the container start in seconds and is accessible over ssh also in seconds after start.

Thank you for your help. And sorry if this makes some mod angry because I dug up an old thread!

Thank you very much and have a nice day!
 
Just wanted to reply that I've had this issue for well over a year and never found an answer. But, changing IPv6 for SLAAC also solved my problems. I guess when the network was starting it was stuck at DHCP for IPv6 on my network. I will have to read up on what SLAAC is and why it solved the problem...

The strange part is that when I first create and start a container it never has this issue, only when it starts for the second and subsequent times.
Still relevant (e.g. if you change fixed IP setting to DHCP and did not think about your router not handing out ipv6). Thanks!
 
One more year, now PVE 7.4-3, and ... I run into the same issues: my 1st lxc container required minutes to boot. But thanx to this thread, the issue is solved :D, start is more or less instantaneous. Great !

Best Regards, Wumpus
 
Last edited:
Still relevant (e.g. if you change fixed IP setting to DHCP and did not think about your router not handing out ipv6). Thanks!
Setting IPv6 to `Static` with no address also works.

SLAAC generates an address and then runs some duplicate detection, which adds some small overhead at least. I'm not sure what the overhead of SLAAC is but if you don't intend to use IPv6 (and you probably don't if you're reading this thread because IPv6 DHCP didn't work for you) you may as well disable IPv6 entirely.
 
I had the same problem. LXC boot was taking ~5 min, which I traced back to the networking service in systemd.

Switching IPv6 to static (and leaving the value blank) fixed the issue, and startup is now much faster.

[[ I am running Debian 12 LXC (kernel Linux 6.8.8-4-pve) with the Proxmox 8.2.4 hypervisor. ]]
 
I had the same issue with slow boot times for containers , and the issue was the IPV6 , changed to SLAAC and now the container loads in 1 second.
Thanks to commenters on this post :)
 
The SLAAC Saga
by a tired dad who just wanted a Minecraft server to boot




It is the year 2025, and an evil monster named DHCP IPv6 Virtual Assassin (DiVa) terrorizes the land of LXC containers, randomly forcing long boot times. With smug laughter and overconfidence, DiVa had no idea what was coming.


From the mist appeared SLAAC Against Protocols (SlaP), a misfit hero with its own lexicon and a story to tell. After years of dodging network traffic and unnecessary highways, SlaP finally emerged to confront DiVa’s whirlwind.


Packets drawn, with a 5000-yard stare, DiVa snarled. SlaP approached slowly and asked one question:


“What’d the five fingers say to the face?!”


“SLAAPPP!”


And just like that, the curse of slow boots was broken.
 
The SLAAC Saga
by a tired dad who just wanted a Minecraft server to boot




It is the year 2025, and an evil monster named DHCP IPv6 Virtual Assassin (DiVa) terrorizes the land of LXC containers, randomly forcing long boot times. With smug laughter and overconfidence, DiVa had no idea what was coming.


From the mist appeared SLAAC Against Protocols (SlaP), a misfit hero with its own lexicon and a story to tell. After years of dodging network traffic and unnecessary highways, SlaP finally emerged to confront DiVa’s whirlwind.


Packets drawn, with a 5000-yard stare, DiVa snarled. SlaP approached slowly and asked one question:


“What’d the five fingers say to the face?!”


“SLAAPPP!”


And just like that, the curse of slow boots was broken.
I’d watch this movie.

Sincerely,
A soldier who began fighting this war as the 6th comment in this thread, back in 2017, before anyone had identified the solution. Never thought this would still be an issue all these years later…