openvz interview questions
Top openvz frequently asked interview questions
I am trying to create a secondary private interface to communicate between 2 openvz containers.
I have tried the steps indicated in the manual here: http://openvz.org/Virtual_Ethernet_device
Doing this I am able to get the container to communicate with the br0 interface I have created on the host machine but the host machine cannot communicate with the container and the containers cannot talk to eachother.
If anyone has experience with this can you share how you accomplished it?
Source: (StackOverflow)
One of my commands in my bash script will depend on the virtualization of the server (XEN or OpenVZ or KVM ). How can I check which of these is in use in bash?
Source: (StackOverflow)
I am newbie to world of virtualisation. Can some one explain me what are the differences between openVZ and docker.
What could be good for the future ?
Pros and cons ?
Source: (StackOverflow)
I have OpenVZ VPS and have problem with clearing the cache:
In OpenVZ not work echo 3 > /proc/sys/vm/drop_caches
How may be this cache clear?
Source: (StackOverflow)
System memory is consumed by ~140MB after running process, but process took only ~8MB. This process (openttd dedicaded server) is completely standalone (does not communicate with others processes).
Before
free -m
total used free shared buffers cached
Mem: 1000 777 222 0 0 0
-/+ buffers/cache: 777 222
Swap: 0 0 0
After
free -m
total used free shared buffers cached
Mem: 1000 913 86 0 0 0
-/+ buffers/cache: 913 86
Swap: 0 0 0
Process map
pmap 18428 -x
18428: /var/www/ttd-server/openttd_1.2.3 -s null -m null -x -c /var/www/ttd-server /configuration/preload/openttd.cfg -D
Address Kbytes RSS Dirty Mode Mapping
0000000000400000 0 2948 0 r-x-- openttd_1.2.3
0000000000aee000 0 64 48 rw--- openttd_1.2.3
0000000000afe000 0 588 584 rw--- [ anon ]
000000001c66d000 0 2516 2516 rw--- [ anon ]
00002ba83f5a7000 0 100 0 r-x-- ld-2.11.3.so
00002ba83f5c5000 0 256 256 rw--- [ anon ]
00002ba83f7c4000 0 4 4 r---- ld-2.11.3.so
00002ba83f7c5000 0 4 4 rw--- ld-2.11.3.so
00002ba83f7c6000 0 4 4 rw--- [ anon ]
00002ba83f7c7000 0 380 0 r-x-- libstdc++.so.6.0.13
00002ba83f8bd000 0 0 0 ----- libstdc++.so.6.0.13
00002ba83fabd000 0 28 28 r---- libstdc++.so.6.0.13
00002ba83fac4000 0 8 8 rw--- libstdc++.so.6.0.13
00002ba83fac6000 0 4 4 rw--- [ anon ]
00002ba83fadb000 0 52 0 r-x-- libpthread-2.11.3.so
00002ba83faf2000 0 0 0 ----- libpthread-2.11.3.so
00002ba83fcf1000 0 4 4 r---- libpthread-2.11.3.so
00002ba83fcf2000 0 4 4 rw--- libpthread-2.11.3.so
00002ba83fcf3000 0 8 8 rw--- [ anon ]
00002ba83fcf8000 0 112 0 r-x-- libm-2.11.3.so
00002ba83fd78000 0 0 0 ----- libm-2.11.3.so
00002ba83ff78000 0 4 4 r---- libm-2.11.3.so
00002ba83ff79000 0 4 4 rw--- libm-2.11.3.so
00002ba83ff7a000 0 460 0 r-x-- libc-2.11.3.so
00002ba8400d3000 0 0 0 ----- libc-2.11.3.so
00002ba8402d2000 0 16 16 r---- libc-2.11.3.so
00002ba8402d6000 0 4 4 rw--- libc-2.11.3.so
00002ba8402d7000 0 16 16 rw--- [ anon ]
00002ba8402dc000 0 16 0 r-x-- libgcc_s.so.1
00002ba8402f2000 0 0 0 ----- libgcc_s.so.1
00002ba8404f1000 0 4 4 rw--- libgcc_s.so.1
00002ba8404f2000 0 104 104 rw--- [ anon ]
00002ba848565000 0 284 284 rw--- [ anon ]
00007fff900e4000 0 44 44 rw--- [ stack ]
00007fff901fd000 0 8 0 r-x-- [ anon ]
ffffffffff600000 0 0 0 ----- [ anon ]
---------------- ------ ------ ------
total kB 162884 8048 3952
top before (sorted by RES)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15801 www-data 17 0 1320m 173m 4036 S 1.3 17.4 0:54.75 java
1518 ejabberd 15 0 99684 54m 3724 S 0.0 5.5 18:05.64 beam
7917 www-data 15 0 124m 47m 2204 S 0.0 4.8 0:02.43 plackup
8039 www-data 15 0 123m 46m 2204 S 0.0 4.7 0:02.38 plackup
32439 www-data 15 0 116m 42m 2812 S 0.0 4.2 0:42.54 plackup
29708 mysql 15 0 170m 38m 7556 S 0.0 3.9 187:51.36 mysqld
32247 www-data 15 0 141m 38m 3376 S 0.0 3.8 0:08.01 plackup
6025 www-data 15 0 176m 37m 4532 S 0.0 3.7 0:06.17 php-cgi
3248 www-data 15 0 172m 33m 4544 S 0.0 3.4 0:10.55 php-cgi
3591 www-data 15 0 123m 32m 3080 S 0.0 3.3 9:09.46 plackup
32303 www-data 15 0 250m 32m 6364 S 0.3 3.3 17:54.92 mongod
24324 send2me 16 0 53340 14m 3088 S 0.0 1.5 0:03.00 perl
26584 bind 25 0 93800 11m 2352 S 0.0 1.1 0:00.17 named
20045 root 15 0 110m 9288 6876 S 0.0 0.9 2:18.20 ispmgr
15574 www-data 18 0 144m 9168 5732 S 0.0 0.9 0:00.07 php-cgi
30220 www-data 15 0 37420 9148 2936 S 0.0 0.9 1:29.11 websockify.py
9935 root 16 0 83864 3688 2856 S 0.0 0.4 0:00.02 sshd
top after (sorted by RES):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15801 www-data 17 0 1320m 173m 4036 S 1.3 17.4 0:53.77 java
1518 ejabberd 15 0 99684 54m 3724 S 0.0 5.5 18:05.62 beam
7917 www-data 15 0 124m 47m 2204 S 0.0 4.8 0:02.42 plackup
8039 www-data 15 0 123m 46m 2204 S 0.0 4.7 0:02.37 plackup
32439 www-data 15 0 116m 42m 2812 S 0.0 4.2 0:42.54 plackup
29708 mysql 15 0 170m 38m 7556 S 0.0 3.9 187:51.34 mysqld
32247 www-data 15 0 141m 38m 3376 S 0.0 3.8 0:08.01 plackup
6025 www-data 15 0 176m 37m 4532 S 0.0 3.7 0:06.17 php-cgi
3248 www-data 15 0 172m 33m 4544 S 0.0 3.4 0:10.55 php-cgi
3591 www-data 15 0 123m 32m 3080 S 0.0 3.3 9:09.44 plackup
32303 www-data 15 0 250m 32m 6364 R 0.3 3.3 17:54.61 mongod
24324 send2me 16 0 53340 14m 3088 S 0.0 1.5 0:03.00 perl
26584 bind 25 0 93800 11m 2352 S 0.0 1.1 0:00.17 named
20045 root 15 0 110m 9288 6876 S 0.0 0.9 2:18.19 ispmgr
15574 www-data 18 0 144m 9168 5732 S 0.0 0.9 0:00.07 php-cgi
30220 www-data 15 0 37420 9148 2936 S 0.0 0.9 1:29.11 websockify.py
18428 www-data 16 0 151m 8048 4096 R 0.0 0.8 0:00.30 openttd_1.2.3
9935 root 16 0 83864 3688 2856 S 0.0 0.4 0:00.02 sshd
Looks like virtual memory of process located in physical memory, but why? For example java process have 1320MB of virtual memory but consumed only 173MB of real (mathced with RES), but openttd process have RES=8MB but consumes 136MB of real memory. What this is mean?
UPD.
My server is based on OpenVZ.
Openttd compiled in single threaded mode.
On the real PC there are no problem.
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 128
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Source: (StackOverflow)
I bought VPS on OpenVZ virtualization and enabled Debian guest OS.
Guest /boot
dir is empty. /etc/inittab
is empty.
How is the OS initialization process performed?
What is the meaning of reboot
for OpenVZ container?
Source: (StackOverflow)
I've just installed MongoDB (standard Ubuntu build, not the latest stable) and for some reason I can't connect:
Mon Feb 6 03:11:22 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed
Now my machine isn't 127.x.x.1 it's for some reason x.x.x.2 (But i've changed my config to bind to that address, and also tried to bind to my public IP which provided no avail.
Config:
#mongodb.conf
# Where to store the data.
# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.
dbpath=/var/lib/mongodb
#where to log
logpath=/var/log/mongodb/mongodb.log
logappend=true
bind_ip = 199.21.114.XX
port = 27017
I've checked the logs and only startup info is displaying in there.
I've also checked that the deamon is running too, and it is - I even tried running it manually with a --fork
.
Has anyone come across this before? Or any suggestions?
Thx
UPDATE:
After a restart - here are the logs:
** WARNING: You are running in OpenVZ. This is known to be broken!!!
Tue Feb 7 19:43:32 [initandlisten] db version v1.8.2, pdfile version 4.5
Tue Feb 7 19:43:32 [initandlisten] git version: nogitversion
Tue Feb 7 19:43:32 [initandlisten] build sys info: Linux allspice 2.6.24-28-se$
Tue Feb 7 19:43:32 [initandlisten] *** warning: spider monkey build without ut$
Tue Feb 7 19:43:32 [initandlisten] waiting for connections on port 27017
Tue Feb 7 19:43:32 [websvr] web admin interface listening on port 28017
Source: (StackOverflow)
I have a VPS on an ISP which is using OpenVZ. I want to run my own image locally to test some services, but I can only download a tar backup of the filesystem.
Can I create a image and run it locally using the tar backup ? I'm on Windows 7. Maybe VMWare Player or Oracle VirtualBox can run this files ?
Source: (StackOverflow)
I have a OpenVZ VPS, the operating system is CentOS 6, I try to install Docker, but Docker start error.
Starting cgconfig service: Error: cannot mount cpuset to /cgroup/cpuset: Invalid argument
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d [FAILED]
Starting docker: [ OK ]
Source: (StackOverflow)
There are some discussions about the problem associated with MongoDB caching in OpenVZ, I was unable to find a practical solution. The issue is related to the memory in OpenVZ, as MongoDB does not consume free memory only. I tried to limit virtual memory by ulimit command, but the problem is that MongoDB server will shut down when reading the limit value of virtual memory (if using unlimited virtual memory, it will shut down when consuming all the machine ram).
Source: (StackOverflow)
I want to perform monitoring of /proc/user_beancounters to see when the system hits the limits and what process is to blame.
Does anybody know tools for this issue?
Source: (StackOverflow)
after installation without any trouble I've started aerospike on a openvz vps with 2cores and 4gb ram.
this is the result:
root@outland:~# /etc/init.d/aerospike start
* Start aerospike: asd [OK]
then check for running asd:
root@outland:~# /etc/init.d/aerospike status
* Halt aerospike: asd [fail]
what is going wrong?
adding logs:
Mar 03 2015 15:17:57 GMT: INFO (config): (cfg.c::3033) system file descriptor limit: 100000, proto-fd-max: 15000
Mar 03 2015 15:17:57 GMT: WARNING (cf:misc): (id.c::249) Tried eth,bond,wlan and list of all available interfaces on device.Failed to retrieve physical address with errno 19 No such device
Mar 03 2015 15:17:57 GMT: CRITICAL (config): (cfg.c:3363) could not get unique id and/or ip address
Mar 03 2015 15:17:57 GMT: WARNING (as): (signal.c::120) SIGINT received, shutting down
Mar 03 2015 15:17:57 GMT: WARNING (as): (signal.c::123) startup was not complete, exiting immediately
Source: (StackOverflow)
I have the following configuration:
- OpenVZ host running CentOS 6 (2.6.32-042stab049.6), gigabit connection
- A single container running on that OpenVZ
The host has full gigabit connection for in- and outbound connections. The containers have full gigabit for all outgoing traffic, but incoming traffic seems subject to a default traffic shaping rules where "bursts" are allowed. Downloading large binary files happens at 15MB/s for a few seconds, then it falls back to 50Kb/s.
That very same file can be downloaded on the host at full speed, over and over again.
Traffic shaping isn't enabled:
root@host:~# tc qdisc show dev venet0
root@host:~# tc class show dev venet0
root@host:~# tc filter show dev venet0
IPtables has nothing fancy:
root@host:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
I'm actually finding myself a bit stuck and am considering this may just be a bug in the OpenVZ kernel for CentOS 6. I don't have the option to test it on CentOS 5 in the near future. Does anyone have any other ideas on how to troubleshoot? Or does it sound familiar? Given the fact that the host runs just find and only the CT's have the incoming bandwidth issue, I'm looking at OpenVZ as the cause.
Source: (StackOverflow)
My Server is hosted on HostEurope, a virtual server
uname -a prompts
Linux lvps176-28-21-237.dedicated.hosteurope.de 2.6.18-028stab095.1 #1 SMP Mon Oct 24 20:15:15 MSD 2011 x86_64 GNU/Linux
They are running OpenVZ. According to the support of HostEurope, an up to date version of Virtuozzo, but reading the version history on OpenVZ, this version is old, frozen and won't be maintained any more. Who is right?
My actual problem is that I want to run a MongoDB, but I am confronted with this OpenVZ problem explained here:
Crashes reported on OpenVZ
So, what can I do? Is there any chance to solve this Out-Of-Memory issue in MongoDB on OpenVZ in this version or do I have to find an other hosting company?
Thanks!
Source: (StackOverflow)