Skip to content

Commit dd66370

Browse files
committed
add new post
1 parent 32df26e commit dd66370

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: post
3+
title: "Troubleshooting LXC Boot Hang"
4+
date: 2023-07-18 00:00:00 -0400
5+
category: "Troubleshooting"
6+
tags: ["linux", "LXC", "boot"]
7+
---
8+
9+
Recently I was troubleshooting slow bootup times with an LXC container I'd created. The container previously was running well, but after an update seemed to be running slowly. I restored it from a backup but still experienced slowness so, I investigated. The first really helpful step I found to take was to log out the bootup sequence of the container.
10+
11+
```shell
12+
lxc-start -n <container-id> -F --logfile=lxc.log --logpriority=debug
13+
```
14+
This command follows the boot process and logs out every step. Doing so I was able to find the hung systemd service
15+
16+
```log
17+
[ OK ] Started containerd container runtime.
18+
[FAILED] Failed to start Wait for network to be configured by ifupdown.
19+
See 'systemctl status ifupdown-wait-online.service' for details.
20+
[ OK ] Reached target Network is Online.
21+
Starting Docker Application Container Engine...
22+
```
23+
24+
From here it looked like an issue with some service waiting for `network-online.target` so I checked which services were dependent
25+
```shell
26+
systemctl show -p WantedBy network-online.target
27+
```
28+
29+
I also ran the following to determine which exact service was causing the hangup.
30+
31+
```shell
32+
systemd-analyze blame
33+
```
34+
35+
Between the two, I found a service I had created for a specific network adapter that I had since deleted. This was causing my issue, once I unregister the service and it booted normally. An easy solution once I had visibility into an otherwise vexing problem.
36+
37+
## Additional Reading
38+
39+
- [proxmox forums: slow-boot-times-with-lxc](https://forum.proxmox.com/threads/slow-boot-times-with-lxc.25778/)
40+
- [proxmox forums: 5-minute-delay](https://forum.proxmox.com/threads/5-minute-delay.129608/)

0 commit comments

Comments
 (0)