[pve-devel] VncProxy

Luiz Fernando Milani Anversa fernando at vilaclick.com.br
Fri Jul 13 07:13:20 CEST 2012


Hi I need to access the VNC console Proxmox via an external site, I'm using the API2-client. I envision the vncviewer screen with the message "Status: X509Plain" but I can not see the virtual machine, here's the source code I'm using:


require("pve2api.php");
        
        $pve2 = new PVE2_API("192.168.13.10", "root", "pam", "xxx");
            
            if ($pve2->constructor_success()){
                if ($pve2->login()){
                    $vmid = "100";
                    
                    $nodes = $pve2->get_node_list();
                    $first_node = $nodes[0];
                    unset($nodes);
                                          
                        if ($vars = $pve2->post("/nodes/".$first_node."/qemu/".$vmid."/vncproxy")){ ?>
             
    
                            <div>
                            <APPLET id="vncapp" CODE=com.tigervnc.vncviewer.VncViewer 
                                ARCHIVE=https://192.168.13.10:8006/vncterm/VncViewer.jar 
                                WIDTH="800" HEIGHT="600" vspace=0 hspace=0>
                         
                                <param value="vncapp" name="id">
                                <param value="192.168.13.10" name="HOST">
                                <param value="Yes" name="Open new window">
                                <param value="<?=$vars['cert']?>" name="PVECert">
                                <param value="<?=$vars['port']?>" name="PORT">  
                                <param value="Yes" name="Show Controls">
                                <param value="Yes" name="Offer Relogin"> 
                                <param value="<?=$vars['user']?>" name="USERNAME">
                                <param value="<?=$vars['ticket']?>" name="PASSWORD">

                            </APPLET>
                            </div>
                    
                   <?php 
                       
                       
                      
                        } else
                            echo "ERROR VNC PROXY";
                }    
            }
    
?>  
    </body>
</html>



Tanks

Luiz Fernando M. Anversa
19 8117-9804
VilaClick Shopping Virtual




www.vilaclick.com.br





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20120713/88a6dd38/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 5836 bytes
Desc: not available
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20120713/88a6dd38/attachment.gif>


More information about the pve-devel mailing list