Fli
08-29-2014, 11:21 PM
There are two Ubuntu 14.04 OpenVZ OS templates available:
http://forum.proxmox.com/threads/18356-Ubuntu-14-04-Template
http://wiki.openvz.org/Download/template/precreated
When copied these templates into /vz/template/cache and chmod them to 755 so i can see them from hypervm i then applied teplate to a VPS.
The first issue was during VPS start, it returned error that Kernel is too old: "FATAL: kernel too old (http://internetlifeforum.com/virtualisation/2309-openvz-fatal-kernel-too-old-container-start-failed-one-solution)"
this error can be seen when starting vps: vzctl --verbose start CTIDHERE
the fix was that in /etc/vz/osrelease.conf i added new line:
ubuntu-14.04 2.6.32
so after VPS started, networking, ssh did not worked.
It started working when did these 2 commands:
ifconfig venet0 VPSIPHERE netmask 255.255.255.224 broadcast BROADCASTIPTHERE(wasthelastipofmysubnet,ihave/27anditwas.31)
route add default gw my_subnet_ip_ending_with_.1_as_a_last_octet venet0
example
ifconfig venet0 107.182.133.24 netmask 255.255.255.224 broadcast 107.182.133.31
route add default gw 107.182.133.1 venet0
the first IP is a VPS IP, second netmask IP worked for me to be .224, third IP is like last IP of the IP range i guess, and fourth IP (gateway ip) can be discovered by doing command "ip route | grep default" from OpenVZ host server.
after reboot networking stop working again... until above commands executed by openvz admin.
these are the changes i did in the ssh config file /etc/ssh/sshd_cofig
(first is new value, second is old value) ... old values did not worked
< PermitRootLogin yes
---
> PermitRootLogin without-password
32c32
< PubkeyAuthentication no
---
> PubkeyAuthentication yes
52c52
< PasswordAuthentication yes
---
> #PasswordAuthentication yes
89d88
< AllowUsers root
I also added missing line into /etc/vz/conf/CTID.conf file:
IPTABLES="ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ipt_state iptable_nat ip_nat_ftp ipt_recent ipt_owner"
an idea is to create script with ifconfig and route commands mentioned above and add path to script into /etc/rc.local
not sure if it would work, but it is probably not repeatable if i use template for creating new VPS with another IP...
Anyone please knows how to make networking working after VPS reboot?
UPDATE: there might be workaround and even fix for networking: https://internetlifeforum.com/virtualisation/4046-openvz-centos-7-new-os-templates-networking-do-not-works-fix-update-vzctl/
http://forum.proxmox.com/threads/18356-Ubuntu-14-04-Template
http://wiki.openvz.org/Download/template/precreated
When copied these templates into /vz/template/cache and chmod them to 755 so i can see them from hypervm i then applied teplate to a VPS.
The first issue was during VPS start, it returned error that Kernel is too old: "FATAL: kernel too old (http://internetlifeforum.com/virtualisation/2309-openvz-fatal-kernel-too-old-container-start-failed-one-solution)"
this error can be seen when starting vps: vzctl --verbose start CTIDHERE
the fix was that in /etc/vz/osrelease.conf i added new line:
ubuntu-14.04 2.6.32
so after VPS started, networking, ssh did not worked.
It started working when did these 2 commands:
ifconfig venet0 VPSIPHERE netmask 255.255.255.224 broadcast BROADCASTIPTHERE(wasthelastipofmysubnet,ihave/27anditwas.31)
route add default gw my_subnet_ip_ending_with_.1_as_a_last_octet venet0
example
ifconfig venet0 107.182.133.24 netmask 255.255.255.224 broadcast 107.182.133.31
route add default gw 107.182.133.1 venet0
the first IP is a VPS IP, second netmask IP worked for me to be .224, third IP is like last IP of the IP range i guess, and fourth IP (gateway ip) can be discovered by doing command "ip route | grep default" from OpenVZ host server.
after reboot networking stop working again... until above commands executed by openvz admin.
these are the changes i did in the ssh config file /etc/ssh/sshd_cofig
(first is new value, second is old value) ... old values did not worked
< PermitRootLogin yes
---
> PermitRootLogin without-password
32c32
< PubkeyAuthentication no
---
> PubkeyAuthentication yes
52c52
< PasswordAuthentication yes
---
> #PasswordAuthentication yes
89d88
< AllowUsers root
I also added missing line into /etc/vz/conf/CTID.conf file:
IPTABLES="ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ipt_state iptable_nat ip_nat_ftp ipt_recent ipt_owner"
an idea is to create script with ifconfig and route commands mentioned above and add path to script into /etc/rc.local
not sure if it would work, but it is probably not repeatable if i use template for creating new VPS with another IP...
Anyone please knows how to make networking working after VPS reboot?
UPDATE: there might be workaround and even fix for networking: https://internetlifeforum.com/virtualisation/4046-openvz-centos-7-new-os-templates-networking-do-not-works-fix-update-vzctl/