Poll

Should I add IPv6 support to the VMs?

Hell yeah! (Yes)
1 (100%)
No way! (No)
0 (0%)
What the f*ck? (What?)
0 (0%)
Get the f*ck out of here! (Don`t have opinion!)
0 (0%)

Total Members Voted: 1

Voting closed: August 02, 2017, 09:22:04 PM

Author Topic: OpenVZ with CWP  (Read 89675 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
Re: OpenVZ with CWP
« Reply #30 on: July 26, 2017, 06:41:22 PM »
Here is the first screen shot from the user panel. Hope you will like it:

Probably from CWP they will want to kill me for something I did but ... I had to! I reversed it back to the same position.
If you want something to be changed/improved feel free to write your opinion and I will do my best to do it if it`s usable.
« Last Edit: July 26, 2017, 06:58:48 PM by darkness »
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #31 on: July 26, 2017, 09:19:08 PM »

It`s going to look something like this, but keep in mind that it will be only 1(one) VM per user. The administrator will not be able to add second VM for the same user, the user need to get/purchase one more account. This is just a demo, so I have them all. Also you will not be able to add the same IP address to another user like I did.
From the button "Manage" the user will be able to perform these actions:
Boot
Shutdown
Reboot
Reinstall
Change Root Password
Change Hostname
The admin can do it from the admin menu with single button click. Poll is coming ... NOW!
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
**
Re: OpenVZ with CWP
« Reply #32 on: July 27, 2017, 03:32:31 PM »

It`s going to look something like this, but keep in mind that it will be only 1(one) VM per user. The administrator will not be able to add second VM for the same user, the user need to get/purchase one more account. This is just a demo, so I have them all. Also you will not be able to add the same IP address to another user like I did.
From the button "Manage" the user will be able to perform these actions:
Boot
Shutdown
Reboot
Reinstall
Change Root Password
Change Hostname
The admin can do it from the admin menu with single button click. Poll is coming ... NOW!

it so nice. we need contract buy more ips for all vm?

Offline
***
Re: OpenVZ with CWP
« Reply #33 on: July 28, 2017, 07:57:54 AM »
No. This is a developing machine where I don`t need more IP adresses. It`s the same if you use external IP or internal IP. Iptables are supposed to forward the users connections to defined IP and port. If you have just 1 external IP like 42.71.148.203 and you make a VM on internal IP like 192.168.0.2 with port 62001, when the user tries to connect to 42.71.148.203 on port 62001 iptable should forward him and connect him to 192.168.0.2 on port 62001. Something like apache is doing when you have NAT enabled. The stuff with the iptabes is not tested fully yet. I live on a village and there is my developing machine. I got my internet there through WiFi and I need to call my ISP to open all ports in the antena, so I can open them in the routers in the house for testing. But I`m still reading about iptables how to make good forwarding. I`ve been using FreeBSD for more than 12 years and I got used with pf(packet filter), so now it`s a bit difficult and strange for me to switch to iptables. But I bought a nice 841 page book for iptables and it`s a matter of time to read it and fix it.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #34 on: August 01, 2017, 09:53:42 AM »
Since I can`t find logo for CCTel Linux I will remove it from the list of the OSs for installation.
Also I`m making some changes on the way both panels looks like. On both of the panels left to do:
Admin panel:
1. Adding IP Addresses to be assigned to VMs (easy job, just need time)
Client panel:
1. Reinstall OS (50%) (easy job, just need time)
2. Change Root Password of a VM (easy job, just need time)
3. Change Hostname of a VM (easy job, just need time)
4. Open Root Console to a VM (hard job, need more time and may be help from a friend)
Some minor fixes on iptables rules and on the way both panels will look like.
« Last Edit: August 01, 2017, 09:55:25 AM by darkness »
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #35 on: August 02, 2017, 07:30:32 PM »
I was watching videos in youtube how to config OBS but it`s still not recording anything but black screen. Take some more pictures instead:












So, this is it for the moment from the client panel. Now I will do the "Change Root Password", "Change Hostname" and may be I will start to work on "Open Root Console". If you don`t like how it looks like or you want me to add something - let me know in the post, on PM, on root@born2host.com or on skype: theworkskype . I`m open for ideas.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #36 on: August 03, 2017, 12:14:57 PM »
Thanks to robbyq I could make the first video. Here it is:
https://youtu.be/L_f2E5uJvqE
Once again: Thank you robbyq
« Last Edit: August 03, 2017, 12:36:23 PM by darkness »
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #37 on: August 04, 2017, 05:28:58 AM »
I`m going to a quick holiday for 3-4 days on the beach. After I come back I will try all the templates one by one and some of them might be deleted, because as I noticed for example there`s a problem with Gentoo x86 Network with OpenVZ. In the first release the problem templates (if any) will be removed and until the second release I will try to fix them to be able to use them. See you soon guys.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #38 on: August 16, 2017, 03:47:22 PM »
After few shorts on the electricity because of burning houses here in the village, the HDD of the developing machine burn out. It`s good that I have 3 backups on 3 different places around Europe. Today I bought a new HDD. Now I will install CentOS 6 again and I will continue work.
Stay tuned ...
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #39 on: August 18, 2017, 06:17:43 PM »
I saw that from OpenVZ.org made updates to the templates. Now I`m testing the new templates to be sure they are not for Virtuozzo 7 only and they work on OpenVZ 6 also. For the moment what I see is that all the CentOS 6 versions works ok, and they are upgraded to 6.9 (Final) so when you install a container with CentOS 6, the user don`t need to wait 1h for "yum -y update", but most likely 1-15min depending on your INet connection and your server.
By the way all(2) Gentoo templates will be removed. They are old, no support for them, too much work to fix the networking and ... it sux. ;D
I found a Proxmox release of Gentoo 03/05/2017, but it makes problem with extracting stage3 to the container so it will be dismissed also.
Also got Ubuntu 17.04 - networking problem, OpenSuSE 42.2 - install problem. Got to test Alpine Linux 3.3, 3.4 and 3.5, Arch Linux base from 2017 and if they work will be added to the module.
Stay tuned.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: OpenVZ with CWP
« Reply #40 on: October 24, 2017, 04:39:30 AM »
Hello people,
It`s been a long time since I wrote back here. Many of the new templates are not working with the old OpenVZ 6, so we will stick on the old ones. For sure I can say that the module is 91% ready, tested and working. Still got no success with the Console from CWP6.user to every single VM. At the moment I`m experimenting with noVNC which gives me some power. As of this point it`s going good, but still having some issues implementing it. Hope soon to be 100% ready. Stay tuned.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
**
Re: OpenVZ with CWP
« Reply #41 on: October 24, 2017, 02:10:16 PM »
First I want to say nice job done here mate.

And second I notice in your first post here that you are reading .my.cnf file directly but you don't have to do that.
You probably know that, but I just want to tip you an a much faster way to do that.

Got some strange problem on the admin panel:
Code: [Select]
$root_file = "/root/.my.cnf"; -> From which file to get mysql password

Just use this vars from CWP itself
Code: [Select]
$db_host , $db_user , $db_pass , $db_name
But if you still want to read cnf file you can use parse_ini_file() function instead of explode and bypass problems with line breaks and spaces that can happen while exploding lines from files:
Code: [Select]
$dbFile = parse_ini_file('/root/.my.cnf');
$sql = new mysqli('localhost', $dbFile['user'], $dbFile['password'], 'root_cwp');

Just a small tip. :) Keep going mate.
« Last Edit: October 24, 2017, 02:18:09 PM by Gogo »

Offline
***
Re: OpenVZ with CWP
« Reply #42 on: October 25, 2017, 04:34:18 PM »
Long time ago I stopped trying to get password from .my.cnf and start using db_conn.php :) Now I`m banging my head on the wall with noVNC. But somehow I will make it work. Some day ... If anyone can help with noVNC ...
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
**
Re: OpenVZ with CWP
« Reply #43 on: October 25, 2017, 09:14:06 PM »
What's the problem with noVNC?

Offline
***
Re: OpenVZ with CWP
« Reply #44 on: October 26, 2017, 04:17:25 AM »
I create the VM through the web control. In the same time the shell script is creating the VM and adding iptables rule:
Code: [Select]
iptables -t nat -A PREROUTING -i $eth -p tcp --dport $port -j DNAT --to-destination $ipaddr:$inport
iptables -t nat -A POSTROUTING -o $eth -j MASQUERADE
Where $port is starting from 62000 and finishes to 65000 and $inport normally is 22 for SSH. As I follow the instructions for integration of noVNC I start it with username and this command:
Code: [Select]
websockify -D --web=/usr/share/novnc/ --cert=/etc/pki/tls/certs/novnc.pem 6080 $ipaddr:$inport
Where 6080 is the web port for accessing noVNC. Meantime the script is creating the vnc/xauth config when creating the VM. But when I try to access the VM through noVNC I got error 1006 and connection fails. If I start it with "websockify -D --web=/usr/share/novnc/ --cert=/etc/pki/tls/certs/novnc.pem 6080 localhost:5901" it`s making connection to the CentOS (where I don`t have GUI and it shows black screen of course).
The problem is that I can`t make it connect to the VM.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...