You can access the noVNC console via it's address:
Code:
[URL="https://your.proxmoxve.server:8006/?console=kvm&novnc=1&vmid=100&node=somenode"]
https://your.proxmoxve.server:8006/?console=kvm&novnc=1&vmid=100&node=somenode[/URL]
change the vmid and the node GET parameters to your needs. But you need to respect the authentification security measures Proxmox VE has.
I actually changed a little bit of the PHP API from
https://github.com/CpuID/pve2-api-php-client ( i hope you use this ^^)
I added the following function in pve2-api-php-client/pve2_api.class.php . You'll need it because the noVNC frontend checks if you have the valid permissions through the "PVEAuthCookie", and to set it outside of the API would be a bigger hassle as the login_ticket is protected in the API.
Code:
public function setCookie()
{
setcookie("PVEAuthCookie",$this->login_ticket['ticket']);
}
And here is some example code of including the noVNC console, attetion you need to create a user which has the VM.Console permission for the vms you would like to show., e.g the role "PVEVMUser" has it. And the user, AFAIK, must be logged in through the pam realm, which means it must be an real user on your proxmox system. I created a "vnc" dummy user on my proxmox server (use the command line tool "adduser"), then gave him the PVEVMUser role through the PVE Web Interface (naturally, you could do it also with the api).
But look at the code yourself, it's really simple. Only the setup from the user and so on is a bit complicated.
Code:
<?php
require("pve2-api-php-client/pve2_api.class.php");
# use pam here, my test user is vnc with, naturally, a strong password ;)
$pve2 = new PVE2_API("pve", "vnc", "pam", "12345");
?>
<html>
<head>
<title>noVNC extern test</title>
</head>
<body>
<?php
if ($pve2->login())
{
$pve2->setCookie(); # this is the function I added to the php API client
?>
<iframe src="https://192.168.122.6:8006/?console=kvm&novnc=1&vmid=100&node=pve" frameborder="0" scrolling="no" width="1024px" height="100%"></iframe>
<?php
# print("logged in");
}
else
{
print("Login to Proxmox Host failed.\n");
exit;
}
?>
</body>
</html>
It's a bit messy, so when you have further questions, feel free to ask. Or when you came up with a cleaner way, please let me know it.