OpenVZ Forum


Home » General » Support » Setting up a new VM
Setting up a new VM [message #15950] Thu, 16 August 2007 18:09 Go to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
I want to setup a new VM on a host node that has a full cPanel install on it and all the partitions are already setup. The VPS is going to have cPanel as well.

I have one big / partition and quotas are turned on. Is there a way for me to create a /vz partition as a file and use quotas on both? Otherwise, what can I do?

I have been setting up the vz like so:

vzctl create 123 --ostemplate centos-4-i386-minimal
vzctl set --ipadd 66.xx.xxx.186 --hostname xxxxxx.co.za
vzctl set 123 --onboot yes --save
vzctl set 123 --vmguarpages 65536 --save
vzctl set 123 --privvmpages 262144 --save
vzctl set 123 --kmemsize 12752512:12752512 --save
vzctl set 123 --diskspace 4000000000:4500000000 --save

The disk space parameter doesn't seem to have any effect. The VM always shows 100GB+ free. Also, I cannot install cPanel successfully. It whines about "Cannot Fork" and "Memory Allocation Failed". I have supplied plenty of kernel memory and RAM to the VM. What are your recommended settings for creating a small VPS (I want it to have 5GB of disk space actually) with 512MB of RAM that can support cPanel and be reliable?
Re: Setting up a new VM [message #15974 is a reply to message #15950] Fri, 17 August 2007 12:23 Go to previous messageGo to next message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
tutt wrote on Thu, 16 August 2007 19:09

I want to setup a new VM on a host node that has a full cPanel install on it and all the partitions are already setup. The VPS is going to have cPanel as well.


cPanel isn't supposed to run on host, it will mess your VE services.


tutt wrote on Thu, 16 August 2007 19:09


I have been setting up the vz like so:

vzctl create 123 --ostemplate centos-4-i386-minimal
vzctl set --ipadd 66.xx.xxx.186 --hostname xxxxxx.co.za
vzctl set 123 --onboot yes --save
vzctl set 123 --vmguarpages 65536 --save
vzctl set 123 --privvmpages 262144 --save
vzctl set 123 --kmemsize 12752512:12752512 --save
vzctl set 123 --diskspace 4000000000:4500000000 --save

The disk space parameter doesn't seem to have any effect. The VM always shows 100GB+ free. Also, I cannot install cPanel successfully. It whines about "Cannot Fork" and "Memory Allocation Failed". I have supplied plenty of kernel memory and RAM to the VM. What are your recommended settings for creating a small VPS (I want it to have 5GB of disk space actually) with 512MB of RAM that can support cPanel and be reliable?


Diskspace is in 1 KB blocks so:
4000000000 KBs = 3814,7 GBs (It's much more than 100GBs...)

If you have memory problems inside VE check /proc/user_beancounters


http://static.openvz.org/userbars/openvz-user.png
Re: Setting up a new VM [message #15977 is a reply to message #15974] Fri, 17 August 2007 14:05 Go to previous messageGo to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
In what way does cPanel interfere with the VPS? Is it going to cause constant problems if cPanel is running on the host?
Re: Setting up a new VM [message #16049 is a reply to message #15950] Mon, 20 August 2007 15:51 Go to previous messageGo to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
Anyone want to explain or point me to where there is information on running a guest under a host node that is running cPanel or other services and the problems that it causes?

Would I be better off using VMware to do this?
Re: Setting up a new VM [message #16050 is a reply to message #16049] Mon, 20 August 2007 16:47 Go to previous messageGo to next message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
you keep using the term VM which is wrong in its entirety for OpenVZ, drop the idea of VM in OpenVZ. VPS are VE which are absolutely as close as you can get to a physical server

read the OpenVZ pdf and especially the section on vzsplit. the default config of VZ creates extremely conservative VE with maybe 24MB RAM capability. when you have divided your machine according to your hardware and expectations of VE, then limit each VE by editing the following:

these settings are for 256MB RAM 6GB Disk:

VMGUARPAGES="65536:xxxx" << xxxx = your RAM total
OOMGUARPAGES="65536:xxxx" << xxxx = your RAM total
PRIVVMPAGES="65536:75536"
SHMPAGES="6553:6553"
DISKSPACE="6291456:6291456" << 6x1024x1024 = 6GB

you can work the rest out yourself: double up for 512MB RAM and recalc the Diskspace for 5GB
Re: Setting up a new VM [message #16055 is a reply to message #16050] Mon, 20 August 2007 17:04 Go to previous messageGo to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
Thanks for your reply. It was helpful.

However, I am wondering what will happen if I try to run an OpenVZ guest on a host that is also running cPanel and has active services (far from a minimal OS install). I had the VE up and running on this machine, but with some memory issues. I am running CentOS 5 with cPanel on the host machine and just need a simple cPanel VPS running on it as well. Impossible to do with openVZ safely?? If so, what might I try? Xen, VMware?
Re: Setting up a new VM [message #16059 is a reply to message #16055] Mon, 20 August 2007 17:33 Go to previous messageGo to next message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
OpenVZ will sit nicely on a HN with cPanel, no conflicts

but cPanel is a graphical web-based web-hosting control panel designed to make administration of websites easy, not a panel for controlling a VPS

you can always install cPanel into the VE like it is a real server

EDIT: your memory issues were all to do with the conservative settings in the VE default, apparently the authors of OpenVZ use their VPS for playing pong (black and white only) and think 24MB RAM is plenty Laughing

[Updated on: Mon, 20 August 2007 17:36]

Report message to a moderator

Re: Setting up a new VM [message #16060 is a reply to message #16059] Mon, 20 August 2007 17:50 Go to previous messageGo to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
Ok, so you are saying that an OpenVZ VPS will run properly (assuming good settings are used) within a cPanel host node? I just want to confirm this. I need it to be reliable (ESPECIALLY the host node).
Re: Setting up a new VM [message #16063 is a reply to message #16060] Mon, 20 August 2007 18:20 Go to previous messageGo to next message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
no. i am saying the converse

cPanel will work correctly within an OpenVZ node

OpenVZ is a kernel. you replace your current kernel with the OpenVZ kernel then run whatever services you wish, without exception, as if you were operating the original non-VZ kernel. what you have gained is the capability to host VZ VPS. what you have lost is nothing

clever huh?

[Updated on: Mon, 20 August 2007 18:21]

Report message to a moderator

Re: Setting up a new VM [message #16066 is a reply to message #16063] Mon, 20 August 2007 19:17 Go to previous messageGo to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
Hello,
Yes, I realize that. I've got the kernel installed and everything. I had the VPS up and running, but with memory issues. I am just wondering if running cPanel on the host node will interfere with anything. Do we know this for certain?
Re: Setting up a new VM [message #16069 is a reply to message #16066] Mon, 20 August 2007 19:44 Go to previous messageGo to next message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
dude that is the 6th time you have asked that question

respectfully, it has been answered Smile
Re: Setting up a new VM [message #16076 is a reply to message #16069] Mon, 20 August 2007 20:24 Go to previous messageGo to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
Somehow, I am left confused as to the answer to my question of whether cPanel can run on the host node without problems. This is a mix of the replies I got:

"cPanel isn't supposed to run on host, it will mess your VE services."


"OpenVZ will sit nicely on a HN with cPanel, no conflicts"


"no. i am saying the converse

cPanel will work correctly within an OpenVZ node

OpenVZ is a kernel. you replace your current kernel with the OpenVZ kernel then run whatever services you wish, without exception, as if you were operating the original non-VZ kernel. what you have gained is the capability to host VZ VPS. what you have lost is nothing"


Can someone CLEARLY tell me if it is a bad idea to run cPanel on the HOST machine, alongside an OpenVZ VPS that will also be running cPanel. Sorry to be a bother, but I am still left wondering what these replies meant.
Re: Setting up a new VM [message #16079 is a reply to message #15974] Mon, 20 August 2007 20:48 Go to previous messageGo to next message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
sspt wrote on Fri, 17 August 2007 08:23


cPanel isn't supposed to run on host, it will mess your VE services.



what i believe he is saying is: "you do not run cPanel on one server attempting to control another server, it is not designed for that purpose. hacking or otherwise attempting to configure cPanel or VZ for that purpose will only mess up your VE services. if you want cPanel on the VE then run it on the VPS, not the host. this statement does not exclude the possibility of running cPanel on the HN for webhosting on the HN"
Re: Setting up a new VM [message #16080 is a reply to message #16079] Mon, 20 August 2007 20:58 Go to previous messageGo to next message
tutt is currently offline  tutt
Messages: 19
Registered: April 2007
Junior Member
Yes, cPanel has nothing to do with CONTROLLING the VPSs. It would be for webhosting on the host. It would also be running on the guest for webhosting as well (this is what the client wants.. don't ask). Is there ANYTHING wrong with having cPanel running on both the host and guest in that case. They would not be inter-related in anyway. I just don't want OpenVZ expecting there to be nothing but a minimal install of CentOS on the host and then interfering with anything.
Re: Setting up a new VM [message #16081 is a reply to message #16076] Mon, 20 August 2007 21:12 Go to previous messageGo to next message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
If you use top, ps, etc in HN you'll see all processes from HN+VEs.
When cPanel kills all httpd, mysqld or other service it will kill all processes running in HN+VE.

I just can't understand why do you want to run cPanel in HN instead of create a VE and install on it.


http://static.openvz.org/userbars/openvz-user.png
Re: Setting up a new VM [message #16084 is a reply to message #16081] Mon, 20 August 2007 21:48 Go to previous message
locutius is currently offline  locutius
Messages: 125
Registered: August 2007
Senior Member
that sux (if it is right)

so best config is 2 x VPS

VPS101 = very large VE representing the HN
VPS102 = the other VE

run cPanel and the webhosting from VPS101
Previous Topic: ipv6 config
Next Topic: Activation mail from forum.
Goto Forum:
  


Current Time: Tue Apr 16 05:12:25 GMT 2024

Total time taken to generate the page: 0.01455 seconds