[pve-devel] [PATCH v2] Fixed OpenVZ noVNC console not showing in PVE3.4

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jul 30 08:39:59 CEST 2015


In commit 8d70213 we started to generate pveui.js from include/ui.js
with a patch, but the same patch was applied to master and stable 3
branch. So there was only lxc and when we try to open a noVNC
console on a OpenVZ container a "implement me" exception gets thrown
and the window shows nothing. This patch targets the stable-3 branch
and switches lxc back to OpenVZ so that the noVNC console is usable,
again.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---

Changed since v1:
 * missed some lxc occurences, fixed them too

 debian/patches/pveui.patch |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/debian/patches/pveui.patch b/debian/patches/pveui.patch
index 8d24e4e..b892796 100644
--- a/debian/patches/pveui.patch
+++ b/debian/patches/pveui.patch
@@ -390,7 +390,7 @@ index 3d3c41e..72072b1 100644
 +	},
 +
 +	pve_detect_migrated_vm: function() {
-+	  if (!(UI.consoletype === 'kvm' || UI.consoletype === 'lxc')) {
++	  if (!(UI.consoletype === 'kvm' || UI.consoletype === 'openvz')) {
 +	      return;
 +	  }
 +
@@ -401,7 +401,7 @@ index 3d3c41e..72072b1 100644
 +	      success: function(result) {
 +		  var list = result.data;
 +		  list.every(function(item) {
-+		      if ((item.type === 'qemu' || item.type === 'lxc') && 
++		      if ((item.type === 'qemu' || item.type === 'openvz') && 
 +			  (item.vmid == UI.vmid)) {
 +			  var url = "?" + UI.urlEncode({
 +			      console: UI.consoletype,
@@ -425,8 +425,8 @@ index 3d3c41e..72072b1 100644
 +
 +	  if (UI.consoletype === 'kvm') {
 +	      baseUrl = '/nodes/' + UI.nodename + '/qemu/' + UI.vmid;
-+	  } else if (UI.consoletype === 'lxc') {
-+	      baseUrl = '/nodes/' + UI.nodename + '/lxc/' + UI.vmid;
++	  } else if (UI.consoletype === 'openvz') {
++	      baseUrl = '/nodes/' + UI.nodename + '/openvz/' + UI.vmid;
 +	  } else {
 +	      throw "unknown VM type";
 +	  }
@@ -560,17 +560,17 @@ index 3d3c41e..72072b1 100644
 +	      {
 +		  text: gettext('Start'), 
 +		  handler: UI.pveCmdStart,
-+		  enable: { kvm: 1, lxc: 1 }
++		  enable: { kvm: 1, openvz: 1 }
 +	      },
 +	      {
 +		  text: gettext('Shutdown'), 
 +		  handler: UI.pveCmdShutdown,
-+		  enable: { kvm: 1, lxc: 1 }
++		  enable: { kvm: 1, openvz: 1 }
 +	      },
 +	      {
 +		  text: gettext('Stop'),
 +		  handler: UI.pveCmdStop,
-+		  enable: { kvm: 1, lxc: 1 }
++		  enable: { kvm: 1, openvz: 1 }
 +	      },
 +	      {
 +		  text: gettext('Reset'),
@@ -716,8 +716,8 @@ index 3d3c41e..72072b1 100644
 +	      if (UI.vmname) {
 +		  title += " ('" + UI.vmname + "')";
 +	      }
-+	  } else if (UI.consoletype === 'lxc') {
-+	      var baseUrl = '/nodes/' + UI.nodename + '/lxc/' + UI.vmid;
++	  } else if (UI.consoletype === 'openvz') {
++	      var baseUrl = '/nodes/' + UI.nodename + '/openvz/' + UI.vmid;
 +	      url =  baseUrl + '/vncproxy';
 +	      wsurl = baseUrl + '/vncwebsocket';
 +	      title = "CT " + UI.vmid;
-- 
1.7.10.4




More information about the pve-devel mailing list