Fli
11-18-2014, 05:52 AM
The WHMCS HyperVM module may return an error when one create new VM on new HyperVM Beta Development version.
The error: {"message":"__error_need_v_num_ipv6address_f","return":"error"}
I fixed WHMCS Hypervm.php module so the automatic creation works on this HyperVM beta. The WHMCS module did not properly obtain an VPS IP assigned by HyperVM, so this was fixed thanks to "HostJake (http://www.hostjake.com)".
there are changes made in original code:
http://i.snag.gy/xHaPk.jpg
http://i.snag.gy/cxHSx.jpg
except that there is a change of adding .vm into action (suspend terminate..) urls of hypervm
So this modiffication makes this original HyperVM whmcs module work on HyperVM beta server.
HyperVM beta big advantage is that it works on CentOS 6.x and supports IPv6 (which is not implemented in whmcs module yet :-( if anyone can do it,.. or need HyperVM whmcs beta module (https://mega.co.nz/#!x5E3Eb4C!wf4l-cd8nG473sdE1hhWxe0P1_vFPM8q4lmBNwD2fT0), i can send it
there is the contact form < (http://chat.epips.net/chat.php)
thank You
-----
to go around HyperVM IPv6 error mentioned above, one may also try add "If" condition ( if (!empty($this->num_ipv6address_f)) { ) around IPv6 check:
if (!empty($this->num_ipv6address_f)) { if ($this->num_ipv6address_f) { $netinfo = $syncs->getIpv6Pool($this->num_ipv6address_f); $totallist = $netinfo['ip']; if (!$this->nameserver) { $this->nameserver = $netinfo['nameserver']; } $this->networkgateway = $netinfo['networkgateway']; $this->networknetmask = $netinfo['networknetmask']; if ($totallist) foreach($totallist as $ip) { $ipadd = new vmipaddress_a(null, $this->syncserver, $ip); $this->vmipaddress_a[$ipadd->nname] = $ipadd; ippool::addToTmpIpAssign($ip); } }
}
into file hypervm (https://github.com/lxcenter/hypervm/tree/dev/hypervm)/httpdocs (https://github.com/lxcenter/hypervm/tree/dev/hypervm/httpdocs)/lib (https://github.com/lxcenter/hypervm/tree/dev/hypervm/httpdocs/lib)/vps (https://github.com/lxcenter/hypervm/tree/dev/hypervm/httpdocs/lib/vps)/vpslib.php
original code is maybe if (!empty($this->num_ipv6address_f)) {
but i guess this is temporary fix untill hypervm upgrade
-----------
Another IMPORTANT thing in HyperVM beta & WHMCS is that it dont allow old WHMCS hypervm module to restart VPS returning error "__error_need_confirm_reboot". Im not sure how to fix HyperVM WHMCS module for this, but this can be fixed by editting hypervm beta file /usr/local/lxlabs/hypervm/httpdocs/lib/vps/driver/vps__openvzlib.phps find: "function reboot()" and in this function are 3 following linex:
if (!$this->main->isOn('reboot_confirm_f')) {
throw new lxException("need_confirm_reboot", 'reboot_confirm_f');
}
just turn it into:
/* if (!$this->main->isOn('reboot_confirm_f')) {
throw new lxException("need_confirm_reboot", 'reboot_confirm_f');
} */
The error: {"message":"__error_need_v_num_ipv6address_f","return":"error"}
I fixed WHMCS Hypervm.php module so the automatic creation works on this HyperVM beta. The WHMCS module did not properly obtain an VPS IP assigned by HyperVM, so this was fixed thanks to "HostJake (http://www.hostjake.com)".
there are changes made in original code:
http://i.snag.gy/xHaPk.jpg
http://i.snag.gy/cxHSx.jpg
except that there is a change of adding .vm into action (suspend terminate..) urls of hypervm
So this modiffication makes this original HyperVM whmcs module work on HyperVM beta server.
HyperVM beta big advantage is that it works on CentOS 6.x and supports IPv6 (which is not implemented in whmcs module yet :-( if anyone can do it,.. or need HyperVM whmcs beta module (https://mega.co.nz/#!x5E3Eb4C!wf4l-cd8nG473sdE1hhWxe0P1_vFPM8q4lmBNwD2fT0), i can send it
there is the contact form < (http://chat.epips.net/chat.php)
thank You
-----
to go around HyperVM IPv6 error mentioned above, one may also try add "If" condition ( if (!empty($this->num_ipv6address_f)) { ) around IPv6 check:
if (!empty($this->num_ipv6address_f)) { if ($this->num_ipv6address_f) { $netinfo = $syncs->getIpv6Pool($this->num_ipv6address_f); $totallist = $netinfo['ip']; if (!$this->nameserver) { $this->nameserver = $netinfo['nameserver']; } $this->networkgateway = $netinfo['networkgateway']; $this->networknetmask = $netinfo['networknetmask']; if ($totallist) foreach($totallist as $ip) { $ipadd = new vmipaddress_a(null, $this->syncserver, $ip); $this->vmipaddress_a[$ipadd->nname] = $ipadd; ippool::addToTmpIpAssign($ip); } }
}
into file hypervm (https://github.com/lxcenter/hypervm/tree/dev/hypervm)/httpdocs (https://github.com/lxcenter/hypervm/tree/dev/hypervm/httpdocs)/lib (https://github.com/lxcenter/hypervm/tree/dev/hypervm/httpdocs/lib)/vps (https://github.com/lxcenter/hypervm/tree/dev/hypervm/httpdocs/lib/vps)/vpslib.php
original code is maybe if (!empty($this->num_ipv6address_f)) {
but i guess this is temporary fix untill hypervm upgrade
-----------
Another IMPORTANT thing in HyperVM beta & WHMCS is that it dont allow old WHMCS hypervm module to restart VPS returning error "__error_need_confirm_reboot". Im not sure how to fix HyperVM WHMCS module for this, but this can be fixed by editting hypervm beta file /usr/local/lxlabs/hypervm/httpdocs/lib/vps/driver/vps__openvzlib.phps find: "function reboot()" and in this function are 3 following linex:
if (!$this->main->isOn('reboot_confirm_f')) {
throw new lxException("need_confirm_reboot", 'reboot_confirm_f');
}
just turn it into:
/* if (!$this->main->isOn('reboot_confirm_f')) {
throw new lxException("need_confirm_reboot", 'reboot_confirm_f');
} */