How to force shutdown a KVM VM with virsh

I have a KVM virtual machine running Windows, and when I try to shutdown, it never stopped. root@sok:~# virsh list Id Name State ————————– 1 iredmail running 3 win10 running root@sok:~# virsh shutdown win10 Domain win10 is being shutdown root@sok:~# virsh list Id Name State ————————– 1 iredmail running 3 win10 running root@sok:~# To force … Read more

Configure KVM Bridge Network using netplan

On Ubuntu 20.04 server we have the following network configuration “netplan get all” command show following netplan config file has the following Before you can use bridge in netplan, you need to install bridge-utils To configure bridge networking, modify the file as follows To check if there is any error in netplan configuration, run To … Read more

Proxmox LXC container docker not working

On a Proxmox server, LXC container failed to run docker. When I start a docker container, I get the following errors. root@erpdo:~# docker run hello-world Unable to find image ‘hello-world:latest’ locally latest: Pulling from library/hello-world 2db29710123e: Pull complete Digest: sha256:2498fce14358aa50ead0cc6c19990fc6ff866ce72aeb5546e1d59caac3d0d60f Status: Downloaded newer image for hello-world:latest docker: Error response from daemon: failed to create shim: … Read more

Migrate physical server to LXD container

lxd-p2c is developed by LXD team to migrate physical servers into LXD containers. https://github.com/lxc/lxd/tree/master/lxd-p2c Static binary files are available in Github. To Download, go to https://github.com/lxc/lxd/actions Click on any of the actions with a green tick mark. Under Artifacts, you will see the download link for various operating systems. Download the Linux.zip file, extract, copy … Read more

Where LXC Container files are stored?

Linux Container

LXC containers are stored in folder /var/lib/lxc Each container have a folder, which contains /var/lib/lxc/VM_NAME_HERE/config = configuration file /var/lib/lxc/VM_NAME_HERE/rootfs = file system used by lxc container. LXC container OS templates are stored in /usr/share/lxc/templates See LXC

LXC container networking not working

Linux Container

On a Debian server, I installed lxc, but when I create a container, it is missing IP address. When I did “lxc-attack VM_NAME”, and checked the network interface with “ip link” command, i can only see the loopback interface “lo”. On Host machine, when I checked network interfaces, lxcbr0 was missing. To fix this, edit … Read more

lxc storage list

To list Storage in LXD, use the command Example In this installation, we use btrfs file system for storing containers. The file location is /var/snap/lxd/common/lxd/disks/default.img. It is used by 7 containers. if using dir format, containers will be stored at See LXD

How to know you are inside a LXD container?

Identify LXD container

You have access to a virtual machine, you need to find out what virtualization technology it uses, you can install virt-what apt instal virt-what Then run virt-what command, it will show what virtualization technology you are using. root@mysql-1:~# virt-what lxc root@mysql-1:~# Another way to find is using the command. If you use LXD container, you … Read more