Bobcares

LXC Container Disable autostart | Guide

by | Nov 26, 2023

Learn how to disable LXC container autostart. Our LXC/LXD Support team is here to help you with your questions and concerns.

LXC Container Disable autostart

In the world of containerization, managing when your containers start helps maintain control over our system’s resources. By default, LXC containers come preset to autostart.

LXC Container Disable autostart

However, sometimes we have to disable autostart. Today we are going to take a look at how to disable the autostart feature for LXC containers:

  1. First, open a new terminal and log into the LXC server via SSH.
  2. Then, head to the LXC directory with the container configurations:

    cd /var/lib/lxc

  3. Now, list the containers on our server with this command:

    ls -l

  4. Now, choose the container for which we want to change autostart settings and head to its directory.

    cd /var/lib/lxc/{your-container-name}

  5. Next, open the configuration file and find the line that reads “lxc.start.auto = 1” in the configuration file. Then change it to “lxc.start.auto = 0.”

    This will inform the system not to start the container automatically.

  6. Finally, save the changes and exit the text editor.

We can confirm if the autostart feature has been successfully disabled or not with this command:

lxc-ls –fancy

With the above steps, we get control over when our LXC containers launch. Let us know in the comments if you need further help.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

In brief, our Support Experts demonstrated how to disable LXC container autostart.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.