yum update
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the onl........
Assign way more replicas than you have of memory on all nodes and watch the Swarm crash which can easily reproduce in a small VMfor testing.
root@Deb11Docker01:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAM........
Even today we see a lot of servers that have different services and ports open for rpc and this creates not only potential inward vulnerabilities but perhaps more common, the abuse of your network resources in reflective rpc queries.
To stop this problem, you should disable and remove all services relating to rpc or at least block all relevant ports for the service.
Surprisingly, there are still some providers and OS installs in Linux that install these services and leave them........
A lot of companies are unsure which solution to choose and many may not be aware of Docker Swarm as an alternative to Kubernetes. One thing that many Sysadmins find is that Docker Swarm is simply easier, quicker to setup and maintain by far than Kubernetes.........
You are probably using some custom image or maybe this is some sort of container that didn't boot with systemd.
The solution is to use "reboot -f"
reboot -f
This will force the system/OS/VM/container to reboot.........
If you have swarm services and dockerd is creating a high load even with the containers just being idle, the easiest solution is to upgrade to a newer docker version.
For example an identical config of 3 nodes, with Redis 5 with 30 replicas produces a load of about 1.45 in Debian 10 with Docker18.09.1
If I create the same setup on Debian 11, with Docker 20.10.5+dfsg1 then the CPU usage is low.
One other difference I wondered is the kernel. In my test setup........
We used a simple Debian 10 VM and showed the memory before starting docker and with no docker containers being started. The goal is to show much much memory dockerd actually uses.
Before docker was started
The VMwas using 58M of RAM.
After docker was started
it was using 99MB of RAM.
How much RAM does docker use?
It's not scientific but fair to say dockerd itself uses about 41MB of RAM (99-58).........
Welcome to our in-depth guide on configuring NVIDIA GPUs with Docker on Ubuntu. This post is tailored for developers, data scientists, and IT professionals who are looking to leverage the power of NVIDIA's GPU acceleration within Docker containers.
Whether you're working on machine lea........
We could always disable swap but this would normally be a bad idea unless you have an incredible amount of RAM and a workload that will never exceed it. However, for live/containerized and high performance environments it could be desirable.
Another middle ground may be to set swappiness to a lower number.
You may also want to clear your kernel's cache, which could be eating up RAM unnecessarily by c........
request_module: runaway loop modprobe binfmt-464c Kernel panic - not syncing: No init found Pid: 1, comm: swapper/0 Not tainted
This is usually caused by a mismatch in architecture and happens frequently in development environments.
Here is a example of what caused this issue:
Your binaries are based on one architecture
Your kernel was compiled with another architecture.
Why does this happe........
Here is an easy way to restore things if you have the starting point and size of each partition using fdisk:
In this example we pretend that /dev/sda was wiped out, but the running system still has the info in /sys/class/block/sda
Go into each partition and record the "start" and "size"
hostdev@box /sys/class/block/sda/sda1 $ cat start
2048
hostdev@box /sys/class/block/sda/sd........
Just use apt-cache policy to find the repo of a package:
apt-cache policy lxd
lxd:
Installed: 3.0.3-0ubuntu1~18.04.2
Candidate: 3.0.3-0ubuntu1~18.04.2
Version table:
*** 3.0.3-0ubuntu1~18.04.2 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
&nb........
If you are using mint, delete the preference that stops snap from installing (as it is required for lxc)
sudo rm /etc/apt/preferences.d/nosnap.pref
1. Install lxd:
sudo apt install lxd
Issues install lxd or errors? Click here
Debian at this time does not have lxd so you'll need to use snap:
sudo apt in........
(firefox:9562): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Failed to execute child process "dbus-launch" (No such file or directory)
ExceptionHandler::GenerateDump cloned child 9743
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
[Parent 9562, Gecko_IOThread] WARNING: pipe error (40): Connection reset by peer: file /build/firefox-EymEXX/fire........
The Best Docker Tutorial for Beginners
We quickly explain the basic Docker concepts and show you how to do the most common tasks from starting your first container, to making custom images, a Docker Swarm Cluster Tutorial, docker compose and Docker buildfiles.........
Kubernetes Easy Beginners Tutorial/Architecture Guide
Kubernetes is known as container orchestration and we should start at explaining the container part of it.
A Container is what runs the actual application and based on an Image, and are more comparable to something like an LXC Container, Virtuozzo/OpenVZ using the Linux Kernel Namespaces feature. Containers run these images as independent, isolated operating environments under the O........
A very common use case is that you don't want to waste time using a video editor that requires you to open it up and manually import the video clip and audio clip, then manually delete the old audio track and import the video and new audio. That's too much work and time since we don't want to go through the hassle.
ffmpeg is our solution, all we have to do is specify 3 variables and we're done!
-i Windows2019-Server-Noaudio.mp4 is our in........
It is unfortunate that LXC's dir mode is completely insecure and allows way too much information from the host to be seen. I wonder if there will eventually be a way to break into the host filesystem or other container's storage?
OpenVZ better security:
[root@ev ~]# cat /proc/mdstat
cat: /proc/mdstat: No such file or directory
/dev/simfs 843G 740G 61G........
Use fdisk on your USB drive to create a bootable NTFS partition (in my case /dev/sdb):
sudo fdisk /dev/sdb
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)........
If you don't aleady have it, you'll need EPEL
Install LXC
yum -y install lxc lxc-templates
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.it.ubc.ca
* epel: mirrors.kernel.org
* extras: mirror.it.ubc.ca
* updates:........
systemd is like the service manager for your Centos and other modern Linux distributions (including Debian/Mint/Ubuntu) allows you to enable services, stop them, restart them, check their status and even reboot your system.
The key commands or arguments you will use with systemctl are the following:
Unit Commands:
list-units [PATTERN...] List loaded units
&nbs........
vzctl stop 4096
Removing stale lock file /vz/lock/4096.lck
Stopping container ...
Child 546213 exited with status 1
^Z
[1]+ Stopped vzctl stop 4096
~]# rm /vz/lock/4096.lck
rm: remove regular file `/vz/lock/4096.lck'? y
~]# vzctl stop 4096
Stopping container ...
Child 546246 exited with status 1........
I've read a few guides about this but they didn't work for me.
sudo apt-get install bridge-utils
#don't think the above is enough it won't work still even though you have by default an /etc/qemu-ifup that handles it if you have the right tools and setup
sudo qemu-system-x86_64 -net tap -net nic -enable-kvm -cpu host,vmx=on ~/VirtualBox VMs/vsphere-vcenter/vsphere-vcenter.vdi
W: /etc/qemu-ifup: no bridge for guest interface foun........
I can't get vmx cpu extensions to show up in Virtualbox guests despite enabling nested paging and
enable vmx in virtualbox guest but this doesn't help that you check VT-X or the AMD Virtualization SVM it enables it for the guest to use BUT does not pass it through. This means if you check cat /proc/cpuinfo in the guest you will see the CPUdoesn't support virtualization. It looks like VirtualBox still hasn't implemented this!
But there is good news I&n........
Starting container...
vzquota : (error) Quota on syscall for id 4532: No such file or directory
vzquota on failed [3]
Solution
vzquota drop 4532
Then start the container and it should work. It actually happened after migrating the VPS manually to ano........
Error: Unable to apply new quota values: quota not running
Container start failed (try to check kernel messages, e.g. "dmesg | tail")
Killing container ...
Container was stopped
Error: Unable to apply new quota values: quota not running
Can't umount /vz/private/123123: Invalid argument
[root@rtt 123123]# vzquota on 123123
vzquota : (error) Can't open quota file for id 123123, maybe you need to reinit........
This happened on Centos for no apparent reason with no obvious issue in the logs. Data could be read fine but not written (possibly due to some corruption or out of memory issue in the OpenVZ container is the best guess).
All mysql update and insert queries failed freezing without any error log on any database and table.
Tried to restart:
service mysqld restart
Timeout error occurred trying to stop MySQL........
This container won't start after exhausting its memory. There are no relevant or helpful messages in dmesg or vzctl.log as well. Standard troubleshooting such as disabling PPP etc has not helped.
2017-07-06T23:33:29-0400 vzctl : CT 888171 : Locked by: pid 166029, cmdline vzctl start 888171
2017-07-06T23:33:29-0400 vzctl : CT 888171 : Container already locked
2017-07-06T23:33:29-0400 vzctl : CT 888171 : Container was stopped
2017-07........
The only solution after trying many suggestions was to simply restart the "vz" service (definitely not preferable).
Even doing an ifdown and ifup for venet0 did not help.
ifup venet0
Bringing up interface venet0:
Configuring interface venet0:
net.ipv4.conf.venet0.send_redirects = 0
RTNETLINK answers: Network is down
Some errors from log:
CPT ERR: d2dc60........
migrating from an old OpenVZ (Centos 5) to new OpenVZ (Centos 6)
Also if migrating from 32-bit HN to 64-bit your RAM will probably be much bigger than it should be!
16x bigger
eg. 32bit HN:
total used free shared buffers cached
Mem:&nb........
Syncing private
Live migrating container...
Syncing 2nd level quota
11000: invalid option -- F
Usage: vzdqload quotaid [-c file] commands
Loads user/group qouta information from stdin into quota file.
-c file use given quota file
Commands specify what user/group information to load:
-G grace time
-U disk limits........
rm /vz/lock/1200.lck
rm: remove regular file `/vz/lock/1200.lck'? y
vzctl start 1200
Container already locked
vzctl start 1200
Starting container ...
vzquota : (error) can't lock quota file, some quota operations are performing for id 1200
vzquota on failed [7]
vzquota off 1200
vzctl start 1200
vzquota on 1200
root@rttbox ~]# vzquota off 1200
vzquota : (........
Errors like this are shown on high usage servers and ports so it is common to see it on http and even imap ports:
possible SYN flooding on port 80. Sending cookies.
The Linux kernel will even detect flooding on OpenVZ containers:
possible SYN flooding on ctid 6000, port 993. Sending cookies.
In many cases this is not an issue and is more so simply a result of regular, but high usage traffic.........
service iptables start
iptables: Applying firewall rules: iptables-restore: line 40 failed
[FAILED]........
vzctl set 2 --devnodes fuse:rw --save
Where "2" is the ctid........
It sounds like this is corrected in later versions of the OpenVZ kernel but Iam not sure, it may also be that a much newer kernel is needed and Centos may not have a recent enough kernel.
*Debain 7.0 however does work fine as a temporary fix or work around.
Debian 8 OpenVZ no IP and networking not working:
lo Link encap:Local Loopback
 ........
iptables -t nat -A PREROUTING -p tcp -m tcp -d 192.168.2.1/32 --dport 3389 -j DNAT --to-destination 192.168.5.2:3389
iptables v1.4.7: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
The above is often because you don't have the correct modules loaded on the hostnode or enabled for the container but in some cases it's actually a weird openvz setting.
Che........
2014-08-12T19:05:55-0400 vzctl : CT 391801 : Unable to start init, probably incorrect template
2014-08-12T19:05:55-0400 vzctl : CT 391801 : Container start failed
This was caused by trying to run a 64-bit template on a 32-bit kernel hostnode which is obviously impossible.
The solution is to use a 32-bit template or upgrade the hostnode to 64-bit.........
vzctl stop ctid
Killing container ...
Child 1033348 exited with status 7
Unable to stop container
vzctl enter ctid
enter into CT 29831 failed
Some have suggested using vzctl stop ctid --fast which does not work.
The only thing that seems to work is restarting the vz service.........
error: Failed to create domain from /home/kvm/kvm101/kvm101.xml
error: cannot open file '/dev//dev/kvmcontainer/kvm101_img': No such file or directory
This is caused by what we consider a quark in SolusVMthat Ihelped a client with.
SolusVMhas as config for the "LVMvolume name" and does not enforce any convention.
Naturally most technical people would use the actual path eg "/dev/kvmcontainer".
However th........
Linux box13. 2.6.32-042stab076.5 #1 SMP Mon Mar 18 20:41:34 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux
even setting privvmpages to a specific setting DOES not affect "free -m" in containers.
This is probably a kernel issue
23:36:29 up 159 days, 7:12, 4 users, load average: 0.42, 0.44, 0.33
[root@box13 ~]# free -m
total&n........
Starting container...
vzquota : (error) Quota on syscall for id 42131: No such file or directory
vzquota on failed [3]
Solution
cd /var/vzquota
mv quota.42131 quota.42131-disable
vzctl start 42131
Starting container...
Initializing quota ...
Container is mounted
Adding IP address(es):
Setting CPU units: 1000
Container start in progress...
........
Container is currently mounted (umount first)
The container is stuck in the "mounted" state, you must manually start it to get it out of that state (there is no umount option as implied by OpenVZ vzctl).........
When trying to reboot this Centos 5 container, it gets stuck as "mounted" and requires a manual start command, here is what dmesg shows:
[424458.173252] VE10000: no allowed mount options found for device 0:21
[424458.177970] proc: unrecognized mount option "relatime" or missing value
[424460.297663] CT: 10000: stopped
[426663.466433] CT: 10000: started........
vzquota : (warning) block_hard_limit [102] < block_current_usage [520824]
This is because your disk usage of the container exceeds the quota.
Eg. once on a test container I had accidentally set it to 32MB yet the OS took about 600MB.
Just set the quota to something bigger than the currently used space to solve it.
vzctl set 3891 --diskspace 5G:5G --save........
iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
This solution applies to all other iptables modules/problems for OpenVZ, you'll just need to add them to both lists/lines below if you have modules other than what I have below.
The modules need to be enabled in both iptables and the OpenVZ hostnode itself and then the containers which need it must be restarted.
How To Enable IPTables Modules in OpenVZ........
One of my test Centos 5 containers was on a partition that filled up and it threw all sorts of errors and stopped responding but now I can't boot it again anymore.
All the console shows is the Linux Penguin on the top left corner and the xm console says "usbcore: registered new driver hub" and has halted there.
Centos 5 Xen container stuck/frozen won't boot on "usbcore: registered new driver hub"
Another great way of troubleshooting is booting fro........
Stuff like this always happens/breaks after a vzctl update, whether it's new parameters being added or required etc..
File /etc/vz/conf/ve-vps.basic.conf-sample not found: No such file or directory
Fix the value of CONFIGFILE in /etc/vz/vz.conf
Creation of container private area failed
Warning: distribution not specified in CT config, using defaults from /etc/vz/dists/default
WARNING: /etc/vz/conf/4400.conf not found: No such file or directory........
This may not apply to everyone but here is what happened to me.
One day my IP connectivity for one container went dead, I could ping the hostnode from it and the hostnode could ping it but there was no external routing. I restarted the network service but it didn't help.
I checked the routing table inside the VPS and the host and everything looked normal. Iadded another different IPon the same subnet to the container and it worked. Right away I st........
Starting online migration of CT 25000 to 192.168.5.1
Preparing remote node
Initializing remote quota
Syncing private
Live migrating container...
Error: Failed to suspend container
CPT ERR: f68cf000,25000 :foreign process 15755/14731(vzctl) inside CT (e.g. vzctl enter or vzctl exec).
CPT ERR: f68cf000,25000 :suspend is impossible now.
CPT ERR: f68cf000,25000 :foreign process 15755/14731(vzctl) inside CT (e.g. vzctl enter or........
I thought only a faster CPUand SSDwould help but I already have a Quad-Core CPU and it wasn't being maxed out. The actual tests were performed on an AMD-V enabled 128MB dual core VMWare container though.
There is a flag that can be passed to make in order to start multiple threads, by specifying 4 threads I was able to reduce the whole kernel compilation time from scratch by about 50%! (65minutes vs 31minutes!). *Yes I did do a make clean before each co........
You can't just do a straight copy of the VDI image of your virtual machine because there is a unique UUID, wellI believe you can and then you can create a new UUID manually (at least you could with VMWARE) but to keep it clean just use this method:
VBoxManage clonevdi /path/to/your.vdi outputname.vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
That's all there is to it, just wait for it copy and you can th........
Make sure the module "tun" is loaded on the host.
vzctl set 2000 --devnodes net/tun:rw --save
*Note what's below is what OpenVZ says you need (but I've never had to do it)
vzctl exec 2000 mkdir -p /dev/net
vzctl exec 2000 mknod /dev/net/tun c 10 200
vzctl exec 2000 chmod 600 /dev/net/tun
On the container test the device:
when Something is wrong:........
first container would not come up:
Starting CT 2333:
service vz stop
OpenVZ is locked [FAILED]
2010-11-29T23:26:23-0800 vzctl : CT 2333 : Starting container ...
2010-11-29T23:37:21-08........
This is an easy fix and highlights a huge issue again with Linux and Flash still not playing nicely/working as well as Windows yet.
Solution - Go to "about:config" and disable the two entries (set them to false):
dom.ipc.plugins.enabled.libflashplayer.so
dom.ipc.plugins.enabled.libnptest.so........
Virtualbox Error
I tried to copy a .vdi of one container to use in another one, basically to clone instead of having to install the OS again.
Failed to start the virtual machine Centos 5.5 Mirror.
Medium '/home/testuser/.VirtualBox/HardDisks/Centos 5.5 Mirror.vdi' is not accessible. UUID {a1a9fad7-0402-4867-b8f3-39fb49454bc5} of the medium '/home/testuser/.VirtualBox/HardDisks/Centos 5.5 Mirror.vdi' does not match the value {4945a0e8-0ed5-4736-9088-bcaf........
Adding IP address(es): 192.168.5.8 192.168.5.9
Setting CPU units: 1000
Error: undump failed: Invalid argument
Restoring failed:
Error: iptables-restore exited with 2
Error: Most probably some iptables modules are not loaded
Error: rst_restore_net: -22
Container start failed
Stopping container ...
Container was stopped
Container is unmounted
Error: Failed to undump VE
Resuming...
vzquota : (erro........
This error is annoying, in a Virtuozzo KB entry about this ip tables nat problem they say the kernel needs to be ugpraded:
Symptoms
The node runs 2.6.18-x kernel older than 2.6.18-028stab053.10.
NAT module does not work in container, you get "can't initialize iptables table 'nat'" error:
# iptables -t nat........
This is obviously a bug in the r8169 kernel module and it seems to affect a lot of people. I upgraded to the latest kernel and hope this won't happen anymore, as it is a very serious error. This is especially serious for those who are running servers with this chipset, who can afford for the NIC to randomly go off-line for no apparent reason?
[655548.189113] type=1505 audit(1277067560.902:5): operation="profile_load" name="/usr/bin/freshclam&q........
The default options for iptables are very basic. Here is what you need to do in order to enable them in OpenVZ.
1.) Add the modules to iptables and restart iptables:
vi /etc/sysconfig/iptables-config
Edit the line as so:
IPTABLES_MODULES="ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp"
2.........
This was unbelievable how much the Xen kernel slows things down, keep in mind both tests were done on the hostnode, one was with the Openvz-Xen hybrid kernel and the other was just OpenVZ. You can see the performance difference is nearly 300% better when not using the Xen kernel.
OpenVZ-Xen Kernel Test Results (I was wondering what was wrong/so slow with my Core i5!)
# # # # # #&n........
Proxmox has made this free utility to backup running OpenVZ containers. It's a great program which is actually just a PERL script but gets the job done. This program is not 100% required because all it really does is cp -a from your container's path as far as I know but it is still good to have uniformity to how you backup your containers.
For RPM distros such as Centos/RHEL/Fedora etc.. download and install this:
wget http://www.proxmox.com/cms_proxm........
I didn't find any useful information that actually fixed this. My VPS was in the "Running State" and I could not stop or restart it. I kept getting "Container already locked" no matter what Idid (I tried all the suggestions in the Google results for this error).
Most of the suggestions were for Windows but I only use Linux. The other solutioins also said to restart the VZ service or even the entire hostnode and this was not acceptable to me........
For some reason Ikeep getting this error when trying to run a sudo command eg:
sudo -u someuser somecommand
sudo: Error dropping capabilities, aborting
My version of sudo is:sudo-1.6.9p17-3.el5_3.1 and I've heard that version 1.7 fixes everything. The only thing is yum does not think sudo has any update. Iguess the new version has not been committed to the RPM repository yet.
This is really a huge and ann........
To enable Fuse to work inside a OpenVZ container it's very simple (although some people say it can't be done).
Remember that on your HN(HostNode) for OpenVZ, Fuse must be installed and the module must be loaded for this to work. In addition remember that you need the Fuse package installed inside the container of course.
vzctl set 2000 --devices c:10:229:rw --save
vzctl exec 2000 mknod /dev/fuse c 10 229
The part that most people forget........
When trying to even cd or ls the mounted OCFS2 partition it crashes. Ithink this is a combination of VMWare Server's problem and the way I mounted and symlinked to it.
More than anything this shows the problem and lack of forsight with VMWare, but also that OCFS2 is easily crashed if you do strange things.
Output of /var/log/messages for OCFS2
Apr 10 15:57:45 localhost kernel: [84331.691258] Modules linked in: vmnet vmci vmmon ocfs2_stac........