Articles of openvz

不能在运行OpenVZ的Ubuntu 12.04上安装php5-dev

我试图使用pecl获取php apc软件包,并遇到一个我认为可能是由OpenVZ引起的问题。 为此,我需要php5-dev。 当我尝试通过apt-get安装它时,我得到这个: php5-dev : Depends: libssl-dev but it is not going to be installed Depends: libtool (>= 2.2) but it is not going to be installed 当我尝试手动安装依赖项(没有成功),我相信我已经确定libc6-dev为罪魁祸首。 libc6-dev : Depends: libc6 (= 2.15-0ubuntu10.2) but 2.15-0ubuntu10+openvz0 is to be installed 我已经在系统上安装了libc6。 如果这里有任何帮助是我的sources.list: deb http://archive.ubuntu.com/ubuntu precise main restricted universe deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe […]

调整OpenVZ Containers以更好地使用Java?

我有一个8 GB的RAM服务器(专用),目前有KVM虚拟机在那里运行(成功),但我正在考虑转移到OpenVZ作为KVM似乎有点矫枉过正,我用它的很多开销。 在过去,我使用OpenVZ Containers,由我自己和其他提供商托pipe,Java似乎不能很好地与他们..一个例子是,如果我给一个容器2 GB的RAM(没有爆发)(有或没有vswap无关紧要),一个java实例只能被调优使用该RAM的最大1500MB(-Xmx,-Xms)。 理想情况下,我希望能够创build大约256MB,512MB,768 RAM的“迷你”容器,并在其中运行一些Java实例。 我的问题是:我试图find一个理想的方法来调整OpenVZ容器configuration,以便更好地使用Java内存。 请不要build议任何与Java设置相关的东西,我正在寻找OpenVZ的具体答案..虽然我欢迎任何build议,如果你觉得它可以帮助我。 非常感谢Daniel

OpenVZ exec,无法重新打开stdin /无法lockingpipe理目录

我在所有OpenVZ容器上运行以下命令来更新/升级: vzctl exec2 $VM "apt-get update & apt-get upgrade" 在所有情况下,我得到以下错误: dpkg-preconfigure: unable to re-open stdin: No such file or directory 当有可用的更新时,会跳过提示“您要继续”。 另外,dpkg不能设置locking: E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 我怎样才能解决这个问题?

你如何从主机进入openvz容器的控制台?

我丢失了我的OpenVZ容器的密码(实际上我使用的是私钥ssh,但是丢失了这个文件,所以在安装之后我从来没有用root密码login过),但是我仍然在主机上有root权限,我没有运行HyperVM ,当我只是苏vm1或任何虚拟机用户的问题,它会把我放入容器的根shell。 我如何从纯OpenVZ那里? 或者像我以前用HyperVM那样重置root密码。 这个OpenVZ不是由任何其他基于OpenVZ gui的经理pipe理的。

OpenVPN-AS无法启动

我一直在尝试让OpenVPN Access服务器运行,但是我遇到了很多麻烦。 我有一个运行Proxmox的主机节点,我想要一个OpenVZ容器来运行服务器。 我已经通过这个指南,但我仍然在启动服务器时收到以下错误。 service failed to start due to unresolved dependencies: set(['user']) service failed to start due to unresolved dependencies: set(['iptables_openvpn']) Service deferred error: IPTablesServiceBase: failed to run iptables-restore [status=1]: ['iptables-restore: line 35 failed']: internet/defer:323,sagent/ipts:119,sagent/ipts:46,util/mycprof:11,<string>:1,sagent/sagent_entry:14,sagent/sagent_entry:11,util/daemon:28,util/daemon:69,application/app:423,scripts/_twistd_unix:202,application/app:445,application/app:348,internet/base:1166,internet/base:1178,internet/epollreactor:194,python/log:85,python/log:70,python/context:59,python/context:37,internet/epollreactor:223,internet/posixbase:191,internet/process:260,internet/process:762,internet/process:775,internet/_baseprocess:60,svc/pp:116,svc/svcnotify:32,internet/defer:238,internet/defer:307,internet/defer:323,sagent/ipts:119,sagent/ipts:46,util/error:60,util/error:43 service failed to start due to unresolved dependencies: set(['user', 'iptables_live', 'iptables_openvpn']) service failed to start due to unresolved dependencies: […]

如何列出OpenVZ服务器上所有容器的磁盘空间使用情况?

我有一个有46个容器的OpenVZ服务器。 如何获取所有容器的相应磁盘使用情况列表?

内存中没有缓冲区。 这是什么意思?

这是来自我的VPS( OpenVZ )的内存统计信息。 $ free -m total used free shared buffers cached Mem: 800 405 394 0 0 405 -/+ buffers/cache: 0 800 Swap: 0 0 0 它通过uWSGI托pipePHP堆栈(nginx,Apache,mod_php)+一些Python应用程序,因此机器不会闲置 。 任何人都可以解释,为什么只显示caching内存和缓冲区始终为0(可能是虚拟化问题)? buffers和cached内存值究竟意味着什么? PS:我已经看到过类似的问题,但是没有更清楚。

通过iptablesloggingopenvz容器的端口上的连接

我正在尝试使用IP xxxxlogging容器上的连接 我使用邮件命令发送邮件使用postfix,但我没有看到任何日志。 这是我的configuration: iptables -N LBFT_OUT iptables -A FORWARD -j LBFT_OUT iptables -A OUTPUT -j LBFT_OUT iptables -A LBFT_OUT -s xxxx / 32 -p tcp -m tcp –dport 25 -m state –state NEW -j LOG – 日志前缀“LBFT_SMTP” – 日志级别7 [root @ host log]#cat /etc/rsyslog.d/lbft.conf :msg,包含“LBFT_SMTP” – / var / log / lbft-smtp.log &〜

还原OpenVZ快照时与pid文件有关的问题

我正在尝试不同的方式来运行openvz容器的快照。 遵循本指南: http : //openvz.org/Checkpointing_and_live_migration ,在恢复快照时,我总是遇到缺lesspid文件的问题。 我所遵循的步骤是: vzctl chkpnt 111 –suspend vzctl chkpnt 111 –dump –dumpfile /vz/dump/testdump.111 vzctl chkpnt 111 –resume 然后我停止VE,然后尝试从转储文件恢复它: vzctl stop 111 vzctl restore 111 –undump –dumpfile /vz/dump/testdump.111 在这一点上,我总是得到关于pid文件丢失的错误: vzctl restore 111 –undump –dumpfile /vz/dump/Dump.111 Restoring container … Container is mounted undump… Adding IP address(es): 10.111.1.111 Setting CPU units: 1000 Restore error, […]

端口通过OpenVPN转发到OpenVZ上的客户端

编辑 :好吧,我会尽量使这更清楚。 我试图实现的只是一个端口,通过OpenVZ托pipe的openvpn服务器转发到在客户端上运行的服务。 我想转发一些不同的服务,比如Web服务器或者一个不知名的客户端。 为了争论,让我们说我只是想build立一个function的netcat连接与这个拓扑结构: 互联网—> [ – > server(1.2.3.4:15555)] – nat – / – > openvpn-server(10.8.0.1) – \ – >客户端运行webserver(10.8.0.6:15555) 要么 …. (inet)—>(public ip)-nat-through-openvpn-server– | – > to-client- \ 10.8.0.6(destination) 其中inet代表互联网上的任何主机,1.2.3.4代表我的服务器的公共IP,10.8.0.6代表将托pipe服务器的ovpn客户端,我希望从VPN后面的地址/端口1.2 .3.4:15555 这是我的ifconfig: lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1037374 errors:0 dropped:0 overruns:0 frame:0 TX packets:1037374 errors:0 […]