Editing
VPS Management
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Making new customer VE (vemakexxx) == This applies to older virts with old templates. This should probably not be used at all anymore. 1. look thru hist for ip 2. confirm ip you want to use isn’t in use via Mgmt. -> IP Map in management screens 3. put ve on whichever partition has more space vemakerh9 <veid> <ip> <hostname> <mount> <email> [gb disk]; <256|384|512> <veid> vemakerh9 866 69.55.226.109 ngentu.com /vz1 ayo@ngantu.com,asd@asd.com 5; 256 866 4. copy (veid), dir, and ip to pending customer screen (pass set to p455agfa) Note: We use VEID (Virtual Environment ID) and CTID (Container ID) interchangably. Similarly, VE and CT. They mean the same thing. VZPP = VirtuoZzo Power Panel (the control panel for each CT) All linux systems exist in /vz, /vz1 or /vz2 - since each linux machine holds roughly 60-90 customers, there will be roughly 30-45 in each partition. The actual filesystem of the system in question is in: /vz(1-2)/private/(VEID) Where VEID is the identifier for that system - an all-numeric string larger than 100. The actual mounted and running systems are in the corresponding: /vz(1-2)/root/(VEID) But we rarely interact with any system from this mount point. You should never need to touch the root portion of their system – however you can traverse their filesystem by going to <tt>/vz(1-2)/private/(VEID)/root</tt> (<tt>/vz(1-2)/private/(VEID)/fs/root</tt> on 4.x systems) the root of their filesystem is in that directory, and their entire system is underneath that. Every VE has a startup script in <tt>/etc/sysconfig/vz-scripts</tt> (which is symlinked as <tt>/vzconf</tt> on all systems) - the VE startup script is simply named <tt>(VEID).conf</tt> - it contains all the system parameters for that VE: <pre># Configuration file generated by vzsplit for 60 VE # on HN with total amount of physical mem 2011 Mb VERSION="2" CLASSID="2" ONBOOT="yes" KMEMSIZE="8100000:8200000" LOCKEDPAGES="322:322" PRIVVMPAGES="610000:615000" SHMPAGES="33000:34500" NUMPROC="410:415" PHYSPAGES="0:2147483647" VMGUARPAGES="13019:2147483647" OOMGUARPAGES="13019:2147483647" NUMTCPSOCK="1210:1215" NUMFLOCK="107:117" NUMPTY="19:19" NUMSIGINFO="274:274" TCPSNDBUF="1800000:1900000" TCPRCVBUF="1800000:1900000" OTHERSOCKBUF="900000:950000" DGRAMRCVBUF="200000:200000" NUMOTHERSOCK="650:660" DCACHE="786432:818029" NUMFILE="7500:7600" AVNUMPROC="51:51" IPTENTRIES="155:155" DISKSPACE="4194304:4613734" DISKINODES="400000:420000" CPUUNITS="1412" QUOTAUGIDLIMIT="2000" VE_ROOT="/vz1/root/636" VE_PRIVATE="/vz1/private/636" NAMESERVER="69.55.225.225 69.55.230.3" OSTEMPLATE="vzredhat-7.3/20030305" VE_TYPE="regular" IP_ADDRESS="69.55.225.229" HOSTNAME="textengine.net"</pre> As you can see, the hostname is set here, the disk space is set here, the number of inodes, the number of files that can be open, the number of tcp sockets, etc. - all are set here. In fact, everything that can be set on this customer system is set in this conf file. All interaction with the customer system is done with the VEID. You start the system by running: vzctl start 999 You stop it by running: vzctl stop 999 You execute commands in it by running: vzctl exec 999 df -k You enter into it, via a root-shell backdoor with: vzctl enter 999 and you set parameters for the system, while it is still running, with: vzctl set 999 --diskspace 6100000:6200000 --save <tt>vzctl</tt> is the most commonly used command - we have aliased <tt>v</tt> to <tt>vzctl</tt> since we use it so often. We’ll continue to use <tt>vzctl</tt> in our examples, but feel free to use just <tt>v</tt>. Let's say the user wants more diskspace. You can cat their conf file and see: DISKSPACE="4194304:4613734" So right now they have 4gigs of space. You can then change it to 6 with: vzctl set 999 --diskspace 6100000:6200000 --save IMPORTANT: all issuances of the vzctl set command need to end with <tt>–save</tt> - if they don't, the setting will be set, but it will not be saved to the conf file, and they will not have those settings next time they boot. All of the tunables in the conf file can be set with the vzctl set command. Note that in the conf file, and on the vzctl set command line, we always issue two numbers seperated by a colon - that is because we are setting the hard and soft limits. Always set the hard limit slightly above the soft limit, as you see it is in the conf file for all those settings. There are also things you can set with `<tt>vzctl set</tt>` that are not in the conf file as settings, per se. For instance, you can add IPs: vzctl set 999 --ipadd 10.10.10.10 --save or multiple IPs: vzctl set 999 --ipadd 10.10.10.10 --ipadd 10.10.20.30 --save or change the hostname: vzctl set 999 --hostname www.example.com --save You can even set the nameservers: vzctl set 999 --nameserver 198.78.66.4 --nameserver 198.78.70.180 --save Although you probably will never do that. You can disable a VPS from being started (by VZPP or reboot) (4.x): vzctl set 999 --disabled yes --save You can disable a VPS from being started (by VZPP or reboot) (<=3.x): vzctl set 999 --onboot=no --save You can disable a VPS from using his control panel: vzctl set 999 --offline_management=no --save You can suspend a VPS, so it can be resumed in the same state it was in when it was stopped (4.x): vzctl suspend 999 and to resume it: vzctl resume 999 to see who owns process: vzpid <PID> to mount up an unmounted ve: vzctl mount 827 To see network stats for CT's: <pre># vznetstat VEID Net.Class Output(bytes) Input(bytes) ----------------------------------------------- 24218 1 484M 39M 24245 1 463M 143M 2451 1 2224M 265M 2454 1 2616M 385M 4149 1 125M 68M 418 1 1560M 34M 472 1 1219M 315M 726 1 628M 317M 763 1 223M 82M 771 1 4234M 437M ----------------------------------------------- Total: 13780M 2090M</pre> One thing that sometimes comes up on older systems that we created with smaller defaults is that the system would run out of inodes. The user will email and say they cannot create any more files or grow any files larger, but they will also say that they are not out of diskspace ... they are running: df -k and seeing how much space is free - and they are not out of space. They are most likely out of inodes - which they would see by running: df -i So, the first thing you should do is enter their system with: vzctl enter 999 and run: <tt>df -i</tt> to confirm your theory. Then exit their system. Then simply cat their conf file and see what their inodes are set to (probably 200000:200000, since that was the old default on the older systems) and run: vzctl set 999 --diskinodes 400000:400000 --save If they are not out of inodes, then a good possibility is that they have maxed out their numfile configuration variable, which controls how many files they can have in their system. The current default is 7500 (which nobody has ever hit), but the old default was as low as 2000, so you would run something like: vzctl set 999 --numfile 7500:7500 --save ---- You cannot start or stop a VE if your pwd is its private (/vz/private/999) or root (/vz/root/999) directories, or anywhere below them.
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information