Home » HyperVM Community Support » Knowledge Base » Preparing a node for configuring vps
| Preparing a node for configuring vps [message #3243] |
Fri, 26 January 2007 03:54  |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
This is a basic tutorial on how to prepare a server for hosting vpses. We will try to highlight some of the common mistakes made when running a vps host. First the obligatory DONTS.
DONT run any of the control panels (cpanel/plesk/lxadmin) on the node. If you want to run a hosting business, please create a separate vps for that. The overhead of xen/openvz is too low to warrant running a complex control panel on the node. If the control panel crashes or gets compromised, that will bring down all your vpses with it.
DONT Run any service other than hyperVM. Run ntsysv and clear out every service other than sshd, network and hypervm. Just run ntsysv, and you can select the list of services from a graphical list, and disable everything except the primary ones. On the master, you will need mysql too.
DONT add the the ips dedicated for vpses to the nodes. You have to make sure that the DC hasn't added all the ips that has been assigned to you the node, and remove them if they are. This has been recurring problem, where you will see that suddenly the vpses are not responding because the node has been configured with the ips meant for them.
The recommendations:
DO have only a single master to control many slaves, since hyperVM now has a lot of features that are meant to take advantage of this setup, and if configured this way, it can save you a lots and lots of work. For instance, in hyperVM you need to setup the ostemplates only on the master and nowhere else, the slaves will automatically download them when they need it.
DONT have multiple masters. We will not support any configuration issues arising from having many masters. A single master controlling many slaves is the correct way to install hyperVM. HyperVM clustering is transparent, and will work seamlessly.
HyperVM clustering is optimized to work efficiently across Data Centers. You can have master in one DC and slave in another, the communication protocol is efficient enough to work without any problem.
[Updated on: Wed, 20 February 2008 00:53] by Moderator Report message to a moderator
|
|
|
| Re: Preparing a node for configuring vps [message #3245 is a reply to message #3243] |
Fri, 26 January 2007 09:20   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
More DOs.
DO use a 64 bit processor. The 32 bit system can only recognize 2GB of RAM. There is a AWE extension for 32bit which enables the 32 bit processor to access more Memory, but it has significant overheads, so ultimately it is better you stick with 64 bit itself. There were some minor 64<=>32 bit issues with the linux kernel, but this has been very properly solved in hyperVM, and we currently have most of our customers running their vpses for over 4 months without any issue on 64bit systems.
DO Take a remote backup of your master database. It is very simple and the total size is around 200KB or so. Go to 'admin home' -> advanced -> 'config self backup' and setup and ftp server where the master database backup will be uploaded to. This will save you a lot of trouble if the master database corrupted. Since the master contains quite a lot of important information, it is always recommended that you a remote backup of it alone, especially considering the small size of the file.
[Updated on: Fri, 26 January 2007 10:53] by Moderator Report message to a moderator
|
|
| |
| Re: Preparing a node for configuring vps [message #5098 is a reply to message #5097] |
Sun, 15 April 2007 01:38   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
| Quote: |
>
>
> To be sure, the OS can be 64bit, but the VPS' os can be 32 bit, correct? There are still some issues with cPanel on 64 bit on the vps' and I'd rather have them all run as 32 bit for now.
|
Yes. The normal method is to run 32 bit vps on 64bit host.
Thanks.
|
|
| | | | | | | | | | | |
| Re: Preparing a node for configuring vps [message #29554 is a reply to message #3243] |
Mon, 14 April 2008 17:33   |
sdebenham  Messages: 18 Registered: February 2008 |
Member |
|
|
| Lxhelp wrote on Fri, 26 January 2007 03:54 |
DONT Run any service other than hyperVM. Run ntsysv and clear out every service other than sshd, network and hypervm. Just run ntsysv, and you can select the list of services from a graphical list, and disable everything except the primary ones. On the master, you will need mysql too.
|
...on my basic Centos5 install, I have the following enabled:
acpid, anacron, apmd, atd, , auditd, autofs, bluetooth, cpuspeed, crond, cups, firstboot, gpm, haldaemon, hidd, ip6tables, iptables, irqbalance, mcstrans, mdmonitor, messagebus, microcode_ctl, netfs, network, nfslock, pcscd, portmap, readahead_early, restorecond, rpcgssd, rpcidmapd, sendmail, smartd, sshd, syslog and yum-updatesd
...so I should switch them all off, apart from sshd, network, hypervm and mysql, as this one server will carry all the VPS's locally to it
...just wish to confirm before I accidentally switch something off that I shouldn't!
|
|
| | | | |
| Re: Preparing a node for configuring vps [message #31495 is a reply to message #3243] |
Sat, 07 June 2008 06:52   |
rfhmendes  Messages: 121 Registered: March 2008 |
Valuable Member |
|
|
You need to use the installation GUI (Graphical Mode not Text Mode). It is the easier way to do it, at least for me.
Inside the partition scheme... choose custom (when it asks about if you want the default scheme etc). After that, create the usual "/" partition, "swap" partition and "/boot". (I don't personally recommend to have "/" and "swap" partitions inside a LVM, because I already had problems with this - but notice that it is a personal choice, maybe for you can work well).
Choose 500mb for the boot partition (like Lxlabs says in the installation web page), use the double space of your RAM for swap partition (personal choice too, Lxlabs recommendation is to use 1gb of space for swap), also 10Gb to "/" partition or add more space to "/" partition if you want to add more templates etc). If you do like Lxlabs says (creating the partitions "/" and "swap" inside the LVM - I tell you later after 2 steps).
After creating the usual partitions, create a new one called LVM (in the same place you create "swap", "/" and "/boot"). Configure it to occupy the rest of the disk. If you have more disks, you must also create new partitions for LVM and also configure it to occupy the rest of the disk - do as you wish. After that in the up right corner you can see the LVM button. Click on it.
Create a new group with whatever name. The default name should do it very well. In this window it is where you create volume groups. You can add one or more partitions (that you created before called LVM Partitions) to the Volume Groups, do as you wish. You can also, create as much volume groups as you wish and select the space they occupy in the LVM partitions. After you add the volume groups, you are OK to continue installing CentOS as you wish. Now, Xen VMs can be created now.
For those who wants to install "/" and "swap" inside the LVM read this. Now that you created the group volumes, you can create now the "/" and "swap" partitions with whatever space you want. It is almost like creating them (in the normal way). Again, in the up right corner you can see the LVM button, click on it. You ill see the "new" bottom... click on it (I think you may need select what group you want to install the partition). After that you can decide what you want... "/", "swap" or whatever (don't remember very well what kind of options are available and how it is perfectly done), also you can decide here the amount of space to occupy for each partition you create and also if you want ext2 or ext3. After that, they are going to be created inside the LVM. With LVM you can through the shell, resize the partitions very easily. Create, remove... add a disk and add a new partition to a group etc... there are a lot of possibilities with LVM and types of groups. You should really read the pdf that contains every information an IT needs to know.
You can learn much more about it here: " http://www.centos.org/docs/5/html/5.1/pdf/Cluster_Logical_Vo lume_Manager.pdf".
After you read that pdf... you can fully dominate LVM through shell. I read it... and I didn't regret it, I learned.
This way it is the my preferred way to do it, I learn it for myself without any kind of help from anyone (after that I read the documentation to dominate LVM through shell).
If you can't use the installation GUI, then, you really must read that documentation. It is everything in there, you can't miss that.
I hope I helped most of the people here with issues installing HyperVM Xen. I typed all of this very fast because I'm running out of time. Any kind of correction that is needed to my text let me know - so I can make the needed corrections to make this the most accurate possible.
Also, I must remind that my English is not 100% perfect (maybe not even 50%, so, I apologize about it).
Thanks,
R. Mendes
[Updated on: Sat, 07 June 2008 07:06] Report message to a moderator
|
|
| |
| Re: Preparing a node for configuring vps [message #31499 is a reply to message #31497] |
Sat, 07 June 2008 10:15   |
rfhmendes  Messages: 121 Registered: March 2008 |
Valuable Member |
|
|
| nibb wrote on Sat, 07 June 2008 13:41 | Thanks. Yes I will use text mode or console mode. Thats basically on how to prepare the server, how about the steps of actually installing then xen and hypervm? I thought you have to boot the machine with the xen disk and install there
|
You don't need to do that (boot the machine with the xen disk), when you use the automated script from lxlabs, the script install everything needed.
Anyway, I ill try to help the most I can with details, so, every new user to lxlabs, ill find it helpful. I ask Lxlabs or someone else that finds something wrong, to correct me, please (so I can edit the text etc).
You really should use the normal way (using the graphical installation and actually the best way to do it, since it is more complete than the text mode - anyway do as you wish ) After the installation of CentOS, inside the shell you ill need to use the following commands:
Update first your CentOS:
Check if you have "nano" and "wget" installed by doing this:
if you are using the 32bit arch, you ill find here 2 lines starting like this, "nano.i386" and another one "wget.i386"... at the end of them, you ill find the word: "installed" if the packages are installed. if your arch is 64bit, instead of getting "*.i386" you ill find something else, replace it for what the yum command shows to you. the symbol "*" means whatever package name.
If you didn't find that word (installed) at the end of those lines, then run this:
yum -y install nano.i386 wget.i386
(note that it is not supposed to run any kind of driver for several reasons (xen and/or openvz) on hypervm master. use xen or openvz with hypervm slave - thats the right way) so if you are installing the hypervm master (only with hypervm master), add "sendmail.i386" to the list of packages to check if needs to be installed or not and if needs, just add a "{space}sendmail.386" to the last command above. "{space} = to press space".
If you have them installed already, run this:
nano /etc/sysconfig/selinux
In this text file you ill find the following parameter:
Change it to:
After changing the file press "CTRL+X" to exit. Press "Y" to save. Press "Enter" to save with the same name.
After this, run:
to install hypervm master, download this:
wget http://download.lxlabs.com/download/hypervm/production/hypervm-install-master.sh
to install hypervm slave, just change the word "master" to "slave".
check if you have ntsysv installed with the command:
just like before, if you need to install it, run:
yum -y install ntsysv.i386
after this, run this if you are installing hypervm master with the possibility to run xen on it:
sh hypervm-install-master.sh --virtualization-type=xen
if you don't want to run xen on it, just change "xen" to "NONE"... notice the capitalized word, it is important that.
if you are installing on a slave server, then install hypervm slave, change on the command "master" to "slave" and you are ok.
After running the script... at the end... run this:
Edit the parameter: "default=1" to "default=0". CTRL+X to exit. press "Y" to save and then "enter" to confirm the filename is the same.
Now, run:
cd /usr/local/lxlabs/hypervm/httpdocs/
lphp.exe ../bin/misc/fixcentos5xen.php
now, lets restart.
after the restart and enter your root password, run this:
with the space or enter, unselect the packages or select them. with the tab you can choose OK or CANCEL.
Now, if you are running a master without any driver (xen or openvz), then.. unselect everything except sshd, network, hypervm and sendmail. The rest you can safely unselect.
If you are running master with the xen driver, then... unselect everything except sshd, network, hypervm, xend, sendmail and xendomains.
If you are going to run a slave with the xen driver, then just unselect everything except sshd, network, hypervm, xend and xendomains.
ok, then: (it is more easier to do shutdown -r now than turn off every service manually with the "service" command).
after this you should be able to access hypervm master through the web browser (something like: "https://yourip:8887" or if you configured a hostname, you can replace "yourip" with your hostname that ill work too if it is well configured (notice you need a domain to do this and configure it properly).
If you had configure everything properly (including the LVM), xen ill work very well, if you didn't configure LVM properly, then you should start to read the pdf above and learn more about it.
I think I didn't forget anything... and every command etc is correct, if you notice something that shouldn't happen let me know so I can see if it is wrong to correct it! 
Hope this helps the most novice users.
Regards,
R. Mendes
|
|
| |
| Re: Preparing a node for configuring vps [message #32300 is a reply to message #32299] |
Sat, 28 June 2008 14:16   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
Install, ovzkernel-PAE
yum -y install ovzkernel-PAE
thanks.
On Sat, Jun 28, 2008 at 06:11:57PM -0000, shanlar wrote:
>
>
> Lxhelp wrote on Fri, 26 January 2007 06:20
> > DO use a 64 bit processor. The 32 bit system can only recognize 2GB of RAM. There is a AWE extension for 32bit which enables the 32 bit processor to access more Memory, but it has significant overheads, so ultimately it is better you stick with 64 bit itself. There were some minor 64<=>32 bit issues with the linux kernel, but this has been very properly solved in hyperVM, and we currently have most of our customers running their vpses for over 4 months without any issue on 64bit systems.
|
|
| |
| Re: Preparing a node for configuring vps [message #32304 is a reply to message #31497] |
Sat, 28 June 2008 15:16   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
There is a problem regarding xen and some specific motherboards. Xen is supposed to automatically recognize full RAm, but doesn't work on some motherboards. It is a linux kernel bug, and for now, motherboard replacement is the only way.
thanks.
On Sat, Jun 07, 2008 at 12:41:25PM -0000, Nibb wrote:
>
>
> Thanks. Yes I will use text mode or console mode. Thats basically on how to prepare the server, how about the steps of actually installing then xen and hypervm? I thought you have to boot the machine with the xen disk and install there :(
|
|
| | | | | | |
| Re: Preparing a node for configuring vps [message #37263 is a reply to message #37262] |
Wed, 10 September 2008 17:27   |
Lxhelp Messages: 23691 Registered: July 2006 |
The Champion |
|
|
Basically, someone is chdired into the vps's /vz/private directory. You have to find that session and kill it.
Will show who has the dir open.
thanks.
On Wed, Sep 10, 2008 at 09:25:13PM -0000, Mark Bailey wrote:
>
>
> Found my error. (User error.)
|
|
| | | | | | |
| Pages (2): [1 ] |
 |
Goto Forum:
Current Time: Thu Jun 20 06:11:42 EDT 2013
Total time taken to generate the page: 0.01724 seconds
|