[pve-devel] Proxmox compatible Android client (Opaque) available for beta testing
Dietmar Maurer
dietmar at proxmox.com
Wed Dec 11 08:08:01 CET 2013
> I am the developer behind aSPICE, the Android SPICE client. In order to better
> support enterprise VDI environments, I decided to create a new client called
> Opaque which aims to give users the ability to attach to the graphics console of
> their VMs running in an oVirt, RHEV, or Proxmox infrastructure. In order to
> support Proxmox, I recently added .vv file capability to Opaque.
The PVE spice API has change recently.
1.) We use POST instead of GET (you need to send the CRSF token for security reasons).
2.) we simply return a json object instead of a '.vv' file.
So you should use /api2/json/nodes/<nodename>/qemu/vmid/spiceproxy API path.
You can easily generate a '.vv' file on the client side using a data URL. I currently
use something like this:
openSpiceViewer: function(url, params){
PVE.Utils.API2Request({
url: url,
params: params,
method: 'POST',
failure: function(response, opts){
Ext.Msg.alert('Error', response.htmlStatus);
},
success: function(response, opts){
var raw = "[virt-viewer]\n";
Ext.Object.each(response.result.data, function(k, v) {
raw += k + "=" + v + "\n";
});
var url = 'data:application/x-virt-viewer;charset=UTF-8,' +
encodeURIComponent(raw);
window.open(url, "_top");
}
});
}
Hope that helps.
- Dietmar
More information about the pve-devel
mailing list