[pve-devel] spiceproxy error

Dietmar Maurer dietmar at proxmox.com
Mon Nov 2 08:25:46 CET 2015


> You can also pass the 'proxy' parameter to the API method in order
> to overwrite that setting.

For example, we have the following code in our GUI
(pve-manager/www/manager/Utils.js):

	    var params = { proxy: PVE.Utils.windowHostname() };
	    if (vmtype === 'kvm') {
		url = '/nodes/' + nodename + '/qemu/' + vmid.toString() + '/spiceproxy';
		PVE.Utils.openSpiceViewer(url, params);
	    } 

where windowHostname() extract the IP address from window.location.hostname:

   windowHostname: function() {
	return window.location.hostname.replace(IP6_bracket_match,
            function(m, addr, offset, original) { return addr; });
    },

hope that helps.



More information about the pve-devel mailing list