How to update a lxc container
This document (7012207) is provided subject to the disclaimer at the end of this document.
Environment
Situation
While the host system receives several updates, the container does not get these updates as well.
Running e.g. zypper to update the container is not always successful.
Packages like udev, mkinitrd, mdadm and a few more fail to update as these try to create devicenodes which is not allowed in a container.
Resolution
container lxc1 needs to be updated:
# lxc-stop -n lxc1
# zypper --root /var/lib/lxc/lxc1/rootfs patch
# lxc-start -n lxc1
Noncritical packages that don't require creation of device nodes still can be updated while the container is running. For a full featured update within a Service Pack the container needs to be stopped.
Cause
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7012207
- Creation Date: 25-Apr-2013
- Modified Date:28-Sep-2022
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com