Quota support is one of the most important features of LXC. When you want to give multiple users access to a LXC container and control disk space then quota's will be used. You can also use quota's to manage disk space for web hosting servers.
In this post, we will shows you, how to use quota's on lxc container using qemu nbd with a qcow image file on Debian 8.
A server running Debian-8 operating system.
A Non-root user account with sudo privilege set up on your server.
Installing Required Packages
First, you will need to install the lxc and qemu utilities. You can simply install it by running the following command:
sudo apt-get install lxc qemu-utils
Once the package is installed, you need to check whether the kernel loop module is loaded or not with the following command:
sudo lsmod | grep '^loop'
If you don't see any output, you can enable the module by running the following command:
sudo modprobe loop
Creating a Virtual Machine
Now, let's start by creating a virtual machine. In this example, we will use Debian Jessie for both the host and the container. But, you can also use any other distro as you wish.
The -t arguement specifies the main template. The -r specifies name of the release you want to use. The --fssize arguement specifies the size of the had disk and the -n arguement define the nama of the virtual machine.
Also, you need to convert the disk image to the qemu qcow2 format with the following command:
# Common configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
# only if bridge is set up (or use other method)
lxc.network.type = veth
lxc.network.name = veth0
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 192.168.1.100/24
lxc.network.ipv4.gateway = 0.0.0.0
Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with...
Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your...
User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading...