Articles of openvz

OpenVZ容器的启动脚本/文件在哪里?

我开始我的容器,它有一些错误。 [xxx@centosbuilder1 etc]$ sudo vzctl start 1011 Starting container… Container is mounted Adding IP address(es): 10.0.64.23 cp: cannot stat '/etc/conf.d/netcfg': No such file or directory /bin/bash: line 593: /etc/conf.d/netcfg: No such file or directory /bin/bash: line 594: /etc/conf.d/netcfg: No such file or directory A unit file for profile 'venet0' already exists Setting CPU units: 1000 […]

openVZ挂载的主机文件夹

我正在尝试在我的新服务器上设置openVZ,但是我遇到了安装我无法理解的文件夹的问题。 它显示了VZ和主机上的不同文件,尽pipe挂载点是相同的。 安装openvz ID 1的login脚本 cat /etc/vz/conf/1.mount #!/bin/bash mount -n –bind /mnt/Archive /vz/private/1/var/export 在主机上创build文件夹: touch /mnt/Archive/fromHost ls /mnt/Archive/ -> fromHost 进入VZ并检查文件夹 vzctl enter 1 entered into CT 1 ls /var/export -> [emtpy] touch /var/export/fromVZ ls /var/export -> fromVZ 离开VZ,回到主机 ls /mnt/Archive -> fromHost [where is the file from the VZ?] VZ的文件在哪里? 我在这里错过了什么? 从主机挂载显示其所有相同的文件夹 mount /dev/mapper/VG_Archive-LV_Archive […]

转移使用的公羊交换和释放更多的物理ram

我有一个256M物理RAM和512M交换空间的VPS, 我正在尝试使用一个需要超过256米,小于512米RAM的软件,所以它使用交换。 问题是在安装的某个时刻,安装过程检查可用的物理内存,它已满(使用了一些交换),所以它暂停安装,并继续安装,以便继续安装。 我看到我需要移动一些用过的物理内存,在进程运行的时候进行交换..有无论如何我可以做到这一点? 或任何其他解决scheme! 对不起,我正在使用openvz vps,并且vm.swappiness选项不能作为解决scheme进行修改。

openvz / centos 6 vps yum失败,错误

用centos 6.4 64bit安装新的openvz容器 Resolving Dependencies –> Running transaction check —> Package kernel.x86_64 0:2.6.32-431.el6 will be installed –> Processing Dependency: kernel-firmware >= 2.6.32-431.el6 for package: kernel-2.6.32-431.el6.x86_64 Package kernel-firmware-2.6.32-431.el6.noarch is obsoleted by vzkernel-firmware-2.6.32-042stab083.2.noarch which is already installed –> Finished Dependency Resolution Error: Package: kernel-2.6.32-431.el6.x86_64 (base) Requires: kernel-firmware >= 2.6.32-431.el6 Installed: vzkernel-firmware-2.6.32-042stab083.2.noarch (@openvz-kernel-rhel6) kernel-firmware = 2.6.32-358.23.2.el6 Available: kernel-firmware-2.6.32-431.el6.noarch […]

OpenVZ共享PHP5-FPM套接字

我需要在2个容器之间共享php5-fpm.sock 我有2个容器: 1.与NGINX 2.用PHP5和PHP5-FPM 通过NFS链接容器 我试过使用: 1. mount –bind / var / lib / vz / private / 100 / var / src_dir_with_socket / var / lib / vz / private / 101 / var / dst_dir_with_socket 2. moutn -t simfs … 3.纯粹的NFS 在NGINX容器上共享php5-fpm.sock – 不起作用 计划只有当我在端口上安装FPM我需要通过SOCKET工作 谢谢!

在openVZ容器中对sysctl.conf进行修改,它们甚至会生效吗?

我正在遵循安全指南( http://www.thefanclub.co.za/how-to/how-secure-ubuntu-1204-lts-server-part-1-basics )来加强我的基于OpenVZ的VPSnetworking服务器的运行Ubuntu 12.04 ,其中的一部分要求对sysctl.conf进行一些修改。 但是我不确定openVZ容器是否真的有意义,因为它是一个共享内核。 这里是为sysctl.conf提供的编辑 # IP Spoofing protection net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 # Ignore ICMP broadcast requests net.ipv4.icmp_echo_ignore_broadcasts = 1 # Disable source packet routing net.ipv4.conf.all.accept_source_route = 0 net.ipv6.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv6.conf.default.accept_source_route = 0 # Ignore send redirects net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 # Block SYN […]

yum更新MemoryError 1G内存空闲

我正在尝试做yum update并得到“MemoryError”。 服务器(OpenVZ盒)有2G RAM和configuration1G InnoDB缓冲区的Percona MySQL服务器。 操作系统是CentOS 6.5,内核2.6.32-openvz-042stab088.4-amd64。 free -m输出: total used free shared buffers cached Mem: 2048 728 1319 0 0 21 -/+ buffers/cache: 706 1341 Swap: 2048 0 2048 在主机上,盒子的内存configuration是: vzctl set 101 –physpages 0:2G –swappages 0:2G –kmemsize unlimited –privvmpages 2000M:2G –vmguarpages 2000M:2G –oomguarpages 2G –save 当我停止MySQL, yum update正常工作。 为什么如果仍然有超过1G的内存,MySQL会让yum update失败? 完整的错误输出是: yum […]

邦妮不提供顺序input/阻止的速度

我正在使用ProxmoxVE,我想运行这个产品的性能的一些基准。 其中一个基准是bonnie ++; 它在VM(qemu-kvm)中运行得非常好,但是当我在一个conainer(openVZ)中运行它时,它不能提供读取速度(只写)。 我不明白为什么…有人知道发生了什么事吗? 虚拟机和容器是Debian 7.4。 以下是容器中的bonnie输出: root@ct2:/# bonnie++ -u root Using uid:0, gid:0. Writing a byte at a time…done Writing intelligently…done Rewriting…done Reading a byte at a time…done Reading intelligently…done start 'em…done…done…done…done…done… Create files in sequential order…done. Stat files in sequential order…done. Delete files in sequential order…done. Create files in random order…done. Stat […]

在OpenVZ容器中,Taskset不能正常工作

在Debian OpenVZ容器中,我试图使用taskset将进程固定到核心,但是它不起作用: root@foo:/# taskset -c -p 0 1754 pid 1754's current affinity list: 0-7 pid 1754's new affinity list: 0-7 主机上完全一样的东西。

有没有可能在openvz中创build循环设备?

我有openvz vps和我可以看到没有磁盘设备。 但我真的需要有一个磁盘设备来检查一件事。 问题是,我可以创build假的磁盘设备,可以使用df或sfdisk等命令吗?