1

Today I modified an LXC container to add an extra "bind mount", but forgot to create the mount directory in the container root filesystem.

As a result the container startup failed, and left the system in a strange state.

The startup had already created the "veth" interface for the container, and renamed another interface that I was binding to the container with the "phys" method from the system "predictable interface names" name of ensXfY to the container name of eth1.

But after the crash it didn't clean this up.

So even after fixing the underlying problem, the container still couldn't start, because the host networking was messed up.

This happended to me on Ubuntu 16.04 running LXC package 2.0.11-0ubuntu1~16.04.3, but it would probably affect some other versions of LXC on other Linux distros too.

1 Answer 1

0

This had created two separate issues - a stale "veth" pair, and a physical interface not being named correctly.

I solved the issue by combining bits of this post:

https://stackoverflow.com/questions/31989426/how-to-identify-orphaned-veth-interfaces-and-how-to-delete-them

for the "veth" issue, and this post:

CentOS 7 - Rename network interface without rebooting

For renaming network interfaces.

The two commands I ended up using ended up just being:

ip link delete vethXYZ
ip link set eth1 name ensXfY

After fixing the real original problem (by creating the mount point directory), and running these commands, I was then able to start the container correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .