VM: lxc: Resize disk | General Utilities

lxc general utilities and common operations.

VM: lxc: Resize disk | General Utilities
Photo by Vincent Botta / Unsplash

Resize an existing container

lxc config device set <container> root size 50GB

Add a New Network:

lxc network create mynet --type=bridge ipv4.address=192.168.9.1/24 ipv4.nat=true

To inspect:

lxc network show mynet

To stop autostart:

lxc config set <container> boot.autostart false

To set CPU (shut down container before trying this)

lxc config set <container> limits.cpu 5

Add cdrom to the container:

lxc config device add <container> cdrom disk source=/my.iso

Remove cdrom from the container:

lxc config device remove <container> cdrom

Change Ram Allotment to a container:

lxc config set test limits.memory 4GB
Linux Rocks Every Day